Update workflow feature with codex
This commit is contained in:
20
web/types.ts
20
web/types.ts
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user