fix: stabilize tests and sync protocol models

This commit is contained in:
Peter Steinberger
2026-01-24 00:25:47 +00:00
parent 12d22e1c89
commit d2bfcd70e7
4 changed files with 47 additions and 32 deletions

View File

@@ -70,7 +70,7 @@ vi.mock("@mariozechner/pi-ai", async () => {
},
streamSimple: (model: { api: string; provider: string; id: string }) => {
const stream = new actual.AssistantMessageEventStream();
queueMicrotask(() => {
setTimeout(() => {
stream.push({
type: "done",
reason: "stop",
@@ -80,7 +80,7 @@ vi.mock("@mariozechner/pi-ai", async () => {
: buildAssistantMessage(model),
});
stream.end();
});
}, 0);
return stream;
},
};