Skip to content

Commit 89608ae

Browse files
committed
fix: add binary check to AutoDevInputSection and VueRelatedClassProvider
1 parent 173fbe6 commit 89608ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/AutoDevInputSection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ class AutoDevInputSection(private val project: Project, val disposable: Disposab
397397
val focusableComponent: JComponent get() = input
398398

399399
private fun DefaultListModel<ModelWrapper>.addIfAbsent(vfile: VirtualFile, first: Boolean = false) {
400-
if (!vfile.isValid) return
400+
if (!vfile.isValid || vfile.fileType.isBinary) return
401401
if (!isInProject(vfile, project)) return
402402
if (vfile is DiffVirtualFileBase) return
403403

exts/ext-vue/src/233/main/kotlin/cc/unitmesh/vue/provider/VueRelatedClassProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class VueRelatedClassProvider : RelatedClassesProvider {
6363

6464
return localImports.mapNotNull {
6565
it.virtualFile?.let { file ->
66-
if (file.isValid || file.fileType.isBinary ) return@let null
66+
if (!file.isValid || file.fileType.isBinary ) return@let null
6767
PsiManager.getInstance(psiFile.project).findFile(file)
6868
}
6969
}

0 commit comments

Comments
 (0)