feat(frontend): 4-zone shell + F1 loop end-to-end (MSW)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 12:30:35 +02:00
co-authored by Claude Sonnet 4.6
parent a267754f8f
commit 2b55e96608
7 changed files with 127 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
import { useSessionStore } from "../store/sessionStore";
import { resolve } from "../widgets";
import { postResponse } from "../api/sessions";
import type { UiResponse } from "../api/types";
export function WidgetHost({ sessionId }: { sessionId: string | null }) {
const pending = useSessionStore((s) => s.pendingWidget);
const clearPending = useSessionStore((s) => s.clearPending);
if (!pending) return null;
const Renderer = resolve(pending.widget);
const onRespond = async (r: UiResponse) => {
if (sessionId) await postResponse(sessionId, r);
clearPending();
};
return <Renderer descriptor={pending} onRespond={onRespond} />;
}