@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.js 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(
@@ -3466,9 +3466,10 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3466
3466
  });
3467
3467
  for (let i = 0; i < steps.length; i++) {
3468
3468
  const step = steps[i];
3469
- const stepTimestamp = new Date(
3470
- stepTimestamps[i] ?? executionStartMs
3471
- ).toISOString();
3469
+ const stepStartedAt = i === 0 ? executionStartMs : stepTimestamps[i - 1] ?? executionStartMs;
3470
+ const stepFinishedAt = stepTimestamps[i] ?? executionStartMs;
3471
+ const assistantTimestamp = new Date(stepStartedAt).toISOString();
3472
+ const toolResultTimestamp = new Date(stepFinishedAt).toISOString();
3472
3473
  const assistantContent = [];
3473
3474
  if (step.reasoningText) {
3474
3475
  assistantContent.push({ type: "thinking", thinking: step.reasoningText });
@@ -3488,7 +3489,7 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3488
3489
  messages.push({
3489
3490
  role: "assistant",
3490
3491
  content: assistantContent,
3491
- timestamp: stepTimestamp
3492
+ timestamp: assistantTimestamp
3492
3493
  });
3493
3494
  }
3494
3495
  if (step.toolResults.length > 0) {
@@ -3505,7 +3506,7 @@ function buildConversation3(triggerPrompt, steps, executionStartMs, stepTimestam
3505
3506
  messages.push({
3506
3507
  role: "user",
3507
3508
  content: resultBlocks,
3508
- timestamp: stepTimestamp
3509
+ timestamp: toolResultTimestamp
3509
3510
  });
3510
3511
  }
3511
3512
  }