import type { WorkflowGraph, WorkflowNodeType } from '../../api';

export const NODE_TYPE_LABEL: Record<WorkflowNodeType, string> = {
  agent: '🤖 Agent',
  skill: '🛠️ Skill',
  http: '🌐 HTTP',
  transform: '🔧 Transform',
  branch: '🔀 Branch'
};

export const STATUS_COLOR: Record<string, string> = {
  running: 'blue',
  success: 'green',
  failed: 'red',
  aborted: 'orange',
  skipped: 'default'
};

export const SAMPLE_GRAPH: WorkflowGraph = {
  entry: 'fetch',
  variables: { topic: 'Go 1.23 新特性' },
  nodes: [
    {
      id: 'fetch',
      type: 'agent',
      name: '搜集资料',
      config: {
        agentId: '',
        prompt: '请围绕主题\"{{vars.topic}}\"列出 5 条最近的关键信息，要点形式。'
      },
      next: 'summarize'
    },
    {
      id: 'summarize',
      type: 'agent',
      name: '总结成稿',
      config: {
        agentId: '',
        prompt: '基于以下要点写一段 200 字日报：\\n{{steps.fetch.output.text}}'
      },
      next: ''
    }
  ]
};

