Skip to content

Commit 48b7e52

Browse files
committed
Rename fixAllAutomatically to autoRunIntelligentUpdate across the application and refactor the settings UI to group default tool configurations
- if api tool has the ability to set default configuration, this setting should be moved to 'Configurations' section. - rename <UiGroup title={t('action.default-configuration')}> to 'Default configurations' - move 'fix all automatically' at the bottom of General section, effectively removing 'intelligent update' section. - rename 'fix all automatically' to 'auto-run intelligent update'. place it immediately below 'reuse last tab'. rename all labels, variables, etc. - move 'reuse last tab' to 'chatbots' section (first item) - because 'find relevant files' section is empty, it should be removed
1 parent 2cadb57 commit 48b7e52

21 files changed

Lines changed: 186 additions & 294 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@
868868
"type": "string",
869869
"scope": "resource"
870870
},
871-
"codeWebChat.fixAllAutomatically": {
871+
"codeWebChat.autoRunIntelligentUpdate": {
872872
"type": "boolean",
873873
"scope": "resource",
874874
"default": false

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ export const preview = async (params: {
131131
}
132132

133133
const config = vscode.workspace.getConfiguration('codeWebChat')
134-
const fix_all_automatically = config.get<boolean>(
135-
'fixAllAutomatically',
134+
const auto_run_intelligent_update = config.get<boolean>(
135+
'autoRunIntelligentUpdate',
136136
false
137137
)
138138

@@ -145,7 +145,7 @@ export const preview = async (params: {
145145
items: items_for_preview,
146146
raw_instructions: params.raw_instructions,
147147
created_at: params.created_at,
148-
fix_all_automatically,
148+
auto_run_intelligent_update,
149149
url: params.url,
150150
recent_api_configuration: params.recent_api_configuration
151151
})

‎apps/editor/src/views/panel/frontend/Panel.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const Panel = () => {
9999
set_items_in_preview,
100100
raw_instructions,
101101
preview_item_created_at,
102-
fix_all_automatically,
102+
auto_run_intelligent_update,
103103
handle_discard_user_changes_in_preview,
104104
url,
105105
recent_api_configuration
@@ -649,7 +649,7 @@ export const Panel = () => {
649649
>
650650
<UiResponsePreview
651651
items={items_in_preview}
652-
fix_all_automatically={fix_all_automatically}
652+
auto_run_intelligent_update={auto_run_intelligent_update}
653653
raw_instructions={raw_instructions}
654654
recent_api_configuration={recent_api_configuration}
655655
has_multiple_workspaces={workspace_folder_count > 1}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ 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 [fix_all_automatically, set_fix_all_automatically] = useState(false)
12+
const [auto_run_intelligent_update, set_auto_run_intelligent_update] = useState(false)
1313
const [url, set_url] = useState<string>()
1414
const [recent_api_configuration, set_recent_api_configuration] =
1515
useState<RecentApiConfiguration>()
@@ -32,7 +32,7 @@ export const use_preview_manager = (vscode: any) => {
3232
set_items_in_preview(message.items)
3333
set_raw_instructions(message.raw_instructions)
3434
set_preview_item_created_at(message.created_at)
35-
set_fix_all_automatically(message.fix_all_automatically ?? false)
35+
set_auto_run_intelligent_update(message.auto_run_intelligent_update ?? false)
3636
set_url(message.url)
3737
set_recent_api_configuration(message.recent_api_configuration)
3838
} else if (message.command == 'UPDATE_FILE_IN_PREVIEW') {
@@ -113,7 +113,7 @@ export const use_preview_manager = (vscode: any) => {
113113
raw_instructions,
114114
url,
115115
preview_item_created_at,
116-
fix_all_automatically,
116+
auto_run_intelligent_update,
117117
handle_discard_user_changes_in_preview,
118118
recent_api_configuration
119119
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ export interface ResponsePreviewStartedMessage extends BaseMessage {
798798
items: ItemInPreview[]
799799
raw_instructions?: string
800800
created_at?: number
801-
fix_all_automatically?: boolean
801+
auto_run_intelligent_update?: boolean
802802
url?: string
803803
recent_api_configuration?: RecentApiConfiguration
804804
}

apps/editor/src/views/settings/backend/message-handlers/handle-get-fix-all-automatically.ts renamed to apps/editor/src/views/settings/backend/message-handlers/handle-get-auto-run-intelligent-update.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'
22
import { SettingsProvider } from '@/views/settings/backend/settings-provider'
33

4-
export const handle_get_fix_all_automatically = async (
4+
export const handle_get_auto_run_intelligent_update = async (
55
provider: SettingsProvider
66
): Promise<void> => {
77
const config = vscode.workspace.getConfiguration('codeWebChat')
8-
const enabled = config.get<boolean>('fixAllAutomatically') || false
8+
const enabled = config.get<boolean>('autoRunIntelligentUpdate') || false
99
provider.postMessage({
10-
command: 'FIX_ALL_AUTOMATICALLY',
10+
command: 'AUTO_RUN_INTELLIGENT_UPDATE',
1111
enabled
1212
})
1313
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as vscode from 'vscode'
2+
import { UpdateAutoRunIntelligentUpdateMessage } from '@/views/settings/types/messages'
3+
4+
export const handle_update_auto_run_intelligent_update = async (
5+
message: UpdateAutoRunIntelligentUpdateMessage
6+
): Promise<void> => {
7+
await vscode.workspace
8+
.getConfiguration('codeWebChat')
9+
.update(
10+
'autoRunIntelligentUpdate',
11+
message.enabled || undefined,
12+
vscode.ConfigurationTarget.Global
13+
)
14+
}

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-fix-all-automatically.ts‎

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export * from './handle-get-reuse-last-tab'
4040
export * from './handle-update-reuse-last-tab'
4141
export * from './handle-delete-api-configuration'
4242
export * from './handle-get-api-configurations'
43-
export * from './handle-get-fix-all-automatically'
44-
export * from './handle-update-fix-all-automatically'
43+
export * from './handle-get-auto-run-intelligent-update'
44+
export * from './handle-update-auto-run-intelligent-update'
4545
export * from './handle-get-extended-cache-duration-for-anthropic'
4646
export * from './handle-update-extended-cache-duration-for-anthropic'
4747
export * from './handle-open-keybindings'

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import {
4646
handle_upsert_api_configuration,
4747
handle_open_ignore_patterns_settings,
4848
handle_open_allow_patterns_settings,
49-
handle_get_fix_all_automatically,
50-
handle_update_fix_all_automatically,
49+
handle_get_auto_run_intelligent_update,
50+
handle_update_auto_run_intelligent_update,
5151
handle_get_extended_cache_duration_for_anthropic,
5252
handle_update_extended_cache_duration_for_anthropic,
5353
handle_open_keybindings,
@@ -227,10 +227,10 @@ export class SettingsProvider {
227227
await handle_open_allow_patterns_settings()
228228
} else if (message.command == 'UPSERT_API_CONFIGURATION') {
229229
await handle_upsert_api_configuration(this, message)
230-
} else if (message.command == 'GET_FIX_ALL_AUTOMATICALLY') {
231-
await handle_get_fix_all_automatically(this)
232-
} else if (message.command == 'UPDATE_FIX_ALL_AUTOMATICALLY') {
233-
await handle_update_fix_all_automatically(message)
230+
} else if (message.command == 'GET_AUTO_RUN_INTELLIGENT_UPDATE') {
231+
await handle_get_auto_run_intelligent_update(this)
232+
} else if (message.command == 'UPDATE_AUTO_RUN_INTELLIGENT_UPDATE') {
233+
await handle_update_auto_run_intelligent_update(message)
234234
} else if (
235235
message.command == 'GET_EXTENDED_CACHE_DURATION_FOR_ANTHROPIC'
236236
) {
@@ -269,7 +269,7 @@ export class SettingsProvider {
269269
void handle_get_send_with_shift_enter(this)
270270
void handle_get_check_new_files(this)
271271
void handle_get_reuse_last_tab(this)
272-
void handle_get_fix_all_automatically(this)
272+
void handle_get_auto_run_intelligent_update(this)
273273
void handle_get_extended_cache_duration_for_anthropic(this)
274274
}
275275
})

0 commit comments

Comments
 (0)