mirror of
https://github.com/sst/opencode.git
synced 2025-08-22 05:54:08 +00:00
sync
This commit is contained in:
parent
c5b3f54a0a
commit
26d2e23a3e
1 changed files with 5 additions and 0 deletions
|
@ -435,6 +435,8 @@ async function getUserPrompt() {
|
|||
}
|
||||
|
||||
function subscribeSessionEvents() {
|
||||
console.log("Subscribing to session events...")
|
||||
|
||||
const TOOL: Record<string, [string, string]> = {
|
||||
todowrite: ["Todo", "\x1b[33m\x1b[1m"],
|
||||
todoread: ["Todo", "\x1b[33m\x1b[1m"],
|
||||
|
@ -454,8 +456,11 @@ function subscribeSessionEvents() {
|
|||
|
||||
let text = ""
|
||||
;(async () => {
|
||||
// TODO
|
||||
console.log("Subscribing to session events: fetching...")
|
||||
const response = await fetch(`${server.url}/event`)
|
||||
if (!response.body) throw new Error("No response body")
|
||||
console.log("Subscribing to session events: fetched")
|
||||
|
||||
const reader = response.body.getReader()
|
||||
const decoder = new TextDecoder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue