mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-28 13:14:28 +01:00
vomit
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user