File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,20 +58,23 @@ function parseVercelAIStreamData(rawBody: string): { documentChatThreadID?: stri
5858 let documentChatThreadID : string | undefined ;
5959
6060 for ( const line of rawBody . split ( '\n' ) ) {
61- if ( ! line . startsWith ( '2:' ) ) { continue ; }
61+ if ( ! line . startsWith ( '2:' ) ) {
62+ continue ;
63+ }
6264 try {
6365 const items : unknown [ ] = JSON . parse ( line . slice ( 2 ) ) ;
6466 for ( const item of items ) {
6567 if ( item && typeof item === 'object' && 'documentChatThreadID' in item ) {
66- documentChatThreadID = ( item as Record < string , unknown > )
67- . documentChatThreadID as string ;
68+ documentChatThreadID = ( item as Record < string , unknown > ) . documentChatThreadID as string ;
6869 break ;
6970 }
7071 }
7172 } catch {
7273 // ignore malformed lines
7374 }
74- if ( documentChatThreadID ) { break ; }
75+ if ( documentChatThreadID ) {
76+ break ;
77+ }
7578 }
7679
7780 return { documentChatThreadID } ;
You can’t perform that action at this time.
0 commit comments