@@ -57,25 +57,25 @@ export const GET = withRouteHandler(
5757 [ { chatId : chat . id , streamId : chat . conversationId } ] ,
5858 { repairVerifiedStaleMarkers : true }
5959 )
60- const liveConversationId = reconciledMarkers . get ( chat . id ) ?. streamId ?? null
60+ const liveStreamId = reconciledMarkers . get ( chat . id ) ?. streamId ?? null
6161
62- if ( liveConversationId ) {
62+ if ( liveStreamId ) {
6363 try {
6464 const [ events , previewSessions ] = await Promise . all ( [
65- readEvents ( liveConversationId , '0' ) ,
66- readFilePreviewSessions ( liveConversationId ) . catch ( ( error ) => {
65+ readEvents ( liveStreamId , '0' ) ,
66+ readFilePreviewSessions ( liveStreamId ) . catch ( ( error ) => {
6767 logger . warn ( 'Failed to read preview sessions for mothership chat' , {
6868 chatId,
69- conversationId : liveConversationId ,
69+ streamId : liveStreamId ,
7070 error : toError ( error ) . message ,
7171 } )
7272 return [ ]
7373 } ) ,
7474 ] )
75- const run = await getLatestRunForStream ( liveConversationId , userId ) . catch ( ( error ) => {
75+ const run = await getLatestRunForStream ( liveStreamId , userId ) . catch ( ( error ) => {
7676 logger . warn ( 'Failed to fetch latest run for mothership chat snapshot' , {
7777 chatId,
78- conversationId : liveConversationId ,
78+ streamId : liveStreamId ,
7979 error : toError ( error ) . message ,
8080 } )
8181 return null
@@ -94,7 +94,7 @@ export const GET = withRouteHandler(
9494 } catch ( error ) {
9595 logger . warn ( 'Failed to read stream snapshot for mothership chat' , {
9696 chatId,
97- conversationId : liveConversationId ,
97+ streamId : liveStreamId ,
9898 error : toError ( error ) . message ,
9999 } )
100100 }
@@ -107,7 +107,7 @@ export const GET = withRouteHandler(
107107 : [ ]
108108 const effectiveMessages = buildEffectiveChatTranscript ( {
109109 messages : normalizedMessages ,
110- activeStreamId : liveConversationId || null ,
110+ activeStreamId : liveStreamId ,
111111 ...( streamSnapshot ? { streamSnapshot } : { } ) ,
112112 } )
113113
@@ -117,7 +117,7 @@ export const GET = withRouteHandler(
117117 id : chat . id ,
118118 title : chat . title ,
119119 messages : effectiveMessages ,
120- conversationId : liveConversationId || null ,
120+ activeStreamId : liveStreamId ,
121121 resources : Array . isArray ( chat . resources ) ? chat . resources : [ ] ,
122122 createdAt : chat . createdAt ,
123123 updatedAt : chat . updatedAt ,
0 commit comments