Skip to content

Commit fe484bc

Browse files
committed
Rename keyword search command to check all with keywords and update all related references
1 parent dd4b52a commit fe484bc

7 files changed

Lines changed: 24 additions & 21 deletions

File tree

‎packages/vscode/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@
304304
"category": "Code Web Chat"
305305
},
306306
{
307-
"command": "codeWebChat.keywordSearchInFolder",
308-
"title": "Keyword Search...",
307+
"command": "codeWebChat.checkAllWithKeywords",
308+
"title": "Check All with Keywords...",
309309
"category": "Code Web Chat"
310310
},
311311
{
@@ -394,7 +394,7 @@
394394
"when": "false"
395395
},
396396
{
397-
"command": "codeWebChat.keywordSearchInFolder",
397+
"command": "codeWebChat.checkAllWithKeywords",
398398
"when": "false"
399399
},
400400
{
@@ -583,7 +583,7 @@
583583
"group": "1_modification@3"
584584
},
585585
{
586-
"command": "codeWebChat.keywordSearchInFolder",
586+
"command": "codeWebChat.checkAllWithKeywords",
587587
"when": "(view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == directory || viewItem == workspaceRoot || viewItem == contextDirectory || viewItem == contextWorkspaceRoot)",
588588
"group": "1_modification@3.5"
589589
},

‎packages/vscode/src/commands/apply-context-command/apply-context-command.ts‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
handle_json_file_source,
1010
handle_workspace_state_source,
1111
handle_commit_files_source,
12-
handle_keyword_search_source
12+
handle_check_all_with_keywords_source
1313
} from './sources'
1414
import {
1515
load_all_contexts,
@@ -216,7 +216,7 @@ export const apply_context_command = (
216216
show_other_menu = false
217217

218218
const other_quick_pick_options: (vscode.QuickPickItem & {
219-
value?: 'unstaged' | 'commit_files' | 'keyword_search'
219+
value?: 'unstaged' | 'commit_files' | 'check_all_with_keywords'
220220
})[] = [
221221
{
222222
label: 'Unstaged files',
@@ -227,14 +227,14 @@ export const apply_context_command = (
227227
value: 'commit_files'
228228
},
229229
{
230-
label: 'Keyword search...',
231-
value: 'keyword_search'
230+
label: 'Check all with keywords...',
231+
value: 'check_all_with_keywords'
232232
}
233233
]
234234

235235
const other_quick_pick = vscode.window.createQuickPick<
236236
vscode.QuickPickItem & {
237-
value?: 'unstaged' | 'commit_files' | 'keyword_search'
237+
value?: 'unstaged' | 'commit_files' | 'check_all_with_keywords'
238238
}
239239
>()
240240
other_quick_pick.title = 'Context Sources'
@@ -254,7 +254,10 @@ export const apply_context_command = (
254254
const other_selection = await new Promise<
255255
| 'back'
256256
| (vscode.QuickPickItem & {
257-
value?: 'unstaged' | 'commit_files' | 'keyword_search'
257+
value?:
258+
| 'unstaged'
259+
| 'commit_files'
260+
| 'check_all_with_keywords'
258261
})
259262
| undefined
260263
>((resolve) => {
@@ -308,8 +311,8 @@ export const apply_context_command = (
308311
}
309312
return
310313
}
311-
if (other_selection.value == 'keyword_search') {
312-
const result = await handle_keyword_search_source(
314+
if (other_selection.value == 'check_all_with_keywords') {
315+
const result = await handle_check_all_with_keywords_source(
313316
workspace_provider,
314317
extension_context
315318
)

packages/vscode/src/commands/apply-context-command/sources/keyword-search-source.ts renamed to packages/vscode/src/commands/apply-context-command/sources/check-all-with-keywords-source.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { dictionary } from '@shared/constants/dictionary'
66
import { Logger } from '@shared/utils/logger'
77
import { LAST_CONTEXT_MERGE_REPLACE_OPTION_STATE_KEY } from '../../../constants/state-keys'
88

9-
export const handle_keyword_search_source = async (
9+
export const handle_check_all_with_keywords_source = async (
1010
workspace_provider: WorkspaceProvider,
1111
extension_context: vscode.ExtensionContext
1212
): Promise<'back' | void> => {
@@ -306,7 +306,7 @@ export const handle_keyword_search_source = async (
306306
`Search failed: ${error instanceof Error ? error.message : String(error)}`
307307
)
308308
Logger.error({
309-
function_name: 'handle_keyword_search_source',
309+
function_name: 'handle_check_all_with_keywords_source',
310310
message: 'Error searching keywords',
311311
data: error
312312
})

‎packages/vscode/src/commands/apply-context-command/sources/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export * from './json-file-source'
22
export * from './unstaged-files-source'
33
export * from './workspace-state-source'
44
export * from './commit-files-source'
5-
export * from './keyword-search-source'
5+
export * from './check-all-with-keywords-source'

packages/vscode/src/commands/keyword-search-in-folder.ts renamed to packages/vscode/src/commands/check-all-with-keywords.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { Logger } from '@shared/utils/logger'
66
import { LAST_CONTEXT_MERGE_REPLACE_OPTION_STATE_KEY } from '../constants/state-keys'
77
import { dictionary } from '@shared/constants/dictionary'
88

9-
export const keyword_search_in_folder_command = (
9+
export const check_all_with_keywords_command = (
1010
workspace_provider: WorkspaceProvider,
1111
extension_context: vscode.ExtensionContext
1212
) => {
1313
return vscode.commands.registerCommand(
14-
'codeWebChat.keywordSearchInFolder',
14+
'codeWebChat.checkAllWithKeywords',
1515
async (item: any) => {
1616
if (!item || !item.resourceUri) {
1717
return
@@ -297,7 +297,7 @@ export const keyword_search_in_folder_command = (
297297
}`
298298
)
299299
Logger.error({
300-
function_name: 'keyword_search_in_folder_command',
300+
function_name: 'check_all_with_keywords_command',
301301
message: 'Error searching keywords in folder',
302302
data: error
303303
})

‎packages/vscode/src/commands/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export * from './save-all-command'
1818
export * from './apply-context-command'
1919
export * from './set-range-command'
2020
export * from './check-parent-folder-command'
21-
export * from './keyword-search-in-folder'
21+
export * from './check-all-with-keywords'

‎packages/vscode/src/extension.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
generate_commit_message_command,
3131
set_range_command,
3232
check_parent_folder_command,
33-
keyword_search_in_folder_command
33+
check_all_with_keywords_command
3434
} from './commands'
3535
import {
3636
get_checkpoints,
@@ -131,7 +131,7 @@ export async function activate(context: vscode.ExtensionContext) {
131131
set_range_command(workspace_provider, context),
132132
check_parent_folder_command(workspace_provider),
133133
duplicate_workspace_command(workspace_provider, websites_provider, context),
134-
keyword_search_in_folder_command(workspace_provider, context),
134+
check_all_with_keywords_command(workspace_provider, context),
135135
open_url_command({
136136
command: 'codeWebChat.openRepository',
137137
url: 'https://github.com/robertpiosik/CodeWebChat'

0 commit comments

Comments
 (0)