feat: notes + agent queue, frontend rebuild, pip mirror, gitignore sync_rotation.json

- Add video_notes table and agent_queue table for persistent notes and AI agent tasks
- Add API endpoints: POST/GET /api/notes/{id}, POST /api/notes/migrate, agent queue endpoints
- Rebuild frontend: fix duplicate loadVideos(), non-blocking localStorage migration, notes UI
- Switch pip install to Tsinghua mirror for faster downloads in China
- Add backend/sync_rotation.json to .gitignore (runtime state)
This commit is contained in:
Gan, Jimmy
2026-07-08 02:23:00 +08:00
parent 77c6a9d963
commit a154bc7978
6 changed files with 434 additions and 117 deletions
+19
View File
@@ -23,6 +23,25 @@ async def init_db():
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)
""")
await db.execute("""
CREATE TABLE IF NOT EXISTS video_notes (
video_id TEXT PRIMARY KEY,
note_text TEXT NOT NULL,
updated_at TEXT DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (video_id) REFERENCES videos(video_id)
)
""")
await db.execute("""
CREATE TABLE IF NOT EXISTS agent_queue (
id INTEGER PRIMARY KEY AUTOINCREMENT,
video_id TEXT NOT NULL,
user_prompt TEXT NOT NULL,
status TEXT DEFAULT 'pending',
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
processed_at TEXT,
FOREIGN KEY (video_id) REFERENCES videos(video_id)
)
""")
await db.commit()
async def get_db():