summaryrefslogtreecommitdiffhomepage
path: root/js/src/index.ts
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-05-30 14:45:10 -0400
committerDax Raad <[email protected]>2025-05-30 14:45:10 -0400
commitf5e2c596d4f887daa4df579975dd5451fadc8457 (patch)
treedb06373b2d332961e2812bd977089d9d674b700e /js/src/index.ts
parente9bad39a7ed224efefe2d21a35a7d27cd25e0879 (diff)
downloadopencode-f5e2c596d4f887daa4df579975dd5451fadc8457.tar.gz
opencode-f5e2c596d4f887daa4df579975dd5451fadc8457.zip
sync
Diffstat (limited to 'js/src/index.ts')
-rw-r--r--js/src/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/src/index.ts b/js/src/index.ts
index 69d246066..c86e60955 100644
--- a/js/src/index.ts
+++ b/js/src/index.ts
@@ -41,12 +41,17 @@ cli
? await Session.get(options.session)
: await Session.create();
console.log("Session:", session.id);
- console.log(`Share: ${Share.URL.replace("api.", "")}/s?id=${session.id}`);
Bus.subscribe(Message.Event.Updated, async (message) => {
console.log("Thinking...");
});
+ const unsub = Bus.subscribe(Session.Event.Updated, async (message) => {
+ if (message.properties.info.share?.url)
+ console.log("Share:", message.properties.info.share.url);
+ unsub();
+ });
+
const providers = await LLM.providers();
const providerID = Object.keys(providers)[0];
const modelID = Object.keys(providers[providerID].info.models!)[0];