@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.mjs
CHANGED
|
@@ -6608,6 +6608,48 @@ function emitTraceEvent(event, tracePushUrl, routeHeader, authToken) {
|
|
|
6608
6608
|
});
|
|
6609
6609
|
}
|
|
6610
6610
|
}
|
|
6611
|
+
function extractToolActionDescription(toolName, toolArgs) {
|
|
6612
|
+
if (!toolName) {
|
|
6613
|
+
return "Using tool...";
|
|
6614
|
+
}
|
|
6615
|
+
if (toolArgs) {
|
|
6616
|
+
try {
|
|
6617
|
+
const args = JSON.parse(toolArgs);
|
|
6618
|
+
if ((toolName === "Task" || toolName === "dispatch_agent") && args.description) {
|
|
6619
|
+
const desc2 = String(args.description).slice(0, 60);
|
|
6620
|
+
return desc2.length < String(args.description).length ? `${desc2}...` : desc2;
|
|
6621
|
+
}
|
|
6622
|
+
if ((toolName === "Bash" || toolName === "bash" || toolName === "execute") && args.command) {
|
|
6623
|
+
const cmd = String(args.command).slice(0, 50);
|
|
6624
|
+
return `Running: ${cmd}${String(args.command).length > 50 ? "..." : ""}`;
|
|
6625
|
+
}
|
|
6626
|
+
if (toolName === "Search" || toolName === "search" || toolName === "Grep") {
|
|
6627
|
+
const query = args.query || args.pattern || args.search;
|
|
6628
|
+
if (query) {
|
|
6629
|
+
return `Searching: ${String(query).slice(0, 40)}`;
|
|
6630
|
+
}
|
|
6631
|
+
}
|
|
6632
|
+
if (toolName === "LS" || toolName === "ls" || toolName === "ListFiles") {
|
|
6633
|
+
const path9 = args.path || args.directory || ".";
|
|
6634
|
+
return `Listing: ${String(path9).slice(0, 50)}`;
|
|
6635
|
+
}
|
|
6636
|
+
if ((toolName === "Read" || toolName === "read" || toolName === "View") && (args.file_path || args.path || args.target_file)) {
|
|
6637
|
+
const filePath = String(
|
|
6638
|
+
args.file_path || args.path || args.target_file
|
|
6639
|
+
).slice(0, 50);
|
|
6640
|
+
return `Reading: ${filePath}`;
|
|
6641
|
+
}
|
|
6642
|
+
if ((toolName === "Write" || toolName === "Edit" || toolName === "write") && (args.file_path || args.path || args.target_file)) {
|
|
6643
|
+
const filePath = String(
|
|
6644
|
+
args.file_path || args.path || args.target_file
|
|
6645
|
+
).slice(0, 50);
|
|
6646
|
+
return `Writing: ${filePath}`;
|
|
6647
|
+
}
|
|
6648
|
+
} catch {
|
|
6649
|
+
}
|
|
6650
|
+
}
|
|
6651
|
+
return `Using ${toolName}...`;
|
|
6652
|
+
}
|
|
6611
6653
|
async function pushTraceEvent(url2, event, routeHeader, authToken) {
|
|
6612
6654
|
try {
|
|
6613
6655
|
const headers = {
|
|
@@ -7010,7 +7052,10 @@ IMPORTANT: This is an automated evaluation run. Execute the requested changes im
|
|
|
7010
7052
|
if (traceEvent.type === LiveTraceEventType.THINKING) {
|
|
7011
7053
|
lastAction = "Thinking...";
|
|
7012
7054
|
} else if (traceEvent.type === LiveTraceEventType.TOOL_USE) {
|
|
7013
|
-
lastAction =
|
|
7055
|
+
lastAction = extractToolActionDescription(
|
|
7056
|
+
traceEvent.toolName,
|
|
7057
|
+
traceEvent.toolArgs
|
|
7058
|
+
);
|
|
7014
7059
|
} else if (traceEvent.type === LiveTraceEventType.FILE_WRITE) {
|
|
7015
7060
|
lastAction = `Writing: ${traceEvent.filePath || "file"}`;
|
|
7016
7061
|
} else if (traceEvent.type === LiveTraceEventType.FILE_READ) {
|