Update workflow feature with codex

This commit is contained in:
Xin Wang
2026-02-10 08:12:46 +08:00
parent 6b4391c423
commit bbeffa89ed
8 changed files with 1334 additions and 39 deletions

View File

@@ -91,13 +91,26 @@ export interface Workflow {
globalPrompt?: string;
}
export type WorkflowNodeType = 'start' | 'assistant' | 'tool' | 'human_transfer' | 'end' | 'conversation' | 'human';
export interface WorkflowCondition {
type: 'always' | 'contains' | 'equals' | 'regex' | 'llm' | 'default';
source?: 'user' | 'assistant';
value?: string;
values?: string[];
prompt?: string;
}
export interface WorkflowNode {
id?: string;
name: string;
type: 'conversation' | 'tool' | 'human' | 'end';
type: WorkflowNodeType;
isStart?: boolean;
metadata: {
position: { x: number; y: number };
};
assistantId?: string;
assistant?: Record<string, any>;
prompt?: string;
messagePlan?: {
firstMessage?: string;
@@ -125,9 +138,14 @@ export interface WorkflowNode {
}
export interface WorkflowEdge {
id?: string;
fromNodeId?: string;
toNodeId?: string;
from: string;
to: string;
label?: string;
condition?: WorkflowCondition;
priority?: number;
}
export enum TabValue {