@empiricalrun/test-gen 0.51.2 → 0.51.3

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,13 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.51.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a32030e: feat: Formatted usage summary and coloured it
8
+ - Updated dependencies [a32030e]
9
+ - @empiricalrun/llm@0.11.2
10
+
3
11
  ## 0.51.2
4
12
 
5
13
  ### Patch Changes
@@ -1,9 +1,5 @@
1
1
  export declare function chatAgent({ chatModel, useDiskForChatState, }: {
2
2
  chatModel?: "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-20241022";
3
3
  useDiskForChatState?: boolean;
4
- }): Promise<{
5
- input: number;
6
- output: number;
7
- cost: number;
8
- }>;
4
+ }): Promise<string>;
9
5
  //# sourceMappingURL=chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AA8EA,wBAAsB,SAAS,CAAC,EAC9B,SAAwC,EACxC,mBAAmB,GACpB,EAAE;IACD,SAAS,CAAC,EAAE,4BAA4B,GAAG,4BAA4B,CAAC;IACxE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;;;;GA0GA"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AA+EA,wBAAsB,SAAS,CAAC,EAC9B,SAAwC,EACxC,mBAAmB,GACpB,EAAE;IACD,SAAS,CAAC,EAAE,4BAA4B,GAAG,4BAA4B,CAAC;IACxE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,mBA4GA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.chatAgent = void 0;
7
7
  const claude_1 = require("@empiricalrun/llm/claude");
8
8
  const path_1 = __importDefault(require("path"));
9
+ const picocolors_1 = require("picocolors");
9
10
  const human_in_the_loop_1 = require("../human-in-the-loop");
10
11
  const browser_agent_1 = require("../tools/browser-agent");
11
12
  const diagnosis_fetcher_1 = require("../tools/diagnosis-fetcher");
@@ -76,7 +77,7 @@ async function chatAgent({ chatModel = "claude-3-7-sonnet-20250219", useDiskForC
76
77
  let userPrompt = undefined;
77
78
  let chatState = useDiskForChatState ? claude_1.ChatState.load() : new claude_1.ChatState(false);
78
79
  const handleSigInt = () => {
79
- console.log("\nExiting. Usage summary:", chatState.getUsageSummary());
80
+ console.log(`\n${(0, picocolors_1.gray)("Usage summary -> " + chatState.getUsageSummary())}`);
80
81
  process.exit(0);
81
82
  };
82
83
  process.once("SIGINT", handleSigInt);
@@ -104,7 +105,7 @@ async function chatAgent({ chatModel = "claude-3-7-sonnet-20250219", useDiskForC
104
105
  catch (e) {
105
106
  // https://github.com/SBoudrias/Inquirer.js/issues/1502#issuecomment-2275991680
106
107
  if (e instanceof Error && e.name === "ExitPromptError") {
107
- console.log("Exiting. Usage summary:", chatState.getUsageSummary());
108
+ console.log(`\n${(0, picocolors_1.gray)("Usage summary -> " + chatState.getUsageSummary())}`);
108
109
  process.exit(0);
109
110
  }
110
111
  throw e;
@@ -161,7 +162,7 @@ async function chatAgent({ chatModel = "claude-3-7-sonnet-20250219", useDiskForC
161
162
  }
162
163
  }
163
164
  const usageSummary = chatState.getUsageSummary();
164
- console.log("Usage summary:", usageSummary);
165
+ console.log(`\n${(0, picocolors_1.gray)("Usage summary -> " + chatState.getUsageSummary())}`);
165
166
  return usageSummary;
166
167
  }
167
168
  exports.chatAgent = chatAgent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.51.2",
3
+ "version": "0.51.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -74,7 +74,7 @@
74
74
  "tsx": "^4.16.2",
75
75
  "typescript": "^5.3.3",
76
76
  "zod": "^3.23.8",
77
- "@empiricalrun/llm": "^0.11.1",
77
+ "@empiricalrun/llm": "^0.11.2",
78
78
  "@empiricalrun/r2-uploader": "^0.3.8",
79
79
  "@empiricalrun/reporter": "^0.23.2",
80
80
  "@empiricalrun/test-run": "^0.7.6"