Skip to content

Commit afef3e1

Browse files
committed
fix(condition): added success check on condition block processor, fixed terminal preventDefault copy bug (#2691)
1 parent b7631ed commit afef3e1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,13 @@ const WorkflowContent = React.memo(() => {
795795
event.preventDefault()
796796
redo()
797797
} else if ((event.ctrlKey || event.metaKey) && event.key === 'c') {
798+
const selection = window.getSelection()
799+
const hasTextSelection = selection && selection.toString().length > 0
800+
801+
if (hasTextSelection) {
802+
return
803+
}
804+
798805
const selectedNodes = getNodes().filter((node) => node.selected)
799806
if (selectedNodes.length > 0) {
800807
event.preventDefault()

apps/sim/tools/function/execute.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ export const functionExecuteTool: ToolConfig<CodeExecutionInput, CodeExecutionOu
9090
transformResponse: async (response: Response): Promise<CodeExecutionOutput> => {
9191
const result = await response.json()
9292

93+
if (!result.success) {
94+
return {
95+
success: false,
96+
output: {
97+
result: null,
98+
stdout: result.output?.stdout || '',
99+
},
100+
error: result.error,
101+
}
102+
}
103+
93104
return {
94105
success: true,
95106
output: {

0 commit comments

Comments
 (0)