mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-13 07:55:09 -05:00
fix(triggers): add copilot as a trigger type (#3191)
* fix(triggers): add copilot as a trigger type * update color
This commit is contained in:
@@ -115,6 +115,7 @@ async function doExecuteRunTool(
|
||||
const result = await executeWorkflowWithFullLogging({
|
||||
workflowInput,
|
||||
executionId,
|
||||
overrideTriggerType: 'copilot',
|
||||
stopAfterBlockId,
|
||||
runFromBlock,
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user