From 5181b6d9f286a0fa3bf1ea58f16c55b63fd86ce2 Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Wed, 19 Feb 2025 13:52:36 +0800 Subject: [PATCH] fix(intellij): fix chat panel find file by workspace filepath. --- .../main/kotlin/com/tabbyml/intellijtabby/chat/ChatBrowser.kt | 2 ++ 1 file changed, 2 insertions(+) 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)) } }