mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 06:30:25 +00:00
todo_write: rename the items param to todos
A top-level arguments key named "items" shadows minijinja's .items() in Together's GLM-5.2 chat template — every replayed turn 400s. Old key still executes; GUI renders both; regression tests added.
This commit is contained in:
@@ -195,9 +195,14 @@ describe("humanizeTool", () => {
|
||||
});
|
||||
|
||||
it("summarizes todo_write by its single item and status", () => {
|
||||
const line = humanizeTool("todo_write", { items: [{ content: "Post the digest", status: "in_progress" }] });
|
||||
const line = humanizeTool("todo_write", { todos: [{ content: "Post the digest", status: "in_progress" }] });
|
||||
expect(line.pre).toBe("Updated the plan — ");
|
||||
expect(line.obj).toContain("Post the digest");
|
||||
expect(line.post).toBe(" → in progress");
|
||||
});
|
||||
|
||||
it("still renders pre-rename todo_write histories (legacy `items` key)", () => {
|
||||
const line = humanizeTool("todo_write", { items: [{ content: "Old plan", status: "pending" }] });
|
||||
expect(line.obj).toContain("Old plan");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user