Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
06fbc29
v0
Sg312 Jan 30, 2026
cb3618a
v1
Sg312 Jan 30, 2026
8b7b331
Basic ss tes
Sg312 Jan 31, 2026
301e25c
Ss tests
Sg312 Jan 31, 2026
4c821d0
Stuff
Sg312 Jan 31, 2026
6cd8f1d
Add mcp
Sg312 Jan 31, 2026
793c877
mcp v1
Sg312 Jan 31, 2026
e04f379
Improvement
Sg312 Feb 1, 2026
4d84c54
Fix
Sg312 Feb 3, 2026
8f17bc4
BROKEN
Sg312 Feb 3, 2026
2d9a7c6
Checkpoint
Sg312 Feb 4, 2026
addc760
Streaming
Sg312 Feb 4, 2026
a58a61b
Fix abort
Sg312 Feb 4, 2026
be7fb8f
Things are broken
Sg312 Feb 4, 2026
b034b1c
Streaming seems to work but copilot is dumb
Sg312 Feb 4, 2026
8c48cdd
Fix edge issue
Sg312 Feb 4, 2026
d8daf3a
LUAAAA
Sg312 Feb 4, 2026
cbd7bb6
Fix stream buffer
Sg312 Feb 4, 2026
89782f6
Fix lint
Sg312 Feb 4, 2026
9a5a494
Checkpoint
Sg312 Feb 5, 2026
7402b38
Initial temp state, in the middle of a refactor
Sg312 Feb 5, 2026
4faa939
Initial test shows diff store still working
Sg312 Feb 5, 2026
7183448
Tool refactor
Sg312 Feb 5, 2026
b3e74e4
First cleanup pass complete - untested
Sg312 Feb 5, 2026
6b40d4f
Continued cleanup
Sg312 Feb 5, 2026
39968be
Refactor
Sg312 Feb 6, 2026
ba8f39f
Refactor complete - no testing yet
Sg312 Feb 6, 2026
fb4afeb
Fix - cursor makes me sad
Sg312 Feb 6, 2026
dd02395
Fix mcp
Sg312 Feb 6, 2026
08a8e14
Clean up mcp
Sg312 Feb 6, 2026
fd1e61b
Updated mcp
Sg312 Feb 6, 2026
69bdffa
Add respond to subagents
Sg312 Feb 6, 2026
74f863a
Fix definitions
Sg312 Feb 6, 2026
3dcd008
Add tools
Sg312 Feb 6, 2026
0c51ce5
Add tools
Sg312 Feb 6, 2026
df3523e
Add copilot mcp tracking
Sg312 Feb 6, 2026
6cb112e
Fix lint
Sg312 Feb 6, 2026
18e493e
Fix mcp
Sg312 Feb 6, 2026
a73e351
Fix
Sg312 Feb 6, 2026
67c2271
Updates
Sg312 Feb 6, 2026
a220455
Clean up mcp
Sg312 Feb 7, 2026
6735eaa
Fix copilot mcp tool names to be sim prefixed
Sg312 Feb 7, 2026
4d4d002
Add opus 4.6
Sg312 Feb 7, 2026
b07b812
Fix discovery tool
Sg312 Feb 7, 2026
220a540
Fix
Sg312 Feb 7, 2026
ebf4e90
Remove logs
Sg312 Feb 7, 2026
7e592e8
Fix go side tool rendering
Sg312 Feb 7, 2026
25d255a
Update docs
Sg312 Feb 9, 2026
b4361b8
Fix hydration
Sg312 Feb 9, 2026
d2c028f
Fix tool call resolution
Sg312 Feb 9, 2026
ed613c3
Fix
Sg312 Feb 9, 2026
4698f73
Fix lint
Sg312 Feb 9, 2026
79af303
Fix superagent and autoallow integrations
Sg312 Feb 9, 2026
c086912
Fix always allow
Sg312 Feb 9, 2026
9a47033
Update block
Sg312 Feb 9, 2026
7200421
Remove plan docs
Sg312 Feb 9, 2026
ab39a4f
Fix hardcoded ff
Sg312 Feb 9, 2026
dba4e61
Fix dropped provider
Sg312 Feb 9, 2026
b14e844
Fix lint
Sg312 Feb 9, 2026
395f890
Fix tests
Sg312 Feb 9, 2026
7458bbd
Fix dead messages array
Sg312 Feb 9, 2026
48c9a3a
Fix discovery
Sg312 Feb 9, 2026
7153141
Fix run workflow
Sg312 Feb 10, 2026
7670cdf
Fix run block
Sg312 Feb 10, 2026
1beb35c
Fix run from block in copilot
Sg312 Feb 10, 2026
18f1d76
Fix lint
Sg312 Feb 10, 2026
8a2eacf
Fix skip and mtb
Sg312 Feb 10, 2026
bd6a103
Fix typing
Sg312 Feb 10, 2026
ddc5164
Fix tool call
Sg312 Feb 10, 2026
bb4e072
Bump api version
Sg312 Feb 10, 2026
98df298
Fix bun lock
Sg312 Feb 10, 2026
621dd23
Nuke bad files
Sg312 Feb 10, 2026
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
Prev Previous commit
Next Next commit
Stuff
  • Loading branch information
Sg312 committed Feb 9, 2026
commit 4c821d03f5e50d73c08e9b55b560a6bf0fbba3b7
6 changes: 6 additions & 0 deletions apps/sim/lib/copilot/orchestrator/sse-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ export const sseHandlers: Record<string, SSEHandler> = {
// Respond tools are internal to copilot's subagent system - skip execution
// The copilot backend handles these internally to signal subagent completion
if (RESPOND_TOOL_SET.has(toolName)) {
toolCall.status = 'success'
toolCall.endTime = Date.now()
toolCall.result = { success: true, output: 'Internal respond tool - handled by copilot backend' }
return
}

Expand Down Expand Up @@ -354,6 +357,9 @@ export const subAgentHandlers: Record<string, SSEHandler> = {

// Respond tools are internal to copilot's subagent system - skip execution
if (RESPOND_TOOL_SET.has(toolName)) {
toolCall.status = 'success'
toolCall.endTime = Date.now()
toolCall.result = { success: true, output: 'Internal respond tool - handled by copilot backend' }
return
}

Expand Down
30 changes: 25 additions & 5 deletions apps/sim/lib/copilot/tools/server/workflow/edit-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { validateSelectorIds } from '@/lib/copilot/validation/selector-validator
import type { PermissionGroupConfig } from '@/lib/permission-groups/types'
import { getBlockOutputs } from '@/lib/workflows/blocks/block-outputs'
import { extractAndPersistCustomTools } from '@/lib/workflows/persistence/custom-tools-persistence'
import { applyAutoLayout } from '@/lib/workflows/autolayout'
import {
loadWorkflowFromNormalizedTables,
saveWorkflowToNormalizedTables,
Expand Down Expand Up @@ -3167,11 +3168,30 @@ export const editWorkflowServerTool: BaseServerTool<EditWorkflowParams, any> = {

// Persist the workflow state to the database
const finalWorkflowState = validation.sanitizedState || modifiedWorkflowState

// Apply autolayout to position blocks properly
const layoutResult = applyAutoLayout(finalWorkflowState.blocks, finalWorkflowState.edges, {
horizontalSpacing: 250,
verticalSpacing: 100,
padding: { x: 100, y: 100 },
})

const layoutedBlocks = layoutResult.success && layoutResult.blocks
? layoutResult.blocks
: finalWorkflowState.blocks

if (!layoutResult.success) {
logger.warn('Autolayout failed, using default positions', {
workflowId,
error: layoutResult.error,
})
}

const workflowStateForDb = {
blocks: finalWorkflowState.blocks,
blocks: layoutedBlocks,
edges: finalWorkflowState.edges,
loops: generateLoopBlocks(finalWorkflowState.blocks as any),
parallels: generateParallelBlocks(finalWorkflowState.blocks as any),
loops: generateLoopBlocks(layoutedBlocks as any),
parallels: generateParallelBlocks(layoutedBlocks as any),
lastSaved: Date.now(),
isDeployed: false,
}
Expand All @@ -3196,10 +3216,10 @@ export const editWorkflowServerTool: BaseServerTool<EditWorkflowParams, any> = {

logger.info('Workflow state persisted to database', { workflowId })

// Return the modified workflow state for the client to convert to YAML if needed
// Return the modified workflow state with autolayout applied
return {
success: true,
workflowState: validation.sanitizedState || modifiedWorkflowState,
workflowState: { ...finalWorkflowState, blocks: layoutedBlocks },
// Include input validation errors so the LLM can see what was rejected
...(inputErrors && {
inputValidationErrors: inputErrors,
Expand Down