mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-18 13:34:08 +00:00
The memory pressure monitor's performCheck() was only invoked after a tool call completed, so a long interactive session with no tool calls never triggered compact_history / cache eviction / GC. The heap could grow toward the V8 limit and hard-OOM during the React unmount on quit (the 'Reached heap limit Allocation failed' crash seen after /quit or Ctrl+C). Add a 30s unref'd interval in startInteractiveUI that calls performCheck(), cleared on cleanup. The quit/cleanup path also runs a final performCheck() right before instance.unmount() so a near-limit heap is not pushed over the edge by React reconciliation during unmount. References: #5147, #4149, #4254. Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> |
||
|---|---|---|
| .. | ||
| src | ||
| index.ts | ||
| package.json | ||
| test-setup.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||