mirror of
https://github.com/sst/opencode.git
synced 2025-09-01 02:37:23 +00:00
sync
This commit is contained in:
parent
7993c2ebde
commit
a0293468de
17 changed files with 393 additions and 133 deletions
11
packages/sdk/js/example/test.ts
Normal file
11
packages/sdk/js/example/test.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { createOpencodeClient, createOpencodeServer } from "../src/index"
|
||||
|
||||
const client = createOpencodeClient({
|
||||
baseUrl: "http://localhost:4096",
|
||||
})
|
||||
|
||||
await client.event.subscribe().then(async (event) => {
|
||||
for await (const e of event.stream) {
|
||||
console.log(e)
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue