Skip to content

Commit 71ae27b

Browse files
v0.4.22: fix execution context pass for google sheets
2 parents 1b7437a + 5ab4821 commit 71ae27b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

apps/sim/tools/index.ts

Lines changed: 3 additions & 7 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

@@ -429,9 +428,7 @@ async function handleInternalRequest(
429428
typeof tool.request.url === 'function' ? tool.request.url(params) : tool.request.url
430429

431430
const fullUrlObj = new URL(endpointUrl, baseUrl)
432-
if (executionContext?.workflowId && typeof window === 'undefined') {
433-
fullUrlObj.searchParams.set('workflowId', executionContext.workflowId)
434-
}
431+
const isInternalRoute = endpointUrl.startsWith('/api/')
435432
const fullUrl = fullUrlObj.toString()
436433

437434
// For custom tools, validate parameters on the client side before sending
@@ -451,7 +448,6 @@ async function handleInternalRequest(
451448
}
452449

453450
const headers = new Headers(requestParams.headers)
454-
const isInternalRoute = endpointUrl.startsWith('/api/')
455451
if (typeof window === 'undefined') {
456452
if (isInternalRoute) {
457453
try {

0 commit comments

Comments
 (0)