MCPcopy Create free account
hub / github.com/DSGWJQ/Feagent / getStatusColor

Function getStatusColor

web/src/features/workflows/utils/nodeUtils.ts:12–26  ·  view source on GitHub ↗
(
  status: NodeStatus | undefined,
  selected: boolean
)

Source from the content-addressed store, hash-verified

10 * 根据节点状态和选中状态获取样式类名
11 */
12export function getStatusColor(
13 status: NodeStatus | undefined,
14 selected: boolean
15): string {
16 switch (status) {
17 case 'running':
18 return 'node-running border-yellow-500 shadow-yellow-500/50';
19 case 'completed':
20 return 'node-completed border-green-500 shadow-green-500/50';
21 case 'error':
22 return 'node-error border-red-500 shadow-red-500/50';
23 default:
24 return selected ? 'selected border-primary shadow-lg' : 'border-border';
25 }
26}
27
28/**
29 * 获取节点默认配置

Callers 15

EmbeddingModelNodeFunction · 0.90
DatabaseNodeFunction · 0.90
TextModelNodeFunction · 0.90
HttpRequestNodeFunction · 0.90
StructuredOutputNodeFunction · 0.90
JavaScriptNodeFunction · 0.90
LoopNodeFunction · 0.90
FileNodeFunction · 0.90
StartNodeFunction · 0.90
EndNodeFunction · 0.90
AudioNodeFunction · 0.90
ConditionalNodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected