message storage performance improvements

This commit is contained in:
Dax Raad 2025-11-07 01:11:47 -05:00
commit 9554abb56e
2 changed files with 28 additions and 32 deletions

View file

@ -3,7 +3,6 @@ import {
BoxRenderable,
TextareaRenderable,
MouseEvent,
KeyEvent,
PasteEvent,
t,
dim,

View file

@ -270,6 +270,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
},
async sync(sessionID: string) {
const now = Date.now()
if (store.message[sessionID]) return
console.log("syncing", sessionID)
const [session, messages, todo, diff] = await Promise.all([
sdk.client.session.get({ path: { id: sessionID }, throwOnError: true }),