fix(triggers): add copilot as a trigger type (#3191)

* fix(triggers): add copilot as a trigger type

* update color
This commit is contained in:
Waleed
2026-02-10 21:36:38 -08:00
committed by GitHub
parent 13a91113fd
commit 3d5bd003ef
8 changed files with 18 additions and 5 deletions

View File

@@ -115,6 +115,7 @@ async function doExecuteRunTool(
const result = await executeWorkflowWithFullLogging({
workflowInput,
executionId,
overrideTriggerType: 'copilot',
stopAfterBlockId,
runFromBlock,
})

View File

@@ -172,7 +172,7 @@ export async function executeRunWorkflow(
generateRequestId(),
params.workflow_input || params.input || undefined,
context.userId,
{ enabled: true, useDraftState }
{ enabled: true, useDraftState, workflowTriggerType: 'copilot' }
)
return {
@@ -408,7 +408,12 @@ export async function executeRunWorkflowUntilBlock(
generateRequestId(),
params.workflow_input || params.input || undefined,
context.userId,
{ enabled: true, useDraftState, stopAfterBlockId: params.stopAfterBlockId }
{
enabled: true,
useDraftState,
stopAfterBlockId: params.stopAfterBlockId,
workflowTriggerType: 'copilot',
}
)
return {
@@ -540,6 +545,7 @@ export async function executeRunFromBlock(
{
enabled: true,
useDraftState,
workflowTriggerType: 'copilot',
runFromBlock: { startBlockId: params.startBlockId, sourceSnapshot: snapshot },
}
)
@@ -602,6 +608,7 @@ export async function executeRunBlock(
{
enabled: true,
useDraftState,
workflowTriggerType: 'copilot',
runFromBlock: { startBlockId: params.blockId, sourceSnapshot: snapshot },
stopAfterBlockId: params.blockId,
}

View File

@@ -39,6 +39,7 @@ export function getTriggerOptions(): TriggerOption[] {
{ value: 'webhook', label: 'Webhook', color: '#ea580c' },
{ value: 'mcp', label: 'MCP', color: '#dc2626' },
{ value: 'a2a', label: 'A2A', color: '#14b8a6' },
{ value: 'copilot', label: 'Copilot', color: '#ec4899' },
]
for (const trigger of triggers) {

View File

@@ -13,7 +13,7 @@ export interface ExecuteWorkflowOptions {
enabled: boolean
selectedOutputs?: string[]
isSecureMode?: boolean
workflowTriggerType?: 'api' | 'chat'
workflowTriggerType?: 'api' | 'chat' | 'copilot'
onStream?: (streamingExec: StreamingExecution) => Promise<void>
onBlockComplete?: (blockId: string, output: unknown) => Promise<void>
skipLoggingComplete?: boolean