@wix/evalforge-evaluator 0.30.0 → 0.31.0
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/build/index.js +46 -1
- package/build/index.js.map +3 -3
- package/build/index.mjs +46 -1
- package/build/index.mjs.map +3 -3
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -6599,6 +6599,48 @@ function emitTraceEvent(event, tracePushUrl, routeHeader, authToken) {
|
|
|
6599
6599
|
});
|
|
6600
6600
|
}
|
|
6601
6601
|
}
|
|
6602
|
+
function extractToolActionDescription(toolName, toolArgs) {
|
|
6603
|
+
if (!toolName) {
|
|
6604
|
+
return "Using tool...";
|
|
6605
|
+
}
|
|
6606
|
+
if (toolArgs) {
|
|
6607
|
+
try {
|
|
6608
|
+
const args = JSON.parse(toolArgs);
|
|
6609
|
+
if ((toolName === "Task" || toolName === "dispatch_agent") && args.description) {
|
|
6610
|
+
const desc2 = String(args.description).slice(0, 60);
|
|
6611
|
+
return desc2.length < String(args.description).length ? `${desc2}...` : desc2;
|
|
6612
|
+
}
|
|
6613
|
+
if ((toolName === "Bash" || toolName === "bash" || toolName === "execute") && args.command) {
|
|
6614
|
+
const cmd = String(args.command).slice(0, 50);
|
|
6615
|
+
return `Running: ${cmd}${String(args.command).length > 50 ? "..." : ""}`;
|
|
6616
|
+
}
|
|
6617
|
+
if (toolName === "Search" || toolName === "search" || toolName === "Grep") {
|
|
6618
|
+
const query = args.query || args.pattern || args.search;
|
|
6619
|
+
if (query) {
|
|
6620
|
+
return `Searching: ${String(query).slice(0, 40)}`;
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
if (toolName === "LS" || toolName === "ls" || toolName === "ListFiles") {
|
|
6624
|
+
const path9 = args.path || args.directory || ".";
|
|
6625
|
+
return `Listing: ${String(path9).slice(0, 50)}`;
|
|
6626
|
+
}
|
|
6627
|
+
if ((toolName === "Read" || toolName === "read" || toolName === "View") && (args.file_path || args.path || args.target_file)) {
|
|
6628
|
+
const filePath = String(
|
|
6629
|
+
args.file_path || args.path || args.target_file
|
|
6630
|
+
).slice(0, 50);
|
|
6631
|
+
return `Reading: ${filePath}`;
|
|
6632
|
+
}
|
|
6633
|
+
if ((toolName === "Write" || toolName === "Edit" || toolName === "write") && (args.file_path || args.path || args.target_file)) {
|
|
6634
|
+
const filePath = String(
|
|
6635
|
+
args.file_path || args.path || args.target_file
|
|
6636
|
+
).slice(0, 50);
|
|
6637
|
+
return `Writing: ${filePath}`;
|
|
6638
|
+
}
|
|
6639
|
+
} catch {
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
return `Using ${toolName}...`;
|
|
6643
|
+
}
|
|
6602
6644
|
async function pushTraceEvent(url2, event, routeHeader, authToken) {
|
|
6603
6645
|
try {
|
|
6604
6646
|
const headers = {
|
|
@@ -7001,7 +7043,10 @@ IMPORTANT: This is an automated evaluation run. Execute the requested changes im
|
|
|
7001
7043
|
if (traceEvent.type === import_evalforge_types.LiveTraceEventType.THINKING) {
|
|
7002
7044
|
lastAction = "Thinking...";
|
|
7003
7045
|
} else if (traceEvent.type === import_evalforge_types.LiveTraceEventType.TOOL_USE) {
|
|
7004
|
-
lastAction =
|
|
7046
|
+
lastAction = extractToolActionDescription(
|
|
7047
|
+
traceEvent.toolName,
|
|
7048
|
+
traceEvent.toolArgs
|
|
7049
|
+
);
|
|
7005
7050
|
} else if (traceEvent.type === import_evalforge_types.LiveTraceEventType.FILE_WRITE) {
|
|
7006
7051
|
lastAction = `Writing: ${traceEvent.filePath || "file"}`;
|
|
7007
7052
|
} else if (traceEvent.type === import_evalforge_types.LiveTraceEventType.FILE_READ) {
|