style:对话界面的样式优化

- 代码高亮
- 间距调整
- 工具调用的样式调整
This commit is contained in:
Roe-xin
2026-01-08 16:10:41 +08:00
parent 5577fe17bb
commit 0bcdc615e3
4 changed files with 301 additions and 72 deletions

View File

@ -172,15 +172,8 @@ export function getAgentCardScript(): string {
const icon = step.status === 'completed' ? '✅' : step.status === 'error' ? '❌' : '🔄';
const displayName = getAgentToolDisplayName(step.toolName);
const result = step.toolResult ? \`: \${step.toolResult.substring(0, 50)}\${step.toolResult.length > 50 ? '...' : ''}\` : '';
// 为技术性工具调用添加低调样式(用户看不懂的)
const lowProfileTools = [
'knowledge_save', 'knowledge_load',
'queryKnowledgeSummary', 'queryRules', 'querySignals',
'setModule', 'addSignal', 'addSignalExample',
'validateKnowledgeGraph', 'addPlan', 'addEdge',
'showPlan', 'spawnExplorer'
];
const stepClass = lowProfileTools.includes(step.toolName) ? 'agent-step low-profile' : 'agent-step';
// 所有工具调用都使用低调样式
const stepClass = 'agent-step low-profile';
return \`<div class="\${stepClass}"><span class="step-icon">\${icon}</span><span class="step-name">\${displayName}</span><span class="step-result">\${result}</span></div>\`;
}).join('');