Commit Graph

317 Commits

Author SHA1 Message Date
ecca5da8ab fix: harden multimodal handling and sanitize mcp action results 2026-04-27 20:11:21 +08:00
bb6bfff176 fix(ui): stabilize tool header icons and mcp completion label 2026-04-27 15:51:52 +08:00
9d8beacc8d fix: align thinking and tool status text in blocks 2026-04-27 15:35:10 +08:00
9dfb1567d2 fix: render user media previews from media store refs 2026-04-27 12:57:13 +08:00
e3e2d22dc4 fix(chat): restore collapse max height in block mode 2026-04-27 01:42:52 +08:00
3c1773dc01 fix(mcp): split categories by server and preserve toggle states 2026-04-27 01:42:40 +08:00
2c75bb01a0 feat(ui): cap tool toggle menu to five items with hidden scrollbar 2026-04-27 01:42:32 +08:00
3cd8bdabef feat(ui): add refresh button for showhtml cards 2026-04-27 01:42:24 +08:00
591a5e64cc fix: 修复聊天区滚动锁定与手动上滚脱锁 2026-04-27 00:13:38 +08:00
ed5315eef6 feat: add MCP management and host-only runtime policy 2026-04-26 23:49:04 +08:00
e758df767f fix: prevent show_html cards from disappearing during streaming 2026-04-26 18:38:13 +08:00
9199f5ca7c fix: unify show cards rendering and prompt constraints 2026-04-26 18:13:24 +08:00
24c702c0af fix(show_html): add js mode with sandbox iframe rendering 2026-04-26 17:13:08 +08:00
ac788daa03 fix(show_html): freeze completed card during streaming 2026-04-26 16:52:22 +08:00
383e68188c fix: stabilize show_html rendering and restore conversation mode state 2026-04-26 01:04:23 +08:00
33d270ff63 fix: stabilize show_html streaming rendering and recovery 2026-04-25 23:17:07 +08:00
1c928d7518 chore: backup snapshot before show_html scroll rework 2026-04-25 20:39:52 +08:00
46404095dd fix: reduce chat debug noise and stabilize auto-scroll behavior 2026-04-25 16:35:09 +08:00
070d77c070 fix: adapt deepseek custom models and harden todo/tool gating 2026-04-24 18:31:03 +08:00
1b27b3ffa2 fix: simplify enhanced display for personalization updates 2026-04-19 16:57:23 +08:00
8991ed5084 feat: add read_skill tool and frontend read-skill rendering 2026-04-19 16:57:02 +08:00
3a949abdb4 fix: restore cached theme before personalization sync 2026-04-14 13:44:24 +08:00
1500a15be1 fix: enhance manage_personalization tool display 2026-04-14 13:44:06 +08:00
916f68e8e9 feat: 添加智能体交流风格选项
- 将"模型行为"标签改为"智能体行为"
- 新增"智能体交流风格"二选一选项(默认/拟人)
- 拟人风格会注入human_like_style.txt提示词
- manage_personalization工具支持communication_style字段
- 添加user-pen.svg图标用于个性化工具和分类
2026-04-14 01:47:06 +08:00
13400f62d5 feat: add manage_personalization tool and fix personalization sync 2026-04-13 20:22:06 +08:00
4b7453ce4a feat: 整合test/agents功能并更新配置
- 添加user_upload/和skills/到.gitignore
- 更新terminal-guide skill说明文档
- 添加logo图片
2026-04-13 17:47:19 +08:00
3219df388b feat: 优化任务轮询和聊天区域渲染机制 2026-04-13 16:23:01 +08:00
78df2249cf fix: stabilize markdown code block selection and copy 2026-04-12 19:59:28 +08:00
49bd994cfa fix: stabilize task completion and chat auto-scroll behavior 2026-04-12 19:45:01 +08:00
757718c492 feat: add user turn tool protection to shallow compression
- Add shallow_compress_keep_user_turn_tools config (default: 3)
- Add is_auto_generated metadata to system messages (sub_agent/background_command)
- Fix sub_agent notification path to include auto_message marker
- Frontend: add input field in PersonalizationDrawer
- Backend: implement protection logic in _run_auto_shallow_compression
2026-04-12 18:48:08 +08:00
0e3dc1dd68 feat: 个人空间模型行为页面添加两个新开关 - AGENTS.md自动注入和允许根目录创建文件 2026-04-12 16:34:04 +08:00
cf5915dfbc feat: 前端store添加AGENTS.md自动注入和根目录创建文件配置字段 2026-04-12 16:34:02 +08:00
2397e6ec1c feat: 添加拖拽上传图片/视频功能
- 支持拖拽图片到窗口自动上传到输入栏
- 支持拖拽视频到窗口自动上传到输入栏
- 支持拖拽其他文件触发普通上传
- 多主题适配:经典色(橙色)、浅色(黑色)、深色(白色)
- 修复浅色/经典色主题下提示文字看不清的问题
2026-04-12 15:55:00 +08:00
3a9b5388f9 style(mobile): 优化审批面板移动端样式
- 移除顶部灰色块,内容直接顶头显示
- 移除关闭按钮圆形外框,只保留×符号
- 统一配色与电脑端一致
2026-04-12 13:42:39 +08:00
0eeec08320 fix(desktop): 禁用审批面板拖拽展开
- 电脑端审批面板不再支持拖拽屏幕边缘展开
- 仅保留移动端的手动打开方式
2026-04-12 13:42:28 +08:00
be9592a2f4 fix(mobile): 审批面板自动关闭和交互问题
- 移除审批面板在空列表时自动关闭的逻辑
- 支持手动打开空审批面板
- 恢复点击遮罩层关闭面板功能
2026-04-12 13:42:09 +08:00
aad958d2d9 fix(mobile): 用量统计点击不展开问题
- 添加 fromSettingsMenu 参数穿透
- 修复设置菜单中用量统计点击不展开弹窗的问题
- 移动端限制不再阻止设置菜单的用量统计功能
2026-04-12 13:41:26 +08:00
3fee0ebf7d fix(mobile): 权限菜单自适应位置并优化审批面板样式
- 修复权限切换弹出菜单在移动端跑出屏幕右侧的问题
- 添加媒体查询使菜单自适应左右位置
2026-04-12 13:41:15 +08:00
dcc6e3588e fix(ui): disable token panel expand on mobile tap
- 移动端禁用点击展开顶部用量面板
- 仅允许在已展开时点击收起
2026-04-12 01:13:26 +08:00
bd891029df feat(tool-approval): add run_python preview support 2026-04-12 01:13:12 +08:00
6a21a642d0 fix(approval): 完整展示写入内容并隐藏内部滚动条 2026-04-11 18:59:40 +08:00
c6c90da64a chore(ui): 文案改为版本控制开关 2026-04-11 18:59:32 +08:00
9c15c6f945 fix(personalization): 恢复个人空间打开/关闭动画 2026-04-11 18:59:23 +08:00
e3bf67d25d fix(mobile): 待审批时自动弹出并审批后收回面板 2026-04-11 18:59:14 +08:00
0ba2763696 fix(personalization): 移除滑动跳模块并调整用量区留白 2026-04-11 17:02:17 +08:00
55feb36091 feat(versioning-ui): 优化版本不一致提示与回溯限制 2026-04-11 17:01:35 +08:00
6379f8c729 feat: complete conversation versioning UX and restore workflow 2026-04-11 16:16:40 +08:00
34a6577f3a feat: ship permission/approval UI with mobile support and context usage ring 2026-04-11 04:07:55 +08:00
3f40aa949f fix: treat slash-prefixed input as normal web message 2026-04-11 00:52:47 +08:00
4124faa040 feat(frontend): 优化聊天界面与监控交互体验 2026-04-10 14:34:18 +08:00
8be1c37b6a refactor(frontend): 整理应用逻辑层与状态管理 2026-04-10 14:34:01 +08:00
90233690ad feat: add json-based extensible model registry and dynamic model UI 2026-04-09 20:56:54 +08:00
a04eca3aab fix: unify background run_command notifications with sub-agent flow 2026-04-08 16:13:40 +08:00
d798d39da3 fix: persist onboarding prompt status and bump android app to 1.0.20 2026-04-07 20:08:33 +08:00
9a2bae04b5 fix: repair admin monitor auth and add invite CRUD 2026-04-07 18:23:09 +08:00
7e1d9bfede fix: restore apk tutorial scrolling and bump app to 1.0.19 2026-04-07 17:56:05 +08:00
4e4186f87a fix: polish tutorial/theme copy and align review dialog themes 2026-04-07 17:12:53 +08:00
692a12affd feat: complete guided tutorial with mobile flow and ui polish 2026-04-07 17:03:37 +08:00
67db1ea831 fix: migrate auth pages to vue and bump android app to 1.0.17 2026-04-07 12:38:45 +08:00
c88b3e9363 feat: inline workspace logo with theme adaptation and bump versions 2026-04-07 12:14:10 +08:00
edc7f9b7ea fix: fallback upload selected local media on mobile webview 2026-04-07 11:50:48 +08:00
386f618c83 fix: improve run_python output readability in dark mode 2026-04-07 11:50:43 +08:00
3ae5be47d9 feat: add per-skill strict read-before-tool enforcement 2026-04-07 11:50:38 +08:00
39af4151d9 fix: enforce max-width hard wrapping in chat input and bubbles 2026-04-07 11:50:28 +08:00
1a3235be09 fix: add connection heartbeat and polish mobile tap feedback 2026-04-07 00:04:44 +08:00
207a7d2e33 fix: remove liquid glass experiment and bump android app to 1.0.14 2026-04-07 00:02:06 +08:00
81d4c17ae7 feat: update app refresh entry and release metadata 2026-04-06 19:51:56 +08:00
b29e6a67f8 fix: keep compression toast persistent and align summary layout 2026-04-06 17:09:36 +08:00
bc939a0098 feat: make context compression policy configurable and stabilize compression UX 2026-04-06 16:51:43 +08:00
7e03e3cd5f feat: stabilize context compression and deep-compact flow 2026-04-06 15:12:25 +08:00
fafb0d35ad feat: add app update flow and apk deploy automation 2026-04-06 02:10:52 +08:00
6f2f854f6d fix: refine mobile assistant content spacing 2026-04-05 21:25:01 +08:00
6e3bdaa964 fix: constrain mobile overlay panel width 2026-04-05 20:57:29 +08:00
3e800609c5 fix: tighten mobile chat gutters and user bubble width 2026-04-05 20:54:57 +08:00
a5412dae34 fix: adjust sub-agent notice spacing in minimal mode 2026-04-05 16:58:22 +08:00
2700a25702 feat: add per-user-message work timer with persistence 2026-04-05 15:14:29 +08:00
de1aebeaa8 feat: add loaders 15-17 to minimal loader pool 2026-04-05 15:14:06 +08:00
df28c44c22 chore: extend loader demo with unified square variants 2026-04-05 01:22:57 +08:00
3b521e9616 feat: expand square loader set and tune bouncing 2026-04-05 01:22:50 +08:00
dc60c7a123 feat: animate minimal summary text with color wave 2026-04-05 01:22:37 +08:00
3328d968d5 fix: align /new restore and first-send routing flow 2026-04-05 01:22:30 +08:00
7812d58a64 fix: adapt admin monitor cards to dark theme 2026-04-05 01:22:22 +08:00
0c213b0a9f feat: polish minimal summary loader interactions 2026-04-04 20:52:50 +08:00
0b923d6c53 fix: harden polling task cancel lifecycle 2026-04-04 20:52:31 +08:00
8da1a3d46d chore(socket): add legacy socket backup snapshot 2026-04-04 19:47:46 +08:00
249eb663bb chore(demo): add loader and minimal-mode preview pages 2026-04-04 19:47:36 +08:00
3b710020fe feat(chat): add randomized summary loaders in minimal mode 2026-04-04 19:47:17 +08:00
8d5a034c70 fix(chat): recover assistant placeholder after stop and switch 2026-04-04 19:47:03 +08:00
b9df354808 fix: 修复极简模式思考内容与SVG图标对齐问题
- 使用相对单位调整思考内容的垂直对齐
- 添加负margin-top让第一行文字中心与SVG图标中心对齐
- 计算公式:(1em - 1.7em) / 2,基于line-height自动适配
- 不影响工具步骤的对齐(工具header的line-height为1)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 16:38:56 +08:00
c26cd3d3fd fix: 修复极简模式多个问题并恢复偏好设置自动应用
- 修复极简模式下步骤竖线距离SVG不均匀的问题
  - 使用flex布局让竖线自动填充空间
  - 添加负margin让竖线延伸到下一个步骤
  - 确保竖线上下距离SVG图标相等

- 修复SVG图标颜色问题
  - 统一使用灰色(--claude-text-tertiary)
  - 不再受颜色模式影响

- 修复思考内容自动滚动问题
  - 添加registerThinkingRef和handleThinkingScroll支持
  - 移除导致滚动异常的伪元素负margin
  - 实现与堆叠模式一致的自动滚动行为

- 修复轮询改造后偏好设置不自动应用的问题
  - 在loadInitialData中应用默认模型和运行模式
  - 在createNewConversation前应用偏好设置
  - 在loadConversation前应用偏好设置
  - 确保新建或切换对话时使用用户设置的默认值

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 16:18:15 +08:00
a030ff954b fix: 修复工具增强显示的多个问题
1. read_file 工具支持三种模式显示
   - read 模式:显示完整文件内容
   - search 模式:显示搜索匹配项和行号
   - extract 模式:显示提取的多个片段

2. edit_file 工具兼容新旧数据格式
   - 支持 old_string/new_string 格式(当前后端使用)
   - 支持 replacements 数组格式(为未来扩展预留)

3. write_file 工具显示写入内容
   - 显示完整的写入内容
   - 使用绿色+号样式(与 edit_file 一致)
   - 支持显示追加模式标识

4. 极简模式工具图标匹配修复
   - 修复所有工具图标都显示为 run_command 的问题
   - 使用与堆叠块模式相同的图标获取逻辑
   - 正确显示每个工具对应的图标

5. 新增样式支持
   - 搜索匹配项样式
   - 提取片段样式
   - 移除彩色侧边框,保持简洁

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 15:37:38 +08:00
6697da9581 fix: 修复轮询机制下对话标题不自动更新的问题
- 后端:在标题生成后将 conversation_changed 事件添加到任务事件流
- 前端:在 taskPolling 中添加 conversation_changed 事件处理
- 前端:同步更新当前对话标题和对话列表中的标题
- 兼容:保留 WebSocket 的标题更新逻辑以向后兼容

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 15:12:18 +08:00
321818f7ef feat: 新增极简模式(Minimal Mode)
新增了一个全新的消息显示模式,提供更简洁的对话体验。

主要功能:
- 新增 MinimalBlocks.vue 组件,实现极简风格的消息块展示
- 在 ChatArea.vue 中集成极简模式渲染逻辑
- 在个性化设置中添加"极简模式"选项(blockDisplayMode)
- 支持三种显示模式:堆叠模式、极简模式、传统模式

技术实现:
- 使用 personalization store 管理显示模式状态
- 通过 computed 属性动态切换渲染组件
- 保持与现有堆叠模式和传统模式的兼容性

用户体验:
- 更清爽的界面布局
- 减少视觉干扰
- 适合快速浏览对话内容

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 14:47:45 +08:00
b474a69b3b fix: 修复停止按钮点击后不恢复为发送按钮的bug
修复了运行期间点击停止按钮后,按钮状态无法恢复的问题。

问题原因:
- stopTask() 方法中 stopRequested 被设置为 true 但未重置
- composerBusy 计算属性依赖 stopRequested 状态
- 导致按钮持续显示停止图标,需要刷新页面才能恢复

修复方案:
- 在 stopTask() 的 finally 块中重置 stopRequested 为 false
- 确保无论成功或失败,状态都能正确恢复

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 14:47:36 +08:00
aeb782d479 refactor: 清理WebSocket遗留代码,标记为废弃
Phase 2 WebSocket代码清理:

前端 (useLegacySocket.ts):
1. 添加文件头注释说明架构变更
   - 聊天流式事件已废弃,改用 REST API 轮询
   - 保留系统事件、配额事件、对话事件、子智能体事件
   - 标记待清理的流式处理代码

2. 简化 ai_message_start 事件处理器
   - 只保留子智能体模式的处理
   - 删除复杂的流式状态管理逻辑

3. 保留备份文件 useLegacySocket.ts.backup
   - 用于紧急回退

后端 (socket_handlers.py):
1. 标记 handle_message 为废弃
   - 添加废弃警告和迁移指南
   - 返回错误提示引导用户使用 REST API
   - 保留原代码用于紧急回退(注释掉)

2. 说明新架构优势
   - 支持分布式部署
   - 更好的错误恢复
   - 减少 WebSocket 连接压力

注意:
- 未删除大量流式处理代码,只添加注释标记
- 保留向后兼容性,避免破坏现有功能
- 后续可逐步清理标记为废弃的代码

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 01:15:31 +08:00
7912d3fd64 fix: 修复页面初始化时对话列表不加载的bug
问题描述:
- 页面刷新后对话列表显示"暂无对话记录"
- 必须创建新对话才会触发列表加载
- 用户体验很差

根本原因:
- loadInitialData() 方法中缺少 loadConversationsList() 调用
- 对话列表只在创建新对话时才会刷新(createNewConversation 第383行)
- 导致页面初始化时 conversations 数组为空

修复方案:
- 在 loadInitialData() 末尾添加对话列表加载
- 重置 conversationsOffset 为 0 确保从头加载
- 在其他初始化任务完成后执行,避免阻塞

测试:
1. 刷新页面,对话列表应立即显示
2. 创建新对话,列表应正常更新
3. 切换对话,列表应保持正常

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 01:08:13 +08:00
8d6c59deed feat: 优化轮询机制(重试、清理、错误提示)
Phase 3 轮询优化:

1. 添加重试机制(task.ts)
   - 新增 pollingErrorCount 状态字段
   - 添加 5 秒超时(AbortSignal.timeout)
   - 连续失败 5 次后停止轮询并通知用户
   - 成功后重置错误计数

2. 改进错误提示(taskPolling.ts)
   - 根据 error_type 提供友好提示
   - 支持 api_error、timeout、quota_exceeded 等类型
   - 延长错误提示显示时间(8秒)

3. 添加任务清理机制(tasks.py)
   - 新增 cleanup_old_tasks() 方法
   - 清理超过 1 小时的已完成任务
   - 启动后台定时器(每 10 分钟清理一次)
   - 减少内存占用,支持长期运行

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 01:04:35 +08:00
de82a37958 fix: 修复代码块复制、事件去重、任务结束、停止按钮bug
Phase 1 关键Bug修复:

1. 代码块复制功能
   - 删除 index.html 中的全局事件监听(47-53行)
   - 避免与 Vue 方法的双重监听冲突

2. 事件去重机制
   - 在 handleTaskEvent() 添加基于 idx 的去重检查
   - 使用 Set 存储已处理的事件索引(最多1000个)
   - 在 restoreTaskState() 时清理已处理事件

3. 任务结束逻辑
   - 修复 handleTaskComplete() 异步状态清理问题
   - 新增 clearTaskState() 统一清理方法
   - 在 stopPolling() 中清除 currentTaskId

4. 停止按钮状态同步
   - 改进 stopTask() 错误处理
   - 添加后端确认等待(300ms)
   - 确保失败时也清理前端状态
   - 添加 finally 块清除 dropToolEvents

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-04 01:03:06 +08:00
860fa7b539 feat(web): remove socket dependency from main chat flow 2026-04-03 11:34:42 +08:00
12c7a4bdd9 fix: remove legacy file edit tags 2026-03-17 22:43:51 +08:00