0cf7f14992
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m4s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m17s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 3m55s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 4m9s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 4m21s
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
问题4:图片分析提速 - 新增 doubao_vision_lite_model 配置(默认 doubao-1-5-vision-lite-250915)+ doubao_vision_use_lite 开关 - call_vision 支持 model/max_tokens/temperature/timeout/system_prompt 参数覆盖 - _step_image_analysis 改 ThreadPoolExecutor 并行调用 VLM(max_workers=min(4,n_images)),lite 模型 timeout=30s,max_tokens=1024 - 图片直接传公网 OSS URL 给豆包视觉,无需本地下载-上传链路(原流程已是直传,保持) 问题5:VLM 商品描述增强(对齐竞品截图2粒度) - 新 _IMAGE_ANALYSIS_SYSTEM_PROMPT 要求输出 16 个字段:name/brand/category/spec/appearance/packaging/text_on_package/colors/material_or_texture/key_features/visual_style/scene/suitable_scenes/target_audience/selling_points/summary - appearance(外观80-150字)+packaging(包装80-150字)要求自然语言细节描述,summary(150-250字)直接给前端展示 - 严禁编造:看不清/没有的统一填「无法判断」,text_on_package 只 OCR 清晰可见的 - _build_products_summary 优先用 VLM 返回的 summary 段(自然段落给编导模型效果最好),兜底再拼结构化字段 - _analyze_single_image 独立函数,所有新字段都有 setdefault 防御,兼容旧字段名 问题6:爆款结构(copy_structure → viral_structure)透传 - 后端现有 schema 已支持 viral_structure 字段,STEP2 generate-copy 也已传,本次把 viral_structure 注入 _SCRIPT_GENERATION_PROMPT - prompt 新增「爆款结构」字段+关键要求第8条:必须严格按该结构节奏/段落顺序编排镜头台词 - 前端 STRUCTURES 从 4 个扩展到 19 个(按协调 Agent 提供的中文列表) - 一键路径 generateViralVideo 已传 viral_structure,无需改动 其它: - .env.example 补 DOUBAO_VISION_MODEL/LITE_MODEL/USE_LITE 三个配置项 - scripts/render_env.sh 把新变量加入 SHARED_SECRETS 白名单 验收:单图分析目标 10-15s(lite 模型+并行),VLM 返回 6 维度丰富描述+summary,copy_structure 影响文案结构
小虾 SaaS - 前端应用
基于 Vite + React 18 + TypeScript + Ant Design 的现代化 SaaS 前端应用。
快速开始
# 安装依赖
npm install
# 启动开发服务器
npm run dev
# 构建生产版本
npm run build
# 预览生产版本
npm run preview
技术栈
- 框架: React 18.3.1
- 语言: TypeScript 5.5.3
- 构建工具: Vite 5.3.1
- UI 组件库: Ant Design 5.18.0
- 路由: React Router 6.24.0
- 状态管理: Zustand 4.5.2
- 数据获取: React Query 5.45.0
- HTTP 客户端: Axios 1.7.2
- 表单: React Hook Form 7.52.0 + Zod 3.23.8
项目结构
src/
├── api/ # API 服务层
├── components/ # React 组件
│ ├── common/ # 通用组件
│ ├── layout/ # 布局组件
│ └── business/ # 业务组件
├── pages/ # 页面组件
│ ├── auth/ # 认证页面
│ ├── workspace/ # 工作空间
│ ├── subscription/# 订阅管理
│ ├── admin/ # Admin 后台
│ └── profile/ # 个人中心
├── hooks/ # 自定义 Hooks
├── store/ # 状态管理
├── router/ # 路由配置
├── types/ # TypeScript 类型
├── utils/ # 工具函数
└── styles/ # 全局样式
功能特性
- ✅ 用户认证(登录/注册/密码重置)
- ✅ 工作空间管理
- ✅ 成员管理和权限控制
- ✅ 订阅计划和升级
- ✅ 配额使用监控
- ✅ Admin 管理后台
- ✅ 个人设置和安全
- ✅ 响应式设计
环境变量
创建 .env 文件:
VITE_API_URL=http://localhost:8000
开发指南
添加新页面
- 在
src/pages/下创建页面组件 - 在
src/router/index.tsx中添加路由 - 确保导出
Component用于懒加载
添加新 API
- 在
src/api/下创建服务模块 - 定义 TypeScript 接口
- 使用
apiClient发起请求
状态管理
使用 Zustand 创建 Store:
import { create } from "zustand"
interface MyStore {
data: any
setData: (data: any) => void
}
export const useMyStore = create<MyStore>((set) => ({
data: null,
setData: (data) => set({ data }),
}))
部署
# 构建
npm run build
# 产物在 dist/ 目录
License
MIT