Skip to content

Commit 329faf9

Browse files
committed
feat: enhance UI and command functionality
- Added `revealPreviewPanel` function to manage the visibility of the preview panel in App component. - Integrated `onRevealPreviewPanel` prop in ChatView to trigger the preview panel reveal. - Updated ChatView to handle the new `onRevealPreviewPanel` prop and adjusted logic for side panel interactions. - Enhanced SlashDropdown to display command aliases in the dropdown, improving user experience by showing matched aliases. - Updated i18n catalogs to reflect changes from AGENT.md to AGENTS.md for consistency across the application. - Improved command handling in slashCommands.js to support aliases, ensuring better command discovery and usability. - Added tests for new functionality in uiPrefs and slashCommands to ensure reliability and correctness.
1 parent 90702fc commit 329faf9

64 files changed

Lines changed: 1237 additions & 332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CLAUDE.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ writes finish and refills the password from the authenticated settings response.
482482
- [src/apps/tui/render_mode.hpp](src/apps/tui/render_mode.hpp): pure terminal render-mode decision logic.
483483
- [src/base/utils/paths.cpp](src/base/utils/paths.cpp): user vs service data directory resolution.
484484

485+
**斜杠命令别名只挂在原名上,不单独注册。** `SlashCommand::aliases`(TUI)与 `/api/commands` builtin 的 `aliases` 数组(Web)是唯一来源;`commands()` 只有原名,下拉与 `/help` 一条命令一行。下拉只在查询命中别名、且别名档位高于原名时显示 `/原名 (别名)`(三名命令敲 `/new` 显示 `/generate (new)`,敲 `/create` 显示 `/generate (create)`,空查询不标别名),选中插入原名。`has_command` 对别名也返回 true —— skill / opencode 命令撞名检查靠它挡住 `rc`、`new`;dispatch 把使用计数记到原名(排序时再加上旧版按别名记的次数),用户实际敲的名字放在 `CommandContext::invoked_command_name`(`/side` 回显 `[/side]` 用它)。纯逻辑:`slash_command_ranking.cpp`、`web/src/lib/slashCommands.js::slashCommandMatchedAlias`;回归:`tests/tui/commands/command_alias_test.cpp`、`slashCommands.test.js` 的别名组。
486+
485487
## Maintenance Notes
486488

487489
**Daemon mode:** main thread blocks in `Crow::App::run()`. Plus:
@@ -785,7 +787,7 @@ The existing region detector still probes DuckDuckGo once at startup through `Pr
785787
"max_depth": 8,
786788
"max_bytes": 262144,
787789
"max_total_bytes": 1048576,
788-
"filenames": ["AGENT.md", "AGENTS.md", "CLAUDE.md"],
790+
"filenames": ["AGENTS.md", "AGENTS.md", "CLAUDE.md"],
789791
"read_claude_md": true
790792
},
791793
"models_dev": {

‎assets/AGENT.md.sample‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ ctest --test-dir build --output-on-failure
3333
- When touching tests: every TEST body gets a Chinese comment explaining the scenario.
3434

3535
<!--
36-
Tip: acecode reads AGENT.md first, then AGENTS.md, and CLAUDE.md as a compatibility
36+
Tip: acecode reads AGENTS.md first, then AGENTS.md, and CLAUDE.md as a compatibility
3737
fallback, picking only one project-instructions file per directory. You can drop
38-
AGENT.md in subdirectories for module-specific overrides (outer-first in the merged
38+
AGENTS.md in subdirectories for module-specific overrides (outer-first in the merged
3939
prompt, so inner directories can tighten outer rules).
4040

4141
Toggle read_claude_md in ~/.acecode/config.json to ignore CLAUDE.md, or override

‎design-prototypes/agent-office/app.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
setText($('working-count'),working);setText($('resting-count'),(6-working)+' 位待命 / 休息');
2929
const a=sim.agents[sim.selected],task=sim.tasks[sim.selected],status=sim.status(sim.selected),percent=Math.floor(task.elapsed/task.duration*100);
30-
setText($('detail-name'),a.name);setText($('detail-role'),a.role);setText($('detail-id'),'AGENT '+String(a.index+1).padStart(2,'0'));
30+
setText($('detail-name'),a.name);setText($('detail-role'),a.role);setText($('detail-id'),'AGENTS '+String(a.index+1).padStart(2,'0'));
3131
setText($('detail-state'),status.label);
3232
const description=task.elapsed>=task.duration?'已完成'+task.title+'。休息一下,准备迎接下一个好想法。':!sim.ready(a.index)?'等待'+task.deps.filter(i=>sim.tasks[i].elapsed<sim.tasks[i].duration).map(i=>sim.agents[i].name).join('、')+'交接,然后开始'+task.title+'。':task.text;
3333
setText($('detail-task'),description);setText($('detail-percent'),percent+'%');$('detail-progress').style.width=percent+'%';

‎design-prototypes/agent-office/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<div class="panel-heading"><h2>今天的伙伴</h2><span class="count-label">6 位</span></div>
5656
<div class="team-summary"><span><i class="status-dot"></i><span id="working-count">4</span> 位工作中</span><span id="resting-count">2 位准备中</span></div>
5757
<div class="agent-list" id="agent-list"></div>
58-
<section class="agent-detail" aria-label="选中成员详情"><div class="detail-heading"><span class="detail-label">正在关注</span><span id="detail-id">AGENT 01</span></div><div class="detail-name"><strong id="detail-name">阿策</strong><span id="detail-role">团队协调</span><span id="detail-state" class="state-tag">构思中</span></div><p id="detail-task">把一个好想法拆成可执行的步骤。</p><div class="detail-meter"><span>当前任务</span><span id="detail-percent">0%</span></div><div class="meter"><span id="detail-progress"></span></div></section>
58+
<section class="agent-detail" aria-label="选中成员详情"><div class="detail-heading"><span class="detail-label">正在关注</span><span id="detail-id">AGENTS 01</span></div><div class="detail-name"><strong id="detail-name">阿策</strong><span id="detail-role">团队协调</span><span id="detail-state" class="state-tag">构思中</span></div><p id="detail-task">把一个好想法拆成可执行的步骤。</p><div class="detail-meter"><span>当前任务</span><span id="detail-percent">0%</span></div><div class="meter"><span id="detail-progress"></span></div></section>
5959
<section class="activity-section" aria-label="团队动态"><div class="activity-heading"><h3>办公室动态</h3><span class="activity-live">LIVE</span></div><ol class="activity-list" id="activity-list" aria-live="off"></ol></section>
6060
<div class="team-footer"><svg><use href="#i-coffee"/></svg><span>好代码和好咖啡,都值得等待。</span></div>
6161
</aside>

‎docs/daemon-api.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,17 +2512,24 @@ empty `commands` array plus enabled global skills only:
25122512
```json
25132513
{
25142514
"builtins": [
2515-
{"name":"init","description":"Analyze this codebase and generate (or improve) AGENT.md"},
2515+
{"name":"init","description":"Analyze this codebase and generate (or improve) AGENTS.md"},
25162516
{"name":"compact","description":"Compress conversation history"},
25172517
{"name":"goal","description":"Create, view, pause, resume, edit, or clear the thread goal"},
2518-
{"name":"plan","description":"Enter plan mode or start planning a described task"}
2518+
{"name":"plan","description":"Enter plan mode or start planning a described task"},
2519+
{"name":"remote-control","description":"...","aliases":["rc"]}
25192520
],
25202521
"skills": [
25212522
{"name":"my-skill","description":"..."}
25222523
]
25232524
}
25242525
```
25252526

2527+
A builtin's aliases are listed in its optional `aliases` array instead of as
2528+
separate entries; the slash picker shows one row per command and appends the
2529+
alias in parentheses only when the typed query matches that alias (for example
2530+
`remote-control (rc)`). `POST /api/sessions/:id/commands` still accepts both
2531+
the name and its aliases.
2532+
25262533
For backward compatibility, omitting the `workspace` query entirely returns
25272534
the builtin-only response and omits both `commands` and `skills`.
25282535

‎docs/desktop-shell/macos-file-drop-handoff.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ At handoff, git status additionally shows modifications to `.gitignore` and
208208
`AGENTS.md`, and an untracked `.comet/` directory. These were not part of the
209209
rollback changes listed above; investigate if needed and do not revert them.
210210

211-
Read current AGENT.md/AGENTS.md and follow the active session's instructions.
211+
Read current AGENTS.md/AGENTS.md and follow the active session's instructions.
212212
Use apply_patch for manual edits, and do not change vendored/submodule sources.
213213
Codegraph was unavailable/not indexed in the previous session; ordinary bounded
214214
source inspection was used. `rg` is not installed; use grep or built-in tools.

‎docs/help-source/group4.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@
7070

7171
"project-rules": page("把项目约定写成可随仓库维护的规则,让 ACECode 在理解和修改代码时遵循相同的边界。", [
7272
section("files", "项目规则文件",
73-
'''<p>ACECode 默认识别 <code>AGENT.md</code>、<code>AGENTS.md</code> 和 <code>CLAUDE.md</code>。同一目录按配置中的文件名顺序选用第一个匹配文件,默认顺序如上;不会把同目录三个文件无条件全部合并。</p><p>加载先读取用户数据目录中的全局规则,再按项目目录层级从外到内收集。是否读取、文件名顺序及内容长度都受配置控制,CLAUDE.md 还受独立读取开关控制。</p><p>规则适合记录目录职责、构建测试命令、编码风格、禁止修改的区域和交付标准。不要把临时任务状态、长日志和密钥放进去,冗长规则也会占用模型上下文。</p>'''),
73+
'''<p>ACECode 默认识别 <code>AGENTS.md</code>、<code>AGENTS.md</code> 和 <code>CLAUDE.md</code>。同一目录按配置中的文件名顺序选用第一个匹配文件,默认顺序如上;不会把同目录三个文件无条件全部合并。</p><p>加载先读取用户数据目录中的全局规则,再按项目目录层级从外到内收集。是否读取、文件名顺序及内容长度都受配置控制,CLAUDE.md 还受独立读取开关控制。</p><p>规则适合记录目录职责、构建测试命令、编码风格、禁止修改的区域和交付标准。不要把临时任务状态、长日志和密钥放进去,冗长规则也会占用模型上下文。</p>'''),
7474
section("init", "使用初始化命令",
75-
'''<p>在正确的项目中提交 <code>/init</code>,让 ACECode 分析仓库并生成或改进 <code>AGENT.md</code>。它会调用模型,可能需要阅读文件和写入确认;生成后仍应检查其中的目录与命令是否真实可用。</p>''',
75+
'''<p>在正确的项目中提交 <code>/init</code>,让 ACECode 分析仓库并生成或改进 <code>AGENTS.md</code>。它会调用模型,可能需要阅读文件和写入确认;生成后仍应检查其中的目录与命令是否真实可用。</p>''',
7676
code("/init", "在 ACECode 输入框中提交"),
77-
'''<p>已有团队维护的 AGENTS.md 时,先明确希望更新哪个文件,避免无意引入优先级更高但内容重复的 AGENT.md。桌面/Web 选择命令只把文本填入输入框,提交后才执行。</p>''',
77+
'''<p>已有团队维护的 AGENTS.md 时,先明确希望更新哪个文件,避免无意引入优先级更高但内容重复的 AGENTS.md。桌面/Web 选择命令只把文本填入输入框,提交后才执行。</p>''',
7878
figure("CF-04", "初始化后的项目规则检查", "展示提交 /init 的位置以及生成规则的文件预览,标出构建命令、测试命令和禁止修改范围。")),
7979
section("example", "一份小而明确的规则",
80-
code("项目使用 Python,业务代码放在 src/,测试放在 tests/。\n修改前先阅读相关模块与测试;不要修改 generated/ 下的生成文件。\n保持现有公开接口,新增行为需要相应测试。\n完成后运行项目 README 中记录的验证命令,并报告未执行的检查。", "AGENT.md 内容示例"),
80+
code("项目使用 Python,业务代码放在 src/,测试放在 tests/。\n修改前先阅读相关模块与测试;不要修改 generated/ 下的生成文件。\n保持现有公开接口,新增行为需要相应测试。\n完成后运行项目 README 中记录的验证命令,并报告未执行的检查。", "AGENTS.md 内容示例"),
8181
'''<p>把示例中的语言、路径和验证命令替换成自己的项目约定。稳定的个人偏好放在个性化或记忆中,可复用的操作流程整理为<a href="skills.html">技能</a>;本项目特有的约束留在项目规则里。</p>''')
8282
], ["src/domain/project_instructions/instructions_loader.cpp", "src/base/config/config.hpp", "src/apps/tui/commands/builtin_commands.cpp", "docs/user-manual.md"]),
8383

0 commit comments

Comments
 (0)