Skip to content

Commit 7d00648

Browse files
committed
Implement the selectReferencingFiles command to support finding and selecting referencing files for active files and directories via symbol analysis
- implement command 'select referencing files' that is placed on folders below 'select imported files'. The command should work similarly to `apps/editor/src/commands/select-referencing-files-command.ts` but, because it is invoked on folders, should scan all symbols within the folder. - the 'check referencing files' on a directory is too broad, should only work for top-level symbols like functions, types, etc. - 'select referencing files' should have suffix '...' - when 'select referencing files' are shown on directory, move it below 'select imported files'
1 parent d818874 commit 7d00648

18 files changed

Lines changed: 222 additions & 59 deletions

‎apps/editor/package.json‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,23 +754,28 @@
754754
},
755755
{
756756
"command": "codeWebChat.selectImportedFiles",
757-
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == file || viewItem == contextFile || viewItem == directory)",
757+
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == file || viewItem == contextFile || viewItem == directory || viewItem == contextDirectory || viewItem == workspaceRoot || viewItem == contextWorkspaceRoot)",
758758
"group": "1_modification@4"
759759
},
760+
{
761+
"command": "codeWebChat.selectReferencingFiles",
762+
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == directory || viewItem == contextDirectory || viewItem == workspaceRoot || viewItem == contextWorkspaceRoot)",
763+
"group": "1_modification@5"
764+
},
760765
{
761766
"command": "codeWebChat.searchFilesForContextFromDirectory",
762767
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == directory || viewItem == workspaceRoot || viewItem == contextDirectory || viewItem == contextWorkspaceRoot)",
763-
"group": "1_modification@5"
768+
"group": "1_modification@6"
764769
},
765770
{
766771
"command": "codeWebChat.findRelevantFiles",
767772
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == directory || viewItem == workspaceRoot || viewItem == contextDirectory || viewItem == contextWorkspaceRoot)",
768-
"group": "1_modification@6"
773+
"group": "1_modification@7"
769774
},
770775
{
771776
"command": "codeWebChat.setRanges",
772777
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && viewItem == file",
773-
"group": "1_modification@7"
778+
"group": "1_modification@8"
774779
},
775780
{
776781
"command": "codeWebChat.findInFolder",

‎apps/editor/package.nls.bg.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Търси файлове за контекста...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Търси файлове за контекста...",
4545
"codeWebChat.findRelevantFiles.title": "Намери подходящи файлове...",
46-
"codeWebChat.selectReferencingFiles.title": "Избери рефериращите файлове",
46+
"codeWebChat.selectReferencingFiles.title": "Избери рефериращите файлове...",
4747
"codeWebChat.selectDefinitionFile.title": "Изберете файл с дефиниция",
4848
"codeWebChat.openInIntegratedTerminal.title": "Отвори във вградения терминал",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Премахни папката от работното пространство",

‎apps/editor/package.nls.cs.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Hledat soubory pro kontext...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Hledat soubory pro kontext...",
4545
"codeWebChat.findRelevantFiles.title": "Najít relevantní soubory...",
46-
"codeWebChat.selectReferencingFiles.title": "Vybrat odkazující soubory",
46+
"codeWebChat.selectReferencingFiles.title": "Vybrat odkazující soubory...",
4747
"codeWebChat.selectDefinitionFile.title": "Vybrat soubor definice",
4848
"codeWebChat.openInIntegratedTerminal.title": "Otevřít v integrovaném terminálu",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Odebrat složku z pracovního prostoru",

‎apps/editor/package.nls.de.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Dateien für Kontext suchen...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Dateien für Kontext suchen...",
4545
"codeWebChat.findRelevantFiles.title": "Relevante Dateien finden...",
46-
"codeWebChat.selectReferencingFiles.title": "Referenzierende Dateien auswählen",
46+
"codeWebChat.selectReferencingFiles.title": "Referenzierende Dateien auswählen...",
4747
"codeWebChat.selectDefinitionFile.title": "Definitionsdatei auswählen",
4848
"codeWebChat.openInIntegratedTerminal.title": "In integriertem Terminal öffnen",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Ordner aus Arbeitsbereich entfernen",

‎apps/editor/package.nls.es.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Buscar archivos para el contexto...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Buscar archivos para el contexto...",
4545
"codeWebChat.findRelevantFiles.title": "Encontrar archivos relevantes...",
46-
"codeWebChat.selectReferencingFiles.title": "Seleccionar archivos que referencian",
46+
"codeWebChat.selectReferencingFiles.title": "Seleccionar archivos que referencian...",
4747
"codeWebChat.selectDefinitionFile.title": "Seleccionar archivo de definición",
4848
"codeWebChat.openInIntegratedTerminal.title": "Abrir en terminal integrado",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Eliminar carpeta del espacio de trabajo",

‎apps/editor/package.nls.fr.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Rechercher des fichiers pour le contexte...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Rechercher des fichiers pour le contexte...",
4545
"codeWebChat.findRelevantFiles.title": "Trouver des fichiers pertinents...",
46-
"codeWebChat.selectReferencingFiles.title": "Sélectionner les fichiers de référence",
46+
"codeWebChat.selectReferencingFiles.title": "Sélectionner les fichiers de référence...",
4747
"codeWebChat.selectDefinitionFile.title": "Sélectionner le fichier de définition",
4848
"codeWebChat.openInIntegratedTerminal.title": "Ouvrir dans le terminal intégré",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Retirer le dossier de l'espace de travail",

‎apps/editor/package.nls.hu.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Fájlok keresése a kontextushoz...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Fájlok keresése a kontextushoz...",
4545
"codeWebChat.findRelevantFiles.title": "Releváns fájlok keresése...",
46-
"codeWebChat.selectReferencingFiles.title": "Hivatkozó fájlok kiválasztása",
46+
"codeWebChat.selectReferencingFiles.title": "Hivatkozó fájlok kiválasztása...",
4747
"codeWebChat.selectDefinitionFile.title": "Definíciós fájl kiválasztása",
4848
"codeWebChat.openInIntegratedTerminal.title": "Megnyitás az integrált terminálban",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Mappa eltávolítása a munkaterületről",

‎apps/editor/package.nls.it.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Cerca file per il contesto...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Cerca file per il contesto...",
4545
"codeWebChat.findRelevantFiles.title": "Trova file rilevanti...",
46-
"codeWebChat.selectReferencingFiles.title": "Seleziona i file di riferimento",
46+
"codeWebChat.selectReferencingFiles.title": "Seleziona i file di riferimento...",
4747
"codeWebChat.selectDefinitionFile.title": "Seleziona file di definizione",
4848
"codeWebChat.openInIntegratedTerminal.title": "Apri nel terminale integrato",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Rimuovi cartella dall'area di lavoro",

‎apps/editor/package.nls.ja.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "コンテキストのファイルを検索...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "コンテキストのファイルを検索...",
4545
"codeWebChat.findRelevantFiles.title": "関連するファイルを検索...",
46-
"codeWebChat.selectReferencingFiles.title": "参照しているファイルを選択",
46+
"codeWebChat.selectReferencingFiles.title": "参照しているファイルを選択...",
4747
"codeWebChat.selectDefinitionFile.title": "定義ファイルを選択",
4848
"codeWebChat.openInIntegratedTerminal.title": "統合ターミナルで開く",
4949
"codeWebChat.removeFolderFromWorkspace.title": "ワークスペースからフォルダーを削除",

‎apps/editor/package.nls.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"codeWebChat.searchFilesForContext.title": "Search Files for Context...",
4444
"codeWebChat.searchFilesForContextFromDirectory.title": "Search Files for Context...",
4545
"codeWebChat.findRelevantFiles.title": "Find Relevant Files...",
46-
"codeWebChat.selectReferencingFiles.title": "Select Referencing Files",
46+
"codeWebChat.selectReferencingFiles.title": "Select Referencing Files...",
4747
"codeWebChat.selectDefinitionFile.title": "Select Definition File",
4848
"codeWebChat.openInIntegratedTerminal.title": "Open in Integrated Terminal",
4949
"codeWebChat.removeFolderFromWorkspace.title": "Remove Folder from Workspace",

0 commit comments

Comments
 (0)