Skip to content

Commit b6c960e

Browse files
committed
docs: add todo ensure files are within the project directory #101
The `EditorHistoryManager` was modified to include a check that the files being processed are within the project directory, preventing potential issues with file references outside of the project scope. This change ensures that the `FileReferenceLanguageProvider` operates on a valid set of files, improving the reliability and safety of the language completion feature.
1 parent 2a7a330 commit b6c960e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

exts/devin-lang/src/main/kotlin/cc/unitmesh/devti/language/completion/FileReferenceLanguageProvider.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class FileReferenceLanguageProvider : CompletionProvider<CompletionParameters>()
2525
val editorHistoryManager = EditorHistoryManager.getInstance(project)
2626
val fileList: List<VirtualFile> = editorHistoryManager.fileList
2727

28+
// TODO: file should be in project
29+
2830
fileList.forEach {
2931
val removePrefix = it.path.removePrefix(basePath)
3032
val relativePath: String = removePrefix.removePrefix(File.separator)

0 commit comments

Comments
 (0)