44 */
55
66import { Writable } from 'stream'
7- import { getLogger } from '../../shared/logger/logger'
87import { Messenger } from '../controllers/chat/messenger/messenger'
98import { ToolUse } from '@amzn/codewhisperer-streaming'
109import { CommandValidation } from './executeBash'
@@ -24,25 +23,21 @@ export class ChatStream extends Writable {
2423 private readonly triggerID : string ,
2524 private readonly toolUse : ToolUse | undefined ,
2625 private readonly validation : CommandValidation ,
27- private readonly changeList ?: Change [ ] ,
28- private readonly logger = getLogger ( 'chatStream' )
26+ private readonly changeList ?: Change [ ]
2927 ) {
3028 super ( )
31- this . logger . debug ( `ChatStream created for tabID: ${ tabID } , triggerID: ${ triggerID } ` )
3229 this . messenger . sendInitalStream ( tabID , triggerID )
3330 }
3431
3532 override _write ( chunk : Buffer , encoding : BufferEncoding , callback : ( error ?: Error | null ) => void ) : void {
3633 // Check if the conversation has been cancelled
3734 if ( ConversationTracker . getInstance ( ) . isTriggerCancelled ( this . triggerID ) ) {
38- this . logger . debug ( `ChatStream skipping chunk due to cancellation for triggerID: ${ this . triggerID } ` )
3935 callback ( )
4036 return
4137 }
4238
4339 const text = chunk . toString ( )
4440 this . accumulatedLogs += text
45- this . logger . debug ( `ChatStream received chunk: ${ text } ` )
4641 this . messenger . sendPartialToolLog (
4742 this . accumulatedLogs ,
4843 this . tabID ,
0 commit comments