301 Commits

Author SHA1 Message Date
Your Name
2572db545c fix: 修复 huanke-gemini 不处理 file 类型图片的问题
- 在 sendHuankeGeminiRequest 中添加对 type: 'file' 格式的处理
- 支持从 Chat API 传过来的 { type: 'file', mediaType, data/url } 格式
- 确保图片编辑请求能正确传递图片到 API
2026-02-02 00:25:51 +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
e631cc45f3 feat: 支持 huanke-gemini 图片生成 provider
- 将 huanke-gemini 加入 Gemini 图片生成处理流程
- 禁用 Base64 图片传输,统一使用 URL 格式
- gemini-image 和 huanke-gemini 内部会自行处理图片上传到 S3
- 添加 huanke-gemini 模型调试日志
2026-02-02 00:19:25 +08:00
Your Name
4267ac42bf Add debug logging for Huanke Gemini model keys 2026-02-02 00:12:09 +08:00
Your Name
2dfe29bf17 fix: 添加 huanke-gemini 到供应商类型校验与数据库 schema 2026-02-01 23:42:51 +08:00
Your Name
9d4579eb53 feat: 添加环科Gemini生图API支持(禁用Base64,使用URL格式) 2026-02-01 23:08:59 +08:00
Your Name
7680cbe02e fix: 修复 JSX 语法错误 2026-02-01 23:00:08 +08:00
Your Name
3855cb05cd feat: 添加智能自动模式的默认生图模型配置 2026-02-01 22:51:33 +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
211db5a620 fix: 使用useParams确保客户端导航时id正确更新 2026-02-01 22:19:35 +08:00
Your Name
a4de05925a feat: 添加新建画布按钮功能 2026-02-01 22:08:05 +08:00
Your Name
efa1234a93 fix: 使用key强制组件在画布ID变化时重新挂载 2026-02-01 19:48:55 +08:00
Your Name
97daaeeb36 fix: 切换画布时清空状态并重新加载数据 2026-02-01 19:46:00 +08:00
Your Name
1e557c620a fix: 移除错误的模型ID映射,直接使用qwen3-vl-plus 2026-02-01 19:39:57 +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
2f667cede8 feat: LLM 驱动的精准提示词优化
1. 使用 Qwen VL 根据历史对话动态优化提示词
2. 强调精准局部编辑,只修改用户指定的部分
3. 保护其他元素不被误改
4. 包含具体的编辑要求和避免项

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:28:39 +08:00
Your Name
7ed0dad3f6 fix: Smart Auto Mode 变量初始化顺序错误
在 Smart Auto Mode 内部单独获取历史消息,避免依赖
后面才定义的 messagesFromDb 变量

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:18:06 +08:00
Your Name
544a1cd46a feat: 智能分析器支持历史对话上下文
1. analyzeIntent 接收历史对话消息
2. 传递最近10条对话给 LLM 分析
3. 帮助 AI 理解用户连续对话的意图(如再调亮一点)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:13:44 +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
1f26ec911c fix: 修复 auto-title API 模型查找
1. 正确访问 model 和 provider 对象结构
2. 直接使用返回的 provider 信息,无需再次查询

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:03:34 +08:00
Your Name
aac42de4c5 debug: 添加 auto-title 模型查找详细日志
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 15:57:43 +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
517d8e493c fix: auto-title API 使用数据库配置的千问VL模型
1. 从数据库查找支持视觉的模型(qwen-vl 系列)
2. 使用对应 provider 的配置调用 API
3. 添加详细日志便于调试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 12:51:00 +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
e84b002302 fix: 画布 API 支持 upsert 操作
当画布不存在时自动创建,而不是返回 404

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 12:36:18 +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
5b4e350568 debug: 添加 chat API 请求验证日志
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 12:28:43 +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