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

Function updateExecutionFlow

apps/visualize-trace/static/js/script.js:593–620  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

591}
592
593function updateExecutionFlow(data) {
594 currentFlowData = data;
595
596 if (!data || data.length === 0) {
597 elements.executionFlow.innerHTML = '<p class="text-muted">无执行流程数据</p>';
598 updateNavigationList([]);
599 return;
600 }
601
602 // 确保每个步骤都是独立的顶级元素
603 const stepsContainer = document.createElement('div');
604 stepsContainer.className = 'execution-steps-container';
605
606 data.forEach((step, index) => {
607 const stepElement = document.createElement('div');
608 stepElement.innerHTML = createStepHTML(step, index);
609 stepsContainer.appendChild(stepElement.firstElementChild);
610 });
611
612 elements.executionFlow.innerHTML = '';
613 elements.executionFlow.appendChild(stepsContainer);
614
615 // 更新导航列表
616 updateNavigationList(data);
617
618 // 绑定事件监听器
619 bindStepEventListeners();
620}
621
622function createStepHTML(step, index) {
623 const roleClass = step.role === 'user' ? 'user-message' :

Callers 1

loadTraceFileFunction · 0.85

Calls 3

updateNavigationListFunction · 0.85
createStepHTMLFunction · 0.85
bindStepEventListenersFunction · 0.85

Tested by

no test coverage detected