mirror of
https://github.com/sst/opencode.git
synced 2025-08-22 14:04:07 +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() {
|
function subscribeSessionEvents() {
|
||||||
|
console.log("Subscribing to session events...")
|
||||||
|
|
||||||
const TOOL: Record<string, [string, string]> = {
|
const TOOL: Record<string, [string, string]> = {
|
||||||
todowrite: ["Todo", "\x1b[33m\x1b[1m"],
|
todowrite: ["Todo", "\x1b[33m\x1b[1m"],
|
||||||
todoread: ["Todo", "\x1b[33m\x1b[1m"],
|
todoread: ["Todo", "\x1b[33m\x1b[1m"],
|
||||||
|
@ -454,8 +456,11 @@ function subscribeSessionEvents() {
|
||||||
|
|
||||||
let text = ""
|
let text = ""
|
||||||
;(async () => {
|
;(async () => {
|
||||||
|
// TODO
|
||||||
|
console.log("Subscribing to session events: fetching...")
|
||||||
const response = await fetch(`${server.url}/event`)
|
const response = await fetch(`${server.url}/event`)
|
||||||
if (!response.body) throw new Error("No response body")
|
if (!response.body) throw new Error("No response body")
|
||||||
|
console.log("Subscribing to session events: fetched")
|
||||||
|
|
||||||
const reader = response.body.getReader()
|
const reader = response.body.getReader()
|
||||||
const decoder = new TextDecoder()
|
const decoder = new TextDecoder()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue