Skip to content

Commit bcae8db

Browse files
committed
Remove redundant translation type casts and update unselected files notification to warning
- remove "as any" in t() invocations, e.g. [Fragment] ├── apps │ ├── browser │ │ └── webpack.config.ts │ └── editor │ └── src │ ├── commands │ │ ├── apply-response-command │ │ │ ├── apply-response-command.ts │ │ │ ├── response-processor │ │ │ │ └── handlers │ │ │ │ ├── diff-handler.ts │ │ │ │ └── restore-preview-handler.ts │ │ │ └── utils │ │ │ └── file-operations │ │ │ ├── close-file-tabs.ts │ │ │ └── undo-files.ts │ │ ├── history-command │ │ │ └── history-command.ts │ │ ├── restore-context-command │ │ │ └── actions │ │ │ └── restore-from-workspace-state.ts │ │ ├── search-files-commands │ │ │ └── utils │ │ │ └── prompt-for-provided-results.ts │ │ ├── select-clipboard-paths-command.ts │ │ ├── select-imported-files-commands │ │ │ └── utils │ │ │ └── prompt-for-imported-files.ts │ │ ├── select-modified-files-command.ts │ │ └── select-referencing-files-commands │ │ └── utils │ │ └── prompt-for-referencing-files.ts │ ├── context │ │ └── providers │ │ └── workspace │ │ └── workspace-provider.ts │ ├── features │ │ ├── checkpoints │ │ │ └── utils │ │ │ └── git-utils.ts │ │ ├── context-restoration │ │ │ └── utils │ │ │ └── context-file-utils.ts │ │ └── search-files │ │ ├── search-files.ts │ │ └── utils │ │ ├── prompt-for-intelligent-search-results.ts │ │ ├── prompt-for-search-results.ts │ │ └── show-search-results-quick-pick.ts │ ├── services │ │ ├── providers-manager.ts │ │ └── websocket-server-process.ts │ └── views │ ├── prompt │ │ ├── backend │ │ │ ├── message-handlers │ │ │ │ ├── handle-at-sign-quick-pick.ts │ │ │ │ ├── handle-open-website.ts │ │ │ │ └── handle-save-instructions.ts │ │ │ ├── prompt-view-provider.ts │ │ │ └── utils │ │ │ └── website-fetcher.ts │ │ └── frontend │ │ ├── Main │ │ │ └── Main.tsx │ │ ├── Prompt.tsx │ │ └── hooks │ │ ├── use-cli-configuration-editing.ts │ │ ├── use-prompt │ │ │ ├── hooks │ │ │ │ └── use-instructions.ts │ │ │ └── use-prompt.ts │ │ └── use-web-configuration-editing.ts │ ├── settings │ │ ├── backend │ │ │ ├── message-handlers │ │ │ │ ├── handle-pick-api-model.ts │ │ │ │ └── handle-pick-provider.ts │ │ │ └── settings-view-provider.ts │ │ └── frontend │ │ └── hooks │ │ ├── use-cli-configuration-editing.ts │ │ └── use-web-configuration-editing.ts │ └── shared │ └── actions │ ├── api │ │ ├── create │ │ │ └── interactions │ │ │ └── verify-reasoning-effort.ts │ │ ├── pick-reasoning-effort.ts │ │ └── update │ │ └── update.ts │ └── web │ └── pick-model.ts └── packages ├── shared │ └── src │ └── hooks │ └── use-is-mac.ts └── ui └── src └── components └── editor ├── common │ ├── Tooltip │ │ ├── Tooltip.module.scss │ │ ├── Tooltip.tsx │ │ └── index.ts │ └── prompts │ └── PromptField │ ├── PromptField.tsx │ └── components │ ├── Footer │ │ └── Footer.tsx │ └── Tabs │ └── Tabs.tsx └── prompt-view └── Tasks └── Tasks.tsx
1 parent b0b7d6a commit bcae8db

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎apps/editor/src/commands/history-command/history-command.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ export const history_command = (params: {
138138
})
139139

140140
const map_checkpoint_to_item = (c: Checkpoint) => {
141-
const label_text = t(
142-
`command.history-command.trigger.${c.trigger}` as any
143-
)
141+
const label_text = t(`command.history-command.trigger.${c.trigger}`)
144142
return {
145143
id: c.timestamp.toString(),
146144
label: label_text,

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ export const search_files_commands = (
265265
try {
266266
const currently_selected = workspace_provider.get_selected_files()
267267
if (currently_selected.length === 0) {
268-
vscode.window.showInformationMessage(
269-
t('common.warning.no-files-selected')
270-
)
268+
vscode.window.showWarningMessage(t('common.warning.no-files-selected'))
271269
return
272270
}
273271

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export const search_files = async (params: {
108108
params.workspace_provider.get_selected_files()
109109

110110
if (currently_selected.length === 0) {
111-
vscode.window.showInformationMessage(
112-
t('common.warning.no-files-selected' as any)
111+
vscode.window.showWarningMessage(
112+
t('common.warning.no-files-selected')
113113
)
114114
continue
115115
}
@@ -124,7 +124,7 @@ export const search_files = async (params: {
124124

125125
if (files_to_search.length === 0) {
126126
vscode.window.showInformationMessage(
127-
t('feature.search-files.info.no-files-selected-in-folder' as any)
127+
t('feature.search-files.info.no-files-selected-in-folder')
128128
)
129129
continue
130130
}

0 commit comments

Comments
 (0)