message storage performance improvements
This commit is contained in:
parent
d0f5c825bd
commit
9554abb56e
2 changed files with 28 additions and 32 deletions
|
|
@ -3,7 +3,6 @@ import {
|
|||
BoxRenderable,
|
||||
TextareaRenderable,
|
||||
MouseEvent,
|
||||
KeyEvent,
|
||||
PasteEvent,
|
||||
t,
|
||||
dim,
|
||||
|
|
|
|||
|
|
@ -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 }),
|
||||
|
|
|
|||
Loading…
Reference in a new issue