File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,8 +452,6 @@ async function subscribeSessionEvents() {
452452
453453 const response = await fetch ( `${ server . url } /event` )
454454 if ( ! response . body ) throw new Error ( "No response body" )
455- // TODO
456- console . log ( "!@#!@#!@#! fetched" , response . body )
457455
458456 const reader = response . body . getReader ( )
459457 const decoder = new TextDecoder ( )
@@ -465,10 +463,10 @@ async function subscribeSessionEvents() {
465463 if ( done ) break
466464
467465 const chunk = decoder . decode ( value , { stream : true } )
468- console . log ( "!@#!@#!@#! read" , chunk )
469466 const lines = chunk . split ( "\n" )
470467
471468 for ( const line of lines ) {
469+ // TODO
472470 console . log ( "!@#!@#!@#! line" , line )
473471 if ( ! line . startsWith ( "data: " ) ) continue
474472
@@ -478,7 +476,7 @@ async function subscribeSessionEvents() {
478476 try {
479477 const evt = JSON . parse ( jsonStr )
480478
481- if ( evt . type !== "part.updated" ) continue
479+ if ( evt . type !== "message. part.updated" ) continue
482480 if ( evt . properties . part . sessionID !== session . id ) continue
483481 const part = evt . properties . part
484482
You can’t perform that action at this time.
0 commit comments