polish(ui): friendly tool-chip labels (strip mcp__void__ prefix)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,12 @@ function turnEl(role, agentName, bodyNode) {
|
||||
el('span', { class: 'msg' }, bodyNode));
|
||||
}
|
||||
|
||||
const TOOL_LABEL = { search: 'searching', read: 'reading', context: 'looking at this view', propose_change: 'drafting a change' };
|
||||
function chipEl(tool, status) {
|
||||
const icon = tool === 'search' ? '🔍' : tool === 'read' ? '📄' : tool === 'context' ? '🧭' : '📝';
|
||||
return el('div', { class: 'tools' }, el('span', { class: 'chip' + (status === 'error' ? ' err' : '') }, `${icon} ${tool}`));
|
||||
const name = String(tool || '').replace(/^mcp__void__/, ''); // strip MCP prefix for display
|
||||
const icon = name === 'search' ? '🔍' : name === 'read' ? '📄' : name === 'context' ? '🧭' : '📝';
|
||||
return el('div', { class: 'tools' },
|
||||
el('span', { class: 'chip' + (status === 'error' ? ' err' : '') }, `${icon} ${TOOL_LABEL[name] || name}`));
|
||||
}
|
||||
|
||||
function draftCardEl(d, onResolve) {
|
||||
|
||||
Reference in New Issue
Block a user