fix(webui): restore full-project typechecking

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-20 14:47:38 +08:00
1 parent f869212e7d
commit a1bca7dc50
56 files changed
+622 -583

No files matched your search

@@ -25,7 +25,7 @@ class TestSocket {
const CHAT_ID = "replay-ownership";
const TURN_ID = "running-turn";
const INITIAL_MESSAGES: UIMessage[] = [
{ id: "prompt", role: "user", content: "Read the fixtures", turnId: TURN_ID },
{ id: "prompt", role: "user", content: "Read the fixtures", turnId: TURN_ID, createdAt: 1_700_000_000_000 },
];
function toolMessage(callId: string): InboundEvent {
@@ -46,7 +46,10 @@ function Thread({ children }: { children?: ReactNode }) {
function displayedCalls(): string[] {
const messages: UIMessage[] = JSON.parse(screen.getByTestId("messages").textContent!);
return messages.flatMap((message) => message.toolEvents?.map((event) => event.call_id) ?? []);
return messages.flatMap((message) => message.toolEvents?.map((event) => {
if (event.call_id === undefined) throw new Error("Expected a transcript tool call id");
return event.call_id;
}) ?? []);
}
afterEach(() => { vi.unstubAllGlobals(); });