Skip to content

Commit 0c21c9a

Browse files
committed
Add warning notifications when no files are selected for search operations
- when searching in selected files and nothing is selected, display appropariate notification └── apps └── editor └── src ├── commands │ └── search-files-commands │ ├── index.ts │ ├── search-files-commands.ts │ └── utils │ ├── get-target-folder-path.ts │ └── prompt-for-provided-results.ts ├── features │ └── search-files │ ├── index.ts │ ├── search-files.ts │ ├── search-modes │ │ ├── perform-agent-search-mode │ │ │ ├── agents │ │ │ │ ├── antigravity.ts │ │ │ │ ├── claude.ts │ │ │ │ ├── codex.ts │ │ │ │ ├── cursor.ts │ │ │ │ ├── grok.ts │ │ │ │ ├── muse.ts │ │ │ │ └── opencode.ts │ │ │ ├── index.ts │ │ │ ├── perform-agent-search-mode.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── perform-intelligent-search-mode.ts │ │ ├── perform-keywords-search-mode.ts │ │ └── perform-phrase-search-mode.ts │ └── utils │ ├── analyze-files.ts │ ├── check-matches-condition.ts │ ├── create-search-regex.ts │ ├── group-quick-pick-items.ts │ ├── handle-parent-folder-result.ts │ ├── map-files-to-quick-pick-items.ts │ ├── prompt-for-config.ts │ ├── prompt-for-intelligent-search-results.ts │ ├── prompt-for-keywords-match-mode.ts │ ├── prompt-for-keywords-target.ts │ ├── prompt-for-search-mode.ts │ ├── prompt-for-search-results.ts │ ├── prompt-for-search-term.ts │ ├── prompt-for-shrink-mode.ts │ ├── search-files-by-intelligent.ts │ ├── search-files-by-keywords.ts │ ├── search-files-by-phrase.ts │ └── show-search-results-quick-pick.ts └── i18n └── translations ├── commands │ └── search-files.ts └── features └── search-files.ts
1 parent 2a7e6e5 commit 0c21c9a

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

‎apps/editor/src/commands/search-files-commands/search-files-commands.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ export const search_files_commands = (
269269
try {
270270
const currently_checked = workspace_provider.get_checked_files()
271271
if (currently_checked.length === 0) {
272+
vscode.window.showWarningMessage(
273+
t('feature.search-files.warning.no-files-selected' as any)
274+
)
272275
return
273276
}
274277

@@ -283,6 +286,9 @@ export const search_files_commands = (
283286
}
284287

285288
if (files_to_search.length === 0) {
289+
vscode.window.showWarningMessage(
290+
t('feature.search-files.warning.no-files-selected-in-folder' as any)
291+
)
286292
return
287293
}
288294

‎apps/editor/src/i18n/translations/features/search-files.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,5 +1294,41 @@ export const translations = {
12941294
cs: 'Hledání již probíhá.',
12951295
hu: 'A keresés már folyamatban van.',
12961296
bg: 'Търсенето вече е в ход.'
1297+
},
1298+
'feature.search-files.warning.no-files-selected': {
1299+
en: 'No files selected to search in.',
1300+
pl: 'Nie wybrano plików do wyszukiwania.',
1301+
'zh-cn': '未选择要搜索的文件。',
1302+
ja: '検索するファイルが選択されていません。',
1303+
'zh-tw': '未選擇要搜尋的檔案。',
1304+
de: 'Keine Dateien für die Suche ausgewählt.',
1305+
es: 'No se han seleccionado archivos para buscar.',
1306+
fr: 'Aucun fichier sélectionné pour la recherche.',
1307+
'pt-br': 'Nenhum arquivo selecionado para pesquisa.',
1308+
ru: 'Не выбраны файлы для поиска.',
1309+
ko: '검색할 파일이 선택되지 않았습니다.',
1310+
it: 'Nessun file selezionato per la ricerca.',
1311+
tr: 'Aramak için dosya seçilmedi.',
1312+
cs: 'Nebyly vybrány žádné soubory k prohledání.',
1313+
hu: 'Nincsenek keresendő fájlok kiválasztva.',
1314+
bg: 'Няма избрани файлове за търсене.'
1315+
},
1316+
'feature.search-files.warning.no-files-selected-in-folder': {
1317+
en: 'No selected files found in this folder.',
1318+
pl: 'Nie znaleziono wybranych plików w tym folderze.',
1319+
'zh-cn': '在此文件夹中未找到选定的文件。',
1320+
ja: 'このフォルダに選択されたファイルは見つかりませんでした。',
1321+
'zh-tw': '在此資料夾中未找到選定的檔案。',
1322+
de: 'Keine ausgewählten Dateien in diesem Ordner gefunden.',
1323+
es: 'No se encontraron archivos seleccionados en esta carpeta.',
1324+
fr: 'Aucun fichier sélectionné trouvé dans ce dossier.',
1325+
'pt-br': 'Nenhum arquivo selecionado encontrado nesta pasta.',
1326+
ru: 'В этой папке не найдено выбранных файлов.',
1327+
ko: '이 폴더에서 선택된 파일을 찾을 수 없습니다.',
1328+
it: 'Nessun file selezionato trovato in questa cartella.',
1329+
tr: 'Bu klasörde seçili dosya bulunamadı.',
1330+
cs: 'V této složce nebyly nalezeny žádné vybrané soubory.',
1331+
hu: 'Ebben a mappában nem találhatók kiválasztott fájlok.',
1332+
bg: 'В тази папка не са намерени избрани файлове.'
12971333
}
12981334
} as const

0 commit comments

Comments
 (0)