mirror of
https://github.com/sst/opencode.git
synced 2025-08-22 14:04:07 +00:00
sync
This commit is contained in:
parent
6cf860be84
commit
bc199d32be
1 changed files with 2 additions and 2 deletions
|
@ -461,15 +461,15 @@ async function subscribeSessionEvents() {
|
|||
let text = ""
|
||||
;(async () => {
|
||||
while (true) {
|
||||
console.log("!@#!@#!@#! reading...")
|
||||
const { done, value } = await reader.read()
|
||||
console.log("!@#!@#!@#! read", done, value)
|
||||
if (done) break
|
||||
|
||||
const chunk = decoder.decode(value, { stream: true })
|
||||
console.log("!@#!@#!@#! read", chunk)
|
||||
const lines = chunk.split("\n")
|
||||
|
||||
for (const line of lines) {
|
||||
console.log("!@#!@#!@#! line", line)
|
||||
if (!line.startsWith("data: ")) continue
|
||||
|
||||
const jsonStr = line.slice(6).trim()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue