fix: unify chat process and reply presentation
This commit is contained in:
@@ -31,6 +31,15 @@ describe("agent session state", () => {
|
||||
expect(next[0]).toMatchObject({ id: "tool-1", status: "completed", title: "工具完成", durationMs: 40 });
|
||||
});
|
||||
|
||||
it("retains full tool inputs across stream updates and persisted history", () => {
|
||||
const input = { address: "完整地址".repeat(70), point: { longitude: 121.5, latitude: 31.2 }, radius: 500 };
|
||||
const first = upsertProgress(undefined, { id: "tool", phase: "tool", tool: { name: "mcp_tjwater_geocode", call_id: "native-call", input } });
|
||||
const next = upsertProgress(first, { id: "tool", phase: "tool", status: "completed" });
|
||||
expect(next[0].tool).toEqual({ name: "mcp_tjwater_geocode", callId: "native-call", input });
|
||||
expect(upsertProgress(undefined, next[0])[0].tool).toEqual(next[0].tool);
|
||||
expect(upsertProgress(undefined, { tool: { name: 3, input: [] } })[0].tool).toBeUndefined();
|
||||
});
|
||||
|
||||
it("normalizes todo updates", () => {
|
||||
expect(
|
||||
toTodoUpdate({
|
||||
|
||||
Reference in New Issue
Block a user