File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,6 +154,12 @@ export namespace AgentEventStream {
154154
155155 /** Whether the thinking process is complete */
156156 isComplete ?: boolean ;
157+
158+ /**
159+ * Unique message identifier that links thinking messages to their session
160+ * This allows clients to correlate incremental updates with complete thinking
161+ */
162+ messageId ?: string ;
157163 }
158164
159165 /**
@@ -186,6 +192,12 @@ export namespace AgentEventStream {
186192
187193 /** Whether this is the final reasoning chunk */
188194 isComplete ?: boolean ;
195+
196+ /**
197+ * Unique message identifier that links streaming thinking messages to their final thinking
198+ * This allows clients to correlate incremental updates with complete thinking
199+ */
200+ messageId ?: string ;
189201 }
190202
191203 /**
Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ export class LLMProcessor {
337337 {
338338 content : chunkResult . reasoningContent ,
339339 isComplete : Boolean ( processingState . finishReason ) ,
340+ messageId : messageId ,
340341 } ,
341342 ) ;
342343 this . eventStream . sendEvent ( thinkingEvent ) ;
@@ -482,6 +483,7 @@ export class LLMProcessor {
482483 const thinkingEvent = this . eventStream . createEvent ( 'assistant_thinking_message' , {
483484 content : reasoningBuffer ,
484485 isComplete : true ,
486+ messageId : messageId ,
485487 } ) ;
486488
487489 this . eventStream . sendEvent ( thinkingEvent ) ;
You can’t perform that action at this time.
0 commit comments