-
-
Notifications
You must be signed in to change notification settings - Fork 22
ai #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe PR adds AI-assisted content generation to the Kirby SEO plugin. It introduces a streaming AI infrastructure with multiple provider support (OpenAI, Anthropic), backend prompt scaffolding for SEO tasks, Vue component streaming integration, and updated field blueprints with AI-enabled seo-writer field types. Configuration, translations, and documentation are expanded accordingly. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Panel as Kirby Panel<br/>(Vue Component)
participant Backend as PHP Backend<br/>(Streaming Endpoint)
participant Provider as AI Provider<br/>(OpenAI/Anthropic)
User->>Panel: Click "Generate" (AI Enabled)
Panel->>Panel: Open instruction/edit dialog
User->>Panel: Confirm instruction
Panel->>Backend: POST /ai/stream<br/>(SSE, with instructions & field data)
activate Backend
Backend->>Backend: Validate permissions & ai.enabled()
Backend->>Backend: Load & render prompt snippets<br/>(introduction, meta, content, task)
Backend->>Backend: Send SSE headers<br/>Set up streaming
Backend->>Provider: Stream POST request<br/>(prompt, model, stream=true)
activate Provider
Provider-->>Backend: SSE event stream
deactivate Provider
activate Panel
loop Process SSE Events
Backend->>Backend: Parse SSE frames<br/>Map to Chunk types
Backend-->>Panel: SSE data event<br/>(chunk: type, text, payload)
Panel->>Panel: consumeStream()<br/>processStreamBuffer()
Panel->>Panel: handleAiEvent()<br/>(text-delta, error, etc.)
Panel->>Panel: applyAiDelta() to editor
Panel->>User: Render streamed text
end
deactivate Panel
deactivate Backend
User->>Panel: View generated content
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (40)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Release Notes
New Features
Documentation