Skip to content

Commit 5ab4821

Browse files
committed
fix(remove-exec-context): tools handle workflow id check themselves
1 parent b8bc632 commit 5ab4821

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

apps/sim/tools/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export async function executeTool(
227227
const isInternalRoute = endpointUrl.startsWith('/api/')
228228

229229
if (isInternalRoute || skipProxy) {
230-
const result = await handleInternalRequest(toolId, tool, contextParams, executionContext)
230+
const result = await handleInternalRequest(toolId, tool, contextParams)
231231

232232
// Apply post-processing if available and not skipped
233233
let finalResult = result
@@ -414,8 +414,7 @@ function isErrorResponse(
414414
async function handleInternalRequest(
415415
toolId: string,
416416
tool: ToolConfig,
417-
params: Record<string, any>,
418-
executionContext?: ExecutionContext
417+
params: Record<string, any>
419418
): Promise<ToolResponse> {
420419
const requestId = generateRequestId()
421420

@@ -430,11 +429,6 @@ async function handleInternalRequest(
430429

431430
const fullUrlObj = new URL(endpointUrl, baseUrl)
432431
const isInternalRoute = endpointUrl.startsWith('/api/')
433-
434-
// Only add workflowId to internal routes, not external APIs
435-
if (executionContext?.workflowId && typeof window === 'undefined' && isInternalRoute) {
436-
fullUrlObj.searchParams.set('workflowId', executionContext.workflowId)
437-
}
438432
const fullUrl = fullUrlObj.toString()
439433

440434
// For custom tools, validate parameters on the client side before sending

0 commit comments

Comments
 (0)