Skip to content

Commit c981614

Browse files
committed
fix: complete all remaining production hardening fixes
- Fix stale closures: sessionRef syncs with session state, sendMessage uses sessionRef.current - Add rate limiting: 500ms debounce on user input prevents double-send - Add settings migration system: v1→v2 migration with version tracking - Fix unifiedDiff: proper LCS-based diff using dynamic programming with fallback for large files - Wire up clearSessionFiles: called on /compact to prevent memory leak - Fix DuckDuckGo scraping: multiple URL fallbacks, multiple snippet patterns, graceful degradation - Add streaming state to orchestration commands (setIsStreaming/setMood on start/complete/error) - Improve token estimation: code vs text differentiation, tool call overhead, system prompt overhead All 10 remaining audit items addressed.
1 parent 041593f commit c981614

File tree

15 files changed

+433
-93
lines changed

15 files changed

+433
-93
lines changed

dist/sessions/manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sessions/manager.js

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sessions/manager.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tools/executor.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export declare class ToolExecutor {
1919
getSessionFiles(): Record<string, string>;
2020
undoLastChange(): string | null;
2121
unifiedDiff(filePath: string): string | null;
22+
private computeLCS;
23+
private computeLCSFallback;
24+
private lcsToChanges;
2225
/**
2326
* Clear tracked session files to free memory.
2427
* Call this after a session is saved or compacted.

dist/tools/executor.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tools/executor.js

Lines changed: 94 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)