Several Pastures pages include “Diagnose →” links that open the AI drawer with a pre-filled query, giving users one-click access to AI diagnostics for a specific issue.Documentation Index
Fetch the complete documentation index at: https://docs.pastures.farm/llms.txt
Use this file to discover all available pages before exploring further.
Pages with Ask AI buttons
| Page | Trigger | Example pre-filled query |
|---|---|---|
| Advisories | Each advisory card | ”Diagnose: etcd cluster has only 1 member” |
| Cluster Intelligence | Each detected issue | ”Diagnose: Longhorn replica count degraded” |
| Monitoring | Each active alert | ”Diagnose: Node memory pressure on worker-03” |
| Harvester VMs | VM error states | ”Diagnose: VM stuck in Starting state” |
How it works
When a user clicks a “Diagnose →” link, the page dispatches aCustomEvent on the window object:
- Opens the drawer (if not already open)
- Pre-fills the input textarea with
detail.query - Automatically submits the query
Integration pattern
To add a “Diagnose →” button to any Pastures page, dispatch the event with the relevant diagnostic text:Behavior details
- If the drawer is already open, a new event replaces the current input and submits
- The pre-filled query appears in the user’s message history as if they typed it
- Context awareness still applies — if the user is on the Advisories page, page-specific suggestions remain available after the conversation