From f897648b5c91dc700a5dfd9b8d70b6918dd10bb8 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 15 Jun 2026 09:51:29 +1000 Subject: [PATCH] feat: optional notice slot under composer + fix starter-suggestion crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional `notice` prop (React.ReactNode) to AgentDockProps, rendered as quiet fine-print under the composer. Lets a host app surface a privacy / data-handling notice next to the input without the dock owning the copy. Default undefined — no change for apps that don't pass it. Also fix a latent crash: a "Try saying" starter suggestion called sendMessage(s) with a single argument, but sendMessage(display, wire) immediately does wire.trim() — clicking a suggestion threw on undefined. Pass (s, s) since a suggestion's display and wire text are identical. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/index.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index d31f8dd..86cd2e9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -113,6 +113,11 @@ export interface AgentDockProps { hidden?: boolean; /** localStorage namespace for the open/closed state. */ storageKey?: string; + /** Optional fine-print rendered under the composer — e.g. a privacy / + * data-handling notice. App-supplied content (the dock stays generic); + * omit for no notice. Kept visually quiet so it doesn't compete with the + * input. */ + notice?: React.ReactNode; } /* ------------------------------------------------------------------ */ @@ -153,6 +158,7 @@ export function AgentDock({ onExpand, hidden = false, storageKey = DEFAULT_STORAGE_KEY, + notice, }: AgentDockProps) { const [open, setOpen] = useState(() => { if (typeof window === "undefined") return false; @@ -418,7 +424,7 @@ export function AgentDock({
  • + {notice ? ( +
    + {notice} +
    + ) : null}