MCPcopy Create free account
hub / github.com/MiroMindAI/MiroThinker / createToolCallHTML

Function createToolCallHTML

apps/visualize-trace/static/js/script.js:692–715  ·  view source on GitHub ↗
(tool)

Source from the content-addressed store, hash-verified

690}
691
692function createToolCallHTML(tool) {
693 // 如果是新格式的工具调用,使用新的渲染方式
694 if (tool.format === 'new') {
695 return createNewFormatToolCallHTML(tool);
696 }
697
698 // 旧格式(MCP或其他)使用原有的渲染方式
699 const isBeowserAgent = tool.server_name === 'browsing-agent' || tool.server_name.includes('agent');
700 const toolClass = isBeowserAgent ? 'browser-agent' : '';
701
702 return `
703 <div class="tool-call ${toolClass}">
704 <div class="tool-call-header">
705 <i class="fas fa-${isBeowserAgent ? 'globe' : 'wrench'}"></i>
706 ${tool.server_name}.${tool.tool_name}
707 <span class="badge badge-format ms-2">${tool.format || 'mcp'}</span>
708 </div>
709 <div class="tool-arguments">
710 <strong>参数:</strong>
711 <div class="code-block">${JSON.stringify(tool.arguments, null, 2)}</div>
712 </div>
713 </div>
714 `;
715}
716
717function createBrowserStepHTML(step, parentIndex) {
718 // 为browser step创建唯一的ID

Callers 2

createStepHTMLFunction · 0.85
createBrowserStepHTMLFunction · 0.85

Calls 1

Tested by

no test coverage detected