perf: read conversation lists in the readonly worker and diff activity history saves
conversations:list-summaries and conversations:get run on the readonly query worker. Activity history replace validates and serializes only changed records; a new activity-history:update IPC writes one record. Adds npm run perf:main.
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
type ExecutionStats,
|
||||
type ExecutionStatsInput,
|
||||
type ActivityHistorySnapshot,
|
||||
type ActivityHistoryUpdate,
|
||||
type ActivityRecord,
|
||||
type TokenUsageSummary,
|
||||
type ConversationSnapshot,
|
||||
@@ -2158,6 +2159,12 @@ export type DesktopApi = {
|
||||
records: ActivityRecord[],
|
||||
legacyHistoryMayBeIncomplete: boolean
|
||||
) => Promise<void>
|
||||
/**
|
||||
* Incremental save (PERF-15): only the changed records cross IPC and are
|
||||
* written. Optional until renderer mocks adopt it; the preload always
|
||||
* provides it.
|
||||
*/
|
||||
update?: (update: ActivityHistoryUpdate) => Promise<void>
|
||||
}
|
||||
usage: {
|
||||
getTokenSummary: () => Promise<TokenUsageSummary>
|
||||
|
||||
Reference in New Issue
Block a user