@@ -13,7 +13,10 @@ import {
1313import { create_safe_path } from '@/utils/path-sanitizer'
1414import { dictionary } from '@shared/constants/dictionary'
1515import { Logger } from '@shared/utils/logger'
16- import { apply_git_patch , sanitize_patch_content } from './handlers/diff-handler'
16+ import {
17+ apply_git_patch ,
18+ sanitize_patch_content
19+ } from './handlers/diff-handler'
1720import { apply_file_relocations } from './utils/file-operations'
1821import { ModelProvidersManager } from '@/services/model-providers-manager'
1922import { get_intelligent_update_config } from '@/utils/intelligent-update-utils'
@@ -250,7 +253,7 @@ export const process_chat_response = async (params: {
250253 type : 'success'
251254 } )
252255
253- await params . panel_provider . switch_to_edit_context ( )
256+ await params . panel_provider . switch_to_edit_files ( )
254257 } else if ( 'created_at' in decision && decision . created_at ) {
255258 const history = params . panel_provider . response_history
256259 const new_history = history . filter (
@@ -277,12 +280,14 @@ export const process_chat_response = async (params: {
277280 const key = `${ patch . workspace_name || '' } :${ patch . file_path } `
278281 rename_map . set ( key , {
279282 new_path : patch . new_file_path ,
280- new_workspace : patch . new_workspace_name || patch . workspace_name
283+ new_workspace : patch . new_workspace_name || patch . workspace_name
281284 } )
282285 }
283286 } )
284287
285- const set_new_paths_in_original_states = ( states : OriginalFileState [ ] ) : OriginalFileState [ ] => {
288+ const set_new_paths_in_original_states = (
289+ states : OriginalFileState [ ]
290+ ) : OriginalFileState [ ] => {
286291 if ( ! rename_map . size ) return states
287292 states . forEach ( ( state ) => {
288293 const key = `${ state . workspace_name || '' } :${ state . file_path } `
@@ -339,7 +344,12 @@ export const process_chat_response = async (params: {
339344 patch . content ,
340345 patch . workspace_name
341346 )
342- const result = await apply_git_patch ( sanitized_patch_content , workspace_path , patch . workspace_name , patch )
347+ const result = await apply_git_patch (
348+ sanitized_patch_content ,
349+ workspace_path ,
350+ patch . workspace_name ,
351+ patch
352+ )
343353
344354 if ( result . success ) {
345355 if ( result . diff_application_method && result . original_states ) {
@@ -375,7 +385,8 @@ export const process_chat_response = async (params: {
375385 }
376386
377387 if ( all_original_states . length > 0 ) {
378- all_original_states = set_new_paths_in_original_states ( all_original_states )
388+ all_original_states =
389+ set_new_paths_in_original_states ( all_original_states )
379390 await apply_file_relocations ( all_original_states )
380391 update_undo_button_state ( {
381392 context : params . context ,
@@ -522,11 +533,11 @@ export const process_chat_response = async (params: {
522533
523534 const fake_chat_response = `\`\`\`\n// ${ file_path_for_block } \n${ params . chat_response } \n\`\`\``
524535
525- const api_providers_manager = new ModelProvidersManager (
536+ const model_providers_manager = new ModelProvidersManager (
526537 params . context
527538 )
528539 const api_configuration_result = await get_intelligent_update_config (
529- api_providers_manager ,
540+ model_providers_manager ,
530541 false ,
531542 params . context
532543 )
@@ -535,7 +546,10 @@ export const process_chat_response = async (params: {
535546 return null
536547 }
537548
538- const { model_provider, api_configuration : intelligent_update_api_configuration } = api_configuration_result
549+ const {
550+ model_provider,
551+ api_configuration : intelligent_update_api_configuration
552+ } = api_configuration_result
539553 const endpoint_url = model_provider . base_url
540554
541555 const intelligent_update_states =
0 commit comments