后端: - 出稿后新增轻量提取调用,从脚本抽取人物/场景标签及每个标签的建议生图提示词, 写入 project.metadata(cast/scenes/cast_prompts/scene_prompts) - 提取调用接入计费闭环(reserve→charge/release,记为 script_optimization); best-effort:无模型/预扣失败/调用失败/解析失败都吞掉返回空,绝不阻断出稿 - generate_base_asset 增加 label,落 group.metadata,把生成结果归回脚本标签卡 前端: - 设定卡风格补齐到 5 个(真实测评/痛点种草/小红书种草/开箱测评/对比展示) - 标签改为待确认胶囊流:增删不立即落库,排进队列在输入框上方显示可撤销胶囊, 点发送才整体重写;待删划线、待加虚线 - 基础资产人物/场景按提取标签逐个 seed 卡,显示 AI 提示词、可改后生成 测试:新增提取+计费+release+label 共 4 个用例,全套 24 个通过(sqlite test 设置) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AirShelf Backend
All backend code lives under AirShelf/core/backend by project decision.
Local bootstrap
cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
Start workers in separate terminals:
cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info
ffmpeg must be available on PATH for Stage5 export jobs.
Runtime layout
- Django project:
airshelf - Domain apps:
apps/* - Settings module:
airshelf.settings.development - Celery app:
airshelf.celery
Secrets must be supplied by environment variables or .env; never commit values from account.md.
Useful commands
python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing