Skip to content

Commit 6fa79ef

Browse files
committed
fix(qa): preserve tool-result ownership after rebase
1 parent 4494a62 commit 6fa79ef

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • extensions/qa-lab/src/providers/mock-openai

‎extensions/qa-lab/src/providers/mock-openai/server.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ const QA_STREAMING_TOOL_PROGRESS_CONTINUATION_RE =
161161
/^Continue with (?:the current Matrix QA scenario|the QA scenario plan and report worked, failed, and blocked items)\.$/i;
162162

163163
function isStreamingToolProgressContinuationText(text: string) {
164-
return QA_STREAMING_TOOL_PROGRESS_CONTINUATION_RE.test(text.trim());
164+
const trimmed = text.trim();
165+
return (
166+
QA_STREAMING_TOOL_PROGRESS_CONTINUATION_RE.test(trimmed) ||
167+
trimmed.startsWith(QA_SETTLED_TOOL_TERMINAL_CONTINUATION_NEEDLE)
168+
);
165169
}
166170

167171
function extractLatestScenarioFamilyPrompt(texts: string[]) {
@@ -678,9 +682,9 @@ async function buildResponsesPayload(
678682
]);
679683
}
680684
const toolProgressReplyDirective =
681-
scenarioFamilyReplyDirective ??
682685
extractExactReplyDirective(toolProgressToolOutput) ??
683-
extractExactMarkerDirective(toolProgressToolOutput);
686+
extractExactMarkerDirective(toolProgressToolOutput) ??
687+
scenarioFamilyReplyDirective;
684688
if (QA_TOOL_PROGRESS_ERROR_PROMPT_RE.test(scenarioFamilyPrompt)) {
685689
if (!toolProgressToolOutput) {
686690
return buildToolProgressReadEvents();

0 commit comments

Comments
 (0)