File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class StreamToAiSdkParts {
4242
4343 handleEvent ( event : StreamJsonEvent ) : AiSdkStreamPart [ ] {
4444 if ( isAssistantText ( event ) ) {
45- const isPartial = typeof ( event as any ) . timestamp_ms === "number" ;
45+ const isPartial = typeof event . timestamp_ms === "number" ;
4646 if ( isPartial ) {
4747 this . sawAssistantPartials = true ;
4848 const text = extractText ( event ) ;
@@ -56,7 +56,7 @@ export class StreamToAiSdkParts {
5656 }
5757
5858 if ( isThinking ( event ) ) {
59- const isPartial = typeof ( event as any ) . timestamp_ms === "number" ;
59+ const isPartial = typeof event . timestamp_ms === "number" ;
6060 if ( isPartial ) {
6161 this . sawThinkingPartials = true ;
6262 const text = extractThinking ( event ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export class StreamToSseConverter {
7575
7676 handleEvent ( event : StreamJsonEvent ) : string [ ] {
7777 if ( isAssistantText ( event ) ) {
78- const isPartial = typeof ( event as any ) . timestamp_ms === "number" ;
78+ const isPartial = typeof event . timestamp_ms === "number" ;
7979 if ( isPartial ) {
8080 this . sawAssistantPartials = true ;
8181 const text = extractText ( event ) ;
@@ -89,7 +89,7 @@ export class StreamToSseConverter {
8989 }
9090
9191 if ( isThinking ( event ) ) {
92- const isPartial = typeof ( event as any ) . timestamp_ms === "number" ;
92+ const isPartial = typeof event . timestamp_ms === "number" ;
9393 if ( isPartial ) {
9494 this . sawThinkingPartials = true ;
9595 const text = extractThinking ( event ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export type StreamJsonUserEvent = {
3535export type StreamJsonAssistantEvent = {
3636 type : "assistant" ;
3737 timestamp ?: number ;
38+ timestamp_ms ?: number ;
3839 session_id ?: string ;
3940 message : {
4041 role : "assistant" ;
You can’t perform that action at this time.
0 commit comments