fix: avoid repeated activity history reads during streaming
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
Reuse the last committed activity records when comparing streaming saves instead of reading the full history for every update. Invalidate comparisons on close, data clearing and commits from other SQLite connections; preserve rollback and retry behavior. Validation: 3 related test files / 121 tests passed; typecheck and lint passed. Ten consecutive saves now perform at most one full-history scan while preserving the WAL write reduction. Installed-app physical disk throughput remains unverified. Release note: Reduce repeated database reads while streaming activity updates in conversations with large activity histories.
This commit is contained in:
@@ -59,6 +59,15 @@ two phases from overlapping. Existing file filters still work, for example
|
||||
use `npm test -- --project unit` or `npm test -- --project integration`. To inspect
|
||||
file selection without running tests, use `npx vitest list --filesOnly`.
|
||||
|
||||
For activity-history persistence, run
|
||||
`npx vitest run src/main/assistant/activity-history-io.test.ts`. This checks both
|
||||
WAL growth and repeated full-history reads: consecutive saves compare against
|
||||
the last committed in-memory records, invalidated on close, data clearing or
|
||||
another SQLite connection's commit. It also checks rollback and retry. The cache
|
||||
does not change the database schema or the full-snapshot IPC contract. WAL size
|
||||
and SQL scan counts do not measure physical disk throughput or conversation
|
||||
message persistence; validate those separately when investigating live I/O.
|
||||
|
||||
监听模式:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user