文件最后提交记录最后更新时间
!152 merge cocreate-lsp-file-uri-encoding into release/v4.23.0 [共创大赛] 修正 LSP file URI 编码 Created-by: Graychao Commit-by: Codex Merged-by: saulcy Description: ## 问题\n\nLSP 客户端在发送 initialize.rootUri、didOpen、didChange、didClose 以及记录 OpenDocumentState 时,通过 format!("file://{}", path.display()) 手动拼接 file URI。\n\n当项目路径或文件名包含空格、#、中文等需要 percent-encoding 的字符时,生成的 URI 不符合 file:// URI 规范,可能导致语言服务器无法正确关联文档、诊断缓存不一致或文件同步失败。\n\n## 修复\n\n- 新增 path_to_uri(),使用 url::Url::from_file_path 生成标准 file URI。\n- rootUri、textDocument.uri 和 OpenDocumentState.uri 全部统一使用该 helper。\n- 保留 fallback,避免极端情况下无法转换路径时直接失败。\n- 增加 path -> URI -> path 回归测试,覆盖空格和 # 这类保留字符编码。\n\n## 验证\n\n- rust:1.88 cargo test -p atomcode-core --lib lsp::client 通过,9 个测试通过。\n- git diff --check 通过。\n\n[共创大赛] See merge request: atomgit_atomcode/atomcode!15214 天前
feat(lsp): add LSP types, JSON-RPC framing, and server registry 1 个月前
feat(codingplan): render rate_limit_windows, surface monthly exhaustion, fix ✗→× glyph - Add RateLimitWindow type + rate_limit_windows field to StatusResponse - /codingplan status iterates rate_limit_windows where show_enable==1: - window_size_seconds > 5h → 本月用量已耗尽 + reset_at - else → usage_status_desc + reset_at (single time source, no more divergence) - Fall back to legacy current_usage path when new field empty (old server compat) - Replace ✗ (U+2717) with × (U+00D7) in all i18n strings — macOS Terminal.app default font lacks ✗, rendering as ☐ tofu; × is Latin-1, universal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 9 天前
fix(lsp): route start failures through event channel instead of stderr When LspManager::ensure_server failed to start a language server (e.g. rust-analyzer not installed or its initialize handshake errored out), it called eprintln! directly to stderr. The TUI is in raw mode with a DECSTBM scroll region pinned around the body, so writes to the underlying stderr fd land at the terminal cursor — which sits inside the input prompt area between the two cyan rules. Users saw `[lsp] Failed to start rust-analyzer for .rs: LSP initialize handshake failed for rust-analyzer (language: rust)` overwriting their input box. Mirror the MCP fix from earlier in v4.21.x: emit LspConnectEvent through a tokio::sync::mpsc::UnboundedSender and let the TUI event loop render them as UiLine::CommandOutput (Started) / UiLine::Error (Failed) lines in scrollback. Warning events (e.g. shutdown teardown errors) route to the trace log so non-actionable noise doesn't churn the UI. Changes: * atomcode-core/src/lsp/manager.rs: * Add LspConnectEvent enum (Started / Failed / Warning). * Add connect_events: Option<UnboundedSender<LspConnectEvent>> field on LspManager. * Add LspManager::with_event_channel ctor that returns (Self, Receiver) — mirrors McpRegistry::with_event_channel. * Add emit() helper that no-ops when no listener is attached. * Replace both raw eprintlns: start failure -> Failed event, shutdown error -> Warning event. Successful start now emits Started so the TUI can render `✓ LSP server 'rust-analyzer' started for .rs` parallel to the MCP rendering. * Add build_lsp_manager_with_events companion to the existing builder. Common registry construction extracted to build_registry. * atomcode-core/src/lsp/mod.rs: re-export LspConnectEvent, LspManager, both builders. * atomcode-cli/src/main.rs: branch on is_headless — TUI mode uses build_lsp_manager_with_events and threads the receiver into atomcode_tuix::run. Headless keeps the no-channel path so LSP errors continue to surface on stderr where CI logs capture them. * atomcode-tuix/src/lib.rs: accept new lsp_connect_rx parameter on run(), plumb it into LoopCtx. * atomcode-tuix/src/event_loop/mod.rs: add field on LoopCtx. Add matching select! arm in BOTH the unix and non-unix select! blocks (the file has parallel blocks gated on cfg(unix)). Tests: * Three new unit tests in lsp::manager::tests: * with_event_channel_yields_empty_receiver_initially * ensure_server_silent_when_command_missing — verifies that which failure stays silent (matches "command not found ≠ start failure" semantics) * emit_no_op_when_receiver_dropped — verifies clean send-after- close behavior * All 16 LSP tests pass. 867 atomcode-core tests pass when run serially. The 3 parallel-mode flakes (commands::list_returns_sorted_ commands, provider::test_auth_token_path_consistency, turn::datalog:: resolve_log_dir_default_lands_under_home) are pre-existing shared- state races unrelated to this change — verified by stashing and re-running. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 1 个月前
feat(lsp): improve diagnostics sync and auto_detect registry control - Support auto_detect=false to use empty registry (user-controlled only) - Sync file content before reading diagnostics for accurate results - Add 150ms settle delay after LSP notification for diagnostics to be published - Fallback to ensure_server when file content cannot be read 1 个月前
feat(lsp): add LSP types, JSON-RPC framing, and server registry 1 个月前