Add diagnostics/read capability for reading LSP diagnostics
#495
nojaf
started this conversation in
Protocol Suggestions
Replies: 1 comment
-
|
Hi @benbrandt and @PsiACE, sorry for the direct ping. I noticed that my discussion (#495) doesn’t appear in the Protocol Suggestions overview: https://github.com/orgs/agentclientprotocol/discussions/categories/protocol-suggestions It has gathered 27 upvotes, so I just wanted to make sure it’s actually on your radar. Could you check whether it’s correctly categorised or if there’s something I should adjust? Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Code editors typically run language servers (LSP) that produce diagnostics: errors, warnings, and other feedback from compilers, linters, and type checkers. These diagnostics are a valuable signal for coding agents, especially after making edits, to determine whether changes introduced new errors or to help users fix existing ones.
Currently, ACP has no mechanism for agents to access editor diagnostics. Agents that run inside the editor (e.g. Zed's built-in agent) can access diagnostics directly through internal APIs, but external agents connected via ACP cannot. This creates a capability gap between internal and external agents.
An external agent's workarounds today are limited and suboptimal:
Proposal
Add a new
diagnostics/readclient method and a correspondingdiagnosticscapability onClientCapabilities.Client Capability
Request
Response
Use cases
diagnostics/readon the edited file to check whether new errors were introduced.diagnostics/readwith no path to get the summary, then reads specific files to get details and fix them.Design considerations
fs/read_text_fileexactly.ClientCapabilities.diagnostics.readand fall back to terminal-based compilation if the client doesn't support it.severityfield lets agents request only errors (skipping warnings/hints) when that's all they care about.Beta Was this translation helpful? Give feedback.
All reactions