Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 'pink',
}

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
4 changes: 3 additions & 1 deletion apps/sim/components/emcn/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const badgeVariants = cva(
amber: `${STATUS_BASE} bg-[#fde68a] text-[#a16207] dark:bg-[rgba(245,158,11,0.2)] dark:text-[#fcd34d]`,
teal: `${STATUS_BASE} bg-[#99f6e4] text-[#0f766e] dark:bg-[rgba(20,184,166,0.2)] dark:text-[#5eead4]`,
cyan: `${STATUS_BASE} bg-[var(--surface-4)] text-[#0891b2] dark:bg-[rgba(14,165,233,0.2)] dark:text-[#7dd3fc]`,
pink: `${STATUS_BASE} bg-[#fbcfe8] text-[#be185d] dark:bg-[rgba(236,72,153,0.2)] dark:text-[#f9a8d4]`,
'gray-secondary': `${STATUS_BASE} bg-[var(--surface-4)] text-[var(--text-secondary)]`,
},
size: {
Expand Down Expand Up @@ -54,6 +55,7 @@ const STATUS_VARIANTS = [
'amber',
'teal',
'cyan',
'pink',
'gray-secondary',
] as const

Expand Down Expand Up @@ -87,7 +89,7 @@ export interface BadgeProps
* Supports two categories of variants:
* - **Bordered**: `default`, `outline`, `type` - traditional badges with borders
* - **Status colors**: `green`, `red`, `gray`, `blue`, `blue-secondary`, `purple`,
* `orange`, `amber`, `teal`, `cyan`, `gray-secondary` - borderless colored badges
* `orange`, `amber`, `teal`, `cyan`, `pink`, `gray-secondary` - borderless colored badges
*
* Status color variants can display a dot indicator via the `dot` prop.
* All variants support an optional `icon` prop for leading icons.
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: '#ec4899' },
]

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?: 'api' | 'chat' | 'copilot'
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