@@ -196,11 +196,11 @@ export const useCopilotStore = create<CopilotStore>()(
196196 const { workflowId, currentChat } = get ( )
197197 const { stream = true } = options
198198
199- console . log ( '[CopilotStore] sendMessage called:' , {
200- message,
201- workflowId,
202- hasCurrentChat : ! ! currentChat ,
203- stream
199+ console . log ( '[CopilotStore] sendMessage called:' , {
200+ message,
201+ workflowId,
202+ hasCurrentChat : ! ! currentChat ,
203+ stream,
204204 } )
205205
206206 if ( ! workflowId ) {
@@ -227,9 +227,9 @@ export const useCopilotStore = create<CopilotStore>()(
227227 timestamp : new Date ( ) . toISOString ( ) ,
228228 }
229229
230- console . log ( '[CopilotStore] Adding messages to state:' , {
231- userMessageId : userMessage . id ,
232- streamingMessageId : streamingMessage . id
230+ console . log ( '[CopilotStore] Adding messages to state:' , {
231+ userMessageId : userMessage . id ,
232+ streamingMessageId : streamingMessage . id ,
233233 } )
234234
235235 set ( ( state ) => ( {
@@ -246,10 +246,10 @@ export const useCopilotStore = create<CopilotStore>()(
246246 stream,
247247 } )
248248
249- console . log ( '[CopilotStore] Streaming result:' , {
250- success : result . success ,
251- hasStream : ! ! result . stream ,
252- error : result . error
249+ console . log ( '[CopilotStore] Streaming result:' , {
250+ success : result . success ,
251+ hasStream : ! ! result . stream ,
252+ error : result . error ,
253253 } )
254254
255255 if ( result . success && result . stream ) {
@@ -353,7 +353,10 @@ export const useCopilotStore = create<CopilotStore>()(
353353
354354 // Handle streaming response (shared by both message types)
355355 handleStreamingResponse : async ( stream : ReadableStream , messageId : string ) => {
356- console . log ( '[CopilotStore] handleStreamingResponse started:' , { messageId, hasStream : ! ! stream } )
356+ console . log ( '[CopilotStore] handleStreamingResponse started:' , {
357+ messageId,
358+ hasStream : ! ! stream ,
359+ } )
357360
358361 const reader = stream . getReader ( )
359362 const decoder = new TextDecoder ( )
@@ -365,7 +368,7 @@ export const useCopilotStore = create<CopilotStore>()(
365368 try {
366369 while ( true ) {
367370 const { done, value } = await reader . read ( )
368-
371+
369372 if ( done || streamComplete ) break
370373
371374 const chunk = decoder . decode ( value , { stream : true } )
@@ -395,7 +398,10 @@ export const useCopilotStore = create<CopilotStore>()(
395398 } else if ( data . type === 'content' ) {
396399 console . log ( '[CopilotStore] Received content chunk:' , data . content )
397400 accumulatedContent += data . content
398- console . log ( '[CopilotStore] Accumulated content length:' , accumulatedContent . length )
401+ console . log (
402+ '[CopilotStore] Accumulated content length:' ,
403+ accumulatedContent . length
404+ )
399405
400406 // Update the streaming message
401407 set ( ( state ) => ( {
@@ -443,7 +449,12 @@ export const useCopilotStore = create<CopilotStore>()(
443449 throw new Error ( data . error || 'Streaming error' )
444450 }
445451 } catch ( parseError ) {
446- console . warn ( '[CopilotStore] Failed to parse SSE data:' , parseError , 'Line:' , line )
452+ console . warn (
453+ '[CopilotStore] Failed to parse SSE data:' ,
454+ parseError ,
455+ 'Line:' ,
456+ line
457+ )
447458 logger . warn ( 'Failed to parse SSE data:' , parseError )
448459 }
449460 } else if ( line . trim ( ) ) {
0 commit comments