mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 14:51:39 +08:00
16 lines
573 B
TypeScript
16 lines
573 B
TypeScript
import type { WorkflowRunNodeExecutionResponse } from '@dify/contracts/api/console/apps/types.gen'
|
|
|
|
export function isBoundAgentV2Execution(
|
|
execution: Pick<WorkflowRunNodeExecutionResponse, 'node_type' | 'process_data'>,
|
|
): boolean {
|
|
const processData = execution.process_data
|
|
return (
|
|
execution.node_type === 'agent' &&
|
|
typeof processData === 'object' &&
|
|
processData !== null &&
|
|
'workflow_agent_binding_id' in processData &&
|
|
typeof processData.workflow_agent_binding_id === 'string' &&
|
|
processData.workflow_agent_binding_id.length > 0
|
|
)
|
|
}
|