@@ -17,15 +17,22 @@ import * as checkTerminalCommandModule from '../check-terminal-command'
1717import * as requestFilesPrompt from '../find-files/request-files-prompt'
1818import * as aisdk from '../llm-apis/vercel-ai-sdk/ai-sdk'
1919import { mainPrompt } from '../main-prompt'
20- import { logger } from '../util/logger'
2120import * as websocketAction from '../websockets/websocket-action'
2221
2322import type { PrintModeEvent } from '@codebuff/common/types/print-mode'
2423import type { ProjectFileContext } from '@codebuff/common/util/file'
24+ import type { Logger } from '@codebuff/types/logger'
2525import type { WebSocket } from 'ws'
2626
2727// --- Shared Mocks & Helpers ---
2828
29+ const logger : Logger = {
30+ debug : ( ) => { } ,
31+ info : ( ) => { } ,
32+ warn : ( ) => { } ,
33+ error : ( ) => { } ,
34+ }
35+
2936class MockWebSocket {
3037 send ( msg : string ) { }
3138 close ( ) { }
@@ -107,13 +114,6 @@ describe.skip('mainPrompt (Integration)', () => {
107114 } )
108115
109116 it ( 'should delete a specified function while preserving other code' , async ( ) => {
110- // Mock necessary non-LLM functions
111- spyOn ( logger , 'debug' ) . mockImplementation ( ( ) => { } )
112- spyOn ( logger , 'error' ) . mockImplementation ( ( ) => { } )
113- spyOn ( logger , 'info' ) . mockImplementation ( ( ) => { } )
114- spyOn ( logger , 'warn' ) . mockImplementation ( ( ) => { } )
115- spyOn ( requestFilesPrompt , 'requestRelevantFiles' ) . mockResolvedValue ( [ ] )
116-
117117 const initialContent = `import { Message } from '@codebuff/common/types/message'
118118import { withCacheControl } from '@codebuff/common/util/messages'
119119
0 commit comments