Commit Graph

42 Commits

Author SHA1 Message Date
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
97da631e01 chore: refresh deep mode styling 2025-11-30 17:57:48 +08:00
93c53eed32 fix: eagerly reload conversations 2025-11-30 01:00:48 +08:00
3a7ed2e042 fix: polish streaming state and ui controls 2025-11-30 00:54:55 +08:00
87ceaad92b feat: improve ui feedback 2025-11-30 00:09:05 +08:00
09654b7d4b fix: stabilize conversation loading 2025-11-29 23:13:11 +08:00
dd32db7677 feat: persist api usage tokens 2025-11-29 17:45:32 +08:00
e42a924429 fix: stabilize streaming buffer drain 2025-11-29 17:01:28 +08:00
7cc91571de feat: modularize frontend layout 2025-11-25 22:41:15 +08:00