@wix/evalforge-evaluator 0.133.0 → 0.135.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.mjs CHANGED
@@ -3031,7 +3031,6 @@ async function executeWithOpenCode(skills, scenario, options) {
3031
3031
  hasAiGatewayHeaders: !!options.aiGatewayHeaders,
3032
3032
  model: options.model
3033
3033
  });
3034
- const startTime = /* @__PURE__ */ new Date();
3035
3034
  const maxTurns = options.maxTurns ?? 10;
3036
3035
  const sdkTimeoutMs = Math.max(3e5, maxTurns * 6e4);
3037
3036
  const { env, providerID, modelID } = await buildOpenCodeEnv({
@@ -3043,6 +3042,7 @@ async function executeWithOpenCode(skills, scenario, options) {
3043
3042
  mcps: options.mcps,
3044
3043
  cwd: options.cwd
3045
3044
  });
3045
+ const startTime = /* @__PURE__ */ new Date();
3046
3046
  const traceContext = options.traceContext;
3047
3047
  if (traceContext) {
3048
3048
  emitTraceEvent(
@@ -3474,9 +3474,10 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3474
3474
  });
3475
3475
  for (let i = 0; i < steps.length; i++) {
3476
3476
  const step = steps[i];
3477
- const stepTimestamp = new Date(
3478
- stepTimestamps[i] ?? executionStartMs
3479
- ).toISOString();
3477
+ const stepStartedAt = i === 0 ? executionStartMs : stepTimestamps[i - 1] ?? executionStartMs;
3478
+ const stepFinishedAt = stepTimestamps[i] ?? executionStartMs;
3479
+ const assistantTimestamp = new Date(stepStartedAt).toISOString();
3480
+ const toolResultTimestamp = new Date(stepFinishedAt).toISOString();
3480
3481
  const assistantContent = [];
3481
3482
  if (step.reasoningText) {
3482
3483
  assistantContent.push({ type: "thinking", thinking: step.reasoningText });
@@ -3496,7 +3497,7 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3496
3497
  messages.push({
3497
3498
  role: "assistant",
3498
3499
  content: assistantContent,
3499
- timestamp: stepTimestamp
3500
+ timestamp: assistantTimestamp
3500
3501
  });
3501
3502
  }
3502
3503
  if (step.toolResults.length > 0) {
@@ -3513,7 +3514,7 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3513
3514
  messages.push({
3514
3515
  role: "user",
3515
3516
  content: resultBlocks,
3516
- timestamp: stepTimestamp
3517
+ timestamp: toolResultTimestamp
3517
3518
  });
3518
3519
  }
3519
3520
  }