Your Name
|
dd0b8e7357
|
debug: 添加占位图状态调试日志
|
2026-02-02 00:34:25 +08:00 |
|
Your Name
|
b8279e4b93
|
fix: 修复 huanke-gemini 占位图不显示问题
- 在 messages.tsx 中将 huanke-gemini 和 gemini-image 纳入 isGeminiModel 判断
- 在 chat.tsx 中将 huanke-gemini 和 gemini-image 记录为 gemini 类型的生成任务
- 确保使用 huanke-gemini 时显示 Gemini 图片生成占位图
|
2026-02-02 00:23:31 +08:00 |
|
Your Name
|
51196ea0dd
|
feat: 添加无限画布设置(启用/禁用、默认模型)
|
2026-02-01 22:41:42 +08:00 |
|
Your Name
|
c8e565d016
|
fix: 修复发送按钮被挤出输入框的布局问题
|
2026-02-01 22:24:49 +08:00 |
|
Your Name
|
a4de05925a
|
feat: 添加新建画布按钮功能
|
2026-02-01 22:08:05 +08:00 |
|
Your Name
|
97daaeeb36
|
fix: 切换画布时清空状态并重新加载数据
|
2026-02-01 19:46:00 +08:00 |
|
Your Name
|
2c8bcd14cd
|
fix: 用户消息按parts原始顺序渲染图片标签和文字
|
2026-02-01 19:27:05 +08:00 |
|
Your Name
|
323646f1d4
|
feat: 用户消息显示图片标签样式,隐藏标注提示前缀
|
2026-02-01 19:00:51 +08:00 |
|
Your Name
|
2e6f9d52bb
|
fix: 发送后清空选中状态和输入框标签
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 18:13:16 +08:00 |
|
Your Name
|
7d3f97e972
|
fix: 发送消息后清空contenteditable内容
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:43:27 +08:00 |
|
Your Name
|
923a2288da
|
feat: 使用contenteditable实现图片标签和文字混合输入
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:28:27 +08:00 |
|
Your Name
|
de63528cc1
|
style: 优化输入框布局,图片标签在上方
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:24:34 +08:00 |
|
Your Name
|
e5524fbaf5
|
fix: 图片标签和文本输入在同一行
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:21:21 +08:00 |
|
Your Name
|
a0abd6959c
|
style: 输入框内显示图片标签
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:18:11 +08:00 |
|
Your Name
|
59a81f3c0e
|
feat: 画布图片节点添加图片标注功能
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 17:12:30 +08:00 |
|
Your Name
|
94640002d0
|
fix: 多图支持和画布自动命名模型ID映射
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 16:58:27 +08:00 |
|
Your Name
|
96e4c8ebe0
|
fix: 画布聊天面板过滤空消息
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 16:48:40 +08:00 |
|
Your Name
|
2a14ae8445
|
fix: 过滤清理后为空的消息,避免显示空对话框
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 16:42:23 +08:00 |
|
Your Name
|
ddf49cb329
|
feat: 画布聊天自动使用最近图片
当用户发送文字请求但没有附带图片时,自动按以下优先级获取图片:
1. 画布中选中的图片
2. 画布中最近添加的图片
3. 历史对话中的图片
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 16:07:34 +08:00 |
|
Your Name
|
3377e0daea
|
fix: 恢复画布 overflow-hidden 防止内容溢出覆盖工具栏
工具栏已使用 Portal 渲染,不再需要 overflow-visible
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:38:33 +08:00 |
|
Your Name
|
2524ec551b
|
fix: 修复画布图片重复添加和工具栏位置问题
1. 首次加载时不将历史消息中的图片添加到画布(避免重复)
2. 检查画布中是否已存在相同 URL 的图片
3. 工具栏位置在渲染时实时计算(跟随画布平移缩放)
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:35:09 +08:00 |
|
Your Name
|
dbdd188c9e
|
fix: 使用 Portal 渲染工具栏避免被裁剪
1. 工具栏使用 createPortal 渲染到 body 级别
2. 根据图片位置动态计算工具栏定位
3. z-index 设为 9999 确保最顶层显示
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:29:11 +08:00 |
|
Your Name
|
58b9c1cbd5
|
fix: 工具栏显示在图片外部上方
1. 修改画布容器为 overflow-visible
2. 工具栏定位到图片上方 (-top-12)
3. 提高 z-index 确保不被遮挡
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:24:11 +08:00 |
|
Your Name
|
8f1f924421
|
feat: 优化画布图片选中工具栏
1. 选中图片时在顶部显示工具栏(放大、移除背景、场景、角度、扩展、调整)
2. 工具栏使用圆角胶囊样式,类似竞品设计
3. 显示图片标题和尺寸信息
4. 添加更多操作下拉菜单(下载、删除)
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:21:29 +08:00 |
|
Your Name
|
049795e264
|
feat: 画布聊天支持智能自动模式
1. 添加「智能自动」模型选项(默认选中)
2. 使用 qwen3-vl 先对话理解需求、优化提示词
3. 然后自动调用最佳生图模型生成图片
4. 支持历史图片上下文自动关联
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:17:18 +08:00 |
|
Your Name
|
8f90aaba08
|
feat: 画布聊天面板功能增强
1. 加载历史对话消息(从 API 获取)
2. 选中画布图片时自动添加到对话附件
3. 修复类型错误
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:13:09 +08:00 |
|
Your Name
|
6464135cf6
|
debug: 添加自动命名调试日志
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 15:09:18 +08:00 |
|
Your Name
|
3bac27265b
|
fix: 修复图片提取逻辑避免重复添加
1. 只提取原始图片 URL,不提取缩略图
2. 有 markdown 格式时不再匹配普通 URL
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:47:55 +08:00 |
|
Your Name
|
e0366c43fd
|
fix: 上传图片立即添加到画布
1. 图片上传成功后立即显示在画布中
2. 同时触发自动命名和设置缩略图
3. 移除发送时重复添加图片的逻辑
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:45:41 +08:00 |
|
Your Name
|
5e642165df
|
feat: 上传图片自动识别并命名画布
1. 使用千问VL模型识别图片主体作为画布名称
2. 第一张上传的图片自动设为画布缩略图
3. 画布列表显示缩略图预览
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:41:01 +08:00 |
|
Your Name
|
ccf610bcf8
|
fix: 用户上传的图片也添加到画布中
发送消息时将用户上传的图片立即添加到画布
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:38:05 +08:00 |
|
Your Name
|
c78743cbed
|
fix: 修复画布聊天 ID 格式问题
从 canvas-{uuid} 格式中提取纯 UUID,以满足后端 schema 要求
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:32:54 +08:00 |
|
Your Name
|
339bf91019
|
fix: 修复画布聊天面板发送消息格式
1. 修复 handleSend 中 parts 数组的顺序(文件在前,文本在后)
2. 添加 videoParams: undefined 确保 schema 兼容
3. 添加调试日志帮助排查问题
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:22:41 +08:00 |
|
Your Name
|
057014900c
|
feat: 完善画布功能按钮与后端 API 对接
1. 修复 CanvasChatPanel 中的图片上传 - 使用 parts 数组而非 attachments
2. 扩展 chat schema 支持更多图片格式(gif, bmp, svg)
3. 实现尺寸调整功能 - 添加对话框选择尺寸
4. 更新 imageGenerationService.resizeImage 使用 canvas API 调整尺寸
5. 所有图片编辑功能已对接:抠图、变清晰、扩展、角度编辑、场景裂变、尺寸调整
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 12:18:16 +08:00 |
|
Your Name
|
a779555f3f
|
fix: 更新 chat 和 dynamic-provider 配置
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 11:24:05 +08:00 |
|
Your Name
|
a6a267e819
|
fix: 修复占位图和图片显示问题
1. 移除 onFinish 中的数据库重新加载逻辑(时机不对,会打断图片生成流程)
2. 保留 appendedMessages 和 mergedMessages 合并逻辑
3. 修复 dynamic-provider.ts 的循环依赖(使用动态导入)
4. 不在 onFinish 中调用 completeGeneration(),因为图片可能还在生成
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 11:18:39 +08:00 |
|
Your Name
|
d6073ec091
|
fix: 改进消息合并逻辑,确保历史消息不丢失
1. 简化 initialMessagesRef 初始化
2. 在 mergedMessages 中使用 baseMessages 作为后备
3. 添加 initialMessages 到 useMemo 依赖数组
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 11:11:22 +08:00 |
|
Your Name
|
12ae592746
|
fix: 修复历史消息消失和用户消息重复问题
1. 移除 wrappedSendMessage,避免用户消息 ID 冲突导致重复
2. 添加 initialMessagesRef 保存初始消息,防止历史消息丢失
3. 改进 mergedMessages 逻辑:合并 初始消息 + useChat消息 + appendedMessages
4. 使用 Map 进行去重,按创建时间排序
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 11:04:29 +08:00 |
|
Your Name
|
05236a7b86
|
fix: 在 onFinish 后从数据库重新加载消息
这是根治方案 B:
1. 添加 GET /api/messages 端点从数据库获取消息
2. 在 onFinish 后延迟 500ms,然后从数据库重新加载消息
3. 更新 setMessages 和清空 appendedMessages
这确保了 data-appendMessage 保存到数据库的消息能正确显示
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:58:08 +08:00 |
|
Your Name
|
7943b7fa5b
|
fix: 简化占位图逻辑,确保文字回复显示
1. 简化 useEffect 中的占位图逻辑
2. 当收到 AI 文字回复后,立即隐藏占位图让用户看文字
3. 修复 hasRestoredPending 逻辑,收到 AI 回复后不再显示恢复的占位图
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:52:51 +08:00 |
|
Your Name
|
52286c40f8
|
fix: 修复占位图不消失的问题
只用 isGeneratingImageFlag 来控制生图占位图的显示,
不再检查消息中的 GENERATING_IMAGE 标记,
因为该标记会一直存在于消息中
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:44:48 +08:00 |
|
Your Name
|
2fc702b543
|
fix: 优化占位图显示时序
1. AI 文字回复显示后延迟 3 秒再显示动态占位图
2. 延迟期间隐藏占位图,让用户有时间阅读文字
3. 只有 isGeneratingImageFlag=true 时才显示图片生成占位图
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:42:28 +08:00 |
|
Your Name
|
b60afb16cb
|
fix: 使用 wrappedSendMessage 保存用户消息到独立状态
1. 创建 wrappedSendMessage 包装函数
2. 在发送消息时同时保存用户消息到 appendedMessages
3. 这样即使 useChat 重置消息状态,用户消息也会保留在 mergedMessages 中
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:35:03 +08:00 |
|
Your Name
|
b3d37f815a
|
fix: 使用独立的 appendedMessages 状态避免与 useChat 冲突
参考 lobe-chat-pro 的架构,将 data-appendMessage 消息存储在
独立的状态中,通过 mergedMessages 合并后传递给组件,
避免直接修改 useChat 的内部状态导致消息丢失
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:29:21 +08:00 |
|
Your Name
|
3737b1ce99
|
fix: 修复占位图逻辑和移除导致错误的刷新
1. 移除 onFinish 中的 router.refresh(),它导致 React 错误
2. 简化占位图逻辑:hasImageContent 优先级最高
3. 当有图片内容时,无论其他标记如何,都隐藏占位图
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 10:20:59 +08:00 |
|
Your Name
|
096faa257a
|
debug: 添加图片检测日志
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 03:09:03 +08:00 |
|
Your Name
|
22b9ad0d70
|
fix: 使用 requestAnimationFrame 立即添加消息
问题:延迟到 onFinish 处理消息导致消息被 useChat 重置
解决:使用 requestAnimationFrame 在收到消息时立即添加,避免延迟
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 03:04:07 +08:00 |
|
Your Name
|
2d0b556ee9
|
fix: 当 isGeneratingImageFlag=true 时强制显示占位图
问题:hasImageContent 检测到历史消息中的图片导致占位图提前消失
解决:isGeneratingImageFlag 优先级最高,为 true 时忽略 hasImageContent
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 02:58:50 +08:00 |
|
Your Name
|
ed30ca214d
|
debug: 添加 isGeneratingImageFlag 调试日志
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 02:54:23 +08:00 |
|
Your Name
|
c6180e8610
|
fix: 修复智能自动模式占位图提前消失问题
问题:
- appendMessage 放入队列延迟处理导致 GENERATING_IMAGE 标记无法被及时检测
- status 变成 ready 时占位图消失,但图片还在生成中
解决方案:
- 添加 isGeneratingImageFlag 状态来跟踪图片生成进度
- 在收到包含 GENERATING_IMAGE 标记的消息时立即设置标志
- 在收到包含图片的消息时清除标志
- 将标志传递给 Messages 组件用于占位图显示判断
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-01 02:49:52 +08:00 |
|