feat(lsp): auto-attach diagnostics to edit results (closes #428)#656
feat(lsp): auto-attach diagnostics to edit results (closes #428)#656merchloubna70-dot wants to merge 4 commits into
Conversation
All system prompts were English-only, causing DeepSeek V4 to reason and respond in English even when users wrote in Chinese or other languages. Add a Language Mirror section to base.md and base.txt that instructs the model to detect the user's primary language and use it for both reasoning (thinking tokens) and the final reply.
base.txt is not referenced via include_str! in prompts.rs. Only base.md is loaded (BASE_PROMPT). Remove the redundant change to base.txt as noted by Gemini Code Assist review.
After every successful apply_patch / write_file / edit_file the engine queries LspManager for diagnostics on touched files and appends a <diagnostics file="…"> block to the tool result. - ToolContext gains optional lsp_manager field + with_lsp_manager() builder - lsp_diagnostics_for_paths() helper handles async fan-out and rendering - All three edit tools append the block when non-empty - Gated behind existing [lsp] enabled config flag; silent fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
谁家PR机器人 |
Triple-check finding: parallel LSP path is dead codeThe PR adds Separately, the engine-level LSP path ( The tool-context path was intended for tools to also auto-inject diagnostics, but was never activated. The Recommendation: Either wire |
…-up) The `with_lsp_manager()` builder and `lsp_manager` ToolContext field existed but were never populated in production — `build_tool_context` always left the field as `None`. Wire `self.lsp_manager.clone()` into the context builder so edit tools can auto-inject diagnostics via the tool-context path in addition to the engine-level LSP hook. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed — added |
47 fmt drifts had accumulated from the squash-merged community PRs on this branch (#653, #654, #655, #645, #658, #668, #659, #661, #660, #667, #656). Pure formatting — no behavioural changes — applied via `cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
47 fmt drifts had accumulated from the squash-merged community PRs on this branch (Hmbown#653, Hmbown#654, Hmbown#655, Hmbown#645, Hmbown#658, Hmbown#668, Hmbown#659, Hmbown#661, Hmbown#660, Hmbown#667, Hmbown#656). Pure formatting — no behavioural changes — applied via `cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This PR was opened before the v0.8.41 rebrand and is now stale. Feel free to rebase onto current |
After every successful apply_patch / write_file / edit_file, query LspManager and append
<diagnostics>block to tool result. Gated behind existing[lsp] enabledconfig flag. Closes #428wangfengcsu@qq.com