@@ -193,7 +193,8 @@ export async function POST(req: NextRequest) {
193193
194194 const userMessageIdToUse = userMessageId || crypto . randomUUID ( )
195195 try {
196- logger . error ( appendCopilotLogContext ( 'Received chat POST' , {
196+ logger . error (
197+ appendCopilotLogContext ( 'Received chat POST' , {
197198 requestId : tracker . requestId ,
198199 messageId : userMessageIdToUse ,
199200 } ) ,
@@ -249,7 +250,8 @@ export async function POST(req: NextRequest) {
249250 actualChatId
250251 )
251252 agentContexts = processed
252- logger . error ( appendCopilotLogContext ( 'Contexts processed for request' , {
253+ logger . error (
254+ appendCopilotLogContext ( 'Contexts processed for request' , {
253255 requestId : tracker . requestId ,
254256 messageId : userMessageIdToUse ,
255257 } ) ,
@@ -355,7 +357,8 @@ export async function POST(req: NextRequest) {
355357 )
356358
357359 try {
358- logger . error ( appendCopilotLogContext ( 'About to call Sim Agent' , {
360+ logger . error (
361+ appendCopilotLogContext ( 'About to call Sim Agent' , {
359362 requestId : tracker . requestId ,
360363 messageId : userMessageIdToUse ,
361364 } ) ,
@@ -552,7 +555,8 @@ export async function POST(req: NextRequest) {
552555 provider : typeof requestPayload ?. provider === 'string' ? requestPayload . provider : undefined ,
553556 }
554557
555- logger . error ( appendCopilotLogContext ( 'Non-streaming response from orchestrator' , {
558+ logger . error (
559+ appendCopilotLogContext ( 'Non-streaming response from orchestrator' , {
556560 requestId : tracker . requestId ,
557561 messageId : userMessageIdToUse ,
558562 } ) ,
@@ -596,7 +600,8 @@ export async function POST(req: NextRequest) {
596600
597601 // Start title generation in parallel if this is first message (non-streaming)
598602 if ( actualChatId && ! currentChat . title && conversationHistory . length === 0 ) {
599- logger . error ( appendCopilotLogContext ( 'Starting title generation for non-streaming response' , {
603+ logger . error (
604+ appendCopilotLogContext ( 'Starting title generation for non-streaming response' , {
600605 requestId : tracker . requestId ,
601606 messageId : userMessageIdToUse ,
602607 } )
@@ -611,7 +616,8 @@ export async function POST(req: NextRequest) {
611616 updatedAt : new Date ( ) ,
612617 } )
613618 . where ( eq ( copilotChats . id , actualChatId ! ) )
614- logger . error ( appendCopilotLogContext ( `Generated and saved title: ${ title } ` , {
619+ logger . error (
620+ appendCopilotLogContext ( `Generated and saved title: ${ title } ` , {
615621 requestId : tracker . requestId ,
616622 messageId : userMessageIdToUse ,
617623 } )
@@ -639,7 +645,8 @@ export async function POST(req: NextRequest) {
639645 . where ( eq ( copilotChats . id , actualChatId ! ) )
640646 }
641647
642- logger . error ( appendCopilotLogContext ( 'Returning non-streaming response' , {
648+ logger . error (
649+ appendCopilotLogContext ( 'Returning non-streaming response' , {
643650 requestId : tracker . requestId ,
644651 messageId : userMessageIdToUse ,
645652 } ) ,
@@ -771,7 +778,8 @@ export async function GET(req: NextRequest) {
771778 ...( streamSnapshot ? { streamSnapshot } : { } ) ,
772779 }
773780
774- logger . error ( appendCopilotLogContext ( `Retrieved chat ${ chatId } ` , {
781+ logger . error (
782+ appendCopilotLogContext ( `Retrieved chat ${ chatId } ` , {
775783 messageId : chat . conversationId || undefined ,
776784 } )
777785 )
0 commit comments