Add Ask Matt AI agent interface with Turnstile verification#316
Open
MattBidewell wants to merge 3 commits into
Open
Add Ask Matt AI agent interface with Turnstile verification#316MattBidewell wants to merge 3 commits into
MattBidewell wants to merge 3 commits into
Conversation
Adds a static /agent route hosting a guardrailed chat UI. The page calls out to a separate Worker (private repo, deployed at agent.matty.dev) for answers — the main site stays fully static. Turnstile-gated, 5-turn session cap, 500-char input limit. Styles use existing design tokens so the widget matches both themes. Requires PUBLIC_AGENT_URL and PUBLIC_TURNSTILE_SITE_KEY (see .env.example). https://claude.ai/code/session_014wWrTmyNCJxRVFyTJYLPZj
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
matty-dev | fe03e6d | Commit Preview URL Branch Preview URL |
Apr 16 2026, 09:39 PM |
Drops the site nav/footer on the agent route via a dedicated AgentLayout. Adds a back link to matty.dev, a centered empty state with clickable suggestion chips, avatar-flanked AI responses, right-aligned user bubbles, animated thinking dots, and a rounded pill composer with icon send button. Visually matches the standard AI chat aesthetic (Claude/ChatGPT) using existing design tokens so both light and dark themes stay consistent. https://claude.ai/code/session_014wWrTmyNCJxRVFyTJYLPZj
Surfaces a clear warning in two places: a prominent disclaimer box in the empty state noting responses are AI-generated, may be inaccurate, and don't represent Matt's own words; plus a shorter permanent footnote under the composer reinforcing the same. https://claude.ai/code/session_014wWrTmyNCJxRVFyTJYLPZj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new "Ask Matt" feature that allows users to interact with a guardrailed AI agent about Matt's work, writing, and projects. The implementation includes a conversational UI component with Cloudflare Turnstile bot protection and a dedicated page.
Key Changes
New AskMatt component (
src/components/agent/AskMatt.astro): A conversational interface that:Styling (
src/components/agent/AskMatt.module.css): Complete visual design with:New page (
src/pages/agent.astro): Dedicated route for the Ask Matt feature with proper SEO metadataEnvironment configuration (
.env.example): Documentation for required environment variables:PUBLIC_AGENT_URL: Backend agent Worker endpointPUBLIC_TURNSTILE_SITE_KEY: Cloudflare Turnstile public keyNotable Implementation Details
astro:page-load) for proper initializationhttps://claude.ai/code/session_014wWrTmyNCJxRVFyTJYLPZj