Step 260: project-wide diagnostics (getProjectDiagnostics)

Diagnostics across all open files in one call, grouped by file path.
Includes cross-file E0400 warnings for undefined imports, with optional
severity filter and file glob filter. 12/12 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-11 20:13:46 +00:00
parent f0417bccce
commit 8a461df47e
7 changed files with 611 additions and 1 deletions

View File

@@ -716,6 +716,27 @@ private:
toolHandlers_["whetstone_apply_quick_fix"] = [this](const json& args) {
return callWhetstone("applyQuickFix", args);
};
// whetstone_get_project_diagnostics
tools_.push_back({"whetstone_get_project_diagnostics",
"Get diagnostics across all open files in one call. Returns "
"diagnostics grouped by file path in compact format. Includes "
"cross-file errors (undefined imports). Filter by severity "
"or file glob pattern.",
{{"type", "object"}, {"properties", {
{"severity", {{"type", "string"},
{"enum", {"error", "warning", "info", "hint"}},
{"description",
"Maximum severity level to include"}}},
{"fileGlob", {{"type", "string"},
{"description",
"File pattern filter (e.g. *.py, utils.py)"}}}
}}}
});
toolHandlers_["whetstone_get_project_diagnostics"] =
[this](const json& args) {
return callWhetstone("getProjectDiagnostics", args);
};
}
// ---------------------------------------------------------------