添加聊天框消息解析功能;优化请求头处理;更新部分 api base url

This commit is contained in:
2026-03-27 18:00:30 +08:00
parent 8713e5a468
commit a101e79750
11 changed files with 464 additions and 193 deletions
+9
View File
@@ -54,6 +54,15 @@ describe("streamCopilotChat", () => {
onEvent: (event) => events.push(event),
});
expect(apiFetch).toHaveBeenCalledWith(
expect.stringContaining("/api/v1/copilot/chat/stream"),
expect.objectContaining({
method: "POST",
projectHeaderMode: "include",
skipAuthRedirect: true,
}),
);
expect(events).toEqual([
{ type: "token", conversationId: "c1", content: "he" },
{ type: "token", conversationId: "c1", content: "llo" },