feat: add get_documentation tool to global mode ai chat#9489
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
588575d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b269e74e.windmill.pages.dev |
| Branch Preview URL: | https://add-get-documentation-global.windmill.pages.dev |
324434f to
35ab6ad
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35ab6ad to
8391dba
Compare
|
Claude finished @centdix's task in 2m 31s —— View job PR ReviewGood to merge — clean, minimal, well-tested addition. No blocking issues. What I verified
Notes (non-blocking)
Test coverage
|
Pi ReviewGood to merge What this PR doesRegisters the existing AnalysisImport and registration — System prompt rule (line 605) — placed right after the existing No new public surfaces — the only user-facing change is tool availability in global chat. No new APIs, no auth changes, no Svelte components. No Test coverageFrontend — one line added to an existing unit test ( AI evals — three well-designed boundary cases ( Manual verification — should be performed before merge: open the global-mode AI chat with a configured AI provider and docs backend ( |
Codex ReviewGood to merge No issues found. Checked for bugs, security, public-surface concerns, and AGENTS.md compliance. Test Coverage Frontend coverage is appropriate: the existing global tool test now asserts Manual verification before merge: ask global mode a Windmill concept question and confirm it calls |
…-global-chat # Conflicts: # ai_evals/cases/global.yaml # frontend/src/lib/components/copilot/chat/global/core.test.ts
Pi ReviewGood to merge What this PR doesRegisters the existing AnalysisImport and registration — System-prompt rule (global/core.ts:634) — placed immediately after the existing Underlying behavior — No new public surfaces — no Eval schema — the new cases use Test coverage
|
Codex ReviewGood to merge No issues found. Checked for bugs, security, public-surface concerns, Test coverage Frontend coverage is appropriate: the existing global tool presence test now asserts Manual verification still worth doing before merge: in global-mode AI chat with an AI provider and |
Summary
The global-mode AI chat could not look up Windmill product documentation, while navigator (and ask/api) modes have a
get_documentationtool for exactly that. This PR registers the same shared tool in global mode so the global assistant can answer "how does X work in Windmill" questions from authoritative platform docs instead of hallucinating.Changes
getDocumentationToolfromnavigator/core(the same tool already shared byaskandapimodes — no duplication) and register it in theglobalToolsarray, alongside the other informational tools.get_documentation, explicitly distinguishing it from the existingget_instructionstool (product docs vs. authoring guidance for a specific item type) so the model doesn't confuse the two.globalToolspresence test to assertget_documentationis registered.ai_evalsboundary cases to theglobalsuite guarding theget_documentation/get_instructionssplit (tool-use validation,skipJudgewhere no draft is produced):global-test27— vocabulary trap: "difference between a resource and a variable?" must useget_documentation, must not callget_instructions(subject: resource).global-test28— pure platform-mechanics question ("how does Windmill decide which worker runs a job?"): must useget_documentation, must not callget_instructions.global-test29— authoring (create a script): must useget_instructions+write_script, must not callget_documentation.AI eval verification
Ran the three new cases across four providers via
ai_evals(bun run cli -- run global <ids> --models sonnet,gpt-5.5,gemini-3.1-pro-preview,deepseek-v4-pro). 12/12 pass.The multi-model run caught a false-negative in an earlier draft of test28: its original prompt ("how do retries/error handling work for a step") is authoring-adjacent, so gemini and deepseek correctly consulted docs but also pulled
get_instructions— single-model (sonnet) testing had hidden this. test28 was reworked to a pure platform-mechanics question where forbiddingget_instructionsis fair, and the boundary now holds across all four providers.Caveat: evals are single-run per model, so this is not a flakiness guarantee.
Test plan
npm run checkpasses (frontend type-check) — not yet run locallyglobalToolsunit test assertingget_documentationis present passes — added but the frontend vitest suite was not executed locally (validated by reasoning)get_documentation/get_instructionsboundary verified viaai_evalsacross sonnet / gpt-5.5 / gemini-3.1-pro / deepseek-v4-pro (12/12)get_documentationand answers from the returned docs (requires a configured AI provider + the/api/inkeepdocs backend)🤖 Generated with Claude Code