Skip to content

Commit 52fefe8

Browse files
committed
Extract agentic search translations into a dedicated module and update code references
- assess if agentic search properly uses translation keys (a separate agentic search.ts file) └── apps └── editor └── src ├── commands │ ├── agentic-search-command │ │ ├── agentic-search-command.ts │ │ ├── agentic-search.ts │ │ ├── agents │ │ │ ├── antigravity.ts │ │ │ ├── claude.ts │ │ │ ├── codex.ts │ │ │ ├── cursor.ts │ │ │ ├── grok.ts │ │ │ ├── muse.ts │ │ │ └── opencode.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── utils.ts │ └── 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-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 ├── agentic-search.ts ├── index.ts └── search-files.ts
1 parent d6f1791 commit 52fefe8

4 files changed

Lines changed: 371 additions & 25 deletions

File tree

‎apps/editor/src/commands/agentic-search-command/agentic-search-command.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const agentic_search_command = (
1515
async () => {
1616
if (agentic_search_in_progress) {
1717
vscode.window.showInformationMessage(
18-
t('feature.search-files.info.search-in-progress')
18+
t('command.agentic-search.info.search-in-progress')
1919
)
2020
return
2121
}

‎apps/editor/src/commands/agentic-search-command/agentic-search.ts‎

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -110,26 +110,26 @@ export const agentic_search = async (params: {
110110

111111
if (available_agents.length == 0) {
112112
vscode.window.showInformationMessage(
113-
t('feature.search-files.agent.no-agents')
113+
t('command.agentic-search.info.no-agents')
114114
)
115115
return undefined
116116
}
117117

118118
const add_button = {
119119
iconPath: new vscode.ThemeIcon('flag'),
120-
tooltip: t('feature.search-files.agent.add-flags')
120+
tooltip: t('command.agentic-search.agent.add-flags')
121121
}
122122
const edit_button = {
123123
iconPath: new vscode.ThemeIcon('edit'),
124-
tooltip: t('feature.search-files.agent.edit-flags')
124+
tooltip: t('command.agentic-search.agent.edit-flags')
125125
}
126126
const delete_button = {
127127
iconPath: new vscode.ThemeIcon('trash'),
128-
tooltip: t('feature.search-files.agent.delete-flags')
128+
tooltip: t('command.agentic-search.agent.delete-flags')
129129
}
130130
const doc_button = {
131131
iconPath: new vscode.ThemeIcon('question'),
132-
tooltip: t('feature.search-files.agent.learn-more')
132+
tooltip: t('command.agentic-search.agent.learn-more')
133133
}
134134

135135
type AgentPickItem = vscode.QuickPickItem & {
@@ -202,9 +202,9 @@ export const agentic_search = async (params: {
202202
}
203203
}
204204

205-
agent_quick_pick.title = t('feature.search-files.agent.select-agent')
205+
agent_quick_pick.title = t('command.agentic-search.agent.select-agent')
206206
agent_quick_pick.placeholder = t(
207-
'feature.search-files.agent.select-agent-placeholder'
207+
'command.agentic-search.agent.select-agent-placeholder'
208208
)
209209
agent_quick_pick.buttons = [vscode.QuickInputButtons.Back, close_button]
210210
agent_quick_pick.ignoreFocusOut = true
@@ -281,7 +281,7 @@ export const agentic_search = async (params: {
281281
const undo_action = t('common.undo')
282282
vscode.window
283283
.showInformationMessage(
284-
t('feature.search-files.agent.deleted'),
284+
t('command.agentic-search.agent.deleted'),
285285
undo_action
286286
)
287287
.then((choice) => {
@@ -344,9 +344,9 @@ export const agentic_search = async (params: {
344344
if (agent_selection_result.action === 'add') {
345345
const { configKey } = agent_selection_result
346346
const new_flags = await vscode.window.showInputBox({
347-
title: t('feature.search-files.agent.add-flags'),
348-
prompt: t('feature.search-files.agent.edit-flags-prompt'),
349-
placeHolder: t('feature.search-files.agent.edit-flags-placeholder'),
347+
title: t('command.agentic-search.agent.add-flags'),
348+
prompt: t('command.agentic-search.agent.edit-flags-prompt'),
349+
placeHolder: t('command.agentic-search.agent.edit-flags-placeholder'),
350350
value: '',
351351
ignoreFocusOut: true
352352
})
@@ -367,9 +367,9 @@ export const agentic_search = async (params: {
367367
if (agent_selection_result.action === 'edit') {
368368
const { configKey, index, value } = agent_selection_result
369369
const new_flags = await vscode.window.showInputBox({
370-
title: t('feature.search-files.agent.edit-flags'),
371-
prompt: t('feature.search-files.agent.edit-flags-prompt'),
372-
placeHolder: t('feature.search-files.agent.edit-flags-placeholder'),
370+
title: t('command.agentic-search.agent.edit-flags'),
371+
prompt: t('command.agentic-search.agent.edit-flags-prompt'),
372+
placeHolder: t('command.agentic-search.agent.edit-flags-placeholder'),
373373
value: value,
374374
ignoreFocusOut: true
375375
})
@@ -429,9 +429,9 @@ export const agentic_search = async (params: {
429429
if (active_item) {
430430
quick_pick.activeItems = [active_item]
431431
}
432-
quick_pick.title = t('feature.search-files.agent.select-workspace')
432+
quick_pick.title = t('command.agentic-search.agent.select-workspace')
433433
quick_pick.placeholder = t(
434-
'feature.search-files.agent.select-workspace-placeholder'
434+
'command.agentic-search.agent.select-workspace-placeholder'
435435
)
436436
quick_pick.buttons = [vscode.QuickInputButtons.Back, close_button]
437437
quick_pick.ignoreFocusOut = true
@@ -518,12 +518,12 @@ export const agentic_search = async (params: {
518518
await vscode.window.withProgress(
519519
{
520520
location: vscode.ProgressLocation.Notification,
521-
title: t('feature.search-files.title.agent'),
521+
title: t('command.agentic-search.title'),
522522
cancellable: true
523523
},
524524
async (progress, token) => {
525525
progress.report({
526-
message: t('feature.search-files.agent.waiting-for-agent')
526+
message: t('command.agentic-search.agent.waiting-for-agent')
527527
})
528528

529529
return new Promise<void>((resolve, reject) => {
@@ -610,7 +610,7 @@ export const agentic_search = async (params: {
610610
)
611611
} catch (err) {
612612
vscode.window.showErrorMessage(
613-
t('feature.search-files.failed', { error: String(err) })
613+
t('command.agentic-search.error.failed', { error: String(err) })
614614
)
615615
go_back_to_query = true
616616
break
@@ -623,12 +623,12 @@ export const agentic_search = async (params: {
623623

624624
const duration = format_duration(Date.now() - start_time)
625625
vscode.window.showInformationMessage(
626-
t('feature.search-files.agent.finished', { duration })
626+
t('command.agentic-search.agent.finished', { duration })
627627
)
628628

629629
if (agent_output.trim() == '') {
630630
vscode.window.showInformationMessage(
631-
t('feature.search-files.no-files')
631+
t('command.agentic-search.info.no-files')
632632
)
633633
go_back_to_query = true
634634
break
@@ -661,7 +661,7 @@ export const agentic_search = async (params: {
661661

662662
if (absolute_paths.length === 0) {
663663
vscode.window.showInformationMessage(
664-
t('feature.search-files.no-files')
664+
t('command.agentic-search.info.no-files')
665665
)
666666
go_back_to_query = true
667667
break
@@ -681,7 +681,7 @@ export const agentic_search = async (params: {
681681
matched_items: absolute_paths.map((path) => ({ path })),
682682
unmatched_checked_paths: [],
683683
workspace_provider: params.workspace_provider,
684-
title: t('feature.search-files.results'),
684+
title: t('command.agentic-search.results'),
685685
show_back_button: true,
686686
hide_search_in_results_button: true
687687
})) as any

0 commit comments

Comments
 (0)