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
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
6f78277a03
feat(ui): add project git status panel
2026-05-31 17:27:24 +08:00
8fddf0d1ed
fix(frontend): refine personal space copy
2026-05-30 22:19:41 +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
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
8da51b3b68
fix(ui): refine dark mode menu highlights
2026-05-29 00:20:31 +08:00
0b6b39f262
fix(ui): refine sidebar and personal space styling
2026-05-28 14:15:02 +08:00
348cad2b1a
fix(personalization): 调整个人空间头部对齐与内容区可视高度
2026-05-28 00:08:51 +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
8d665ad6de
feat(permission): add auto-approval mode with approval agent, UI flow, and docs sync
...
Implemented a new permission mode between and , including backend policy, runtime behavior, frontend display, and documentation updates.
Backend & policy changes:
- Added to permission mode validation and persistence paths.
- Updated tool permission evaluation: workspace-local direct pass, out-of-workspace requires approval.
- Kept readonly-first flow and added auto-approval decision path when permission denial occurs.
- Added approval reason/decider support in tool approval manager.
- Improved rejection tool-content format to natural language: '工具调用被拒绝\n原因:...'
- Fixed permission-mode sync edge cases on conversation create/load and restart-first-switch behavior.
Approval agent subsystem:
- Added and .
- Added lightweight auto-approval config at (name/url/key/model/extra_params + timeouts).
- Added optional transcript debug switch in code and transcript output under logs/approval_agent.
- Aligned transcript saving toward cumulative messages format and captured reasoning/content/tool_calls/tool sequence.
Frontend changes:
- Added option to personalization and permission menus.
- Reworked approval panel auto-review display into a dedicated block with simplified lines: start, command, final approve/reject + reason.
- Added delayed sidebar auto-close (10s) after approval resolved.
- Added stricter permission-switch verification and rollback on mismatch/error.
Docs updated:
- Synced AGENTS.md, README.md, and docs/host_sandbox_and_permission_model.md with new permission mode, approval-agent behavior, config, and current constraints (including docker caveat).
2026-05-11 17:55:27 +08:00
ed5315eef6
feat: add MCP management and host-only runtime policy
2026-04-26 23:49:04 +08:00
3a949abdb4
fix: restore cached theme before personalization sync
2026-04-14 13:44:24 +08:00
916f68e8e9
feat: 添加智能体交流风格选项
...
- 将"模型行为"标签改为"智能体行为"
- 新增"智能体交流风格"二选一选项(默认/拟人)
- 拟人风格会注入human_like_style.txt提示词
- manage_personalization工具支持communication_style字段
- 添加user-pen.svg图标用于个性化工具和分类
2026-04-14 01:47:06 +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
9c15c6f945
fix(personalization): 恢复个人空间打开/关闭动画
2026-04-11 18:59:23 +08:00
0ba2763696
fix(personalization): 移除滑动跳模块并调整用量区留白
2026-04-11 17:02:17 +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
4124faa040
feat(frontend): 优化聊天界面与监控交互体验
2026-04-10 14:34:18 +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
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
3ae5be47d9
feat: add per-skill strict read-before-tool enforcement
2026-04-07 11:50:38 +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
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
7812d58a64
fix: adapt admin monitor cards to dark theme
2026-04-05 01:22:22 +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
12c7a4bdd9
fix: remove legacy file edit tags
2026-03-17 22:43:51 +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
d71525a3c6
feat: add personal usage stats
2026-03-09 12:03:47 +08:00
43409c523e
fix: 移除错误的对话切换跳转逻辑并修复工具执行返回值问题
...
主要修复:
1. 移除前端"取消跳转到正在运行的对话"的错误逻辑
- 删除 switchConversation 中的任务检查和确认提示
- 删除 createNewConversation 中的跳转回运行对话逻辑
- 删除 loadConversation 中对未定义变量 hasActiveTask 的引用
2. 修复后端工具执行返回值问题
- 修复 execute_tool_calls 在用户停止时返回 None 的 bug
- 确保所有返回路径都返回包含 stopped 和 last_tool_call_time 的字典
3. 其他改进
- 添加代码复制功能 (handleCopyCodeClick)
- 移除 FocusPanel 相关代码
- 更新个性化配置 (enhanced_tool_display)
- 样式和主题优化
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-08 17:42:07 +08:00
5ce21eb280
修复手机端个人空间选项卡滑动问题
...
- 为选项卡容器添加 width: 100% 和 max-width: 100% 限制宽度
- 添加 -webkit-overflow-scrolling: touch 启用 iOS 平滑滚动
- 添加 touch-action: pan-x 明确允许横向触摸滚动
- 添加 scroll-behavior: smooth 实现平滑滚动效果
- 添加 overscroll-behavior-x: contain 防止滚动溢出
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-08 04:52:30 +08:00
08bc08b35f
feat: update model support and multimodal
2026-02-25 01:41:05 +08:00
7472028997
feat: add skills framework and controls
2026-02-07 00:20:35 +08:00
55ef45e04d
feat: add silent disable option and workspace prompt split
2026-02-03 23:11:15 +08:00
6f8c1b36cc
feat: add image compression preference for uploads
2026-01-28 11:43:09 +08:00
8a7cc5d9c6
feat: support kimi-k2.5 with multimodal thinking
2026-01-28 10:34:27 +08:00
51f61b04d2
feat: add api admin ui and container status fix
2026-01-25 10:49:52 +08:00
88dc7e02a4
feat: improve onboarding and copy ux
2026-01-19 21:02:24 +08:00
60e63595a6
chore: sync pending changes
2026-01-05 21:48:55 +08:00