64 Commits

Author SHA1 Message Date
Your Name
3558eed251 fix: 改用 URL 方式发送图片给 Qwen-VL,修复数据库查询 2026-02-02 12:05:50 +08:00
Your Name
47afddfd73 feat: 添加物品拾取功能(MVP版本)
- 新增 ObjectPickerOverlay 组件,支持点击图片拾取物品
- 新增 /api/pick-object API,调用 Qwen-VL 识别物品
- Canvas Store 扩展拾取模式状态管理
- ImageNode 工具栏新增拾取按钮
- CanvasChatPanel 集成物品标签,发送时自动构建精准prompt
- 图片压缩至 600px 以内加速 AI 分析
- 物品名称限制 8 字,位置固定 4 字标准词库
2026-02-02 11:50:30 +08:00
Your Name
3fc00270c4 fix: 修复删除图片标签后无法重新添加的问题
- 改用 URL 而不是索引来删除附件,更可靠
- 优化 useEffect 中的附件去重逻辑
- 添加调试日志便于排查问题
2026-02-02 11:27:53 +08:00
Your Name
dbed4020c0 feat: 图片工具栏改为纯图标模式,悬停显示功能名称
- 移除工具栏按钮的文字标签,只显示图标
- 使用 Tooltip 组件在鼠标悬停时显示功能名称
- 将下载和删除按钮从下拉菜单移到工具栏直接显示
- 工具栏更紧凑,视觉更简洁
2026-02-02 11:07:52 +08:00
Your Name
ed71477f15 fix: 画布图片下载改为直接下载,不再跳转页面
- 使用 fetch 获取图片数据并创建 Blob URL
- 避免跨域图片导致的跳转问题
- 添加下载进度提示和错误处理
2026-02-02 11:01:32 +08:00
Your Name
d7c0e66c3e feat: 画布图片按原始比例 1:1 显示
- 图片使用 object-contain 保持原始比例,不再裁剪
- 添加 getImageDimensions 函数获取图片原始尺寸
- 图片节点大小根据原始尺寸动态设置(最大 500px,最小 150px)
- 图片间距动态调整,避免重叠
2026-02-02 10:57:42 +08:00
Your Name
52867404f7 feat: 画布图片添加到对话框改为手动触发
- 在图片工具栏添加"添加到对话"按钮
- 移除选中图片时自动添加标签的逻辑
- 通过 canvas store 的 pendingChatAttachments 实现跨组件通信
- 用户点击按钮后才会将图片添加到对话框,避免标签越来越多
2026-02-02 10:54:03 +08:00
Your Name
ba99ad212e fix: 删除聊天框图片标签时不再删除画布中的图片
- 修改全局键盘事件处理,增加对 contentEditable 元素的检测
- 在删除图片标签时阻止事件冒泡,防止触发画布的删除操作
2026-02-02 10:42:15 +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
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
59bc3636e1 feat: rename scene fusion to detail replace, add auto-retry up to 10 times 2026-01-27 21:47:59 +08:00
Your Name
ee4bb14736 feat: add banner settings to admin panel for configuring ad banner text and link 2026-01-26 22:26:44 +08:00
Your Name
0c4a2a455e fix: create new canvas instead of redirecting when canvas not found 2026-01-26 22:17:58 +08:00
Your Name
b936e58637 debug: add mousedown handler and z-index to button 2026-01-26 22:12:18 +08:00
Your Name
23e2dcf1b9 debug: make file list button very visible (red pulsing) 2026-01-26 22:07:52 +08:00
Your Name
76eac7a52a debug: add blue background and alert to file list button 2026-01-26 22:04:07 +08:00
Your Name
da523034c8 fix: use native button element for file list button 2026-01-26 21:55:47 +08:00
Your Name
259f45740e fix: ensure file list button click handler works properly 2026-01-26 21:52:28 +08:00
Your Name
8e82b0ea99 fix: use Button with router.push for reliable navigation
- Replace Link components with Button + router.push
- Add e.preventDefault() and e.stopPropagation() to prevent event issues
- Fix file list button click handler in CanvasChatPanel
- Ensures single click navigation works consistently
2026-01-26 21:31:58 +08:00
Your Name
676be1c70c feat: switch file list from dialog to inline panel
- Replace dialog-based file list with inline panel in sidebar
- Click file list button now switches panel content instead of opening popup
- Add CanvasFileListPanel component for embedded file list view
- Fix thumbnail property name and type casting issues
- Add placeholder handleAction function
2026-01-26 21:19:52 +08:00
Your Name
9385b6f6d6 feat: implement auto-save, auto-title, and canvas file list sidebar
- Remove manual rename and save buttons from canvas header
- Add auto-save logic with debounce
- Add AI auto-titling and thumbnail generation based on canvas content
- Add CanvasFileList sidebar for managing canvases
- Direct entry to new canvas from top navigation
- Add new API endpoint for auto-titling
2026-01-24 22:50:34 +08:00