ChatWindowLayer
Renders every open window for the current {@link useChatWindowManager}. Below {@link CHAT_WINDOW_MOBILE_QUERY} each is a full-screen sheet and only the most recently focused one is visible. Drop one of these near the root alongside a
Import
Section titled “Import”import { ChatWindowLayer } from "@flanksource/clicky-ui/ai";No dedicated Storybook demo is available for this component yet.
The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
chat |
Partial<ChatProps> |
— | Props forwarded to the inner <Chat>. The window manages `threadId` and merges attached context / tool preferences into `body` on top of these. |
contextTypeConfig |
ContextTypeConfig |
— | Maps context item `type` to an icon/colour for the badge row. |
defaultToolPolicy |
enum |
— | Initial mode assigned to tools when they first load. Defaults to "ask". |
headerExtras |
ReactNode |
— | Extra controls rendered in the header, e.g. a <ContextMeter mode="gauge"/> gauge. |
renderContextPicker |
(…) => ReactNode |
— | Optional app-owned entity/document picker rendered beside context badges. |
runtimesApi |
string | null |
— | Backend runtime catalog endpoint. Null uses the built-in runtime families without probing host availability. |
sessionsApi |
string | null |
— | Canonical Captain session endpoint used for list/create/get/delete and approval resolution, or null to disable persistence. Defaults to "/api/chat/sessions". |
threadsSource |
ThreadSource |
— | Inject the thread list/delete directly instead of fetching `sessionsApi` (e.g. an app that loads conversations via its own client). Shows the picker regardless of `sessionsApi`. |
title |
ReactNode |
— | Header title shown when the thread picker is disabled. |
toolRenderers |
ToolRenderAdapter[] | ToolRenderRegistry |
— | Domain tool input/output renderers forwarded to the inner <Chat>. Host adapters match before the built-in heuristics. |
tools |
ToolMeta[] |
— | When provided, a tool-preferences popover is shown and forwarded as `body.toolPreferences`. Tools default to "ask" (approval required); the user can switch any tool to On/Auto/Off from the popover. |
toolsApi |
string | null |
— | Backend tool catalog endpoint. Defaults to "/api/chat/tools"; null disables fetching. |