Skip to content

Commit 24f0f81

Browse files
author
Frank
committed
sync
1 parent bc199d3 commit 24f0f81

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

github/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)