refactor: navigate presentation by scene and beat

This commit is contained in:
lda
2026-07-04 16:42:23 +07:00 Verified
parent c6018c4a86
commit 5947ee625c
13 changed files with 446 additions and 219 deletions
@@ -1,17 +1,9 @@
import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { OperatorChat } from "./OperatorChat.js";
import type { PresentationState } from "./presentation-state.js";
import { initialPresentationState } from "./presentation-state.js";
import type { AgentMessage } from "../demo/agent/events.js";
const state: PresentationState = {
beat: "intro",
selectedNodeId: null,
chatMode: "full",
evidenceMode: "hidden",
playbackMode: "replay",
};
describe("OperatorChat", () => {
it("renders standard agent message parts", () => {
const messages: ReadonlyArray<AgentMessage> = [
@@ -33,7 +25,7 @@ describe("OperatorChat", () => {
},
];
render(<OperatorChat state={state} messages={messages} />);
render(<OperatorChat state={initialPresentationState} messages={messages} />);
expect(screen.getByText("Prepare the report.")).toBeInTheDocument();
expect(screen.getByText("I will use the prepared recipe.")).toBeInTheDocument();