Skip to content

Commit 36ae562

Browse files
committed
Rename 'intelligent update' to 'patch repair'
- rename 'intelligent update' to 'patch repair' ├── apps │ └── editor │ ├── package.json │ └── src │ ├── commands │ │ └── apply-response-command │ │ ├── apply-response-command.ts │ │ ├── response-processor.ts │ │ ├── types │ │ │ └── original-file-state.ts │ │ └── utils │ │ └── preview │ │ ├── file-preparer.ts │ │ ├── preview.ts │ │ └── workspace-listener.ts │ ├── constants │ │ ├── instructions.ts │ │ └── state-keys.ts │ ├── services │ │ └── model-providers-manager.ts │ └── views │ ├── prompt │ │ ├── backend │ │ │ ├── message-handlers │ │ │ │ ├── handle-fix-all-failed-files.ts │ │ │ │ └── index.ts │ │ │ └── prompt-view-provider.ts │ │ ├── frontend │ │ │ ├── Prompt.tsx │ │ │ └── hooks │ │ │ └── use-preview-manager.ts │ │ └── types │ │ └── messages.ts │ ├── settings │ │ ├── backend │ │ │ ├── message-handlers │ │ │ │ ├── handle-get-api-configurations.ts │ │ │ │ ├── handle-set-default-api-configuration.ts │ │ │ │ └── index.ts │ │ │ └── settings-view-provider.ts │ │ ├── frontend │ │ │ ├── Home │ │ │ │ ├── Home.tsx │ │ │ │ └── sections │ │ │ │ └── ApiConfigurationsSection.tsx │ │ │ ├── Settings.tsx │ │ │ ├── hooks │ │ │ │ └── use-settings.ts │ │ │ └── i18n │ │ │ └── translations │ │ │ └── api-calls.ts │ │ └── types │ │ └── messages.ts │ └── shared │ ├── actions │ │ └── api │ │ └── update │ │ └── update.ts │ └── types │ └── api-features.ts ├── docs │ ├── api-tools │ │ └── index.mdx │ └── chatbot-initialization.mdx └── packages ├── shared │ └── src │ ├── constants │ │ ├── api-tools.ts │ │ └── dictionary.ts │ └── types │ └── file-in-preview.ts └── ui └── src └── components └── editor └── prompt └── ResponsePreview ├── ResponsePreview.stories.tsx ├── ResponsePreview.tsx └── components └── FileItem └── FileItem.tsx
1 parent d0ef583 commit 36ae562

40 files changed

Lines changed: 203 additions & 203 deletions

‎apps/editor/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@
10331033
"type": "string",
10341034
"scope": "resource"
10351035
},
1036-
"codeWebChat.autoRunIntelligentUpdate": {
1036+
"codeWebChat.autoRunPatchRepair": {
10371037
"type": "boolean",
10381038
"scope": "resource",
10391039
"default": false
@@ -1210,7 +1210,7 @@
12101210
"isDefaultForIntelligentFileSearch": {
12111211
"type": "boolean"
12121212
},
1213-
"isDefaultForIntelligentUpdate": {
1213+
"isDefaultForPatchRepair": {
12141214
"type": "boolean"
12151215
},
12161216
"isDefaultForCommitMessages": {

‎apps/editor/src/commands/apply-response-command/apply-response-command.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ export const apply_response_command = (params: {
353353
is_checked: true,
354354
apply_failed: state.apply_failed,
355355
ai_content: state.ai_content,
356-
applied_with_intelligent_update:
357-
state.applied_with_intelligent_update
356+
applied_with_patch_repair:
357+
state.applied_with_patch_repair
358358
})
359359

360360
if (state.file_path_to_restore) {

‎apps/editor/src/commands/apply-response-command/response-processor.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ export const process_response = async (params: {
9292
current_content: file_in_preview?.content,
9393
is_checked: file_in_preview?.is_checked,
9494
apply_failed: file_in_preview?.apply_failed,
95-
applied_with_intelligent_update:
96-
file_in_preview?.applied_with_intelligent_update
95+
applied_with_patch_repair:
96+
file_in_preview?.applied_with_patch_repair
9797
}
9898
})
9999
update_undo_button_state({

‎apps/editor/src/commands/apply-response-command/types/original-file-state.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export type OriginalFileState = {
1414
proposed_content?: string
1515
current_content?: string
1616
apply_failed?: boolean
17-
applied_with_intelligent_update?: boolean
17+
applied_with_patch_repair?: boolean
1818
}

‎apps/editor/src/commands/apply-response-command/utils/preview/file-preparer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const prepare_files_from_original_states = async (params: {
9696
is_checked: state.is_checked ?? true,
9797
apply_failed: state.apply_failed,
9898
ai_content: state.ai_content,
99-
applied_with_intelligent_update: state.applied_with_intelligent_update
99+
applied_with_patch_repair: state.applied_with_patch_repair
100100
}
101101

102102
prepared_files.push({

‎apps/editor/src/commands/apply-response-command/utils/preview/preview.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ export const preview = async (params: {
124124
}
125125

126126
const config = vscode.workspace.getConfiguration('codeWebChat')
127-
const auto_run_intelligent_update = config.get<boolean>(
128-
'autoRunIntelligentUpdate',
127+
const auto_run_patch_repair = config.get<boolean>(
128+
'autoRunPatchRepair',
129129
false
130130
)
131131

@@ -138,7 +138,7 @@ export const preview = async (params: {
138138
items: items_for_preview,
139139
raw_instructions: params.raw_instructions,
140140
created_at: params.created_at,
141-
auto_run_intelligent_update,
141+
auto_run_patch_repair,
142142
url: params.url,
143143
recent_api_configuration: params.recent_api_configuration
144144
})
@@ -301,7 +301,7 @@ export const preview = async (params: {
301301
cleanup_temp_files(prepared_files)
302302

303303
if (params.prompt_view_provider) {
304-
params.prompt_view_provider.cancel_all_intelligent_updates()
304+
params.prompt_view_provider.cancel_all_patch_repairs()
305305
params.prompt_view_provider.send_message({
306306
command: 'RESPONSE_PREVIEW_FINISHED'
307307
})

‎apps/editor/src/commands/apply-response-command/utils/preview/workspace-listener.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export let discard_user_changes_in_preview:
2424
| ((file: { file_path: string; workspace_name?: string }) => Promise<void>)
2525
| undefined
2626

27-
export let set_file_applied_with_intelligent_update:
27+
export let set_file_applied_with_patch_repair:
2828
| ((file: { file_path: string; workspace_name?: string }) => void)
2929
| undefined
3030

@@ -757,8 +757,8 @@ export const setup_workspace_listeners = (params: {
757757
return
758758
}
759759

760-
if (file_to_discard.previewable_file.applied_with_intelligent_update) {
761-
file_to_discard.previewable_file.applied_with_intelligent_update = false
760+
if (file_to_discard.previewable_file.applied_with_patch_repair) {
761+
file_to_discard.previewable_file.applied_with_patch_repair = false
762762
update_response_history({
763763
prompt_view_provider: params.prompt_view_provider,
764764
created_at: params.created_at,
@@ -883,7 +883,7 @@ export const setup_workspace_listeners = (params: {
883883
}
884884
}
885885

886-
set_file_applied_with_intelligent_update = ({
886+
set_file_applied_with_patch_repair = ({
887887
file_path,
888888
workspace_name
889889
}) => {
@@ -893,7 +893,7 @@ export const setup_workspace_listeners = (params: {
893893
f.previewable_file.workspace_name == workspace_name
894894
)
895895
if (file) {
896-
file.previewable_file.applied_with_intelligent_update = true
896+
file.previewable_file.applied_with_patch_repair = true
897897
update_response_history({
898898
prompt_view_provider: params.prompt_view_provider,
899899
created_at: params.created_at,
@@ -910,7 +910,7 @@ export const setup_workspace_listeners = (params: {
910910
file_renamed_listener.dispose()
911911
toggle_file_preview_state = undefined
912912
discard_user_changes_in_preview = undefined
913-
set_file_applied_with_intelligent_update = undefined
913+
set_file_applied_with_patch_repair = undefined
914914
}
915915

916916
return { dispose }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ The variable is possibly not defined.
2323
2424
Find correct replacement text for the <missing_text> symbol.`
2525

26-
export const intelligent_update_task_instructions =
26+
export const patch_repair_task_instructions =
2727
'Apply the attached changes to the file without explanations or any other text.'
2828

29-
export const intelligent_update_edit_format_instructions = `Respond strictly with a single markdown code block showing the original and updated code snippets with Git-style merge conflict syntax. Example:
29+
export const patch_repair_edit_format_instructions = `Respond strictly with a single markdown code block showing the original and updated code snippets with Git-style merge conflict syntax. Example:
3030
3131
\`\`\`python
3232
<<<<<<< SEARCH

‎apps/editor/src/constants/state-keys.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export const LAST_USED_COMMIT_MESSAGE_ACTION_STATE_KEY =
4949
'last-used-commit-message-action'
5050
export const LAST_USED_INTELLIGENT_SEARCH_ACTION_STATE_KEY =
5151
'last-used-intelligent-search-action'
52-
export const LAST_USED_INTELLIGENT_UPDATE_CONFIG_ID_STATE_KEY =
53-
'last-used-intelligent-update-config-id'
52+
export const LAST_USED_PATCH_REPAIR_CONFIG_ID_STATE_KEY =
53+
'last-used-patch-repair-config-id'
5454
export const LAST_USED_VOICE_INPUT_CONFIG_ID_STATE_KEY =
5555
'last-used-voice-input-config-id'
5656

‎apps/editor/src/services/model-providers-manager.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ export class ModelProvidersManager {
174174
new_config.isDefaultForCodeAtCursor = true
175175
if (old_config?.isDefaultForIntelligentFileSearch)
176176
new_config.isDefaultForIntelligentFileSearch = true
177-
if (old_config?.isDefaultForIntelligentUpdate)
178-
new_config.isDefaultForIntelligentUpdate = true
177+
if (old_config?.isDefaultForPatchRepair)
178+
new_config.isDefaultForPatchRepair = true
179179
if (old_config?.isDefaultForCommitMessages)
180180
new_config.isDefaultForCommitMessages = true
181181
if (old_config?.isDefaultForVoiceInput)
@@ -292,20 +292,20 @@ export class ModelProvidersManager {
292292
)
293293
}
294294

295-
public async get_default_intelligent_update_api_configuration(): Promise<
295+
public async get_default_patch_repair_api_configuration(): Promise<
296296
ApiConfiguration | undefined
297297
> {
298298
await this._load_promise
299299
return this._get_default_api_configuration_from_settings(
300-
'isDefaultForIntelligentUpdate'
300+
'isDefaultForPatchRepair'
301301
)
302302
}
303303

304-
public async set_default_intelligent_update_api_configuration(
304+
public async set_default_patch_repair_api_configuration(
305305
api_configuration: ApiConfiguration | null
306306
) {
307307
await this._set_default_api_configuration_in_settings(
308-
'isDefaultForIntelligentUpdate',
308+
'isDefaultForPatchRepair',
309309
api_configuration
310310
)
311311
}

0 commit comments

Comments
 (0)