Skip to content

Commit d90de25

Browse files
committed
Fix
1 parent 23e9668 commit d90de25

File tree

1 file changed

+4
-4
lines changed
  • apps/sim/lib/copilot/orchestrator/sse/handlers

1 file changed

+4
-4
lines changed

apps/sim/lib/copilot/orchestrator/sse/handlers/handlers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export const sseHandlers: Record<string, SSEHandler> = {
296296
return
297297
}
298298

299-
if (!isToolAvailableOnSimSide(toolName)) {
299+
if (!isToolAvailableOnSimSide(toolName) && !clientExecutable) {
300300
return
301301
}
302302

@@ -396,8 +396,8 @@ export const sseHandlers: Record<string, SSEHandler> = {
396396
return
397397
}
398398

399-
// Client-executable tool: if the server can handle it, execute server-side.
400-
// Otherwise wait for the client (React UI) to complete it.
399+
// Client-executable tool: execute server-side if available, otherwise
400+
// delegate to the client (React UI) and wait for completion.
401401
if (clientExecutable) {
402402
if (isToolAvailableOnSimSide(toolName)) {
403403
fireToolExecution()
@@ -553,7 +553,7 @@ export const subAgentHandlers: Record<string, SSEHandler> = {
553553
return
554554
}
555555

556-
if (!isToolAvailableOnSimSide(toolName)) {
556+
if (!isToolAvailableOnSimSide(toolName) && !clientExecutable) {
557557
return
558558
}
559559

0 commit comments

Comments
 (0)