Skip to content

Add AI-generated SEO descriptions via Ollama Cloud - #16

Merged
kiran-brahma merged 4 commits into
mainfrom
feature/ai-seo-description
Oct 23, 2026
Merged

kiran-brahma merged 4 commits into
mainfrom
feature/ai-seo-description

Conversation

@kiran-brahma

Copy link
Copy Markdown
Owner

Summary

Adds a "Generate with AI" button to the SEO / GEO editor that drafts a 120–140 character description from a post's title and content using Ollama Cloud. Connection details live in a new Settings → AI assistant section (API key, address, model, optional extra instructions) and are saved in D1.

  • The API key is AES-GCM encrypted in its own ai_settings table (migration 0025), never returned to the browser (only the last 4 characters), and changing the address requires re-entering it.
  • Generation calls POST {address}/api/chat with a Bearer key, retries up to 3 times with a length correction, and only returns an answer that is 120–140 characters; otherwise it errors and nothing is written to the field.
  • This is a fork-specific personal-site feature; recorded in AGENTS.md.

Related issue

None.

Testing

  • yarn check — not run (yarn is unavailable in this environment).
  • tsc --noEmit and astro check: clean.
  • Worker suite: 230 passed, including new tests/worker/ai-settings.test.ts.
  • Unit suite: tests/unit/character-search-migration.test.ts fails with or without this change (verified with the migration removed).
  • Not tested against the live Ollama Cloud API.

Screenshots

N/A (not captured; UI is a new settings card and a button under the SEO description field).

Risks

  • Apply migration 0025 to D1 before use.
  • Rotating BETTER_AUTH_SECRET makes the saved key unreadable; re-enter it.
  • No rate limit on generation; address accepts any https host (admin-only, same-origin enforced by middleware).

Checklist

  • This pull request contains one focused change.
  • Tests were added or updated when behavior changed.
  • Documentation was updated when commands or public behavior changed.
  • No secrets, private configuration, production data, or generated files are included.

🤖 Generated with Claude Code

kiran-brahma and others added 2 commits October 23, 2026 22:10
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
cms-kb e1e5ea6 Oct 23 2026, 05:16 PM

kiran-brahma and others added 2 commits October 23, 2026 22:36
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kiran-brahma
kiran-brahma marked this pull request as ready for review October 23, 2026 17:44
@kiran-brahma
kiran-brahma merged commit 5413554 into main Oct 23, 2026
3 of 4 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-23T17:46:22.370465Z e1e5ea6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kiran-brahma
kiran-brahma deleted the feature/ai-seo-description branch October 23, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant