@wix/evalforge-evaluator 0.31.0 → 0.32.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 +18 -5
- package/build/index.js.map +2 -2
- package/build/index.mjs +18 -5
- package/build/index.mjs.map +2 -2
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -6607,8 +6607,9 @@ function extractToolActionDescription(toolName, toolArgs) {
|
|
|
6607
6607
|
try {
|
|
6608
6608
|
const args = JSON.parse(toolArgs);
|
|
6609
6609
|
if ((toolName === "Task" || toolName === "dispatch_agent") && args.description) {
|
|
6610
|
-
const desc2 = String(args.description).slice(0,
|
|
6611
|
-
|
|
6610
|
+
const desc2 = String(args.description).slice(0, 55);
|
|
6611
|
+
const truncatedDesc = desc2.length < String(args.description).length ? `${desc2}...` : desc2;
|
|
6612
|
+
return `Task: ${truncatedDesc}`;
|
|
6612
6613
|
}
|
|
6613
6614
|
if ((toolName === "Bash" || toolName === "bash" || toolName === "execute") && args.command) {
|
|
6614
6615
|
const cmd = String(args.command).slice(0, 50);
|
|
@@ -6974,15 +6975,27 @@ async function executeWithClaudeCode(skill, scenario, options) {
|
|
|
6974
6975
|
}, SDK_TIMEOUT_MS);
|
|
6975
6976
|
});
|
|
6976
6977
|
if (traceContext) {
|
|
6978
|
+
let lastReportedAction = "";
|
|
6979
|
+
let sameActionCount = 0;
|
|
6977
6980
|
heartbeatHandle = setInterval(() => {
|
|
6978
6981
|
const elapsedMs = Date.now() - executionStartTime;
|
|
6979
6982
|
let progressMessage = lastAction;
|
|
6980
|
-
if (
|
|
6983
|
+
if (lastAction === lastReportedAction) {
|
|
6984
|
+
sameActionCount++;
|
|
6985
|
+
} else {
|
|
6986
|
+
sameActionCount = 1;
|
|
6987
|
+
lastReportedAction = lastAction;
|
|
6988
|
+
}
|
|
6989
|
+
const isTaskTool = lastToolName === "Task" || lastToolName === "dispatch_agent";
|
|
6990
|
+
if (isTaskTool && sameActionCount > 1) {
|
|
6991
|
+
progressMessage = `Waiting for ${lastAction}`;
|
|
6992
|
+
} else if (lastToolName && lastFilePath) {
|
|
6981
6993
|
progressMessage = `${lastToolName}: ${lastFilePath}`;
|
|
6982
|
-
} else if (lastToolName) {
|
|
6994
|
+
} else if (lastToolName && !isTaskTool) {
|
|
6983
6995
|
progressMessage = `Using ${lastToolName}...`;
|
|
6984
6996
|
}
|
|
6985
|
-
|
|
6997
|
+
const elapsedSec = Math.round(elapsedMs / 1e3);
|
|
6998
|
+
progressMessage += ` (${elapsedSec}s, step ${traceStepNumber})`;
|
|
6986
6999
|
const progressEvent = {
|
|
6987
7000
|
evalRunId: traceContext.evalRunId,
|
|
6988
7001
|
scenarioId: traceContext.scenarioId,
|