mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-12 17:23:24 +00:00
autoshare
This commit is contained in:
parent
be65ed6f88
commit
a22a2f0f37
2 changed files with 4 additions and 5 deletions
|
|
@ -40,11 +40,9 @@ cli
|
|||
console.log("Thinking...");
|
||||
await Share.init();
|
||||
const session = await Session.create();
|
||||
const shareID = await Session.share(session.id);
|
||||
if (shareID)
|
||||
console.log(
|
||||
`Share ID: ${Share.URL.replace("api.", "")}/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) => {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ export namespace Session {
|
|||
log.info("created", result);
|
||||
state().sessions.set(result.id, result);
|
||||
await Storage.writeJSON("session/info/" + result.id, result);
|
||||
await share(result.id);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue