fix: unify reasoning tags + agent ids (#1613) (thanks @kyleok) (#1629)

This commit is contained in:
Peter Steinberger
2026-01-24 19:56:02 +00:00
committed by GitHub
parent 71457fa100
commit 390b730b37
6 changed files with 85 additions and 64 deletions

View File

@@ -460,6 +460,22 @@ File contents here`,
expect(result).toBe("The actual answer.");
});
it("strips final tags while keeping content", () => {
const msg: AssistantMessage = {
role: "assistant",
content: [
{
type: "text",
text: "<final>\nAnswer\n</final>",
},
],
timestamp: Date.now(),
};
const result = extractAssistantText(msg);
expect(result).toBe("Answer");
});
it("strips thought tags", () => {
const msg: AssistantMessage = {
role: "assistant",