Add AI Studio with agentic system, SnapGen video gen, Perchance image gen

Features:
- AI Studio module with 4 tabs: Video Generation, Image Generation, Lesson Plan, AI Agent Chat
- SnapGen AI API integration for video lesson generation (https://api.snapgen.ai/uapi/v1/generate)
  - Educational prompt enhancement with subject/topic/language context
  - Async polling for video generation status
  - Fallback to z-ai-web-dev-sdk if SnapGen not configured
- Perchance AI API integration for image generation (https://perchance.org/text-to-image-plugin)
  - Multiple styles: realistic, cartoon, watercolor, pixel, sketch, 3D
  - Fallback to z-ai-web-dev-sdk if Perchance not configured
- Agentic AI chat with teacher assistant context
- AI lesson plan generation

Fixes:
- Fix duplicate close button in onboarding tour (removed default Dialog close, kept custom one)
- Add SnapGen and Perchance fields to AISettings model

Navigation:
- AI Studio added to Insights section (teachers) and Student nav
- Digital Notebook confirmed available for both students and teachers
This commit is contained in:
Z User committed 2026-08-10 16:33:23 +00:00
1 parent c078ec36aa
commit 763ebef22b
8 files changed
+1278 -2

No files matched your search

+6
View File
@@ -2430,6 +2430,12 @@ model AISettings {
aiMaxRequestsPerDay Int @default(50) // Student daily limit
aiHelperMode String @default("guided") // guided, full, restricted
aiSystemPrompt String? // Custom system prompt for AI chat
// SnapGen AI (Video generation)
snapgenEnabled Boolean @default(false)
snapgenApiKey String?
// Perchance AI (Image generation)
perchanceEnabled Boolean @default(false)
perchanceApiKey String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt