diff --git a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/chat/ChatBrowser.kt b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/chat/ChatBrowser.kt index 90cefb45215e..14f870f98ec5 100644 --- a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/chat/ChatBrowser.kt +++ b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/chat/ChatBrowser.kt @@ -224,6 +224,8 @@ class ChatBrowser(private val project: Project) : JBCefBrowser( val filepathInWorkspace = filepath as FilepathInWorkspace filepathInWorkspace.baseDir.let { project.findVirtualFile(it.appendUrlPathSegments(filepathInWorkspace.filepath)) + } ?: project.guessProjectDir()?.url?.let { + project.findVirtualFile(it.appendUrlPathSegments(filepathInWorkspace.filepath)) } }