refactor(layout): 重构布局组件并添加视频播放功能

-重写 Header 组件,使用新的 OptionLayoutContext 替代 HistoryContext
- 新增 VideoPlayer 组件,用于播放视频
- 更新 Playground 组件,集成新的侧边栏和视频播放功能
- 重构 Layout 组件,支持新的选项布局
- 更新相关路由和导出导入逻辑,以支持上述更改
This commit is contained in:
zhaoweijie
2025-08-25 20:43:27 +08:00
parent c937694d8b
commit 901bc13526
4 changed files with 27 additions and 9 deletions

View File

@@ -52,7 +52,8 @@ const PlaygroundIodProvider: React.FC<{ children: React.ReactNode }> = ({
if (iodLoading || !messages.length) {
return undefined
}
console.log(messages)
console.log(currentMessageId)
// 如果不存在currentMessageId默认返回最后一个message
if (!currentMessageId) {
const lastMessage = messages.at(-1)