File tree Expand file tree Collapse file tree
ui/src/components/editor/panel/ChatInput
vscode/src/views/panel/backend/message-handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ export const ChatInput: React.FC<ChatInputProps> = (props) => {
303303 ] ] : props . edit_format == format
304304 }
305305 ) }
306- title = { `Attached edit format instructions: ${ props . edit_format_instructions ?. [ format ] } ` }
306+ title = { `" ${ props . edit_format_instructions ?. [ format ] } " ` }
307307 onClick = { ( ) => props . on_edit_format_change ?.( format ) }
308308 data-text = { format }
309309 >
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import { make_api_request } from '@/utils/make-api-request'
99import axios from 'axios'
1010import { PROVIDERS } from '@shared/constants/providers'
1111import { DEFAULT_TEMPERATURE } from '@shared/constants/api-tools'
12- import { LAST_SELECTED_EDIT_CONTEXT_CONFIG_ID_STATE_KEY } from '@/constants/state-keys'
12+ import {
13+ API_EDIT_FORMAT_STATE_KEY ,
14+ LAST_SELECTED_EDIT_CONTEXT_CONFIG_ID_STATE_KEY
15+ } from '@/constants/state-keys'
1316import { EditFormat } from '@shared/types/edit-format'
1417import { ToolConfig } from '@/services/model-providers-manager'
1518import { replace_changes_placeholder } from '@/views/panel/backend/utils/replace-changes-placeholder'
@@ -326,10 +329,12 @@ const perform_context_editing = async (params: {
326329
327330 const files = `<files>${ collected_files } \n</files>`
328331
329- const edit_format = params . context . workspaceState . get < EditFormat > (
330- 'api-edit-format' ,
331- 'diff'
332- )
332+ const edit_format =
333+ params . context . workspaceState . get < EditFormat > (
334+ API_EDIT_FORMAT_STATE_KEY
335+ ) ??
336+ params . context . globalState . get < EditFormat > ( API_EDIT_FORMAT_STATE_KEY ) ??
337+ 'whole'
333338 const all_instructions = vscode . workspace
334339 . getConfiguration ( 'codeWebChat' )
335340 . get < { [ key in EditFormat ] : string } > ( 'editFormatInstructions' )
You can’t perform that action at this time.
0 commit comments