Skip to content

Commit b7bc51a

Browse files
committed
lint fix
1 parent f4647f8 commit b7bc51a

2 files changed

Lines changed: 11 additions & 23 deletions

File tree

dist/components/treeview/WorkflowTreeView.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/treeview/WorkflowTreeView.tsx

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ export const WorkflowTreeView = (props: WorkflowTreeViewProps) => {
368368
const iterationStatus = childNodes.some((n: any) => n.status === 'ERROR')
369369
? 'ERROR'
370370
: childNodes.some((n: any) => n.status === 'INPROGRESS' || n.status === 'RUNNING')
371-
? 'INPROGRESS'
372-
: childNodes.every((n: any) => n.status === 'FINISHED')
373-
? 'FINISHED'
374-
: 'PENDING';
371+
? 'INPROGRESS'
372+
: childNodes.every((n: any) => n.status === 'FINISHED')
373+
? 'FINISHED'
374+
: 'PENDING';
375375

376376
// Create the virtual node and add to nodeMap
377377
const virtualNode = {
@@ -599,7 +599,7 @@ export const WorkflowTreeView = (props: WorkflowTreeViewProps) => {
599599
const renderNode = (node: any) => {
600600
// Check if this is an iteration node
601601
const isIterationNode = node.name === 'iterationAgentflow' || node.data?.isVirtualNode;
602-
602+
603603
// Add a special class or icon for iteration nodes
604604
const nodeLabel = (
605605
<div class="flex items-center">
@@ -626,20 +626,12 @@ export const WorkflowTreeView = (props: WorkflowTreeViewProps) => {
626626
<span class={isIterationNode ? 'iteration-node-label' : ''}>{node.label}</span>
627627
</div>
628628
);
629-
629+
630630
// Create a wrapper for the status icon to apply the status-icon class
631-
const statusIcon = (
632-
<div class="status-icon">
633-
{getStatusIcon(node.status)}
634-
</div>
635-
);
636-
631+
const statusIcon = <div class="status-icon">{getStatusIcon(node.status)}</div>;
632+
637633
return (
638-
<TreeItem
639-
itemId={node.id}
640-
label={nodeLabel}
641-
icon={statusIcon}
642-
>
634+
<TreeItem itemId={node.id} label={nodeLabel} icon={statusIcon}>
643635
{node.children && node.children.length > 0 && node.children.map((childNode: any) => renderNode(childNode))}
644636
</TreeItem>
645637
);
@@ -755,11 +747,7 @@ export const WorkflowTreeView = (props: WorkflowTreeViewProps) => {
755747
<Show when={isPanelExpanded()}>
756748
<div class="border-t">
757749
<div class="p-4 mb-2">
758-
<RichTreeView
759-
defaultExpanded={expandedNodes()}
760-
onNodeSelect={handleNodeSelect}
761-
indentationLevel={props.indentationLevel || 24}
762-
>
750+
<RichTreeView defaultExpanded={expandedNodes()} onNodeSelect={handleNodeSelect} indentationLevel={props.indentationLevel || 24}>
763751
<For each={treeData()}>{(rootNode) => renderNode(rootNode)}</For>
764752
</RichTreeView>
765753
</div>

0 commit comments

Comments
 (0)