Skip to content

Commit 4313091

Browse files
committed
Rename the configuration setting codeWebChat.attachAllPromptsInCommitMessagesByDefault to codeWebChat.selectAllPromptsInCommitMessagesByDefault
- rename 'attach all...' to 'select all...'
1 parent 4213fdf commit 4313091

12 files changed

Lines changed: 87 additions & 87 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@
848848
"type": "string",
849849
"scope": "resource"
850850
},
851-
"codeWebChat.attachAllPromptsInCommitMessagesByDefault": {
851+
"codeWebChat.selectAllPromptsInCommitMessagesByDefault": {
852852
"type": "boolean",
853853
"scope": "resource",
854854
"default": true

‎apps/editor/src/commands/generate-commit-message-command/generate-commit-message-command.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ export const generate_commit_message_command = (
150150
path.relative(workspace_root, change.uri.fsPath).replace(/\\/g, '/')
151151
)
152152

153-
const attach_prompts_setting = vscode.workspace
153+
const select_prompts_setting = vscode.workspace
154154
.getConfiguration('codeWebChat')
155-
.get<boolean>('attachAllPromptsInCommitMessagesByDefault', true)
155+
.get<boolean>('selectAllPromptsInCommitMessagesByDefault', true)
156156

157157
const relevant_prompts = all_prompts
158158
.filter((p) => p.files.some((file) => staged_files.includes(file)))
@@ -214,7 +214,7 @@ export const generate_commit_message_command = (
214214
}
215215

216216
if (edited_message) {
217-
let selected_prompts = attach_prompts_setting ? relevant_prompts : []
217+
let selected_prompts = select_prompts_setting ? relevant_prompts : []
218218

219219
if (relevant_prompts.length > 0) {
220220
const picked = await new Promise<
@@ -225,7 +225,7 @@ export const generate_commit_message_command = (
225225
label: simplify_prompt_symbols({ prompt: p.prompt }),
226226
prompt: p
227227
}))
228-
quick_pick.selectedItems = attach_prompts_setting
228+
quick_pick.selectedItems = select_prompts_setting
229229
? quick_pick.items
230230
: []
231231
quick_pick.canSelectMany = true
@@ -291,7 +291,7 @@ export const generate_commit_message_command = (
291291
}
292292
} else {
293293
const prompts_text =
294-
attach_prompts_setting && relevant_prompts.length > 0
294+
select_prompts_setting && relevant_prompts.length > 0
295295
? '\n\n' +
296296
relevant_prompts
297297
.map(

‎apps/editor/src/services/git-discard-file-watcher.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ export const setup_git_discard_file_watcher = (
5454

5555
repo_states.set(workspace_root, current_changes)
5656

57-
const attach_prompts_setting = vscode.workspace
57+
const select_prompts_setting = vscode.workspace
5858
.getConfiguration('codeWebChat')
59-
.get<boolean>('attachAllPromptsInCommitMessagesByDefault', true)
59+
.get<boolean>('selectAllPromptsInCommitMessagesByDefault', true)
6060

6161
let relevant_prompts_text = ''
6262

63-
if (attach_prompts_setting) {
63+
if (select_prompts_setting) {
6464
const all_prompts =
6565
PromptsForCommitMessagesUtils.load_all(context)[workspace_root] ||
6666
[]

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-include-prompts-in-commit-messages.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export const handle_get_include_prompts_in_commit_messages = async (
66
): Promise<void> => {
77
const config = vscode.workspace.getConfiguration('codeWebChat')
88
const enabled = config.get<boolean>(
9-
'attachAllPromptsInCommitMessagesByDefault',
9+
'selectAllPromptsInCommitMessagesByDefault',
1010
true
1111
)
1212
provider.postMessage({
13-
command: 'ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT',
13+
command: 'SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT',
1414
enabled
1515
})
1616
}

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-include-prompts-in-commit-messages.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import * as vscode from 'vscode'
2-
import { UpdateAttachAllPromptsInCommitMessagesByDefaultMessage } from '@/views/settings/types/messages'
2+
import { UpdateSelectAllPromptsInCommitMessagesByDefaultMessage } from '@/views/settings/types/messages'
33

44
export const handle_update_include_prompts_in_commit_messages = async (
5-
message: UpdateAttachAllPromptsInCommitMessagesByDefaultMessage
5+
message: UpdateSelectAllPromptsInCommitMessagesByDefaultMessage
66
): Promise<void> => {
77
await vscode.workspace
88
.getConfiguration('codeWebChat')
99
.update(
10-
'attachAllPromptsInCommitMessagesByDefault',
10+
'selectAllPromptsInCommitMessagesByDefault',
1111
message.enabled,
1212
vscode.ConfigurationTarget.Global
1313
)

‎apps/editor/src/views/settings/backend/settings-provider.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ export class SettingsProvider {
177177
await handle_update_commit_message_instructions(message)
178178
} else if (
179179
message.command ==
180-
'GET_ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
180+
'GET_SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
181181
) {
182182
await handle_get_include_prompts_in_commit_messages(this)
183183
} else if (
184184
message.command ==
185-
'UPDATE_ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
185+
'UPDATE_SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
186186
) {
187187
await handle_update_include_prompts_in_commit_messages(message)
188188
} else if (message.command == 'GET_CONTEXT_SIZE_WARNING_THRESHOLD') {

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ type Props = {
113113
edit_files_system_instructions: string
114114
find_relevant_files_instructions: string
115115
commit_message_instructions: string
116-
attach_all_prompts_in_commit_messages_by_default: boolean
116+
select_all_prompts_in_commit_messages_by_default: boolean
117117
context_size_warning_threshold: number
118118
gemini_user_id: number | null
119119
ai_studio_user_id: number | null
@@ -132,7 +132,7 @@ type Props = {
132132
threshold: number | undefined
133133
) => void
134134
on_commit_instructions_change: (instructions: string) => void
135-
on_attach_all_prompts_in_commit_messages_by_default_change: (
135+
on_select_all_prompts_in_commit_messages_by_default_change: (
136136
enabled: boolean
137137
) => void
138138
on_edit_format_instructions_change: (
@@ -422,11 +422,11 @@ export const Home: React.FC<Props> = (props) => {
422422
props.on_open_allow_patterns_settings
423423
}
424424
on_open_keybindings={props.on_open_keybindings}
425-
attach_all_prompts_in_commit_messages_by_default={
426-
props.attach_all_prompts_in_commit_messages_by_default
425+
select_all_prompts_in_commit_messages_by_default={
426+
props.select_all_prompts_in_commit_messages_by_default
427427
}
428-
on_attach_all_prompts_in_commit_messages_by_default_change={
429-
props.on_attach_all_prompts_in_commit_messages_by_default_change
428+
on_select_all_prompts_in_commit_messages_by_default_change={
429+
props.on_select_all_prompts_in_commit_messages_by_default_change
430430
}
431431
commit_instructions={commit_instructions}
432432
set_commit_instructions={set_commit_instructions}

‎apps/editor/src/views/settings/frontend/Home/sections/GeneralSection.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ type Props = {
4949
on_open_allow_patterns_settings: () => void
5050
on_open_keybindings: (search?: string) => void
5151
set_section_ref: (id: NavItem, el: HTMLDivElement | null) => void
52-
attach_all_prompts_in_commit_messages_by_default: boolean
53-
on_attach_all_prompts_in_commit_messages_by_default_change: (
52+
select_all_prompts_in_commit_messages_by_default: boolean
53+
on_select_all_prompts_in_commit_messages_by_default_change: (
5454
enabled: boolean
5555
) => void
5656
commit_instructions: string
@@ -363,16 +363,16 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
363363
<UiGroup title={t('general.commit-messages.title')}>
364364
<UiItem
365365
title={t(
366-
'general.attach-all-prompts-in-commit-messages-by-default.title'
366+
'general.select-all-prompts-in-commit-messages-by-default.title'
367367
)}
368368
description={t(
369-
'general.attach-all-prompts-in-commit-messages-by-default.description'
369+
'general.select-all-prompts-in-commit-messages-by-default.description'
370370
)}
371371
slot_right={
372372
<UiToggler
373-
is_on={props.attach_all_prompts_in_commit_messages_by_default}
373+
is_on={props.select_all_prompts_in_commit_messages_by_default}
374374
on_toggle={
375-
props.on_attach_all_prompts_in_commit_messages_by_default_change
375+
props.on_select_all_prompts_in_commit_messages_by_default_change
376376
}
377377
/>
378378
}

‎apps/editor/src/views/settings/frontend/Settings.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const Settings = () => {
5454
settings_hook.edit_files_system_instructions !== undefined &&
5555
settings_hook.find_relevant_files_instructions !== undefined &&
5656
settings_hook.commit_message_instructions !== undefined &&
57-
settings_hook.attach_all_prompts_in_commit_messages_by_default !==
57+
settings_hook.select_all_prompts_in_commit_messages_by_default !==
5858
undefined &&
5959
settings_hook.context_size_warning_threshold !== undefined &&
6060
settings_hook.edit_format_instructions !== undefined &&
@@ -99,8 +99,8 @@ export const Settings = () => {
9999
context_size_warning_threshold={
100100
settings_hook.context_size_warning_threshold!
101101
}
102-
attach_all_prompts_in_commit_messages_by_default={
103-
settings_hook.attach_all_prompts_in_commit_messages_by_default!
102+
select_all_prompts_in_commit_messages_by_default={
103+
settings_hook.select_all_prompts_in_commit_messages_by_default!
104104
}
105105
commit_message_instructions={settings_hook.commit_message_instructions!}
106106
edit_format_instructions={settings_hook.edit_format_instructions!}
@@ -125,8 +125,8 @@ export const Settings = () => {
125125
on_commit_instructions_change={
126126
settings_hook.handle_commit_instructions_change
127127
}
128-
on_attach_all_prompts_in_commit_messages_by_default_change={
129-
settings_hook.handle_attach_all_prompts_in_commit_messages_by_default_change
128+
on_select_all_prompts_in_commit_messages_by_default_change={
129+
settings_hook.handle_select_all_prompts_in_commit_messages_by_default_change
130130
}
131131
on_edit_files_system_instructions_change={
132132
settings_hook.handle_edit_files_system_instructions_change

‎apps/editor/src/views/settings/frontend/hooks/use-settings.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export const use_settings = (vscode: any) => {
2323
const [commit_message_instructions, set_commit_message_instructions] =
2424
useState<string | undefined>(undefined)
2525
const [
26-
attach_all_prompts_in_commit_messages_by_default,
27-
set_attach_all_prompts_in_commit_messages_by_default
26+
select_all_prompts_in_commit_messages_by_default,
27+
set_select_all_prompts_in_commit_messages_by_default
2828
] = useState<boolean | undefined>(undefined)
2929
const [edit_files_system_instructions, set_edit_files_system_instructions] =
3030
useState<string | undefined>(undefined)
@@ -74,7 +74,7 @@ export const use_settings = (vscode: any) => {
7474
post_message(vscode, { command: 'GET_FIND_RELEVANT_FILES_INSTRUCTIONS' })
7575
post_message(vscode, { command: 'GET_COMMIT_MESSAGE_INSTRUCTIONS' })
7676
post_message(vscode, {
77-
command: 'GET_ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
77+
command: 'GET_SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
7878
})
7979
post_message(vscode, { command: 'GET_CONTEXT_SIZE_WARNING_THRESHOLD' })
8080
post_message(vscode, { command: 'GET_EDIT_FORMAT_INSTRUCTIONS' })
@@ -106,9 +106,9 @@ export const use_settings = (vscode: any) => {
106106
} else if (message.command == 'COMMIT_MESSAGE_INSTRUCTIONS') {
107107
set_commit_message_instructions(message.instructions)
108108
} else if (
109-
message.command == 'ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
109+
message.command == 'SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT'
110110
) {
111-
set_attach_all_prompts_in_commit_messages_by_default(message.enabled)
111+
set_select_all_prompts_in_commit_messages_by_default(message.enabled)
112112
} else if (message.command == 'CONTEXT_SIZE_WARNING_THRESHOLD') {
113113
set_context_size_warning_threshold(message.threshold)
114114
} else if (message.command == 'EDIT_FORMAT_INSTRUCTIONS') {
@@ -245,12 +245,12 @@ export const use_settings = (vscode: any) => {
245245
instructions
246246
})
247247

248-
const handle_attach_all_prompts_in_commit_messages_by_default_change = (
248+
const handle_select_all_prompts_in_commit_messages_by_default_change = (
249249
enabled: boolean
250250
) => {
251-
set_attach_all_prompts_in_commit_messages_by_default(enabled)
251+
set_select_all_prompts_in_commit_messages_by_default(enabled)
252252
post_message(vscode, {
253-
command: 'UPDATE_ATTACH_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT',
253+
command: 'UPDATE_SELECT_ALL_PROMPTS_IN_COMMIT_MESSAGES_BY_DEFAULT',
254254
enabled
255255
})
256256
}
@@ -385,7 +385,7 @@ export const use_settings = (vscode: any) => {
385385
set_web_configurations,
386386
defaults,
387387
commit_message_instructions,
388-
attach_all_prompts_in_commit_messages_by_default,
388+
select_all_prompts_in_commit_messages_by_default,
389389
edit_files_system_instructions,
390390
find_relevant_files_instructions,
391391
context_size_warning_threshold,
@@ -411,7 +411,7 @@ export const use_settings = (vscode: any) => {
411411
handle_add_web_configuration,
412412
handle_delete_web_configuration,
413413
handle_commit_instructions_change,
414-
handle_attach_all_prompts_in_commit_messages_by_default_change,
414+
handle_select_all_prompts_in_commit_messages_by_default_change,
415415
handle_edit_files_system_instructions_change,
416416
handle_find_relevant_files_instructions_change,
417417
handle_open_editor_settings,

0 commit comments

Comments
 (0)