diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index be6c11ef05..853cd544ff 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -795,6 +795,13 @@ const WorkflowContent = React.memo(() => { event.preventDefault() redo() } else if ((event.ctrlKey || event.metaKey) && event.key === 'c') { + const selection = window.getSelection() + const hasTextSelection = selection && selection.toString().length > 0 + + if (hasTextSelection) { + return + } + const selectedNodes = getNodes().filter((node) => node.selected) if (selectedNodes.length > 0) { event.preventDefault() diff --git a/apps/sim/tools/function/execute.ts b/apps/sim/tools/function/execute.ts index f5c6977211..516c701270 100644 --- a/apps/sim/tools/function/execute.ts +++ b/apps/sim/tools/function/execute.ts @@ -90,6 +90,17 @@ export const functionExecuteTool: ToolConfig => { const result = await response.json() + if (!result.success) { + return { + success: false, + output: { + result: null, + stdout: result.output?.stdout || '', + }, + error: result.error, + } + } + return { success: true, output: {