feat: 结束视频后保留对话,支持继续文字聊天

- useVisionSession 新增 stopVideo 回调(停媒体流,保持连接和消息)
- App.tsx 控制区从二态改为三态(initial/video/textOnly)
- 文字对话态显示「重新开始视频」和「结束会话」按钮
- 新增 CSS 样式(video-ended-hint、btn--outline)
- 新增 i18n key(stopVideo/endSession/resumeVideo/video.ended)
- 新增设计方案文档
This commit is contained in:
2026-06-20 13:48:26 +08:00
parent 3dc2015a91
commit ae9a27c300
7 changed files with 385 additions and 4 deletions

View File

@@ -51,6 +51,8 @@ export const enUS: TranslationMap = {
"video.placeholder": "Type in the chat panel to start",
"video.cameraOff": "Camera is off",
"video.cameraOff.hint": "You can type in the chat panel",
"video.ended": "Video Ended",
"video.ended.hint": "You can continue chatting below",
// Controls
"controls.connecting": "Connecting...",
@@ -64,6 +66,9 @@ export const enUS: TranslationMap = {
"controls.observation": "👁️ Observe",
"controls.interrupt": "⏹ Interrupt",
"controls.stop": "End Session",
"controls.stopVideo": "End Video",
"controls.endSession": "End Session",
"controls.resumeVideo": "📹 Resume Video",
// Chat panel
"chat.title": "Chat",