Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/sim/app/workspace/[workspaceId]/logs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const TRIGGER_VARIANT_MAP: Record<string, React.ComponentProps<typeof Badge>['va
webhook: 'orange',
mcp: 'cyan',
a2a: 'teal',
copilot: 'indigo',
Comment thread
waleedlatif1 marked this conversation as resolved.
Outdated
}

interface StatusBadgeProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface WorkflowExecutionOptions {
onStream?: (se: StreamingExecution) => Promise<void>
executionId?: string
onBlockComplete?: (blockId: string, output: any) => Promise<void>
overrideTriggerType?: 'chat' | 'manual' | 'api'
overrideTriggerType?: 'chat' | 'manual' | 'api' | 'copilot'
stopAfterBlockId?: string
/** For run_from_block / run_block: start from a specific block using cached state */
runFromBlock?: {
Expand Down
1 change: 1 addition & 0 deletions apps/sim/lib/copilot/client-sse/run-tool-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ async function doExecuteRunTool(
const result = await executeWorkflowWithFullLogging({
workflowInput,
executionId,
overrideTriggerType: 'copilot',
stopAfterBlockId,
runFromBlock,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -540,6 +545,7 @@ export async function executeRunFromBlock(
{
enabled: true,
useDraftState,
workflowTriggerType: 'copilot',
runFromBlock: { startBlockId: params.startBlockId, sourceSnapshot: snapshot },
}
)
Expand Down Expand Up @@ -602,6 +608,7 @@ export async function executeRunBlock(
{
enabled: true,
useDraftState,
workflowTriggerType: 'copilot',
runFromBlock: { startBlockId: params.blockId, sourceSnapshot: snapshot },
stopAfterBlockId: params.blockId,
}
Expand Down
1 change: 1 addition & 0 deletions apps/sim/lib/logs/get-trigger-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '#6366f1' },
]

for (const trigger of triggers) {
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/lib/workflows/executor/execute-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface ExecuteWorkflowOptions {
enabled: boolean
selectedOutputs?: string[]
isSecureMode?: boolean
workflowTriggerType?: 'api' | 'chat'
workflowTriggerType?: string
Comment thread
waleedlatif1 marked this conversation as resolved.
Outdated
onStream?: (streamingExec: StreamingExecution) => Promise<void>
onBlockComplete?: (blockId: string, output: unknown) => Promise<void>
skipLoggingComplete?: boolean
Expand Down
1 change: 1 addition & 0 deletions apps/sim/stores/logs/filters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export const CORE_TRIGGER_TYPES = [
'webhook',
'mcp',
'a2a',
'copilot',
] as const

export type CoreTriggerType = (typeof CORE_TRIGGER_TYPES)[number]
Expand Down
Loading