Skip to content

Commit 04a8fb3

Browse files
committed
🤖 Fix runtimeExecuteBash tests: use tool-call-start events
- Tests were looking for tool-call-delta events which no longer exist - Tool calls now emit tool-call-start and tool-call-end events - Updated all 3 test cases (simple, env vars, special chars) for both local and SSH - All 6 tests now pass (3 local + 3 SSH) Generated with `cmux`
1 parent 7b7cfc5 commit 04a8fb3

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

tests/ipcMain/runtimeExecuteBash.test.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,9 @@ describeIntegration("Runtime Bash Execution", () => {
134134
expect(responseText.toLowerCase()).toContain("hello world");
135135

136136
// Verify bash tool was called
137-
const toolCalls = events.filter(
138-
(e: any) => e.type === "tool-call-delta" && e.toolName
139-
);
140-
const bashCall = toolCalls.find((e: any) => e.toolName === "bash");
137+
// Tool calls now emit tool-call-start and tool-call-end events (not tool-call-delta)
138+
const toolCallStarts = events.filter((e: any) => e.type === "tool-call-start");
139+
const bashCall = toolCallStarts.find((e: any) => e.toolName === "bash");
141140
expect(bashCall).toBeDefined();
142141
} finally {
143142
await cleanup();
@@ -192,10 +191,9 @@ describeIntegration("Runtime Bash Execution", () => {
192191
expect(responseText).toContain("test123");
193192

194193
// Verify bash tool was called
195-
const toolCalls = events.filter(
196-
(e: any) => e.type === "tool-call-delta" && e.toolName
197-
);
198-
const bashCall = toolCalls.find((e: any) => e.toolName === "bash");
194+
// Tool calls now emit tool-call-start and tool-call-end events (not tool-call-delta)
195+
const toolCallStarts = events.filter((e: any) => e.type === "tool-call-start");
196+
const bashCall = toolCallStarts.find((e: any) => e.toolName === "bash");
199197
expect(bashCall).toBeDefined();
200198
} finally {
201199
await cleanup();
@@ -251,10 +249,9 @@ describeIntegration("Runtime Bash Execution", () => {
251249
expect(responseText).toContain("quotes");
252250

253251
// Verify bash tool was called
254-
const toolCalls = events.filter(
255-
(e: any) => e.type === "tool-call-delta" && e.toolName
256-
);
257-
const bashCall = toolCalls.find((e: any) => e.toolName === "bash");
252+
// Tool calls now emit tool-call-start and tool-call-end events (not tool-call-delta)
253+
const toolCallStarts = events.filter((e: any) => e.type === "tool-call-start");
254+
const bashCall = toolCallStarts.find((e: any) => e.toolName === "bash");
258255
expect(bashCall).toBeDefined();
259256
} finally {
260257
await cleanup();

0 commit comments

Comments
 (0)