5eb922b1eb
Merge branch 'master' into feat/agent-ui
2026-05-16 16:31:12 +08:00
06a4af7c1e
feat(video-from-script): 批量生产支持剪映草稿地址跟踪
...
- 新增 `--draft-url` 命令行参数,允许为单个批次项指定草稿地址
- capcut_assemble 模块现在返回 `{ draftUrl, draftId }` 对象
- 组装阶段完成后自动将草稿地址保存到 manifest 文件中
- CSV/XLSX 导出表头新增"草稿地址"列,支持批量导出草稿链接
2026-05-15 12:04:51 +08:00
lc
8787d369d3
feat(video-from-script): 批量生产元数据增强 — 选题/转发文案/草稿命名/导出/草稿箱改名
...
- batch-pipeline.js: 新增 mark 元数据字段(topicA/B, draftName, forwardCopy, hashtags)
- batch-pipeline.js: 新增 export 命令导出 CSV/XLSX 最终表格
- batch-pipeline.js: 新增 rename-drafts 命令批量重命名剪映草稿(Mac 直接 mv 文件夹)
- batch-pipeline.js: 完善 displayTitle 向后兼容旧 topic 字段
- lib/phase-tts: 增强 TTS 生成稳定性
- lib/phase-videos: 视频生成优化
- lib/video-poll-utils: 提取轮询重试共享工具
- CLAUDE.md: 补充批量生产选题/转发文案/草稿命名/导出/草稿箱改名文档
- 执黑先行 account.json: 配置更新
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-14 23:16:12 +08:00
lc
2449fbabdf
chore: 合并上游更新 — ttsVoices 映射及执黑先行配置
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-12 13:02:32 +08:00
163a83ab6d
feat(video-from-script): 新增产品宣传片账户配置及 Ken Burns 效果支持
...
- 添加 product_viral_factory 账户配置,支持产品宣传片自动生成
- 集成 Ken Burns 效果到组装流程
- 优化视频生成阶段的空结果诊断和修复提示
- 改进 manifest 保存逻辑,处理 EPERM 权限错误
- 添加 .claudeignore 忽略生成文件
2026-05-12 01:28:40 +08:00
06f44ddafa
refactor(video-from-script): 提取轮询重试逻辑为共享工具
...
提取三个视频生成器中重复的 `pollWithRetry` 函数到共享模块 `video-poll-utils`,消除代码重复。新增两层重试机制:轮询级(处理网络瞬断)和任务级(创建新任务 + 提示词优化)。同时优化 `phase-videos` 中视频状态管理和 manifest 保存逻辑。
2026-05-12 01:24:55 +08:00
7b743dc701
feat(video-from-script): 支持分段音频时长测量
...
为 `capcut_assemble.js` 中的 item 增加 segments 属性支持,当 item 包含多个音频分段时,计算各分段总时长并赋给 `audioDuration`,提升对分段式音轨素材的处理能力。
2026-05-12 01:08:49 +08:00
lc
540d104d72
chore: 移除误提交的测试文件
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-10 17:07:16 +08:00
lc
2232be4eee
feat: 视频阶段诊断增强 + 新账号 product_viral_factory + 执黑先行提示词更新
...
- phase-videos.js: 增加 item 不符合条件时的逐项诊断日志,明确 confirmed 校验
- pipeline-utils.js: saveManifest 先直写,EPERM 时回退 tmp+rename
- 执黑先行: 分镜/图片/视频提示词完善
- 新增 product_viral_factory 账号(PPT产品宣传片方向)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-10 17:07:06 +08:00
18fce1b5a1
feat(video-from-script): 添加 TTS 音色管理和解析功能
...
- 在 config.json 中添加 `ttsVoices` 音色库,支持音色名称到 ID 的映射
- 实现 `resolveVoice` 函数,将音色名称解析为实际 ID
- 更新账号系统和批量管道,支持通过音色名称配置 TTS 语音
- Excel 导入和 CLI 参数新增音色字段,支持按行指定不同音色
2026-05-08 23:53:37 +08:00
4a15e38169
chore(video-from-script): 删除临时文件 items_tmp.json
2026-05-08 23:06:40 +08:00
cfdf30d438
feat(video-from-script): 添加批量视频生产编排器
...
新增 `batch-pipeline.js` 脚本,实现从 Excel/CSV 批量创建视频生产任务的核心功能:
- 支持 `init`、`status`、`mark`、`retry-failed`、`next` 等 CLI 子命令
- 解析表格数据,提取脚本、账号、模式等字段,生成 batch-manifest.json 元数据
- 支持 `xlsx`/`csv` 格式输入,自动校验账号存在性
- 提供状态追踪与任务重试机制,为 Orchestrator-Worker 批量模式奠定基础
同时更新 `CLAUDE.md` 文档,添加批量生产功能的操作指南。
2026-05-08 23:06:17 +08:00
a3d823f81f
chore(db): 更新 SQLite 数据库 WAL 和 SHM 文件
...
数据库预写日志和共享内存文件随数据库操作自动更新
2026-05-08 22:19:11 +08:00
401cc129b5
feat(chat): 为图片附件添加类型标识以支持多类型附件
...
在图片消息的接口类型中显式添加 `type: 'image'` 属性,为后续支持多种附件类型(如视频、文件等)做好类型基础。
2026-05-08 03:16:48 +08:00
5087d77f23
fix(chat): 修复重连后对话状态丢失导致消息发送失败的问题
...
在 WebSocket 重连场景下,服务端可能丢失 `conversationId` 状态,导致后续消息发送被拒绝。通过在客户端消息中携带 `conversationId`,并在服务端添加 fallback 恢复逻辑,确保重连后仍能正常发送消息。
同时优化了 `pendingMessage` 类型定义,支持存储待发送的图片附件,修复了延迟发送场景下图片丢失的问题。
2026-05-08 03:15:21 +08:00
7440ade66d
feat(assets): 优化资产预览性能并添加资源管理器连接状态提示
...
- 使用缩略图替代原图展示,通过 sharp 库生成缓存缩略图
- 优化资产分组逻辑,避免不必要的重计算
- 添加 WebSocket 连接状态提示到输入框
- 使用 `useCallback` 和 `useRef` 优化组件渲染性能
- 添加 AbortController 支持请求取消,防止内存泄漏
- 添加 `disconnected` 事件处理,自动重置会话状态
2026-05-08 02:47:23 +08:00
a92379e20e
feat(ui): 替换原生select为shadcn/ui组件并支持图片消息发送
...
- 将 AccountBasicTab 和 ConfigForm 中的原生 select 替换为 shadcn/ui Select 组件
- ChatInput 支持拖放上传图片附件
- 添加 attachment button 并整合图片附件到消息发送
- 优化 Select 组件样式,增加过渡动画和悬停效果
- 调整 ConfigForm tab 切换样式为按钮风格
- AssetGallery 使用 useAccounts hook 获取账户列表
- 重新构建前端静态资源
2026-05-08 02:29:07 +08:00
2186b04675
feat(web): 将原生 select 替换为 shadcn/ui Select 组件并支持图片消息发送
...
- 在 AccountForm、AssetGallery、ChatView、ConfigForm、PromptEditor 中将 `<select>` 替换为 shadcn/ui 的 Select 组件以统一 UI 风格
- 在 ChatView 和 useChat hook 中支持发送图片附件
- 更新 pi-bridge 和 ws/chat 以处理 agent 调用中的图片数据
2026-05-08 02:18:50 +08:00
803b55605f
feat(agent): 支持工具执行结果中的图片和视频资产预览
...
在聊天消息组件中添加资产灯箱预览功能,支持展示工具调用返回的图片和视频资源。新增 `AssetLightbox` 组件用于全屏浏览资产,并扩展消息类型以包含资产元数据。同时引入 `@radix-ui/react-select` 依赖并为服务端添加资产 URL 转换工具函数。
2026-05-08 02:14:28 +08:00
e16305840b
feat(agent): 添加视频创作工作流技能系统和流程工具
...
新增基于 SKILL.md 的视频创作工作流系统,Agent 可通过 skills 目录加载结构化的导演指令;实现 validate_storyboard、update_manifest_items、confirm_images 三个流程工具支撑分镜校验、提示词更新和图片确认。
2026-05-08 01:54:04 +08:00
3a124f0310
feat(web): 添加pi-coding-agent依赖包
2026-05-08 01:48:35 +08:00
2db7f316f2
chore(web): 将项目切换到ESM模块系统
...
将项目从CommonJS切换到ESM模块系统,更新了`dev:server`和`db:init`脚本以使用`node --import tsx/esm`模式,并在`package.json`中添加了`"type": "module"`配置。
2026-05-08 01:43:49 +08:00
a6f2973f21
refactor(agent): 迁移AI会话引擎至pi-agent-core库
...
将原有基于Anthropic/OpenAI SDK的直播聊天代理重构为使用`@earendil-works/pi-agent-core`和`@earendil-works/pi-ai`库的统一API。
新增pi-bridge、pi-model、pi-persist、pi-tools四个模块,封装Agent路由、模型配置、消息持久化和工具适配逻辑。移除`chat.ts`中大量死代码,简化WebSocket处理流程。
BREAKING CHANGE: 移除`VideoAgent`类的`getAnthropicClient`、`getOpenAIClient`、`executeTool`等方法,外部调用需迁移至新pi-bridge API。`PROJECT_ROOT`路径计算方式变更,从`../../..`变为`../../`。
2026-05-08 01:43:33 +08:00
2ab5396461
refactor(agent): 将 tools 模块拆分为独立文件并优化导入路径
...
将 `tools.ts` 拆分为按功能划分的独立文件,并存放于 `tools/` 目录下,同时更新导入路径;优化 agent 系统提示语,移除冗余的「美图 Agent」前缀。
2026-05-08 01:05:37 +08:00
10f11189f8
feat(web): 重构对话列表和资产页面,添加加载骨架屏和确认对话框
...
- 重构 MiddlePanel 对话列表,按时间分组并优化交互
- 为 AccountList 和 AssetGallery 添加加载骨架屏
- 用确认对话框替换原生 confirm,统一交互体验
- 优化聊天消息组件的视觉样式和细节
- 添加 Escape 键快速返回账户列表导航
- 更新构建资源文件
2026-05-08 00:53:34 +08:00
0fb33b9f57
feat(web): 重构组件样式并添加确认对话框组件
...
- 优化组件视觉风格: 使用渐变色、阴影和圆角增强现代感
- 添加 ConfirmDialog 组件和 useConfirm hook 用于确认操作
- 改进聊天界面: 添加滚动到底部按钮、斜杠命令自动弹出
- 统一组件间距和颜色方案,提升 UI 一致性
2026-05-08 00:41:09 +08:00
66d170066a
feat(web): 添加全局 Toast 通知系统和资产预览导航功能
...
- 新增 ToastProvider 和 useToast hook,支持全局成功/错误/信息提示
- 资产预览增加左右导航按钮、键盘快捷键(方向键)和计数器显示
- 资产库增加图片/视频类型筛选标签页及计数
- 对话列表增加最近对话展示、搜索优化和删除确认
- 消息增加删除确认对话框
- 优化聊天自动滚动行为,仅在用户未手动滚动时跟随新内容
- 新增删除消息 API 端点
- 优化消息历史清理逻辑,过滤错误消息和孤儿 tool 消息
- 添加自定义滚动条样式
- 优化账户参考图显示逻辑,支持本地文件显示
- 修复对话创建流程,直接导航到新创建的对话
2026-05-08 00:23:36 +08:00
088bdb9a8e
feat(web): 重构前端UI并支持OpenAI协议
...
- 添加账号管理详情页(基本信息、提示词、CapCut、参考图标签页)
- 重构资产页面,按项目组分开展示图片/视频
- 聊天界面支持深度思考内容折叠展示、复制、删除消息
- 设置页面支持Agent配置(Anthropic/OpenAI协议)和工具配置
- 后端支持OpenAI兼容协议流式输出和DeepSeek思考模式
- 添加对话置顶/删除功能、数据库迁移、资产清单API
- 添加账号参考图上传/删除、技能配置持久化、连接测试API
2026-05-07 23:48:26 +08:00
lc
1c0703cc80
feat: 为图片遮罩新增 KenBurns 效果及视频阶段并发优化
...
- capcut_assemble: 添加 KenBurns 效果支持(慢速推拉动画)
- phase-videos: 区分"无任务"与"已有 video"的日志输出,避免误报跳过
- 张不苦账号提示词文档精简(拆分/图片提词/遮罩提词词)
- 新增 CHANGELOG.md 和 CONSTRAINT_ENGINE.md 约束引擎文档
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 19:53:03 +08:00
01963aac96
feat(web): add image/video generation and manifest tools to agent
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 04:17:54 +08:00
5104bbc18a
feat(web): modernize chat UI, fix account navigation
...
- Chat: avatars, cleaner bubbles, improved spacing, typing dots
- Input: rounded design, auto-expand textarea, arrow button, slash commands
- Account list: fix navigation with useParams reactivity
- Bot/User role labels in messages
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 04:14:16 +08:00
e850613972
feat(web): add markdown syntax highlighting, slash commands, stop button, quote/reply
...
- PromptEditor with Prism.js syntax highlighting
- Slash commands (/run, /status, /images, /list, /help) in chat input
- Stop button to cancel ongoing generation
- Quote/reply and regenerate/continue actions in chat
- MiddlePanel with conversation timestamps and preview
- Pipeline progress in chat view
- Fix all remaining dark theme classes
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 04:09:00 +08:00
f43a640e64
fix(web): add conversation preview, fix dark theme remnants
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 04:07:46 +08:00
348cc0c5b9
refactor(web): router-based navigation, light theme, form config
...
- Replace Zustand activeView with React Router (NavLink + Routes)
- White/light modern theme with indigo accents
- Sidebar with Chinese labels under icons
- ConfigForm with individual form fields (no JSON textareas)
- Account switching with context injection into chat
- Fix duplicate conversation creation with useRef guard
- Asset gallery: smaller 6-column grid with date labels
- All components updated to light color scheme
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 03:48:14 +08:00
2859fa3f2c
fix(web): restructure client as standalone Vite project
...
- client/ now has its own package.json (independent Vite project)
- Tailwind + PostCSS config inlined into vite.config.ts
- dev:client uses `cd client && npm run dev` (CWD = Vite root)
- Root package.json only has server deps
- Fix tsconfig deprecation (remove baseUrl)
- Add `npm run setup` for one-command install
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 03:36:22 +08:00
c257dd2b8c
fix(web): change port to 3007, add auto port cleanup, graceful error handling
2026-05-07 03:26:22 +08:00
001dbde9f4
feat(web): integrate Claude LLM streaming with markdown rendering
...
- Add Anthropic SDK with DeepSeek-compatible API config
- Streaming tool-use loop in WebSocket chat handler
- GitHub-style markdown rendering with markdown-it
- Tool status indicators and thinking states in chat UI
- Fix Tailwind content path and CSS border utility
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 03:22:15 +08:00
d6b18fb7dc
fix(web): add class-variance-authority dependency
2026-05-07 02:48:01 +08:00
1bad63ff6d
feat(web): add conversation search, rename, and pipeline resume
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:46:29 +08:00
177c90a661
feat(web): add pipeline resume from conversation context
2026-05-07 02:46:16 +08:00
af6ea966fd
feat(web): add asset gallery with waterfall layout, preview and delete
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:44:06 +08:00
685e383621
feat(web): add asset CRUD and scanning API
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:44:04 +08:00
6e3f5d9415
feat(web): add chat UI with WebSocket streaming and conversation persistence
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:41:01 +08:00
10685ea866
feat(web): add pipeline progress inline component
2026-05-07 02:38:38 +08:00
375540f528
feat(web): add WebSocket chat handler with message persistence
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:36:42 +08:00
19a1a4e6d2
feat(web): add pi-agent tool layer with pipeline integration
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:36:28 +08:00
e35778ebea
feat(web): add prompt editor with split-pane and Markdown editing
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:34:04 +08:00
66f0f82fde
feat(web): add prompt file read/write API
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:32:50 +08:00
c9fe380d0d
feat(web): add account list and form components
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-07 02:30:32 +08:00
93e67bb8dc
feat(web): add settings config form
2026-05-07 02:29:31 +08:00