mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 12:54:42 +00:00
Fix session update to use proper getter and correct operation order
🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
parent
b75456f5dd
commit
575d76fa06
1 changed files with 2 additions and 2 deletions
|
|
@ -96,11 +96,11 @@ export namespace Session {
|
|||
|
||||
export async function update(id: string, editor: (session: Info) => void) {
|
||||
const { sessions } = state();
|
||||
const session = sessions.get(id);
|
||||
const session = await get(id);
|
||||
if (!session) return;
|
||||
editor(session);
|
||||
await Storage.writeJSON("session/info/" + id, session);
|
||||
sessions.set(id, session);
|
||||
await Storage.writeJSON("session/info/" + id, session);
|
||||
return session;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue