LSP client (lsp/client.rs): - JSON-RPC framing over subprocess stdio - Async request/response with oneshot channels - Background read loop routing responses to pending requests - 30s timeout per request, graceful shutdown LSP manager (lsp/manager.rs): - Auto-detect: Cargo.toml → rust-analyzer, package.json → tsserver, pyproject.toml → pyright, go.mod → gopls - Initialize handshake, lazy textDocument/didOpen - High-level methods: definition, references, hover, document_symbols, workspace_symbols - Graceful degradation when binary not on PATH LSP tools (tools.rs): - lsp_definition, lsp_references, lsp_hover, lsp_diagnostics, lsp_symbols - execute_lsp() async dispatch, is_lsp_tool() check - All routed as ToolSide::Client in orchestrator Tool schemas registered in Sol's build_tool_definitions() for Mistral. Integration tests (6 new): - Language detection for Rust project - is_lsp_tool routing - LSP initialize + hover on src/main.rs - Document symbols (finds main function) - Workspace symbols with retry (waits for rust-analyzer indexing) - Graceful degradation with bad project path
136 KiB
136 KiB