Skip to content

Commit 932c609

Browse files
committed
Remove auto-run patch repair configuration and feature
- remove setting 'auto run patch repair', make this a default behavior
1 parent 371f175 commit 932c609

16 files changed

Lines changed: 3 additions & 201 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -984,11 +984,6 @@
984984
"type": "string",
985985
"scope": "resource"
986986
},
987-
"codeWebChat.autoRunPatchRepair": {
988-
"type": "boolean",
989-
"scope": "resource",
990-
"default": false
991-
},
992987
"codeWebChat.agenticSearchAntigravityFlags": {
993988
"type": "array",
994989
"scope": "resource",

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@ export const preview = async (params: {
123123
items_for_preview.push(...prepared_files.map((p) => p.previewable_file))
124124
}
125125

126-
const config = vscode.workspace.getConfiguration('codeWebChat')
127-
const auto_run_patch_repair = config.get<boolean>(
128-
'autoRunPatchRepair',
129-
false
130-
)
131-
132126
if (params.prompt_view_provider) {
133127
params.prompt_view_provider.send_message({
134128
command: 'HIDE_PROGRESS'
@@ -138,7 +132,6 @@ export const preview = async (params: {
138132
items: items_for_preview,
139133
raw_instructions: params.raw_instructions,
140134
created_at: params.created_at,
141-
auto_run_patch_repair,
142135
url: params.url,
143136
recent_api_configuration: params.recent_api_configuration
144137
})

‎apps/editor/src/views/prompt/frontend/Prompt.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export const Prompt = () => {
9494
set_items_in_preview,
9595
raw_instructions,
9696
preview_item_created_at,
97-
auto_run_patch_repair,
9897
handle_discard_user_changes_in_preview,
9998
url,
10099
recent_api_configuration
@@ -605,7 +604,6 @@ export const Prompt = () => {
605604
>
606605
<UiResponsePreview
607606
items={items_in_preview}
608-
auto_run_patch_repair={auto_run_patch_repair}
609607
raw_instructions={raw_instructions}
610608
recent_api_configuration={recent_api_configuration}
611609
has_multiple_workspaces={workspace_folder_count > 1}

‎apps/editor/src/views/prompt/frontend/hooks/use-preview-manager.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const use_preview_manager = (vscode: any) => {
99
const [raw_instructions, set_raw_instructions] = useState<string>()
1010
const [preview_item_created_at, set_preview_item_created_at] =
1111
useState<number>()
12-
const [auto_run_patch_repair, set_auto_run_patch_repair] = useState(false)
1312
const [url, set_url] = useState<string>()
1413
const [recent_api_configuration, set_recent_api_configuration] =
1514
useState<RecentApiConfiguration>()
@@ -32,7 +31,6 @@ export const use_preview_manager = (vscode: any) => {
3231
set_items_in_preview(message.items)
3332
set_raw_instructions(message.raw_instructions)
3433
set_preview_item_created_at(message.created_at)
35-
set_auto_run_patch_repair(message.auto_run_patch_repair ?? false)
3634
set_url(message.url)
3735
set_recent_api_configuration(message.recent_api_configuration)
3836
} else if (message.command == 'UPDATE_FILE_IN_PREVIEW') {
@@ -113,7 +111,6 @@ export const use_preview_manager = (vscode: any) => {
113111
raw_instructions,
114112
url,
115113
preview_item_created_at,
116-
auto_run_patch_repair,
117114
handle_discard_user_changes_in_preview,
118115
recent_api_configuration
119116
}

‎apps/editor/src/views/prompt/types/messages.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@ export interface ResponsePreviewStartedMessage extends BaseMessage {
741741
items: ItemInPreview[]
742742
raw_instructions?: string
743743
created_at?: number
744-
auto_run_patch_repair?: boolean
745744
url?: string
746745
recent_api_configuration?: RecentApiConfiguration
747746
}

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-auto-run-intelligent-update.ts‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-auto-run-intelligent-update.ts‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/index.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export * from './handle-open-allow-patterns-settings'
2828
export * from './handle-get-send-with-shift-enter'
2929
export * from './handle-update-send-with-shift-enter'
3030
export * from './handle-get-api-configurations'
31-
export * from './handle-get-auto-run-intelligent-update'
32-
export * from './handle-update-auto-run-intelligent-update'
3331
export * from './handle-open-keybindings'
3432
export * from './handle-open-external-url'
3533
export * from './handle-delete-web-configuration'

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import {
3030
handle_update_send_with_shift_enter,
3131
handle_open_ignore_patterns_settings,
3232
handle_open_allow_patterns_settings,
33-
handle_get_auto_run_patch_repair as handle_get_auto_run_patch_repair,
34-
handle_update_auto_run_patch_repair as handle_update_auto_run_patch_repair,
3533
handle_open_keybindings,
3634
handle_open_external_url,
3735
handle_delete_web_configuration,
@@ -216,10 +214,6 @@ export class SettingsViewProvider {
216214
await handle_open_ignore_patterns_settings()
217215
} else if (message.command == 'OPEN_ALLOW_PATTERNS_SETTINGS') {
218216
await handle_open_allow_patterns_settings()
219-
} else if (message.command == 'GET_AUTO_RUN_PATCH_REPAIR') {
220-
await handle_get_auto_run_patch_repair(this)
221-
} else if (message.command == 'UPDATE_AUTO_RUN_PATCH_REPAIR') {
222-
await handle_update_auto_run_patch_repair(message)
223217
} else if (message.command == 'OPEN_KEYBINDINGS') {
224218
await handle_open_keybindings(message)
225219
} else if (message.command == 'OPEN_EXTERNAL_URL') {
@@ -275,7 +269,6 @@ export class SettingsViewProvider {
275269
void handle_get_gemini_user_id(this)
276270
void handle_get_ai_studio_user_id(this)
277271
void handle_get_send_with_shift_enter(this)
278-
void handle_get_auto_run_patch_repair(this)
279272
void handle_get_templates(this)
280273
this._send_web_configurations()
281274
}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export type NavItem =
2929
| 'section:api:group:model-providers'
3030
| 'section:api:group:api-configurations'
3131
| 'section:api:group:api-defaults'
32-
| 'section:api:group:api-behavior'
3332
| 'section:api:group:system-instructions'
3433

3534
type NavConfigItem = { id: NavItem; label: TranslationKey }
@@ -75,10 +74,6 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
7574
id: 'section:api:group:api-defaults',
7675
label: 'api-calls.default-configurations.title'
7776
},
78-
{
79-
id: 'section:api:group:api-behavior',
80-
label: 'api-calls.behavior.title'
81-
},
8277
{
8378
id: 'section:api:group:system-instructions',
8479
label: 'api-calls.system-instructions.title'
@@ -98,7 +93,6 @@ type Props = {
9893
gemini_user_id: number | null
9994
ai_studio_user_id: number | null
10095
send_with_shift_enter: boolean
101-
auto_run_patch_repair: boolean
10296
templates: Record<string, Template[]>
10397
on_update_templates: (key: string, templates: Template[]) => void
10498
on_edit_template: (key: string, index: number) => void
@@ -124,7 +118,6 @@ type Props = {
124118
on_gemini_user_id_change: (id: number | null) => void
125119
on_ai_studio_user_id_change: (id: number | null) => void
126120
on_send_with_shift_enter_change: (enabled: boolean) => void
127-
on_auto_run_patch_repair_change: (enabled: boolean) => void
128121
on_open_keybindings: (search?: string) => void
129122
on_open_editor_settings: () => void
130123
on_open_ignore_patterns_settings: () => void
@@ -176,7 +169,6 @@ export const Home: React.FC<Props> = (props) => {
176169
'section:api:group:model-providers': null,
177170
'section:api:group:api-configurations': null,
178171
'section:api:group:api-defaults': null,
179-
'section:api:group:api-behavior': null,
180172
'section:api:group:system-instructions': null
181173
})
182174

@@ -216,7 +208,6 @@ export const Home: React.FC<Props> = (props) => {
216208
if (
217209
[
218210
'section:api:group:api-defaults',
219-
'section:api:group:api-behavior',
220211
'section:api:group:system-instructions'
221212
].includes(item.id) &&
222213
props.api_configurations.length === 0
@@ -304,7 +295,6 @@ export const Home: React.FC<Props> = (props) => {
304295
if (
305296
[
306297
'section:api:group:api-defaults',
307-
'section:api:group:api-behavior',
308298
'section:api:group:system-instructions'
309299
].includes(item.id) &&
310300
props.api_configurations.length === 0
@@ -406,7 +396,6 @@ export const Home: React.FC<Props> = (props) => {
406396
if (
407397
[
408398
'section:api:group:api-defaults',
409-
'section:api:group:api-behavior',
410399
'section:api:group:system-instructions'
411400
].includes(item.id) &&
412401
props.api_configurations.length === 0
@@ -536,10 +525,6 @@ export const Home: React.FC<Props> = (props) => {
536525
on_delete_provider={props.on_delete_provider}
537526
on_edit_provider={props.on_edit_provider}
538527
on_reorder_providers={props.on_reorder_providers}
539-
auto_run_patch_repair={props.auto_run_patch_repair}
540-
on_auto_run_patch_repair_change={
541-
props.on_auto_run_patch_repair_change
542-
}
543528
on_open_external_url={props.on_open_external_url}
544529
api_configurations={props.api_configurations}
545530
defaults={props.defaults}

0 commit comments

Comments
 (0)