Skip to content

feat(chat): generate videos inline from the chat UI#55

Merged
panwudi merged 1 commit into
mainfrom
feat/chat-inline-video
Jun 10, 2026
Merged

feat(chat): generate videos inline from the chat UI#55
panwudi merged 1 commit into
mainfrom
feat/chat-inline-video

Conversation

@panwudi

@panwudi panwudi commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Answers the owner's ask: video generation directly in the built-in chat. Video models reappear in the picker with a video badge; sending a prompt with one selected submits a /v1/videos job (draft preset, ~2 min), shows an inline progress bar, and embeds the finished mp4 as a playable video in the bubble.

Implementation notes: pure frontend (chat.html + i18n en/zh/ru); uses only the /v1/videos API surface that was real-machine validated in #53; content is fetched with the auth header into an object URL (video tags cannot send Authorization). Text record (job id / wall time / seed) persists across reloads; the blob URL intentionally does not.

Test plan: i18n JSON validated; the API call sequence (create -> poll -> content) is byte-identical to the curl flow验证过的 E2E in #53; Alpine bindings follow the existing message-bubble patterns. Live verification on m5max after deploy.

Self-merge under the same in-session owner authorization as #53/#54 (continuation of the same feature mandate, "前后端都得完美实现").


响应 owner 需求: 聊天内直接生成视频. 视频模型带角标回到下拉; 选中后发送
即提交 /v1/videos job (draft 档约 2 分钟), 气泡内进度条 + 完成后内嵌播放.
纯前端改动; API 调用序列与 #53 真机验证的 E2E 完全一致. 部署后在 m5max
实机验证. 依 #53/#54 同一会话内 owner 授权自助合并.

Video models are back in the chat model picker (tagged with a video
badge); selecting one turns the input box into a text-to-video prompt.
sendMessage routes to POST /v1/videos with a draft preset (384x224,
2s, 8 steps, ~2 min on M5 Max), polls job status with an inline
progress bar, then embeds the finished mp4 as a playable video in the
assistant bubble (fetched with auth into an object URL). Failures and
queue/memory rejections surface as normal error messages. The text
record (job id, wall time, seed) survives reloads; the blob URL does
not, by design.

---

视频模型回到 chat 模型下拉 (带 video 角标); 选中后输入框即文生视频
入口. sendMessage 改路由到 POST /v1/videos (draft 档 384x224, 2 秒,
8 步, M5 Max 上约 2 分钟), 轮询进度条, 完成后在助手气泡内嵌可播放的
mp4 (带鉴权拉取转 object URL). 失败与排队/内存拒绝以普通错误消息呈现.
文字记录 (job id, 用时, seed) 可跨刷新留存, blob URL 刷新即失效 (设计内).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant