Commit Graph

429 Commits

Author SHA1 Message Date
e4a663594d feat: Android App 原生 PDF 预览与前端 show_file 卡片
- 集成 AndroidPdfViewer (mhiew fork) 实现不依赖浏览器的 PDF 预览
- 新增 PdfPreviewActivity 与 JS Bridge (AndroidPdfBridge)
- ShowFileCard 在 Android App 内对 PDF 显示「预览」按钮,不内嵌 iframe
- 新增 /api/file/content 后端接口用于文件内容 inline 预览
- 前端支持 <show_file> 标签与 download:// 链接渲染
- 更新 Android 版本号至 1.0.35
2026-06-24 00:06:10 +08:00
53b3669f1d fix(stop): 强停止按钮两段式逻辑与 work_timer 持久化 2026-06-23 19:27:50 +08:00
e90610ed05 fix(frontend): 修复刷新后AI等待提示与终端侧边栏重复问题
- 修复模型调用工具后刷新页面,AI回复头部等待提示文字再次出现的bug
  - restoreTaskState 根据 hasAssistantContentEvent 精确设置 awaitingFirstContent
  - handleAiMessageStart 从头重建时保留 restoreTaskState 的设置
  - handleToolStart 兜底清除 awaitingFirstContent

- 修复刷新页面后终端侧边栏已有内容重复显示绿色箭头与输入内容的bug
  - 后端 get_snapshot/get_terminal_output 返回 last_event_time
  - 前端 TerminalPanel 基于 last_event_time 对 terminal_output 事件去重
2026-06-22 20:35:00 +08:00
8e1a339102 refactor: split api_client, tool_result_formatter, tools_definition into sub-packages
- utils/api_client.py -> utils/api_client/ (mixin-based)
- utils/tool_result_formatter.py -> utils/tool_result_formatter/ (by tool category)
- core/main_terminal_parts/tools_definition.py -> core/main_terminal_parts/tools_definition/ (by tool group)
- Update AGENTS.md, CLAUDE.md, and split memory index
- Keep original files as compatibility re-exports
- Includes TerminalPanel display adjustment and ToolAction.vue diff line fix
2026-06-20 21:51:45 +08:00
6c368d2aa0 fix(frontend): preserve edit file trailing context 2026-06-20 19:19:58 +08:00
f661dc6456 refactor(server,modules,utils,frontend): split oversized modules into packages and fix regressions
- Split server/chat.py, server/status.py, server/tasks.py into sub-packages
- Split utils/context_manager.py, utils/conversation_manager.py into mixin packages
- Split modules/file_manager.py, persistent_terminal.py, terminal_ops.py, mcp_client_manager.py into packages
- Split core/main_terminal_parts/context.py into base + mixins
- Split static/src/app/methods/{ui,message,upload,taskPolling,conversation} into sub-modules
- Fix flattened method exports, dynamic import paths, missing cross-module imports
- Add missing permission/network/execution mode constants and _PERMISSION_MODE_LABEL
- Update AGENTS.md, CLAUDE.md and project memories to reflect new structure
2026-06-20 15:54:48 +08:00
8235c4ce70 fix(goal): 停止对话后清理工作区目标状态,避免继承到新对话
- /api/tasks/<task_id>/cancel 现在会同步停止该工作区的目标模式
- POST /api/tasks 创建非目标模式任务时清理残留活动目标
- 保留 /api/client_debug_log 前端日志上报端点供后续复用
2026-06-20 13:06:37 +08:00
9ed956518c refactor(sub_agent): 子智能体从 Node.js 子进程改为主进程内 Python 协程
- 重写子智能体执行核心,不再启动 easyagent Node.js 子进程
- 新增 modules/sub_agent/ 包集中管理子智能体逻辑
- 工具调用复用主进程 WebTerminal.handle_tool_call,自然经过沙箱/容器链路
- 子智能体模型独立读取 ~/.agents/<mode>/config/sub_agent_models.json
- 支持 8 个工具:read_file/write_file/edit_file(replacements+replace_all)/run_command/web_search/extract_webpage/search_workspace/read_mediafile
- 修复子智能体进度弹窗:标题颜色、write_file 显示、过滤非 progress 条目、统一滚动条样式
- 更新 AGENTS.md / CLAUDE.md 子智能体描述
- 新增 test/test_sub_agent_regression.py 回归测试
2026-06-20 00:26:45 +08:00
a212a0076c feat: support setting default workspace/project from frontend
- Add set_default_host_workspace() and /api/host/workspaces/set-default
- Add default_workspace_id persistence in UserManager and /api/projects/set-default
- Add 'Set as default' button in HostWorkspaceManageDialog
- Sync default badge in LeftPanel workspace list
- Update all workspace/project APIs to return real default_workspace_id
2026-06-19 21:48:24 +08:00
2c6d208be7 fix(input): /菜单上下键滚动抖动与高亮条偶发闪烁
- 修复 rAF 第一帧 now 早于 startTime 导致 scrollTop 反向抖动
- 过滤动画结束后的延迟 scroll 事件,避免误进入 manualScrolled 模式导致高亮条闪一下消失
2026-06-19 21:24:47 +08:00
2766a8ab57 fix(sub-agent): 修复网络受限时无法创建子智能体,并修复详情页只显示最近一次工具调用的问题 2026-06-19 20:23:44 +08:00
09af37055a fix: 右侧面板拖拽与终端滚动
- 修复仅打开终端面板时右侧无法左右拖动的问题
- 修复切换终端会话后未自动滚动到最新输出的问题
2026-06-19 17:45:09 +08:00
a6775598dc fix(terminal): 新建终端后侧边栏实时输出不更新
修复 TerminalPanel 中因空历史导致 _historyReady 始终为 false,
进而跳过所有 terminal_output 事件的问题。现在无论历史是否为空
都会标记加载完成;同时在历史加载期间暂存实时输出,避免首屏丢失。
2026-06-19 13:16:50 +08:00
c2d460a706 feat: 宿主机模式网络沙箱
- macOS sandbox-exec profile 支持 network_permission 参数 (restricted/full/none)
- backend: 透传网络权限至 run_command / terminal_session / sub_agent / background_command
- 后台 run_command 接入沙箱执行
- 自动审核模式兼容网络权限报错 markers
- 运行时切换网络权限通过 pending 机制 + user 消息通知
- 提示词注入网络状态 (仅沙箱模式)
- 前端权限菜单新增网络权限组 (受限/完全开放)
- direct 模式下网络权限组变灰禁用
- settings.json 默认 HOST_SANDBOX_NETWORK_PERMISSION=restricted
2026-06-19 00:22:30 +08:00
f75e2f07a3 refactor(deep_compression): 改造深度压缩消息结构、提示词加载与前端展示
- 删除 compact 文件和 inject guide 中的最近工具记录
- 新结构:用户所有输入(按压缩轮次分段)+ 历次压缩总结 + 最近一次输入
- 用户输入分段标记改为 <第N次压缩> 和 <当前触发的第X次压缩>
- 压缩总结提示词迁移到 prompts/deep_compression_summary.txt
- deep_compression_records 增加 user_inputs_before 和 summary 字段
- 压缩后清空全部 frozen prompt 缓存
- 修复 wait 模式 in-place 压缩前端不刷新问题
- 更新手动压缩确认弹窗文案
- 修复 _apply_workspace_personalization_preferences 测试 mock 签名
- 清理 context.py 中误导性的主提示词构建参数
2026-06-18 14:50:16 +08:00
c5dde27faa fix(frontend): terminal_input 显示参数从 timeout 改为 output_wait,标签改为等待时间 2026-06-17 22:02:06 +08:00
f43b5ea73b fix(chat): 运行期间恢复旧滚动逻辑,堆叠块更多按钮也接入锚定 2026-06-17 16:25:02 +08:00
edb557bdd3 feat(chat): 优化块展开/折叠滚动锚定,避免 stick-to-bottom 弹簧追底顿挫 2026-06-17 15:24:15 +08:00
1da269e2aa fix(前端): 目标模式刷新/切换对话稳定性修复
- 切换/停止任务后立即 stopPolling,防止旧任务目标事件污染新对话
- 目标进度/完成/停止回调增加 conversation_id 归属校验
- 刷新恢复改为复用现有 assistant 容器+增量追加事件,去掉无条件强制重建,避免视觉闪回与同步重放卡死
- 压缩消息不再另起 work segment,继续前一段

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 19:46:19 +08:00
50e49d60ec fix: /菜单手动滚动后高亮条切换为鼠标hover模式 2026-06-12 01:17:51 +08:00
095e0631c1 feat(sidebar): 统一Git和终端侧边栏空状态样式
- Git空状态改为图标+大字,与终端风格一致
- 终端空状态去掉小字,文字改为当前没有开启的终端
- 统一头部栏高度为38px
- 统一空状态图标颜色为var(--text-tertiary) + 整体opacity
- 统一空tab文字为13px/600字重/左对齐
- 新增folder-git-2.svg图标
2026-06-12 01:04:40 +08:00
55097cb3fc fix: 消息队列自动发送消息metadata错误标记为guidance 2026-06-12 00:34:31 +08:00
7d716b8b90 fix(ui): 终端侧边栏自动开关改为仅数量变化时触发一次
- 旧逻辑每次轮询都执行开关,导致面板关不掉/瞬间关闭
- 新增 previousTerminalCount 追踪,仅 0→>0 时开、>0→0 时关
2026-06-12 00:26:15 +08:00
2e54f2c343 feat(terminal): 实时终端改造为侧边栏面板,支持拖拽分割与自动开关
- 将实时终端从独立页面改造为 Vue3 侧边栏面板,与 Git 面板上下排列
- 使用 xterm.js + Grid 布局,支持三主题配色适配
- 上下拖拽分割条,动态调整终端/Git 面板比例
- 输入栏上方新增终端数量按钮,点击快捷打开
- 个人空间新增「自动打开终端面板」开关(外观与显示分类)
- REST API /api/terminals 获取终端列表,多时机自动刷新
- 有终端自动打开面板,无终端自动关闭
2026-06-12 00:18:27 +08:00
788753f6fd feat(slash-menu): 扩展 / 菜单至19项,可见行数5→7,等比缩放样式,优化间距 2026-06-11 11:47:41 +08:00
af4ec5c1a8 feat(composer): / 菜单选中切换添加流畅动画
- 提取 skill-slash-menu-wrapper 外壳层,高亮条脱离滚动容器独立定位
- 一个 rAF 循环同时驱动 scrollTop 和高亮条 top,帧帧精确同步
- 中间区域:高亮条视觉上钉在正中,列表平滑滚动
- 两端边界:高亮条平滑跟随,无偏差
2026-06-11 01:29:03 +08:00
f9d194f100 fix(ui): 块模式展开箭头改用SVG mask,修复偏位和非中心旋转 2026-06-11 00:24:56 +08:00
04128fac14 fix(frontend): 修复 read_file 搜索结果显示"行??"的问题
后端 search_text 返回 line_start/line_end,前端错误地读取了不存在的 line_number 字段。
改为正确读取 line_start 和 line_end,且当上下文窗口合并时显示完整行范围。
2026-06-10 19:49:06 +08:00
76e4c5144e feat(personalization): 去掉保存按钮,所有选项改为实时自动保存
- personalization store 新增 scheduleAutoSave/autoSave 防抖方法(500ms)
- updateField 及所有 mutation 方法修改后自动触发保存
- PersonalizationDrawer 删除保存按钮和 settings-save-bar
- handleStackedHideBordersChange 移除显式 save 调用
2026-06-10 19:44:33 +08:00
0ed262c87b fix(ui): 深色模式块底部运行指示线太亮,改用 accent 灰色系 2026-06-10 19:27:28 +08:00
dcb25dfe89 fix: 堆叠块深色hover不可见 & 底部块高度偏差 & 新增隐藏边线开关
- 深色模式 hover 修复:用 !important 覆盖 _overlays 中的 surface-panel 规则,使用 --hover-bg(6%白) 对齐对话列表 hover
- 底部块高度修正:shellHeight = targetShell + 2 补偿 border-box 下内容区裁剪
- 深色模式运行横条改为白色(var(--text-primary))
- 新增隐藏边线开关:后端 PersonalForm 持久化 stacked_hide_borders,前端条件渲染开关(仅堆叠模式可见)
2026-06-10 19:18:29 +08:00
3abbf30422 feat(admin): 管理员密码管理功能,支持搜索用户名/邮箱重置密码 2026-06-10 17:41:21 +08:00
820ec69354 feat(memory): 新增项目记忆系统,整合总体+项目记忆注入
- 新建 .agents/memory/ 项目记忆目录,支持 YAML frontmatter + Markdown
- 新增 update_project_memory / recall_project_memory 工具(复用 write_file/read_file)
- 新建 memory_system.txt prompt,总体长期记忆 + 项目记忆统一注入
- 记忆从 workspace_system.txt 中移出,独立为 memory_prompt 注入
- 重排 system prompt 注入顺序:主→权限→环境→对话→个性化→工作区→AGENTS.md→skills→记忆→禁用
- 压缩后选择性 invalidate 4 个 frozen keys(skills/workspace/personalization/memory)
- 前端:notebook/notebook-pen 图标、动画、状态文案、展开内容渲染
- 优化三个记忆工具的 description 和 memory_system prompt,引导模型主动调用
2026-06-10 15:14:01 +08:00
6255efc594 perf: CSS content-visibility + containment 优化长对话渲染性能
- .message-block 添加 content-visibility: auto 跳过屏幕外消息渲染
- .messages-flow / .messages-area 添加 contain: layout style 隔离布局
- 减少长对话 DOM 重排开销,解决横向 resize 时的级联卡顿
2026-06-10 01:08:47 +08:00
d24e00b9b3 feat(voice): Android 端侧离线语音识别集成
基于 Sherpa-ONNX + SenseVoice int8 实现 APK 端侧语音识别:
- VoiceBridge: AudioRecord 录音 + 整段识别 + JS Bridge 回调
- ModelManager: 模型下载管理(自有服务器),支持断点续传/校验/删除
- 前端:语音按钮仅 APK 环境显示,识别结果回填 ProseMirror 编辑器
- 调试:文件日志 + /api/voice_debug 接收路由
- demo/sense_voice_demo.py: Python 端测 Demo

versionCode 24→36, versionName 1.0.22→1.0.34
2026-06-10 00:50:16 +08:00
62e2c08f5a fix(style): 统一三主题 token 圆环绿黄红状态颜色为夜间模式值 2026-06-09 15:01:58 +08:00
644b609d85 fix(ui): 修复Git侧边栏刷新时loading文字闪烁 - 只在首次加载显示loading,刷新时保持现有文字避免闪烁 2026-06-09 12:21:40 +08:00
ff7108738e fix(style): 去除审批面板边缘光晕
desktop-approval-sheet 的 box-shadow 从大范围彩色扩散光晕
替换为项目既有的 var(--shadow-strong) 中性克制投影。
2026-06-09 11:46:20 +08:00
d5bf110b88 fix(style): 修复弹窗和审批面板文字颜色在深色模式下的异常显示
- confirm-title 添加 color: var(--text-primary)
- confirm-button--primary 使用 var(--on-accent) 替代 var(--text-primary),
  修复浅色模式下黑底黑字不可读
- 审批面板 auto-approval-block 标题/内容/决策/原因 补充显式颜色
- 审批面板 approval-lines/approval-diff/approval-kv strong/approval-value
  补充显式颜色,避免深色模式下继承为浅金色
2026-06-09 11:45:51 +08:00
033bea236c feat(ui): 预输入/引导消息队列存在时自动隐藏Git状态栏
与 / 菜单出现时隐藏逻辑相同,在 floatingStatusVisible 中新增
runtimeQueuedMessages 和 hasPendingRuntimeGuidance 两项检查。
2026-06-09 11:42:37 +08:00
8d87068ba7 fix(chat): 修复内容大幅增长时滚动锁定不及时的问题
- 调整 vue-stick-to-bottom resize spring 参数,加快动画响应
  (damping 0.68→0.5, stiffness 0.11→0.28, mass 1.05→0.75)
- 在 scrollListener 中添加高度突变检测,当 scrollHeight 大幅增长
  (超过 200px 或 viewport 35%)且用户未脱离锁定时,用 instant
  瞬间追底,绕过 spring 动画延迟和去重机制

修复场景:思考块展开、Markdown 表格渲染等造成大幅度垂直距离增加时
滚动锁定失效或锁住不及时的问题
2026-06-09 10:47:22 +08:00
2fcd241d94 fix(frontend): 移除历史消息加载时action-item的入场动画,仅流式输出时保留动画 2026-06-09 10:27:48 +08:00
4807c0b9f1 fix(frontend): 重构堆叠块高度引擎,根治鬼畜抖动并统一动画
StackedBlocks 旧实现每帧用 getBoundingClientRect 读正在过渡的块高度,
叠加 360ms runSync 轮询 + ResizeObserver + animateMoreToggle 三个驱动源
互相触发,形成不收敛的测量-回写反馈环 = 高频上下抽搐;且新块出现/展开
收起无外框动画(瞬间赋值且无 transition)。

高度引擎重构:
- 改测真实 DOM 稳定值(header.offsetHeight + content-inner.offsetHeight
  + border)算每块高度。content-inner 自身高度不受父级 collapsible-content
  的 max-height 过渡/overflow 裁切影响,是稳定目标态值,杜绝读动画中间帧。
- 删除 runSync 轮询、animateMoreToggle JS lerp、逐帧 getBoundingClientRect。
  measureAndCompute 仅在状态变化时测一次。
- ResizeObserver 只观察 content-inner(流式增长源),不观察被 transition 的
  元素,断开写→RO→写回环。
- shell/viewport/inner 三者同一条 height/transform 260ms transition 同步过渡,
  外框增高、传送带上移、展开收起、收起裁切全平滑。

单块路径统一(修 1→2 块重建鬼畜):
- splitActionGroups 阈值 >=2 改 >=1,单个 thinking/tool 也走 StackedBlocks,
  消除 single↔stack 路径整体切换导致的组件重新挂载(表现为外框瞬间塌扁再展开)。
- 单块用 isSingle + .stacked-shell--single 还原原 single 外观(12px 圆角+透明底)。

首次/后续进场动画区分:
- ChatArea 传 conversation-running + is-latest-message。
- animated(运行中+最新) 控 TransitionGroup :appear/:css(块进场动画);
  ready(首次 measure 后一次性) 控 shell/viewport/inner/collapsible-content
  的 transition:初始挂载/历史批量加载高度直接到位不跳动,之后启用使展开/
  收起在历史对话里也平滑。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 10:05:28 +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
66261e91c6 feat: 添加语音输入按钮,位于发送按钮左侧
- SVG线条图标风格,只用hover交互,不做边框
- 图标路径:static/icons/mic.svg
- 测试页面:static/voice_test.html
2026-06-08 14:14:19 +08:00
b6818bc0d0 fix: edit_file diff 显示修复 — 多行替换排序 & 行间间隙 2026-06-07 23:48:08 +08:00
84336b1802 fix(input): 重构消息队列动画 — 去掉容器外框、纯位移FLIP同步动画 2026-06-07 23:20:57 +08:00
d639278182 fix(overlay): 修复手机端图片/视频本地选择兼容性问题
- 将 local-files 事件类型由 FileList 改为 File[],避免 WebView 中 FileList 在 input 清空后失效
- 屏蔽文件选择器关闭后 500ms 内的 backdrop click,防止 touch 穿透误关 overlay
- 延迟 200ms 清空 input value,避免国产手机 WebView 异步填充 files 被截断
2026-06-07 17:19:53 +08:00
7c08031413 fix(android): 修复国产手机 WebView 中本地图片/视频选择无效的问题
- 将 .file-input-hidden 从 display:none 改为 opacity:0 + position:absolute
  国产手机(华为/小米/OPPO/vivo)WebView 对 display:none 的 input[type=file]
  选择后不会填充 files 属性,导致 change 事件触发但 files 为空
- 在 ImagePicker/VideoPicker 的 change 事件中增加空文件警告日志
- 在 upload.ts handleLocalImageFiles/handleLocalVideoFiles 中增加空文件
  时的 Toast 提示,避免静默失败
2026-06-07 16:56:55 +08:00
78544cb205 refactor: remove run_python tool, consolidate all execution to run_command 2026-06-07 16:23:01 +08:00
4bf0733907 feat: add minimal tool reel animation 2026-06-07 14:59:44 +08:00
a1dd97d5f1 fix(ui): align composer status controls 2026-06-07 03:41:27 +08:00
f50d87fc79 feat(chat): render streaming code blocks 2026-06-07 03:34:00 +08:00
f383b0ec71 fix(ui): refine dark code block styling
Remove stray borders, outlines, shadows, and token backgrounds from markdown code content in dark mode to avoid the visible white frame around code text.

Adjust code block body padding so code content sits closer to the block edge while staying visually aligned with the language label.
2026-06-07 02:57:58 +08:00
8617304fd4 refactor(prompt): freeze system prompts and update personalization modes
Freeze all leading system prompt blocks per conversation, including the main prompt, skills, workspace context, recent conversations, personalization, AGENTS.md, custom system prompts, and disabled-tool notices. Tool schemas remain dynamically generated outside the frozen prompt path.

Remove obsolete prompt injection files and code paths for thinking mode, deep thinking mode, sub-agent guidelines, and todo guidelines so prompt assembly stays simpler and cache-friendly.

Add personalization-controlled conversation_continuity with high/medium/low levels, rename the UI copy to 对话连续性, and wire it through backend sanitization, prompt generation, manage_personalization, frontend settings, and tool result rendering.

Add auto communication style support via prompts/auto_style.txt, matching the existing separate-file pattern used by human_like_style.txt.
2026-06-07 02:52:00 +08:00
d095531bb8 refactor(frontend): unify chat content rail alignment
Normalize the chat content rail around the input composer as the width baseline. This introduces shared rail variables, compensates message content for the actual scrollbar gutter, and separates mobile/webview behavior so desktop, mobile web, and app shell layouts stay centered consistently.

Align assistant text, markdown blocks, tables, minimal-mode summaries, expanded minimal steps, slash/runtime/git floating UI, and brief-message separators to the same horizontal rail. Remove the collapsed right resize handle and mobile menu glow while preserving the intended percentage widths for floating composer affordances.

Validation: npm run build --silent 2>&1 | tail -n 5
2026-06-07 01:55:20 +08:00
05e8ea5e40 feat(frontend): 输入栏现代化重设计 + 配套高度/配色修复
- 输入栏由体育场形改为圆角矩形,输入区与按钮行分离
- +/发送按钮移至底部行(左下/右下),缩小尺寸、圆角 hover、同心圆角对齐
- 发送按钮去光晕:浅色黑底白三角、深色白底黑三角,仅留浅阴影
- logo 旁思考模式按钮去除扩散光晕,focus 仅留描边环
- 对话区预留高度基准 80→90 适配更高输入栏,欢迎语 padding 同步加大
- /菜单命令名配色:经典 accent 橙、浅/深色保留 state-info 蓝
- /菜单及深色 + 菜单 hover 统一为侧边栏同款 --theme-tab-active(修复深色全黑)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 18:25:20 +08:00
b4030c386e refactor(frontend): 颜色 token 系统两层重构 + 三主题填色 + 去半透明
将前端配色从散落的硬编码/双命名体系(--claude-* / --theme-*)重构为
两层 token 结构(原始层 + 中性语义层),并按"经典抄 Claude、浅色抄
ChatGPT、深色自研"的定位完成三主题填色,同时建立 stylelint 防回退栏杆。
代码大量由 AI 生成的历史遗留配色问题(同语义多值、跨主题塌缩、强调色
撞文字色、fallback 第二真相源等)在此一并收口。

== 一、Token 结构重构(_tokens.scss)==
- 重写为两层:原始层 + 语义层;组件只引用中性语义名
  (--surface-* / --text-* / --border-* / --accent* / --state-* 等)。
- --claude-* / --theme-* 降级为兼容别名(41 个转发),迁移完成后删除。
- 三主题(classic / light / dark)+ 首屏回退(:root:not([data-theme]),
  与经典同值)全部补齐,结构对齐、不再缺项。

== 二、三主题填色 ==
- 经典 = Claude 官网亮色盘:暖奶油表面阶梯
  canvas #faf9f5 < soft #f5f0e8 < card #efe9de < cream-strong #e8e0d2
  < 纯白浮起;文字 #141413;hairline #e6dfd8;暖橙 primary #cc785c。
- 浅色 = ChatGPT 亮色盘:冷白 #ffffff / 侧栏 #f9f9f9 / 嵌套 #f3f3f3,
  中性灰文字,近黑 primary #181818。
- 深色 = 自研中性灰阶,本轮完全不动(原样保留)。
- 修复塌缩 bug:强调色在 light/dark 原被误填成灰(CTA 失去品牌色),
  现统一回品牌 primary;light 表面原全塌成 #ffffff(过于平面),
  现按灰阶拉开层次。
- 强调色克制(CTA-only voltage):primary 仅用于发送按钮/logo 等极少
  数处;hover / 选中 / 运行态一律走中性灰(运行态指示器从 amber 改灰)。
- 对话区背景从纯白改为暖奶油 canvas;个人空间下拉菜单、git 状态条、
  二级菜单等收口到统一语义色。

== 三、全面去半透明 ==
- 所有实体面板/二级菜单背景改为不透明(surface token 由半透明白改实色,
  --mobile-menu 三亮色主题改实色)。
- 移除已不透明面板上失效的 backdrop-filter 磨砂(移动端菜单、右键菜单、
  模型模式下拉等)。
- 遮罩 scrim(--overlay-scrim)与刻意玻璃质感装饰保留半透明。

== 四、块展开底色统一 ==
- 思考/工具块展开区底色统一为对话背景色:.collapsible-block 及其 header
  背景由 --surface-soft 改 transparent,与堆叠块(stacked-block)一致,
  消除"单块奶油底 vs 多块透明"的不一致。

== 五、布局修复 ==
- 工作区隐藏后残留空白:.workspace-panel--collapsed 补 flex-basis:0 +
  width/min-width:0,修正 flex-basis:auto 被子元素内容宽度撑开导致内联
  width:0 失效、collapsed 后仍占 ~300px 的问题。

== 六、防回退栏杆(新增)==
- 新增 .stylelintrc.cjs:三条规则拦截裸 hex / rgb()|hsl() 字面色 /
  var(--x, fallback) 兜底 / prefers-color-scheme;存量未清理文件用
  BASELINE_EXEMPT 临时豁免(现仅剩 5 个 admin 页面,本轮按用户要求不处理),
  清理一个移除一个、不再回退。
- package.json:build 脚本接入 stylelint(tsc → stylelint → vite),
  新增 lint:css 脚本及 stylelint/postcss-scss/postcss-html 依赖。
- 修复 25 处 \!important 笔误(zsh 历史扩展污染导致的无效 CSS)。

== 七、辅助脚本(新增 scripts/)==
- lint_check.py:Node 环境不可用时的 stylelint 替身(复刻三规则 + 括号
  校验,支持多行声明检测)。
- color_map.py:硬编码色 → token 反查,判定可映射/野色。
- strip_fallback.py:安全剥离已定义 token 的冗余 fallback。

== 八、文档 ==
- CLAUDE.md / AGENTS.md 前端设计规范更新:颜色规则扩写为三主题定位 +
  两层 token + 表面层次 + 强调色克制 + color-mix 派生 + stylelint 栏杆;
  新增"实体面板禁止半透明"规则;"禁止边缘光晕"补充"仅在用户明确允许
  或要求时才可使用"。

注:前端构建验证(npm run build / lint:css)由用户本机完成;AI 工具
上下文 Node v24 段错误无法运行 node/npm/vite/stylelint。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 16:20:58 +08:00
e34e2c965c fix(frontend): 多行输入时保持光标可见
adjustTextareaSize 重算高度会打乱 scrollTop,导致多行输入时光标被滚出视野。
新增 keepEditorSelectionVisible:高度重设后,聚焦态用编辑器 coordsAtPos 算出
光标位置并滚回可视区(上下留 lineHeight*0.3 padding),非聚焦态恢复原 scrollTop。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:33:48 +08:00
9be775d346 feat(personalization): 简略消息显示改为持久化到配置文件
原来「简略消息显示」只存浏览器 localStorage(experiments),换设备/清缓存即丢。
现迁移到后端 personalization.json,与主题/默认隐藏工作区一致即时保存:

- 后端新增 compact_message_display 字段(默认 full)及清洗(仅 full/brief,
  容错大小写空格,非法回退 full)
- store: PersonalForm 加字段;setCompactMessageDisplay 写 form + 即时 POST;
  加载时同步进旧 experiments 镜像,并一次性迁移本地遗留 brief 回写配置文件
- 抽屉下拉与 ChatArea 改读 form.compact_message_display,experiments 作兜底
- 保留 localStorage 镜像保证向后兼容,老用户首次加载自动迁移偏好

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:31:06 +08:00
779140ef59 fix(frontend): 新建对话时重置 token 统计
新对话流程(resetNewConversation)清空消息时一并调用 resetTokenStatistics,
避免上一对话的 token 统计残留到新对话。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:09:00 +08:00
469e804e38 fix(frontend): 工具块展开内部滚动条样式统一,滚动槽透明
- MinimalBlocks 思考内容(.thinking-content)补全自定义滚动条
- ToolAction 结构化显示三类滚动区(content/diff/code/output pre)统一样式
- 参考 git 状态侧边栏滚动条:10px 圆角胶囊滑块、半透明主题色
- 滚动槽(track)设为透明,贴合工具块灰色底色,避免明显槽体
- 颜色走 --claude-*/--theme-* 变量,三模式自适应

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:07:11 +08:00
548455f127 feat(frontend): 状态栏 +/- 行数变化加数字滚筒动画
新增 RollingNumber.vue:逐位纵向滚筒,值变大下面顶上来、变小上面压下来,
高位先动(38ms 错开),一次变化两格直达不路过中间数字。接入 InputComposer
状态栏的 +additions / -deletions 两处。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 19:15:30 +08:00
f2d7d8f3b1 fix(ui): refresh git summary while idle 2026-05-31 23:28:10 +08:00
2f0e269788 fix(ui): adjust composer status layering 2026-05-31 22:14:57 +08:00
75594aa2aa fix(ui): 修复 write_file 内容在 diff grid 下被挤成多行
.diff-line 改为 grid 三列布局后,write_file 仍输出裸文本,整段
被塞进 5ch 宽的首列竖排折行。改为与 edit_file 一致的行号/标记/内容
三 span 结构,内容落在 1fr 列正常换行。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 17:51:31 +08:00
6f78277a03 feat(ui): add project git status panel 2026-05-31 17:27:24 +08:00
6d5630c820 feat(file-edit): support batched replacements 2026-05-31 13:15:37 +08:00
fc70179b02 feat(web): 统一前端设计风格并重写回顾/版本管理弹窗
- 将 8 条前端设计风格原则写入 CLAUDE.md 与 AGENTS.md
- 重写对话回顾弹窗:扁平化去圆角套娃、移除彩色光晕、固定高度、
  自定义关闭按钮、滚动条隐藏、颜色全走三模式变量
- 回顾弹窗改用独立列表 state,加载更多改为追加不刷新、不复位滚动,
  按钮样式对齐侧边栏(全宽/文字靠左/固定高度)
- 后端 get_conversation_list 新增 non_empty 参数,回顾弹窗仅显示
  有内容的对话且分页数量一致(侧边栏不受影响)
- 重写版本管理弹窗:原生 select/checkbox 换自定义下拉与开关、
  拆圆角套娃、固定高度、颜色走变量(diff 红绿语义色保留)
- 版本管理开关旁文字随状态显示开启/关闭
- icons 注册 refreshCw 键

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 11:30:08 +08:00
59a79b0063 fix(web): align slash menu spacing, corners, and scroll step
- Add bottom padding so the last option has a gap below it
- Size max-height for 5 rows + 6 gaps (incl. border) so all 5 show
- Equalize side/row gaps at 5px and make first-item corners concentric
- Read row height + gap from CSS vars in scroll logic instead of hardcoded 41px

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 09:30:46 +08:00
50310a1bf8 feat(web): expand slash command menu 2026-05-31 00:06:48 +08:00
39328cf6a9 fix(web): use tiptap mention for skill input 2026-05-30 23:31:13 +08:00
8fddf0d1ed fix(frontend): refine personal space copy 2026-05-30 22:19:41 +08:00
9f37479272 chore: remove autosaved presentation 2026-05-30 22:10:45 +08:00
1702ccacd2 fix(ui): 目标横幅在队列/skill菜单展开时收起为圆点且不顶高布局
目标模式就绪横幅原为流内元素,撑高 stadium-input-wrapper,使锚定其顶部的
消息队列与 skill 菜单被顶起,且其高度被计入聊天区预留高度,进而抬高可滚动范围。

- 收起态切为 absolute 脱离文档流,锚定输入框上方,圆点位置不变、文字收拢
- collectComposerVisualHeight 排除收起态横幅,不再计入预留高度
- 新增 watch(goalBannerCollapsed) 在 skill 菜单开关时重新上报高度

队列为空且无 skill 选择时自动展开恢复原样。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 21:51:32 +08:00
3fd2214da0 feat(compression): 深压缩改为 in-place 标记前缀,不再切换新对话
深压缩从"建新对话+切过去"重构为标记当前对话历史前缀(deep_compacted):
原文保留并照常显示,仅在 build_messages 构建请求时排除。conversation_id
不变,避免任务状态/目标模式/前端对话切换的大量适配带来的 bug。

- deep_compression.py: _mark_history_compacted 打标 + 重置 current_context_tokens
  防自动续接死循环;总结请求传入正常 tools 以 100% 命中前缀缓存
- context.py build_messages: 跳过 deep_compacted 消息
- conversation.py /compress: 去掉切对话,按 compress_behavior 决定续接/等待
- 新增个性化设置 deep_compress_form(file/inject) 与
  deep_compress_behavior(continue/wait,仅手动压缩生效)
- 前端去掉强制切换对话,改为重载当前对话刷新展示
- AGENTS.md/CLAUDE.md: 补充默认中文交流约定等说明

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:56:15 +08:00
f5e4541d83 feat(chat): add compact message display mode and goal-review/compression headers
- 审核(goal_review) user 消息气泡显示「审核 + circle-alert 图标」
- compact 消息新增「简略信息」显示形式(个人空间可切换),渲染为横线包裹的一行概要
- 压缩续接消息单独标记为 compression_handoff,visibility 改为 compact

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:05:59 +08:00
32865f6d6e fix(ui): refine message visibility and goal approval flow 2026-05-30 16:30:05 +08:00
e220b3703a feat(web): add skill slash selector 2026-05-30 14:50:00 +08:00
8a1e17b9a0 feat(goal): add autonomous goal mode workflow
Introduce workspace-level goal state persistence, goal prompt injection, and after-turn review handling so an active task can continue until the configured completion conditions are met.

Add a dedicated goal review agent with readonly and active evidence modes, configurable model settings, review prompt, token/turn boundaries, idle-no-tool protection, and progress/completed/stopped events.

Wire goal_mode through task creation, task restoration, compression handoff, runtime user messages, API message sanitization, and tool-call ordering so goal continuations survive long-running tasks and deep compression.

Add Vue UI for arming goal mode from the quick menu, showing running/completed banners, displaying progress metrics, restoring running goal state, and exposing personalization settings for review mode and stop limits.

Include goal mode research notes and default goal review configuration.
2026-05-30 12:51:42 +08:00
77752a22d4 fix(frontend): hide workspace status badges 2026-05-29 20:32:33 +08:00
b1cf4b9ff2 fix(frontend): restore conversation delete animation
Use a two-phase delete flow for conversation list items.

Instead of immediately removing the deleted conversation from the array and relying only on transition-group leave hooks, mark the target conversation as pending deletion first so it can play the left-slide animation, then remove it after the animation completes.

Also keep the list container mounted during delete mode so empty/loading branches do not interrupt the exit transition.

Validation: npm run build --silent 2>&1 | tail -n 20
2026-05-29 19:57:23 +08:00
08d9812f45 feat(docker): support isolated projects in web mode
Implement Docker Web project management on top of workspace_id while keeping host mode workspace behavior intact.

Backend changes:

- Move Docker user files to users/<user>/projects/<project_id>/{project,data,logs} and shared user state to users/<user>/personal.

- Add automatic legacy migration from old project/data/logs/agentskills layouts and from the temporary project/shared layout.

- Generate project IDs server-side from the project name, reserve internal IDs, and hide project paths from the UI.

- Add project rename/delete APIs; deleting a Docker project removes its project directory and releases terminal/container state.

- Add host workspace rename/delete APIs; deleting a host workspace only removes catalog entries and keeps files on disk.

- Scope Docker containers, terminals, uploads, conversations, storage, and running task metadata by workspace_id.

- Store private skills under users/<user>/personal/agentskills and sync them into each project workspace.

- Inject the current project/workspace name through prompts/workspace_system.txt.

Frontend changes:

- Replace Docker file-tree area with project management UX and reuse host multi-workspace running-task behavior.

- Add a management dialog for creating, renaming, and deleting projects/workspaces.

- Show project labels instead of internal IDs in toasts and project lists.

- Clear stale conversation history during project/workspace switching and show loading until the new list is ready.

- Keep running-task loader/check behavior consistent across host workspaces and Docker projects.

Validation:

- python3 -m py_compile modules/user_manager.py modules/host_workspace_manager.py modules/skills_manager.py core/main_terminal_parts/tools_execution.py server/auth.py server/context.py server/status.py server/conversation.py server/tasks.py utils/context_manager.py

- python3 -m unittest test.test_server_refactor_smoke

- npm run build --silent 2>&1 | tail -n 20
2026-05-29 19:49:48 +08:00
03cb39924a feat(host): support concurrent workspace conversations
Implement host-mode multi-workspace concurrency while preserving one active task per workspace. Host terminals are scoped by workspace id, host workspace switching no longer globally refreshes or blocks on tasks, and task APIs now expose workspace/conversation metadata for frontend coordination.

Update conversation navigation so creating/loading conversations during an active workspace task is view-only and does not mutate backend terminal context. This prevents running task output from being pushed into the currently viewed conversation after switching or creating a new conversation.

Add running task awareness to the frontend sidebar, composer, and polling flow. Running tasks can be shown across workspaces, current-workspace active conversations render inline loaders, completed unviewed tasks persist as check indicators across refresh, and completed tasks clear once viewed.

Restore running conversations correctly after switching workspace/conversation or refreshing during an active task. REST polling is rebound only for the matching conversation/task, stale poll responses are ignored, empty assistant placeholders are restored before first content, and completion clears loader/stop states without requiring page refresh.

Adjust host workspace UX so switching workspaces loads the active conversation if one is running, otherwise opens the new-conversation state. Other conversations in a busy workspace are view-only with disabled input instead of blocked navigation.

Validation: python3 -m py_compile server/auth.py server/context.py server/conversation.py server/status.py server/tasks.py; python3 -m unittest test.test_server_refactor_smoke; npm run build --silent 2>&1 | tail -n 12.
2026-05-29 17:54:11 +08:00
1c1aee090c fix(sidebar): highlight current conversation 2026-05-29 13:56:01 +08:00
69ae036f08 perf(status): defer docker stats on startup 2026-05-29 13:55:54 +08:00
eb00a3522a refactor(models): use dynamic api model registry 2026-05-29 00:20:54 +08:00
8da51b3b68 fix(ui): refine dark mode menu highlights 2026-05-29 00:20:31 +08:00
bed194386a fix(mobile): align conversation overlay in app 2026-05-28 20:50:44 +08:00
f61a8df6fa feat: add blocking user question tool 2026-05-28 16:30:55 +08:00
0b6b39f262 fix(ui): refine sidebar and personal space styling 2026-05-28 14:15:02 +08:00
ecba45da65 feat(ui): add sidebar list and workspace animations 2026-05-28 04:49:52 +08:00
3bc6f718eb feat(ui): refine sidebar workspace and code blocks 2026-05-28 03:53:49 +08:00
348cad2b1a fix(personalization): 调整个人空间头部对齐与内容区可视高度 2026-05-28 00:08:51 +08:00
cd82c6d658 fix(ui,runtime,search): merge runtime/frontend stabilization into main 2026-05-27 16:38:19 +08:00
e955ef73e0 feat(ui): redesign personal space settings 2026-05-27 16:15:21 +08:00
398ee6e760 feat(memory): refactor proactive memory and conversation recall
Refactor conversation persistence into workspace-scoped storage with host workspace legacy migration, current workspace filtering, and active host workspace state protection.

Add proactive recent-conversation prompt injection with personal-space controls, configurable item count, empty-conversation filtering, and frozen per-conversation prompt metadata to keep request caches stable.

Introduce conversation_search and conversation_review tools for current-workspace history: multi-keyword search, list mode, current conversation exclusion, message/tool counts, formatted model output, read/save review modes, long-review fallback, and .agents/review storage.

Move internal workspace artifacts under .agents, including uploads, skills, compact results, and reviews; update prompt file-tree visibility, compression output, upload paths, and hidden versioning exclusions.

Add create_skill workflow and a Skills tool category, move read_skill into Skills, validate/归档 skill folders, support host global skills and Docker/API private skills, and sync private skills into .agents/skills and skill prompts.

Update frontend tool icons, statuses, and expanded renderers for conversation recall and skills workflows; add workspace conversation and skills-manager tests.
2026-05-27 03:09:42 +08:00
aff972b218 fix(input): polish runtime queue rendering 2026-05-25 22:57:29 +08:00
41305ae2a8 fix(composer): avoid draft restore while busy 2026-05-25 22:57:29 +08:00
eaf270766f fix(frontend): sync generated conversation title 2026-05-25 22:52:03 +08:00