Contextual ‘Diagnose →’ links open the AI drawer pre-filled with diagnostic queries.
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.
The event-based pattern means any page — including custom pages added by contributors — can integrate with Pastures AI without importing drawer components directly.
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
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Pastures","colors":{"primary":"#007ACC","light":"#4DA6FF","dark":"#005A99"},"favicon":"https://mintcdn.com/pastures/gb_Mh1mS8tvN9Den/favicon.svg?fit=max\u0026auto=format\u0026n=gb_Mh1mS8tvN9Den\u0026q=85\u0026s=5c0fb1bc972b8426e4d394777eeb0dfb","logo":{"light":"https://mintcdn.com/pastures/gb_Mh1mS8tvN9Den/logo/light.svg?fit=max\u0026auto=format\u0026n=gb_Mh1mS8tvN9Den\u0026q=85\u0026s=7441e227a2d9e5f90d490136ff0b25a0","dark":"https://mintcdn.com/pastures/gb_Mh1mS8tvN9Den/logo/dark.svg?fit=max\u0026auto=format\u0026n=gb_Mh1mS8tvN9Den\u0026q=85\u0026s=387de652edc9ff4a787853d95d9cdf7e"},"navbar":{"links":[{"label":"Support","href":"https://pastures.farm/support"}],"primary":{"type":"button","label":"Get Oracle","href":"https://pastures.farm/pricing"}},"footer":{"socials":{"github":"https://github.com/pastures-farm/pastures-rancher","website":"https://pastures.farm"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/pastures-farm/pastures-rancher","icon":"github"},{"anchor":"Community","href":"https://pastures.farm/support","icon":"slack"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pastures","hasAudioNarration":false,"actualSubdomain":"pastures","customDomains":["docs.pastures.farm"],"gitSource":{"type":"github","owner":"pastures-farm","repo":"pastures-rancher","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21ec732fb2a99bab9309ff","collectionId":"684a536b-eae6-4f4d-a79f-f0fe43f8bb53","schemaVersion":"v2"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"}},"buildId":"6a21ec732fb2a99bab9309ff:success","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Documentation","count":41},{"language":"default","tag":"Features","count":11},{"language":"default","tag":"Pastures AI","count":6},{"language":"default","tag":"Configuration","count":5},{"language":"default","tag":"Development","count":5},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"Rancher Oracle","count":4},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Installation","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"pastures-ai/ask-ai-buttons","slug":"/pastures-ai/ask-ai-buttons","pageMetadata":{"title":"Ask AI Buttons","description":"Contextual 'Diagnose →' links open the AI drawer pre-filled with diagnostic queries.","href":"/pastures-ai/ask-ai-buttons"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Contextual ‘Diagnose →’ links open the AI drawer pre-filled with diagnostic queries.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Several Pastures pages include `,_jsx(_components.strong,{children:`“Diagnose →”`}),` links that open the AI drawer with a pre-filled query, giving users one-click access to AI diagnostics for a specific issue.`]}),`\n`,_jsx(Heading,{level:`2`,id:`pages-with-ask-ai-buttons`,children:`Pages with Ask AI buttons`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Page`}),_jsx(_components.th,{children:`Trigger`}),_jsx(_components.th,{children:`Example pre-filled query`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Advisories`}),_jsx(_components.td,{children:`Each advisory card`}),_jsx(_components.td,{children:`”Diagnose: etcd cluster has only 1 member”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Cluster Intelligence`}),_jsx(_components.td,{children:`Each detected issue`}),_jsx(_components.td,{children:`”Diagnose: Longhorn replica count degraded”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Monitoring`}),_jsx(_components.td,{children:`Each active alert`}),_jsx(_components.td,{children:`”Diagnose: Node memory pressure on worker-03”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Harvester VMs`}),_jsx(_components.td,{children:`VM error states`}),_jsx(_components.td,{children:`”Diagnose: VM stuck in Starting state”`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`When a user clicks a “Diagnose →” link, the page dispatches a `,_jsx(_components.code,{children:`CustomEvent`}),` on the `,_jsx(_components.code,{children:`window`}),` object:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`dispatchEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CustomEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pastures:drawer:open'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` detail:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Diagnose: etcd cluster has only 1 member'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The AI drawer listens for this event. When received, it:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Opens the drawer (if not already open)`}),`\n`,_jsxs(_components.li,{children:[`Pre-fills the input textarea with `,_jsx(_components.code,{children:`detail.query`})]}),`\n`,_jsx(_components.li,{children:`Automatically submits the query`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This means the user sees the drawer open and immediately begin generating a diagnosis — no manual typing required.`}),`\n`,_jsx(Heading,{level:`2`,id:`integration-pattern`,children:`Integration pattern`}),`\n`,_jsx(_components.p,{children:`To add a “Diagnose →” button to any Pastures page, dispatch the event with the relevant diagnostic text:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`vue`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`vue`,children:_jsxs(_components.code,{language:`vue`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`template`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` @click`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"diagnose\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Diagnose →`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`template`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` lang`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` diagnose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`dispatchEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CustomEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pastures:drawer:open'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` detail:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Diagnose: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`issue`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`The event-based pattern means any page — including custom pages added by contributors — can integrate with Pastures AI without importing drawer components directly.`})}),`\n`,_jsx(Heading,{level:`2`,id:`behavior-details`,children:`Behavior details`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`If the drawer is already open, a new event replaces the current input and submits`}),`\n`,_jsx(_components.li,{children:`The pre-filled query appears in the user’s message history as if they typed it`}),`\n`,_jsx(_components.li,{children:`Context awareness still applies — if the user is on the Advisories page, page-specific suggestions remain available after the conversation`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Ask AI Buttons","description":"Contextual 'Diagnose →' links open the AI drawer pre-filled with diagnostic queries.","href":"/pastures-ai/ask-ai-buttons"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Pages with Ask AI buttons","slug":"pages-with-ask-ai-buttons","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Integration pattern","slug":"integration-pattern","depth":2,"children":[]},{"title":"Behavior details","slug":"behavior-details","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"pastures","siteName":"Pastures","title":"Ask AI Buttons - Pastures","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-25T23:36:00.087Z","originalFileLocation":"pastures-ai/ask-ai-buttons.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Contextual \u0026#x27;Diagnose →\u0026#x27; links open the AI drawer pre-filled with diagnostic queries.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pastures\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ask AI Buttons - Pastures\">\u003cmeta data-mint-head property=\"og:description\" content=\"Contextual \u0026#x27;Diagnose →\u0026#x27; links open the AI drawer pre-filled with diagnostic queries.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pastures\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pastures.mintlify.app/_mintlify/api/og/v2?division=Pastures+AI\u0026amp;title=Ask+AI+Buttons\u0026amp;description=Contextual+%27Diagnose+%E2%86%92%27+links+open+the+AI+drawer+pre-filled+with+diagnostic+queries.\u0026amp;theme=e4549a01edf7ab7e3c5e3abb\u0026amp;signature=756833978c5021be79831c1dc2ac2cc1bb788702687d358379f6b5e1bd27cc60\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Ask AI Buttons - Pastures\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Contextual \u0026#x27;Diagnose →\u0026#x27; links open the AI drawer pre-filled with diagnostic queries.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pastures.mintlify.app/_mintlify/api/og/v2?division=Pastures+AI\u0026amp;title=Ask+AI+Buttons\u0026amp;description=Contextual+%27Diagnose+%E2%86%92%27+links+open+the+AI+drawer+pre-filled+with+diagnostic+queries.\u0026amp;theme=e4549a01edf7ab7e3c5e3abb\u0026amp;signature=756833978c5021be79831c1dc2ac2cc1bb788702687d358379f6b5e1bd27cc60\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/pastures/y9zra0lPtEOQ8sf6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pastures\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007ACC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pastures-ai/ask-ai-buttons.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pastures.farm/#organization\",\"name\":\"Pastures\",\"url\":\"https://docs.pastures.farm\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pastures/gb_Mh1mS8tvN9Den/logo/light.svg?fit=max\u0026auto=format\u0026n=gb_Mh1mS8tvN9Den\u0026q=85\u0026s=7441e227a2d9e5f90d490136ff0b25a0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pastures.farm#website\",\"name\":\"Pastures\",\"url\":\"https://docs.pastures.farm\",\"publisher\":{\"@id\":\"https://docs.pastures.farm/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons#webpage\",\"url\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons\",\"name\":\"Ask AI Buttons\",\"description\":\"Contextual 'Diagnose →' links open the AI drawer pre-filled with diagnostic queries.\",\"dateModified\":\"2026-04-25T23:36:00.087Z\",\"isPartOf\":{\"@id\":\"https://docs.pastures.farm#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Pastures AI\",\"item\":\"https://docs.pastures.farm/pastures-ai/context-awareness\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ask AI Buttons\",\"item\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons#article\",\"headline\":\"Ask AI Buttons\",\"name\":\"Ask AI Buttons\",\"description\":\"Contextual 'Diagnose →' links open the AI drawer pre-filled with diagnostic queries.\",\"url\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pastures.farm/pastures-ai/ask-ai-buttons#webpage\"},\"dateModified\":\"2026-04-25T23:36:00.087Z\",\"publisher\":{\"@id\":\"https://docs.pastures.farm/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pastures.farm#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pastures\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Pastures","nav":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/pastures-farm/pastures-rancher","icon":"github"},{"anchor":"Community","href":"https://pastures.farm/support","icon":"slack"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Architecture","href":"/architecture"}]},{"group":"Installation","pages":[{"title":"Requirements","href":"/installation/requirements"},{"title":"Developer Load","href":"/installation/developer-load"},{"title":"Helm Chart Installation","href":"/installation/helm-chart"}]},{"group":"Configuration","pages":[{"title":"AI Model Configuration","href":"/configuration/ai-model"},{"title":"Oracle Setup","href":"/configuration/oracle-setup"},{"title":"BYO Model Setup","href":"/configuration/byo-model"},{"title":"Demo Mode","href":"/configuration/demo-mode"},{"title":"MCP Connections","href":"/configuration/mcp-connections"}]},{"group":"Features","pages":[{"title":"Advisories","href":"/features/advisories"},{"title":"Pastures AI","href":"/features/pastures-ai"},{"title":"Overview (Cluster Intelligence)","href":"/features/overview"},{"title":"Operations","href":"/features/operations"},{"title":"Harvester HCI","href":"/features/harvester"},{"title":"Infrastructure","href":"/features/infrastructure"},{"title":"AI Agents","href":"/features/ai-agents"},{"title":"Fleet Overview","href":"/features/fleet-overview"},{"title":"Projects \u0026 Quotas","href":"/features/projects-quotas"},{"title":"Workloads","href":"/features/workloads"},{"title":"Access Control","href":"/features/access-control"}]},{"group":"Pastures AI","pages":[{"title":"Context Awareness","description":"Pastures AI adapts its suggested questions based on which Rancher page you're viewing.","href":"/pastures-ai/context-awareness"},{"title":"Ask AI Buttons","href":"/pastures-ai/ask-ai-buttons"},{"title":"Source Citations","description":"AI responses include linked GitHub issues as verifiable source citations.","href":"/pastures-ai/source-citations"},{"title":"Fix Verification","href":"/pastures-ai/fix-verification"},{"title":"Fleet Correlation","href":"/pastures-ai/fleet-correlation"},{"title":"Cluster Memory","href":"/pastures-ai/cluster-memory"}]},{"group":"Rancher Oracle","pages":[{"title":"What is Rancher Oracle?","href":"/rancher-oracle/what-is-oracle"},{"title":"Pricing","href":"/rancher-oracle/pricing"},{"title":"The Oracle Corpus","href":"/rancher-oracle/corpus"},{"title":"Oracle API Reference","href":"/rancher-oracle/api-reference"}]},{"group":"Development","pages":[{"title":"Contributing","href":"/development/contributing"},{"title":"Local Development Setup","href":"/development/local-setup"},{"title":"Extension Structure","href":"/development/extension-structure"},{"title":"Adding Pages","href":"/development/adding-pages"},{"title":"Demo Mode Development Guide","href":"/development/demo-mode-guide"}]},{"group":"API Reference","pages":[{"title":"API Reference Overview","href":"/api-reference/overview"},{"title":"Diagnose Endpoint","href":"/api-reference/diagnose"},{"title":"Advisories Endpoint","href":"/api-reference/advisories"},{"title":"Health \u0026 Status Endpoints","href":"/api-reference/health"}]}]}]},"title":"Ask AI Buttons - Pastures","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":[],"chunks":[]}