feat: AI caption generation with Claude/OpenAI (#161) #195

Merged
jmiller merged 2 commits from feature/161-ai-post-generation into dev 2026-06-28 16:23:13 +00:00
Owner

Summary

  • AiGeneratorHelper: Calls Claude Messages API or OpenAI Chat Completions to generate platform-optimized captions (social, short, chat, email_subject) from article content
  • AiController: AJAX endpoint with CSRF token validation and ACL enforcement
  • Config: New "AI Caption Generation" fieldset with provider selection, API key, model override, and tone (professional/friendly/casual)
  • Content plugin: "Generate with AI" button injected into the Share Content panel that auto-fills all caption fields via AJAX

Test plan

  • Configure AI provider and API key in component Options > AI Caption Generation
  • Open an existing article in the editor
  • Verify "Generate with AI" button appears in the Share Content tab
  • Click button and confirm all 4 caption fields are populated
  • Test with Claude and OpenAI providers separately
  • Verify button is hidden when AI provider is set to "None"
  • Verify CSRF and ACL checks reject unauthorized requests

Closes #161

## Summary - **AiGeneratorHelper**: Calls Claude Messages API or OpenAI Chat Completions to generate platform-optimized captions (social, short, chat, email_subject) from article content - **AiController**: AJAX endpoint with CSRF token validation and ACL enforcement - **Config**: New "AI Caption Generation" fieldset with provider selection, API key, model override, and tone (professional/friendly/casual) - **Content plugin**: "Generate with AI" button injected into the Share Content panel that auto-fills all caption fields via AJAX ## Test plan - [ ] Configure AI provider and API key in component Options > AI Caption Generation - [ ] Open an existing article in the editor - [ ] Verify "Generate with AI" button appears in the Share Content tab - [ ] Click button and confirm all 4 caption fields are populated - [ ] Test with Claude and OpenAI providers separately - [ ] Verify button is hidden when AI provider is set to "None" - [ ] Verify CSRF and ACL checks reject unauthorized requests Closes #161
jmiller added 2 commits 2026-06-28 16:22:52 +00:00
feat: add AI caption generation with Claude and OpenAI support (#161)
Universal: Auto Version Bump / Version Bump (push) Successful in 7s
99e4a83ed5
- AiGeneratorHelper: Claude Messages API and OpenAI Chat Completions
  with structured JSON output for social/short/chat/email_subject
- AiController: AJAX endpoint with CSRF and ACL checks
- config.xml: new AI fieldset (provider, API key, model, tone)
- Content plugin: "Generate with AI" button in Share Content panel
- Language strings for all AI config and UI elements

Authored-by: Moko Consulting
chore(version): auto-bump patch 01.08.46-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
4ce96dc95b
jmiller merged commit bcc17e4882 into dev 2026-06-28 16:23:13 +00:00
jmiller deleted branch feature/161-ai-post-generation 2026-06-28 16:23:14 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteCross#195