feat: add question bank reference for course generation#44
Open
YizukiAme wants to merge 2 commits intoTHU-MAIC:mainfrom
Open
feat: add question bank reference for course generation#44YizukiAme wants to merge 2 commits intoTHU-MAIC:mainfrom
YizukiAme wants to merge 2 commits intoTHU-MAIC:mainfrom
Conversation
- Add Question Bank pill button with popover in generation toolbar - Support pasting reference questions or importing .txt/.md files - Inject question bank context into outline generation prompt - AI can draw original questions or generate new ones in the same style - Add i18n keys for zh-CN and en-US - Wire up full data flow: FormState -> session -> API -> prompt template
94520e0 to
194bfce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Question Bank Reference feature to the generation toolbar, allowing users to upload or paste reference questions that the AI uses when generating quiz scenes. Closes #43.
What it does
.txt/.md)FormState→sessionStorage→generation-preview→scene-outlines-streamAPI → prompt templateFiles changed (7)
lib/i18n/common.tsapp/generation-preview/types.tsquestionBankContextfield in session statelib/generation/prompts/templates/.../user.md### Question Bank Referencesection + instruction #9app/api/generate/scene-outlines-stream/route.tsquestionBankContextto promptapp/generation-preview/page.tsxquestionBankContextto APIapp/page.tsxquestionBankTextin FormState + sessioncomponents/generation/generation-toolbar.tsxTesting
pnpm buildpasses