Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/deploy-workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,21 @@ jobs:
- name: Configure Cloudflare Worker Secrets (dev)
run: |
echo "$SANITY_API_READ_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_API_READ_TOKEN --env=""
if [ -n "$SANITY_AUTH_TOKEN" ]; then
echo "$SANITY_AUTH_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_AUTH_TOKEN --env=""
fi
if [ -n "$SANITY_CONTEXT_TOKEN" ]; then
echo "$SANITY_CONTEXT_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_CONTEXT_TOKEN --env=""
fi
if [ -n "$OPENROUTER_API_KEY" ]; then
echo "$OPENROUTER_API_KEY" | pnpm --filter @codingcatdev/site exec wrangler secret put OPENROUTER_API_KEY --env=""
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SANITY_API_READ_TOKEN: ${{ secrets.SANITY_API_READ_TOKEN }}
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
SANITY_CONTEXT_TOKEN: ${{ secrets.SANITY_CONTEXT_TOKEN }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}

deploy-production:
Expand Down Expand Up @@ -97,11 +105,19 @@ jobs:
- name: Configure Cloudflare Worker Secrets (production)
run: |
echo "$SANITY_API_READ_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_API_READ_TOKEN --env production
if [ -n "$SANITY_AUTH_TOKEN" ]; then
echo "$SANITY_AUTH_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_AUTH_TOKEN --env production
fi
if [ -n "$SANITY_CONTEXT_TOKEN" ]; then
echo "$SANITY_CONTEXT_TOKEN" | pnpm --filter @codingcatdev/site exec wrangler secret put SANITY_CONTEXT_TOKEN --env production
fi
if [ -n "$OPENROUTER_API_KEY" ]; then
echo "$OPENROUTER_API_KEY" | pnpm --filter @codingcatdev/site exec wrangler secret put OPENROUTER_API_KEY --env production
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SANITY_API_READ_TOKEN: ${{ secrets.SANITY_API_READ_TOKEN }}
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
SANITY_CONTEXT_TOKEN: ${{ secrets.SANITY_CONTEXT_TOKEN }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
3 changes: 3 additions & 0 deletions apps/site/.dev.vars.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Local secrets for `wrangler dev` / platformProxy. Copy to .dev.vars (gitignored).
SANITY_API_READ_TOKEN=
# Optional: Organization-level Sanity Context Viewer token for https://api.sanity.io/v1/context/organizations/ovF2qiKSO/mcp/agent-aj-mcp
SANITY_CONTEXT_TOKEN=
SANITY_AUTH_TOKEN=
# Optional: PostHog project key for visitor flows, funnels, and LMS telemetry via /ingest proxy
PUBLIC_POSTHOG_KEY=
PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
26 changes: 26 additions & 0 deletions apps/site/src/components/ChatModal.astro
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@
</svg>
<span>Top videos</span>
</button>
<button
type="button"
class="ai-prompt-chip inline-flex items-center gap-1.5 text-xs px-3.5 py-2 rounded-full border border-border bg-card hover:bg-accent text-foreground cursor-pointer transition-all font-medium shadow-2xs hover:scale-105"
data-prompt="Tell me a programming dad joke!"
>
<svg class="size-3.5 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" x2="9.01" y1="9" y2="9"></line>
<line x1="15" x2="15.01" y1="9" y2="9"></line>
</svg>
<span>Coding joke</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -139,6 +152,19 @@
</svg>
<span>Top videos</span>
</button>
<button
type="button"
class="ai-prompt-chip shrink-0 inline-flex items-center gap-1.5 text-xs px-3 py-1 rounded-full border border-border bg-card hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer transition-colors font-medium shadow-2xs"
data-prompt="Tell me a programming dad joke!"
>
<svg class="size-3 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" x2="9.01" y1="9" y2="9"></line>
<line x1="15" x2="15.01" y1="9" y2="9"></line>
</svg>
<span>Coding joke</span>
</button>
</div>

<!-- Input Form -->
Expand Down
22 changes: 22 additions & 0 deletions apps/site/src/pages/.well-known/mcp/server-card.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,28 @@ export const GET: APIRoute = async ({ locals }) => {
required: ["mode", "documentId", "field"],
},
},
{
name: "knowledge_base_read",
title: "Read Knowledge Base Entries",
description:
"Read full entries from the CodingCat.dev Sanity Context Knowledge Base (e.g. 'AJ Knowlege Jokes' — programming & tech dad jokes, Git jokes, SQL jokes, Jeff Dean facts, coding culture).",
inputSchema: {
type: "object",
properties: {
knowledgeBaseId: {
type: "string",
description: "The ID of the Knowledge Base to read from.",
},
paths: {
type: "array",
items: { type: "string" },
description:
"List of entry paths to read from the Knowledge Base (up to 20 paths).",
},
},
required: ["knowledgeBaseId", "paths"],
},
},
],
};

Expand Down
Loading
Loading