Skip to content

Commit 7278b91

Browse files
committed
Refactor settings UI to implement grouped navigation and add placeholder to search mode prompt
- 'seach mode' quick pick should have appropriate placeholder - instead of 'search for files...' in descriptions, use 'select files...' - add missing translations to `apps/editor/src/i18n/translations/commands/search-files.ts` - move 'commit message instructions' to 'commit messages' subsection (in preferences) - 'commit message instructions' should be collapsible - categorize expand/collapse translations in 'common' - assess if translations are correctly categorized - move 'edit files system instructions' to 'miscellaneous' - when scrolled to sub-section, the parent menu item should keep being highlighted - navigation item should accept prop 'has active child' that is used when a child is active - 'edit files system instructions' should appear below 'auto run intelligent update' - 'edit files system instructions' -> quote 'edit files' in both title and desc - place 'open editor settings' 'ignore patterns' 'allow patterns' 'code at cursor shortcuts' in Preferences> 'Open...' submenu - rename 'Preferences' to 'General' (with translations) - move 'auto run intelligent update' and 'edit files system instructions' in API Calls > Miscellaneous - group should accept prop 'is last' if is last, it should set padding bottom to formula: 100vh minus its height - use SECTION_HEADER_HEIGHT - use GROUP_TITLE_HEIGHT - scrolling to anchors which is invalid, stops about 10 pixels too early - detach navigation item component into two: 'navigation item section' and 'navigation item group'. - the `packages/ui/src/components/editor/settings/NavigationItemSection/NavigationItemSection.tsx` should not be clickable, as we only want users to navigate directly to groups. We like how section gets highlighted as soon it's visible though. - in `packages/ui/src/components/editor/settings/NavigationItemSection/NavigationItemSection.tsx` merge is_active and has_active_child under a single is_active - when parent is active of `packages/ui/src/components/editor/settings/NavigationItemGroup/NavigationItemGroup.tsx`, labels should not be dimmed - section's title should use this color: var(--vscode-textLink-foreground); - `packages/ui/src/components/editor/settings/NavigationItemSection/NavigationItemSection.tsx` should use this color: var(--vscode-textLink-foreground); - move 'reuse last tab' to chatbots>Miscellanous - in chatbots, place Miscellanous below configurations - change nav items opacity with transition-duration-250 - rename Miscellaneous to Misc - rename 'misc' to 'other' - don't use 'is nested' instead use group/section prefixes - move the 'credentials are stored securely...' above the group, right below the section - group should not accept notices - rename chatbots > 'Other' to 'Behavior' - some translations are in wrong files, e.g. 'behavior' - rename api calls > other to behavior - place 'edit files system instructions' in a separate group 'system instructions' - rename 'edit files system instructions' to 'edit files' - rename General>'other' to 'behavior' - move General>'behavior' to be below 'Open...' - rename 'general'>behavior to 'context' - make sure nav item identifiers follow clear structure where section is clearly stated
1 parent 414b842 commit 7278b91

27 files changed

Lines changed: 990 additions & 715 deletions

File tree

‎apps/editor/src/commands/search-files-command/utils/prompt-for-search-mode.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const prompt_for_search_mode = async (
3737
quick_pick.items = items
3838
quick_pick.activeItems = [active_item]
3939
quick_pick.title = t('command.search.mode.title')
40+
quick_pick.placeholder = t('command.search.mode.placeholder')
4041
quick_pick.ignoreFocusOut = false
4142
quick_pick.buttons = [close_button]
4243

‎apps/editor/src/constants/instructions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const commit_message_instructions =
2929
"Write a brief and precise summary for the changes, limited to a single sentence. Because the summary will be used for a commit message, don't use any markdown formatting and don't include a trailing dot. Use an imperative tone to ensure clarity and focus on the primary change or purpose."
3030

3131
export const find_relevant_files_instructions =
32-
"Find all files building modules of the following task's scope:"
32+
'Find a complete set of relevant files according to the following query:'
3333

3434
export const find_relevant_files_format = `<system>
3535
Your response must contain paths of relevant files enclosed in "relevant-files" and "file-path" XML tags. Don't send anything else. Example:

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

Lines changed: 66 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,24 @@ export const search_files = {
251251
hu: 'Keresési mód',
252252
bg: 'Режим на търсене'
253253
},
254+
'command.search.mode.placeholder': {
255+
en: 'Select search mode',
256+
pl: 'Wybierz tryb wyszukiwania',
257+
'zh-cn': '选择搜索模式',
258+
ja: '検索モードを選択',
259+
'zh-tw': '選擇搜尋模式',
260+
de: 'Suchmodus auswählen',
261+
es: 'Seleccionar modo de búsqueda',
262+
fr: 'Sélectionner le mode de recherche',
263+
'pt-br': 'Selecionar modo de pesquisa',
264+
ru: 'Выберите режим поиска',
265+
ko: '검색 모드 선택',
266+
it: 'Seleziona modalità di ricerca',
267+
tr: 'Arama modunu seç',
268+
cs: 'Vyberte režim hledání',
269+
hu: 'Válasszon keresési módot',
270+
bg: 'Изберете режим на търсене'
271+
},
254272
'command.search.mode.phrase': {
255273
en: 'Phrase',
256274
pl: 'Fraza',
@@ -270,22 +288,22 @@ export const search_files = {
270288
bg: 'Фраза'
271289
},
272290
'command.search.mode.phrase-description': {
273-
en: 'Search for files containing the exact phrase',
274-
pl: 'Szukaj plików zawierających dokładną frazę',
275-
'zh-cn': '搜索包含精确短语的文件',
276-
ja: '完全なフレーズを含むファイルを検索',
277-
'zh-tw': '搜尋包含精確短語的檔案',
278-
de: 'Nach Dateien suchen, die die genaue Phrase enthalten',
279-
es: 'Buscar archivos que contengan la frase exacta',
280-
fr: 'Rechercher des fichiers contenant la phrase exacte',
281-
'pt-br': 'Buscar arquivos que contenham a frase exata',
282-
ru: 'Поиск файлов, содержащих точную фразу',
283-
ko: '정확한 구문을 포함하는 파일 검색',
284-
it: 'Cerca file che contengono la frase esatta',
285-
tr: 'Tam ifadeyi içeren dosyaları arayın',
286-
cs: 'Hledat soubory obsahující přesnou frázi',
287-
hu: 'A pontos kifejezést tartalmazó fájlok keresése',
288-
bg: 'Търсене на файлове, съдържащи точната фраза'
291+
en: 'Select files containing the exact phrase',
292+
pl: 'Wybierz pliki zawierające dokładną frazę',
293+
'zh-cn': '选择包含确切短语的文件',
294+
ja: '完全なフレーズを含むファイルを選択',
295+
'zh-tw': '選擇包含確切短語的檔案',
296+
de: 'Dateien auswählen, die genau diese Phrase enthalten',
297+
es: 'Seleccionar archivos que contengan la frase exacta',
298+
fr: 'Sélectionner des fichiers contenant la phrase exacte',
299+
'pt-br': 'Selecione arquivos que contenham a frase exata',
300+
ru: 'Выберите файлы, содержащие точную фразу',
301+
ko: '정확한 구문을 포함하는 파일 선택',
302+
it: 'Seleziona file che contengono la frase esatta',
303+
tr: 'Tam ifadeyi içeren dosyaları seçin',
304+
cs: 'Vyberte soubory obsahující přesnou frázi',
305+
hu: 'Pontos kifejezést tartalmazó fájlok kiválasztása',
306+
bg: 'Изберете файлове, съдържащи точната фраза'
289307
},
290308
'command.search.mode.keywords': {
291309
en: 'Keywords',
@@ -306,23 +324,23 @@ export const search_files = {
306324
bg: 'Ключови думи'
307325
},
308326
'command.search.mode.keywords-description': {
309-
en: 'Search for files containing all comma-separated keywords',
310-
pl: 'Szukaj plików zawierających wszystkie słowa kluczowe oddzielone przecinkami',
311-
'zh-cn': '搜索包含所有逗号分隔关键字的文件',
312-
ja: 'カンマ区切りのすべてのキーワードを含むファイルを検索',
313-
'zh-tw': '搜尋包含所有逗號分隔關鍵字的檔案',
314-
de: 'Nach Dateien suchen, die alle kommagetrennten Schlüsselwörter enthalten',
315-
es: 'Buscar archivos que contengan todas las palabras clave separadas por comas',
316-
fr: 'Rechercher des fichiers contenant tous les mots-clés séparés par des virgules',
327+
en: 'Select files containing all comma-separated keywords',
328+
pl: 'Wybierz pliki zawierające wszystkie słowa kluczowe oddzielone przecinkami',
329+
'zh-cn': '选择包含所有逗号分隔关键字的文件',
330+
ja: 'カンマ区切りのすべてのキーワードを含むファイルを選択',
331+
'zh-tw': '選擇包含所有逗號分隔關鍵字的檔案',
332+
de: 'Dateien auswählen, die alle kommagetrennten Schlüsselwörter enthalten',
333+
es: 'Seleccionar archivos que contengan todas las palabras clave separadas por comas',
334+
fr: 'Sélectionner des fichiers contenant tous les mots-clés séparés par des virgules',
317335
'pt-br':
318-
'Buscar arquivos que contenham todas as palavras-chave separadas por vírgulas',
319-
ru: 'Поиск файлов, содержащих все ключевые слова через запятую',
320-
ko: '쉼표로 구분된 모든 키워드를 포함하는 파일 검색',
321-
it: 'Cerca file che contengono tutte le parole chiave separate da virgola',
322-
tr: 'Virgülle ayrılmış tüm anahtar kelimeleri içeren dosyaları arayın',
323-
cs: 'Hledat soubory obsahující všechna klíčová slova oddělená čárkou',
324-
hu: 'Minden vesszővel elválasztott kulcsszót tartalmazó fájlok keresése',
325-
bg: 'Търсене на файлове, съдържащи всички ключови думи, разделени със запетая'
336+
'Selecione arquivos que contenham todas as palavras-chave separadas por vírgulas',
337+
ru: 'Выберите файлы, содержащие все ключевые слова, разделенные запятыми',
338+
ko: '쉼표로 구분된 모든 키워드를 포함하는 파일 선택',
339+
it: 'Seleziona i file contenenti tutte le parole chiave separate da virgole',
340+
tr: 'Virgülle ayrılmış tüm anahtar kelimeleri içeren dosyaları seçin',
341+
cs: 'Vyberte soubory obsahující všechna klíčová slova oddělená čárkou',
342+
hu: 'Minden vesszővel elválasztott kulcsszót tartalmazó fájl kiválasztása',
343+
bg: 'Изберете файлове, съдържащи всички ключови думи, разделени със запетая'
326344
},
327345
'command.search.prompt.keywords': {
328346
en: 'Enter comma-separated keywords.',
@@ -361,22 +379,22 @@ export const search_files = {
361379
bg: 'Интелигентен'
362380
},
363381
'command.search.mode.intelligent-description': {
364-
en: 'Search for files using natural language',
365-
pl: 'Szukaj plików za pomocą języka naturalnego',
366-
'zh-cn': '使用自然语言搜索文件',
367-
ja: '自然言語を使用してファイルを検索',
368-
'zh-tw': '使用自然語言搜尋檔案',
369-
de: 'Nach Dateien mit natürlicher Sprache suchen',
370-
es: 'Buscar archivos usando lenguaje natural',
371-
fr: 'Rechercher des fichiers en utilisant le langage naturel',
372-
'pt-br': 'Buscar arquivos usando linguagem natural',
373-
ru: 'Поиск файлов с использованием естественного языка',
374-
ko: '자연어를 사용하여 파일 검색',
375-
it: 'Cerca file utilizzando il linguaggio naturale',
376-
tr: 'Doğal dil kullanarak dosya arayın',
377-
cs: 'Hledat soubory pomocí přirozeného jazyka',
378-
hu: 'Fájlok keresése természetes nyelven',
379-
bg: 'Търсене на файлове с помощта на естествен език'
382+
en: 'Select files using natural language',
383+
pl: 'Wybierz pliki przy użyciu języka naturalnego',
384+
'zh-cn': '使用自然语言选择文件',
385+
ja: '自然言語を使用してファイルを選択',
386+
'zh-tw': '使用自然語言選擇檔案',
387+
de: 'Dateien mit natürlicher Sprache auswählen',
388+
es: 'Seleccionar archivos usando lenguaje natural',
389+
fr: 'Sélectionner des fichiers en utilisant le langage naturel',
390+
'pt-br': 'Selecione arquivos usando linguagem natural',
391+
ru: 'Выберите файлы, используя естественный язык',
392+
ko: '자연어를 사용하여 파일 선택',
393+
it: 'Seleziona i file utilizzando il linguaggio naturale',
394+
tr: 'Doğal dil kullanarak dosyaları seçin',
395+
cs: 'Vyberte soubory pomocí přirozeného jazyka',
396+
hu: 'Fájlok kiválasztása természetes nyelv használatával',
397+
bg: 'Изберете файлове, използвайки естествен език'
380398
},
381399
'command.search.prompt.intelligent': {
382400
en: 'Enter natural language search query.',

0 commit comments

Comments
 (0)