-
Notifications
You must be signed in to change notification settings - Fork 16k
fix: sync outdated stub docs + integrate LSP closeAllFiles with compact #1248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -99,6 +99,22 @@ export function runPostCompactCleanup(querySource?: QuerySource): void { | |||||
| }) | ||||||
| } | ||||||
| clearSessionMessagesCache() | ||||||
|
|
||||||
| // Memory leak #14: Release LSP server file tracking state. | ||||||
| // closeAllFiles() sends didClose for every tracked file and clears the Map. | ||||||
| // Next file access re-opens only what's needed, preventing unbounded growth | ||||||
| // in long sessions. Fire-and-forget: best-effort release, non-blocking. | ||||||
| if (isMainThreadCompact) { | ||||||
| void import('../lsp/manager.js') | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win Use This new relative import path should follow the repo alias convention for source imports. Suggested change- void import('../lsp/manager.js')
+ void import('src/services/lsp/manager.js')As per coding guidelines, "Import paths must use the 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| .then(m => { | ||||||
| const manager = m.getLspServerManager() | ||||||
| if (manager) return manager.closeAllFiles() | ||||||
| }) | ||||||
| .catch(error => { | ||||||
| logError(error) | ||||||
| }) | ||||||
| } | ||||||
|
|
||||||
| for (const cb of compactCleanupCallbacks) { | ||||||
| try { | ||||||
| cb() | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“已实现”状态与后文待办清单冲突。
Line 3 标记为已实现,但 Line 677-695 与 Line 729-737 仍是未完成清单格式,读者会误判当前真实状态。建议将这些清单改为“已完成记录”或补充“历史计划”说明。
🤖 Prompt for AI Agents