Feature/ppt 3#27
Conversation
Backend: - Add PPT models (session, outline, message, result) with Alembic migration - Add Docmee API proxy client with token management and V2 task flow - Add auto image search service (Unsplash + LLM keyword translation) - Add LangGraph workflow (retrieve -> outline -> image -> approval) - Add PPT API routes: sessions, streaming outline, generate, modify, edit snapshot, download, versions Frontend: - Add ppt.js API client with SSE streaming support - Add components: WelcomePanel, ChatPanel, ChatMessage, ChatInput, OutlineCard, TemplateSelector, KnowledgeLibraryModal, PptSidebar, PptThumbnailList, PptCanvas - Rewrite LessonPrepPpt.vue with 3-stage flow (welcome -> chat -> preview) - Add schemas/ppt.py with all request/response models
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e05737d1a1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| outline_result = await db.execute( | ||
| select(PptOutline).where(PptOutline.id == body.outline_id) | ||
| ) |
There was a problem hiding this comment.
Scope outline lookup to the authenticated session
stream_generate_ppt validates session_id for the current user, but then loads the outline by id alone. A crafted request can pass an outline from a different session (or another user if IDs are guessed), causing unauthorized outline content to be rendered into a new PPT and also creating cross-session foreign-key links (ppt_results.outline_id) that can cascade-delete unrelated results later. The outline query should be constrained to the same session/user context before generation proceeds.
Useful? React with 👍 / 👎.
| clarificationStage.value = 'generating_outline' | ||
| await streamGenerateOutline(buildOutlineRequestText()) | ||
| clarificationStage.value = 'done' | ||
| } |
There was a problem hiding this comment.
Preserve clarification state when outline generation fails
After collecting clarification answers, handleSend always sets clarificationStage to done immediately after streamGenerateOutline(...), even when generation fails. Because streamGenerateOutline catches errors internally (does not rethrow), the stage still advances to done with no currentOutline, and subsequent sends bypass both idle and awaiting_reply branches, leaving the conversation stuck with no way to continue the outline flow.
Useful? React with 👍 / 👎.
变更摘要
本次 PR 主要完善了 PPT 生成、预览、导出与下载链路。
主要改动
outline_payload