Commit Graph

58 Commits

Author SHA1 Message Date
edb557bdd3 feat(chat): 优化块展开/折叠滚动锚定,避免 stick-to-bottom 弹簧追底顿挫 2026-06-17 15:24:15 +08:00
2e54f2c343 feat(terminal): 实时终端改造为侧边栏面板,支持拖拽分割与自动开关
- 将实时终端从独立页面改造为 Vue3 侧边栏面板,与 Git 面板上下排列
- 使用 xterm.js + Grid 布局,支持三主题配色适配
- 上下拖拽分割条,动态调整终端/Git 面板比例
- 输入栏上方新增终端数量按钮,点击快捷打开
- 个人空间新增「自动打开终端面板」开关(外观与显示分类)
- REST API /api/terminals 获取终端列表,多时机自动刷新
- 有终端自动打开面板,无终端自动关闭
2026-06-12 00:18:27 +08:00
0d4f6c9e56 fix(frontend): 修复对话压缩后页面抽搐、重复显示与滚动重置
三管齐下,消除 in-place 压缩触发的多余重载:

1. handleTaskEvent: _rebuildingFromScratch 重放时跳过
   compression_finished/compression_state/shallow_compression,
   打破 restoreTaskState 重放 → 再次触发压缩完成的无限循环。

2. handleCompressionFinished + compressConversation:
   in-place 压缩(对话 id 不变)跳过 loadConversation +
   restoreTaskState + loadConversationsList,
   避免 resetAllStates 重置滚动状态和清空消息列表。

3. useLegacySocket conversation_loaded:
   同对话 clear_ui 跳过 resetAllStates + fetchAndDisplayHistory,
   避免后端 Socket.IO 推送触发二次重置。
2026-06-08 14:14:19 +08:00
f50d87fc79 feat(chat): render streaming code blocks 2026-06-07 03:34:00 +08:00
6f78277a03 feat(ui): add project git status panel 2026-05-31 17:27:24 +08:00
32865f6d6e fix(ui): refine message visibility and goal approval flow 2026-05-30 16:30:05 +08:00
cd82c6d658 fix(ui,runtime,search): merge runtime/frontend stabilization into main 2026-05-27 16:38:19 +08:00
16473c824d chore: 合并多项独立 WIP 改动
- cli: 增加 layoutRefreshTick 与 IME 输入组件,处理 slash_menu 光标偏移
- config/auto_approval: 切到 opencode 中转端点
- modules/approval_agent: 调试 transcript 增加 trace / final_result 字段
- static/useLegacySocket: 重试 toast 显示具体错误信息

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 02:01:36 +08:00
9dfb1567d2 fix: render user media previews from media store refs 2026-04-27 12:57: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
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
13400f62d5 feat: add manage_personalization tool and fix personalization sync 2026-04-13 20:22:06 +08:00
78df2249cf fix: stabilize markdown code block selection and copy 2026-04-12 19:59:28 +08:00
0eeec08320 fix(desktop): 禁用审批面板拖拽展开
- 电脑端审批面板不再支持拖拽屏幕边缘展开
- 仅保留移动端的手动打开方式
2026-04-12 13:42:28 +08:00
8be1c37b6a refactor(frontend): 整理应用逻辑层与状态管理 2026-04-10 14:34:01 +08:00
8da1a3d46d chore(socket): add legacy socket backup snapshot 2026-04-04 19:47:46 +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
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
f3179e2a97 feat: 优化滚动锁定和个性化称呼功能
滚动锁定优化:
- 滚动锁定默认始终启用,不再根据输出状态自动解锁
- 深色模式下锁定图标显示为白色,与箭头图标保持一致

个性化称呼功能:
- AI 助手名称根据个性化设置中的"自称"动态显示
- 用户名称根据个性化设置中的"称呼"动态显示
- 页面初始化时自动加载个性化设置,无需打开个人空间
- 在"模型行为"中新增"使用自定义称呼"开关
- 开关关闭时显示默认的"AI Assistant"和"用户"
- 修复保存后开关状态被重置的问题

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-13 12:10:08 +08:00
ed82fc966e fix: improve sub-agent ui and state 2026-03-11 15:40:28 +08:00
b68dee9d98 chore: snapshot current changes 2026-03-10 23:48:40 +08:00
a4d3160b0a fix: 修复页面加载时出现两次动画的问题
问题原因:
- Socket 事件(conversation_changed, status_update 等)在初始化期间与 bootstrapRoute 并发执行
- loadConversationsList 在初始化期间自动加载第一个对话
- 导致 currentConversationId 被多次设置,触发多次历史加载和动画

解决方案:
- 在 Socket 事件处理中添加 initialRouteResolved 检查
- 初始化完成前,Socket 事件不修改 currentConversationId
- loadConversationsList 在初始化完成前不自动加载对话
- 确保所有数据(历史、文件树、思考模式等)在同一时间加载完成

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-09 16:59:56 +08:00
801d20591c feat: 实现 REST API + 轮询模式,支持页面刷新后任务继续执行
主要改进:
- 新增 REST API 任务管理接口 (/api/tasks)
- 实现 150ms 轮询机制,提供流畅的流式输出体验
- 支持页面刷新后自动恢复任务状态
- WebSocket 断开时检测 REST API 任务,避免误停止
- 修复堆叠块融合问题,刷新后内容正确合并
- 修复思考块展开/折叠逻辑,只展开正在流式输出的块
- 修复工具块重复显示问题,通过注册机制实现状态更新
- 修复历史不完整导致内容丢失的问题
- 新增 tool_intent 事件处理,支持打字机效果显示
- 修复对话列表排序时 None 值比较错误

技术细节:
- 前端:新增 taskPolling.ts 和 task store 处理轮询逻辑
- 后端:TaskManager 管理任务生命周期和事件存储
- 状态恢复:智能判断是否需要从头重建,避免内容重复
- 工具块注册:恢复时注册到 toolActionIndex,支持状态更新
- Intent 显示:0.5-1秒打字机效果,历史加载直接显示

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-08 03:12:46 +08:00
877bcc2fad fix: improve api error diagnostics and raise model quotas 2026-03-06 17:02:19 +08:00
868640b479 feat: add aliyun quota fallback 2026-03-06 12:31:20 +08:00
8d0c187bbf fix: ignore empty text blocks in stacks 2026-02-25 13:20:15 +08:00
3f76780fff fix: avoid empty text action on stream 2026-02-25 03:18:18 +08:00
406e777e22 feat: improve compression and context budgeting 2026-01-31 10:30:00 +08:00
b81e14b314 feat: add video processing toast 2026-01-30 18:15:54 +08:00
7890926c3d fix: improve cancellation flow and api error tracing 2026-01-30 15:36:44 +08:00
453df30f45 refactor: replace file diff tools, simplify todos, disable typewriter 2026-01-29 14:20:01 +08:00
e2ba632ac8 feat: expand model support and qwen-vl ux 2026-01-03 07:01:24 +08:00
d34fbe963a fix: unify collapse animation and scroll lock reset 2026-01-02 12:39:23 +08:00
9ae43e89ff fix: smooth scroll when unlocking 2026-01-01 20:17:21 +08:00
b42cb3b032 fix: allow scroll button tap when idle 2026-01-01 19:39:40 +08:00
ce5032cef4 fix: keep scroll lock user-controlled during thinking 2026-01-01 17:35:22 +08:00
eeb3db084b chore: snapshot before collapse fix 2026-01-01 14:23:39 +08:00
8de3b5d24a fix: prevent duplicate history animation 2026-01-01 06:15:01 +08:00
4262922694 fix: intent streaming defaults and UI stability 2026-01-01 05:48:13 +08:00
7639e0677b fix: stabilize thinking block animation and bg streaming 2025-12-31 09:27:21 +08:00
7b735e252f fix: keep model activity alive and switch new chats 2025-12-30 09:16:51 +08:00
8fe06753bb fix: stabilize terminal tool timeouts 2025-12-15 15:15:03 +08:00
8755688c8e feat: enhance virtual monitor command/python playback 2025-12-14 17:38:03 +08:00
55af5b52c6 fix: delay tool blocks until text fully streamed 2025-12-14 14:50:20 +08:00
053db95fee feat: virtual monitor 2025-12-14 04:22:00 +08:00
2f75c1c8bb feat: stable version before virtual monitor timing fix
Current status includes:
- Virtual monitor surface and components
- Monitor store for state management
- Tool call animations and transitions
- Liquid glass shader integration

Known issue to fix: Tool status display timing - "正在xx" appears
after tool execution completes instead of when tool call starts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 17:12:12 +08:00