mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix: apply the review items for #685 at merge
palette agent switch: aria-hidden on .command-palette-agent, arrows lose role="button" and aria-label (no nested buttons in the row) i18n: zh-CN entry for the "Agent for the new session (Left/Right to change)" tooltip docs: Keyboard-Shortcuts Ctrl+K row says Left/Right change the agent on the New session row test: pin the aria-hidden switch and the zh-CN tooltip entry in command-palette-ui.test.ts Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c6a5995ac6
commit
d16172c4b8
4 files changed
+24
-6
No files matched your search
@@ -94,6 +94,8 @@
|
||||
'Move to Ungrouped': '移到未分组',
|
||||
'Move to new group': '移到新分组',
|
||||
'New session': '新建会话',
|
||||
// The Cmd+K palette's new-session agent switch (panels-ui.js, its title tooltip).
|
||||
'Agent for the new session (Left/Right to change)': '新会话使用的智能体(按左/右方向键切换)',
|
||||
'A session is already starting.': '已有会话正在启动。',
|
||||
'Follow parent again': '重新跟随父会话',
|
||||
'Parent closed; placed on its own': '父会话已关闭;单独放置',
|
||||
|
||||
@@ -694,19 +694,21 @@ Object.assign(CodemanApp.prototype, {
|
||||
|
||||
/**
|
||||
* The new-session row's agent switch: arrows either side of the agent's logo
|
||||
* and name. Spans, not buttons: the row itself is a <button>. Nothing is drawn
|
||||
* when there is nothing to choose between.
|
||||
* and name. Spans, not buttons: the row itself is a <button>. The switch is
|
||||
* aria-hidden (no nested buttons; the row's subtitle already names the agent),
|
||||
* and its arrows work by click through data-palette-agent-cycle. Nothing is
|
||||
* drawn when there is nothing to choose between.
|
||||
*/
|
||||
_renderCommandPaletteAgentPicker(mode) {
|
||||
const choices = this._commandPaletteAgentChoices();
|
||||
if (choices.length < 2) return '';
|
||||
const agent = choices.find((c) => c.id === mode) || choices[0];
|
||||
return `
|
||||
<span class="command-palette-agent" title="Agent for the new session (Left/Right to change)">
|
||||
<span class="command-palette-agent-arrow" role="button" data-palette-agent-cycle="prev" aria-label="Previous agent">‹</span>
|
||||
<span class="command-palette-agent" aria-hidden="true" title="Agent for the new session (Left/Right to change)">
|
||||
<span class="command-palette-agent-arrow" data-palette-agent-cycle="prev">‹</span>
|
||||
<span class="run-mode-dot ${escapeHtml(agent.id)}" aria-hidden="true"></span>
|
||||
<span class="command-palette-agent-label">${escapeHtml(agent.label)}</span>
|
||||
<span class="command-palette-agent-arrow" role="button" data-palette-agent-cycle="next" aria-label="Next agent">›</span>
|
||||
<span class="command-palette-agent-arrow" data-palette-agent-cycle="next">›</span>
|
||||
</span>`;
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user