perf: 减少索引器内存占用与持久化存储体积 #69
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
索引器优化(indexer.ts):
stripDetailsForPersist方法,在持久化history.details时剔除高占用的messages字段,仅保留摘要信息,显著降低内存驻留与磁盘I/O开销。DETAILS_CACHE_LIMIT缓存策略。资源清理(indexer.ts):
stopHistoryIndexer清理逻辑,显式清除所有 pending 状态的重试定时器 (clearTimeout)。rescanCooldown映射,确保无残留对象引用。前端性能(App.tsx):
buildFilteredText依赖项 (添加selectedSessionFingerprint等),减少无效计算与重渲染。国际化与文案:
history.json,terminal.json),新增终端启动失败、复制行等文案。