Home Explore Blog CI



zed

crates/assistant_tools/src/diagnostics_tool/description.md
057691dfe7aed5e8a83bea980300a550350462b2a2d2f19600000003000002e3
Get errors and warnings for the project or a specific file.

This tool can be invoked after a series of edits to determine if further edits are necessary, or if the user asks to fix errors or warnings in their codebase.

When a path is provided, shows all diagnostics for that specific file.
When no path is provided, shows a summary of error and warning counts for all files in the project.

<example>
To get diagnostics for a specific file:
{
    "path": "src/main.rs"
}

To get a project-wide diagnostic summary:
{}
</example>

<guidelines>
- If you think you can fix a diagnostic, make 1-2 attempts and then give up.
- Don't remove code you've generated just because you can't fix an error. The user can help you fix it.
</guidelines>

Chunks
95807cd9 (1st chunk of `crates/assistant_tools/src/diagnostics_tool/description.md`)
Title: Get Diagnostics Tool Description
Summary
This describes a tool that retrieves diagnostics (errors and warnings) for a project or a specific file. It can be used after edits to check for issues. Providing a file path shows diagnostics for that file; providing no path gives a project-wide error/warning summary. The tool is allowed to attempt to fix diagnostics, but should not remove generated code if it fails to fix an error.