Wave 2 prep: LedgerEvent.ref, demo bridge protocol, artifact stubs, sendText in ChatActionsContext

This commit is contained in:
Amos
2026-08-22 10:03:20 +03:00
parent 34dee919bb
commit 6a68fcfba1
6 changed files with 60 additions and 2 deletions
+3 -1
View File
@@ -37,6 +37,8 @@ const COLUMN = "mx-auto w-full max-w-3xl px-4";
export const ChatActionsContext = createContext<{
chatId: string;
syncFromServer: () => Promise<void>;
/** Send a user message into the session (demo error-fix loop, W6). */
sendText: (text: string) => void;
} | null>(null);
/** useLayoutEffect that is silent during SSR (client components still render on the server in Next). */
@@ -143,7 +145,7 @@ export function Chat({
};
return (
<ChatActionsContext.Provider value={{ chatId, syncFromServer }}>
<ChatActionsContext.Provider value={{ chatId, syncFromServer, sendText: (t: string) => void sendMessage({ text: t }) }}>
<div className="flex h-dvh flex-col">
<header className="flex items-center gap-3 px-3 py-2">
<SidebarToggle />