You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Yogthos
committed
LSP Phase 7: CLI + config plumbing through build_channels
src/config/mod.rs
- LspConfig: untagged enum, accepts `true`/`false` OR a map of
per-server overrides.
- LspServerConfig: all-optional fields (command, extensions, env,
initialization, disabled). Missing fields fall back to built-in.
- Config gains an optional `lsp` field; default-None (which the CLI
resolver treats as enabled-with-built-ins).
- 4 config-parse tests: bool form, per-server map form, absent-is-None,
mixed command/disabled entries.
src/cli.rs
- `--no-lsp` flag.
- `resolve_lsp_enabled(cli, cfg)` resolver: no-tools or no-lsp turns it
off; otherwise the config bool (default true) decides.
src/lsp/spawn.rs
- ProcessSpawner::default_commands(): the 4 built-in commands for v1
servers (rust-analyzer, typescript-language-server --stdio,
pyright-langserver --stdio, clojure-lsp). User config overrides are
merged in main::compile_lsp_commands.
src/main.rs
- build_channels grows a 10th return slot: Option<Arc<LspManager>>.
Constructed when lsp_enabled, via ProcessSpawner with merged defaults
+ user overrides.
- compile_lsp_commands: starts from defaults, applies per-server
overrides (disabled removes, command replaces, env/init merge).
- Threaded through all 3 `build_agent` call sites + run_interactive.
src/provider.rs + src/agent/builder.rs
- New `lsp_manager: Option<Arc<LspManager>>` arg on build_agent /
build_agent_inner. Threaded down to the WriteTool / EditTool /
ReadTool constructors (which Phase 6 prepared the field for) AND to
the LspTool registration (Phase 5's tool now actually gets attached
to the agent when lsp_manager is present).
src/ui/mod.rs + src/ui/slash.rs + src/extras/acp/mod.rs
- run_interactive accepts and forwards lsp_manager.
- Plan-switch rebuild passes the live lsp_manager.clone() (so the
rebuilt agent still has LSP tools — same pattern as the bg-store
fix from Phase 5).
- 7 slash.rs sub-rebuild sites + 2 ui/mod.rs prompt-switch sites pass
`None` for lsp_manager (intentional — these rebuild for /model,
/context-reset etc., which don't need to re-attach LSP).
- ACP path passes `None`.
src/agent/tools/lsp.rs
- Drops the Phase-5 `#![allow(dead_code)]` now that builder.rs wires it.
Phase 6: 116, Phase 7: +4 config tests -> 120 LSP tests.
Suite: 422 -> 426.
0 commit comments