Add Video Learning Agent for short video platforms

Features:
- VideoLearningAgent for automated video watching on Douyin/Kuaishou/TikTok
- Web dashboard UI for video learning sessions
- Real-time progress tracking with screenshot capture
- App detection using get_current_app() for accurate recording
- Session management with pause/resume/stop controls

Technical improvements:
- Simplified video detection logic using direct app detection
- Full base64 hash for sensitive screenshot change detection
- Immediate stop when target video count is reached
- Fixed circular import issues with ModelConfig

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
let5sne.win10
2026-01-09 22:54:57 +08:00
parent 3552df23d6
commit 5b3f214e20
15 changed files with 2317 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
@echo off
REM Video Learning Demo Script for Windows
REM This script starts the dashboard and opens the video learning page
echo ============================================
echo AutoGLM Video Learning Demo
echo ============================================
echo.
echo Starting Dashboard...
echo.
REM Start the dashboard in background
start "AutoGLM Dashboard" python -m uvicorn dashboard.main:app --host 0.0.0.0 --port 8080 --reload
echo Waiting for dashboard to start...
timeout /t 3 /nobreak > nul
echo.
echo Dashboard starting at: http://localhost:8080
echo Opening Video Learning page in browser...
echo.
REM Open the video learning page
start http://localhost:8080/static/video-learning.html
echo.
echo ============================================
echo Video Learning Demo is ready!
echo ============================================
echo.
echo Press Ctrl+C to stop the dashboard
echo.
REM Keep the script running
pause

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# Video Learning Demo Script for Linux/Mac
# This script starts the dashboard and opens the video learning page
echo "============================================"
echo "AutoGLM Video Learning Demo"
echo "============================================"
echo ""
echo "Starting Dashboard..."
echo ""
# Start the dashboard in background
python -m uvicorn dashboard.main:app --host 0.0.0.0 --port 8080 --reload &
DASHBOARD_PID=$!
echo "Waiting for dashboard to start..."
sleep 3
echo ""
echo "Dashboard starting at: http://localhost:8080"
echo "Opening Video Learning page in browser..."
echo ""
# Open the video learning page
if command -v xdg-open > /dev/null; then
xdg-open http://localhost:8080/static/video-learning.html
elif command -v open > /dev/null; then
open http://localhost:8080/static/video-learning.html
else
echo "Please open your browser and navigate to:"
echo "http://localhost:8080/static/video-learning.html"
fi
echo ""
echo "============================================"
echo "Video Learning Demo is ready!"
echo "============================================"
echo ""
echo "Press Ctrl+C to stop the dashboard"
echo ""
# Wait for dashboard process
wait $DASHBOARD_PID