@copilotkit/aimock 1.37.2 → 1.37.4

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/dist/recorder.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_TEST_ID } from "./constants.js";
2
2
  import { normalizeModelName } from "./model-utils.js";
3
3
  import { getTestId, slugifyContext, slugifyTestId } from "./helpers.js";
4
- import { getLastMessageByRole, getTextContent } from "./router.js";
4
+ import { currentTurnHasToolResult, getLastMessageByRole, getTextContent } from "./router.js";
5
5
  import { writeErrorResponse } from "./sse-writer.js";
6
6
  import { capturedRedactedData, collapseStreamingResponse } from "./stream-collapse.js";
7
7
  import { resolveUpstreamUrl } from "./url.js";
@@ -1101,7 +1101,7 @@ function buildFixtureMatch(request, recordConfig) {
1101
1101
  const messages = request.messages ?? [];
1102
1102
  if (messages.length > 0 && (request._endpointType === "chat" || request._endpointType === void 0)) {
1103
1103
  match.turnIndex = messages.filter((m) => m.role === "assistant").length;
1104
- match.hasToolResult = messages.some((m) => m.role === "tool");
1104
+ match.hasToolResult = currentTurnHasToolResult(messages);
1105
1105
  }
1106
1106
  if (request._context) match.context = request._context;
1107
1107
  return match;