message storage performance improvements

This commit is contained in:
Dax Raad
2025-11-07 01:11:47 -05:00
parent d0f5c825bd
commit 9554abb56e
8 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 }),