You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Open with AI button to include current URL in prompt (#189)
The AI prompt now embeds the current page URL so the agent can fetch
the page content directly (either the .md file for doc pages or the
page itself for API pages). Also references llms.txt for API pages
so agents have a site overview fallback. Markdown is always copied
to clipboard as a convenience backup.
Co-authored-by: Britton Hayes <brittonhayes@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
// For API pages without .md files, copy content and prompt to paste
213
-
constprompt=`I have a page from the D&D 5e SRD API documentation: "${pageTitle}". The content is in my clipboard. I'll paste it so you can help me with questions about it.`;
207
+
constpageUrl=window.location.href;
208
+
constprompt=mdUrl
209
+
? `Fetch ${mdUrl} and read the documentation so I can ask questions about it. The page is located at ${pageUrl}`
210
+
: `Fetch ${pageUrl} and read the page content so I can ask questions about this D&D 5e SRD API documentation. You can also fetch https://5e-bits.github.io/docs/llms.txt for a site overview.`;
0 commit comments