diff options
| author | Dax Raad <[email protected]> | 2025-05-27 15:26:49 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-27 15:26:49 -0400 |
| commit | a9758e0db58b1043319adec319f033a31b2febc5 (patch) | |
| tree | e37159d8f6473067b67bb709b9c49102259f839f /js/src | |
| parent | e98f915fd512e5319079d7b0826ecd44f2d6e463 (diff) | |
| download | opencode-a9758e0db58b1043319adec319f033a31b2febc5.tar.gz opencode-a9758e0db58b1043319adec319f033a31b2febc5.zip | |
vomit
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/index.ts | 4 | ||||
| -rw-r--r-- | js/src/share/share.ts | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/js/src/index.ts b/js/src/index.ts index 7d6feed45..dc80206f7 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -41,7 +41,9 @@ cli const session = await Session.create(); const shareID = await Session.share(session.id); if (shareID) - console.log("Share ID: https://dev.opencode.ai/share?id=" + session.id); + console.log( + `Share ID: ${Share.URL.replace("api.", "")}/share?id=${session.id}`, + ); let index = 0; Bus.subscribe(Storage.Event.Write, async (payload) => { diff --git a/js/src/share/share.ts b/js/src/share/share.ts index f8e25e07d..b857cac59 100644 --- a/js/src/share/share.ts +++ b/js/src/share/share.ts @@ -52,7 +52,9 @@ export namespace Share { await state(); } - const URL = process.env["OPENCODE_API"] ?? "https://api.dev.opencode.ai"; + export const URL = + process.env["OPENCODE_API"] ?? "https://api.dev.opencode.ai"; + export async function create(sessionID: string) { return fetch(`${URL}/share_create`, { method: "POST", |
