claw-code/rust/crates/tools
TheArchitectit 4be1d43ada feat: auto-LSP integration with didOpen/didChange and diagnostic enrichment
Wire LSP into the Read/Edit/Write tool flow so the agent automatically
gets diagnostics after file operations:

- lsp_transport: Add LspServerMessage enum, read_message() for handling
  both responses and server-initiated notifications, notification queue
  with drain_notifications(), send_request now handles interleaved
  publishDiagnostics without breaking

- lsp_process: Add did_open(), did_change(), drain_diagnostics(),
  open file tracking (HashSet) and version counters for didChange,
  language_id_for_path() and severity_name() helpers

- lsp_client: Add notify_file_open(), notify_file_change(),
  fetch_diagnostics_for_file() with best-effort graceful fallback,
  registry-level open file tracking, diagnostic caching

- tools: Enrich run_read_file with didOpen + diagnostics, run_write_file
  and run_edit_file with didChange + diagnostics, format_diagnostic_appendix()
  for readable diagnostic output appended to tool results

All enrichment is non-blocking: if no LSP server is available, tools work
exactly as before. No errors propagate from the LSP layer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 16:49:32 -05:00
..
src feat: auto-LSP integration with didOpen/didChange and diagnostic enrichment 2026-06-10 16:49:32 -05:00
tests Keep G002 path-scope tests aligned with enforced denials 2026-05-14 17:33:47 +09:00
.gitignore fix: auto compaction threshold default 200k tokens 2026-04-01 03:55:00 +00:00
Cargo.toml feat(tools): add LoggingAspect to unified tool dispatch entry point 2026-05-25 11:22:45 +09:00
GIT_TOOLS_README.md feat: git-aware context tools 2026-05-25 11:24:37 +09:00