@@ -13,15 +13,11 @@ import { ModelProvidersManager } from '@/services/model-providers-manager'
1313import { get_intelligent_update_config } from '@/utils/intelligent-update-utils'
1414import { PROVIDERS } from '@shared/constants/providers'
1515import { handle_intelligent_update } from './handlers/intelligent-update-handler'
16- import { check_for_truncated_fragments } from '@/utils/check-for-truncated-fragments'
1716import { handle_fast_replace } from './handlers/fast-replace-handler'
1817import { PanelProvider } from '@/views/panel/backend/panel-provider'
1918import { FileInPreview } from '@shared/types/file-in-preview'
2019import { update_undo_button_state } from './utils/state-manager'
21- import {
22- check_if_all_files_new ,
23- check_for_conflict_markers
24- } from './utils/file-checks'
20+ import { check_for_conflict_markers } from './utils/file-checks'
2521import { handle_conflict_markers } from './handlers/conflict-markers-handler'
2622
2723export type PreviewData = {
@@ -455,38 +451,7 @@ export const process_chat_response = async (
455451 message : 'Selecting conflict markers mode.'
456452 } )
457453 } else {
458- const all_files_new = await check_if_all_files_new ( files )
459- let has_truncated_fragments = false
460- if (
461- args ?. edit_format === undefined ||
462- args ?. edit_format == 'truncated' // Is undefined when invoked manually
463- ) {
464- has_truncated_fragments = check_for_truncated_fragments ( files )
465- }
466-
467- if ( all_files_new && ! has_truncated_fragments ) {
468- selected_mode_label = 'Fast replace'
469- Logger . info ( {
470- function_name : 'process_chat_response' ,
471- message :
472- 'All files are new - automatically selecting fast replace mode'
473- } )
474- } else if ( has_truncated_fragments ) {
475- selected_mode_label = 'Intelligent update'
476- {
477- Logger . info ( {
478- function_name : 'process_chat_response' ,
479- message :
480- 'Auto-selecting intelligent update mode due to detected truncated fragments'
481- } )
482- }
483- } else {
484- selected_mode_label = 'Fast replace'
485- Logger . info ( {
486- function_name : 'process_chat_response' ,
487- message : 'Defaulting to Fast replace mode'
488- } )
489- }
454+ selected_mode_label = 'Fast replace'
490455 }
491456
492457 let final_original_states : OriginalFileState [ ] | null = null
0 commit comments