feat(chat): 完善运行状态与权限交互

This commit is contained in:
2026-08-06 18:41:53 +08:00
parent 8d7c947897
commit 9e75e2df8a
21 changed files with 1025 additions and 226 deletions
+14
View File
@@ -390,6 +390,7 @@ describe("streamAgentChat", () => {
skipAuthRedirect: true,
}),
);
});
it("calls permission reply endpoint", async () => {
@@ -413,6 +414,19 @@ describe("streamAgentChat", () => {
}),
}),
);
await replyAgentPermission("s1", "perm-2", "always");
expect(apiFetch).toHaveBeenLastCalledWith(
expect.stringContaining("/api/v1/agent/sessions/s1/permission-responses"),
expect.objectContaining({
method: "POST",
body: JSON.stringify({
request_id: "perm-2",
reply: "always",
}),
}),
);
});
it("submits refreshed credentials through the authenticated context", async () => {