fix: restore model activity reasoning stream
This commit is contained in:
@@ -15,6 +15,15 @@ test("text_delta accumulates into transcript", () => {
|
||||
expect(useSessionStore.getState().transcript.at(-1)?.text).toBe("Analisi");
|
||||
});
|
||||
|
||||
test("activity_delta accumulates separately from the assistant transcript", () => {
|
||||
const s = useSessionStore.getState();
|
||||
s.applyEvent({ type: "activity_delta", text: "Valuto " });
|
||||
s.applyEvent({ type: "activity_delta", text: "le ambiguità" });
|
||||
|
||||
expect(useSessionStore.getState().activity.at(-1)?.text).toBe("Valuto le ambiguità");
|
||||
expect(useSessionStore.getState().transcript).toEqual([]);
|
||||
});
|
||||
|
||||
test("info appends to stepMessages", () => {
|
||||
useSessionStore.getState().applyEvent({ type: "info", level: "warning", text: "attenzione" });
|
||||
expect(useSessionStore.getState().stepMessages.at(-1)).toEqual({ level: "warning", text: "attenzione" });
|
||||
@@ -122,4 +131,5 @@ test("resetSession clears lastUserEntry and stepMessages", () => {
|
||||
st.resetSession();
|
||||
expect(useSessionStore.getState().lastUserEntry).toBeNull();
|
||||
expect(useSessionStore.getState().stepMessages).toEqual([]);
|
||||
expect(useSessionStore.getState().activity).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user