@empiricalrun/test-gen 0.52.8 → 0.52.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.52.11
4
+
5
+ ### Patch Changes
6
+
7
+ - ac2c8af: feat: made claude gemini handle parallel tool calling
8
+ - Updated dependencies [ac2c8af]
9
+ - @empiricalrun/llm@0.13.8
10
+
11
+ ## 0.52.10
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [ae08b74]
16
+ - @empiricalrun/llm@0.13.7
17
+
18
+ ## 0.52.9
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [64d799d]
23
+ - @empiricalrun/llm@0.13.6
24
+
3
25
  ## 0.52.8
4
26
 
5
27
  ### Patch Changes
@@ -96,22 +96,26 @@ async function chatAgent({ selectedModel = "claude-3-7-sonnet-20250219", useDisk
96
96
  chatModel.pushUserMessage(userPrompt);
97
97
  continue;
98
98
  }
99
- const toolUse = chatModel.getPendingToolCall();
100
- if (toolUse) {
101
- console.log(`Executing tool ${toolUse.name} with args: ${JSON.stringify(toolUse.input)}`);
102
- const toolExecutor = toolExecutors[toolUse.name];
103
- if (!toolExecutor) {
104
- throw new Error(`Tool ${toolUse.name} not found`);
105
- }
106
- const toolResult = await toolExecutor(toolUse.input);
107
- if (toolResult.isError) {
108
- ora(`Tool ${toolUse.name} failed: ${toolResult.result}`).fail();
109
- }
110
- else {
111
- ora(`Tool ${toolUse.name} completed`).succeed();
99
+ const toolCalls = chatModel.getPendingToolCalls();
100
+ if (toolCalls.length) {
101
+ const toolResults = [];
102
+ for (const call of toolCalls) {
103
+ const args = JSON.stringify(call.input);
104
+ console.log(`Executing tool ${call.name} with args: ${args}`);
105
+ const toolExecutor = toolExecutors[call.name];
106
+ if (!toolExecutor) {
107
+ throw new Error(`Tool ${call.name} not found`);
108
+ }
109
+ const callResponse = await toolExecutor(call.input);
110
+ if (callResponse.isError) {
111
+ ora(`Tool ${call.name} failed: ${callResponse.result}`).fail();
112
+ }
113
+ else {
114
+ ora(`Tool ${call.name} completed`).succeed();
115
+ }
116
+ toolResults.push(callResponse);
112
117
  }
113
- chatModel.pushToolResultMessage(toolUse, toolResult);
114
- continue;
118
+ chatModel.pushToolResultsMessage(toolCalls, toolResults);
115
119
  }
116
120
  const spinner = ora(`${getModelName(selectedModel)} is working...`).start();
117
121
  const response = await chatModel.getLLMResponse({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.52.8",
3
+ "version": "0.52.11",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -68,7 +68,7 @@
68
68
  "tsx": "^4.16.2",
69
69
  "typescript": "^5.3.3",
70
70
  "zod": "^3.23.8",
71
- "@empiricalrun/llm": "^0.13.5",
71
+ "@empiricalrun/llm": "^0.13.8",
72
72
  "@empiricalrun/r2-uploader": "^0.3.8",
73
73
  "@empiricalrun/test-run": "^0.7.6"
74
74
  },