import { FC } from 'react'; import { AssistantTransport } from './types'; /** * One selectable assistant mode. Supply two or more via `modes` to render a * mode switcher in the header — e.g. a "Workflow" assistant and a "Build a node" * assistant, each with its own transport. Switching modes starts that mode's * conversation (state is not shared across modes). */ export interface AssistantModeOption { /** Stable id used for selection + persistence. */ id: string; /** Short label shown in the mode switcher. */ label: string; /** Backend adapter for this mode. */ transport: AssistantTransport; /** Optional per-mode header title / empty-state subtitle / input placeholder. */ title?: string; subtitle?: string; placeholder?: string; } export interface AssistantWidgetProps { /** * Backend adapter supplied by the host product. Optional only when `modes` is * provided (each mode carries its own transport); supply exactly one of the two. */ transport?: AssistantTransport; /** * Two or more assistant modes, rendered as a switcher in the header. When * omitted, the widget is single-mode and behaves exactly as before. */ modes?: AssistantModeOption[]; /** Initially-selected mode id when `modes` is used (defaults to the first). */ defaultModeId?: string; /** Window header title. */ title?: string; /** Short helper line shown above the first message. */ subtitle?: string; /** Input placeholder. */ placeholder?: string; /** Extra classes for the launcher button (e.g. to reposition). */ launcherClassName?: string; /** Speech-recognition language tag. */ voiceLang?: string; /** * `floating` (default) — the small bottom-right popover every product uses. * `sidebar` — a full-height panel docked to the right edge, for products whose * assistant does long multi-step work worth watching (BigConsole). * * Defaulted, so a product that passes nothing keeps the exact UI it has today. */ layout?: 'floating' | 'sidebar'; /** * Show the conversations rail (New chat / History, with per-chat delete). * Ignored unless the transport actually implements session management — * a panel whose buttons do nothing is worse than no panel. */ showSessionPanel?: boolean; /** Route in-app links from assistant replies without a full page reload. */ onNavigate?: (href: string) => void; /** * Pixels of chrome to sit BELOW in `sidebar` layout — i.e. the app header's * height. The panel is docked to the viewport, so without this it happily * covers the top nav. Defaults to 0 (full height) for hosts with no header. */ topOffsetPx?: number; /** * Show a file-upload (paperclip) button in the composer so users can attach a * data file (JSON / CSV / Excel / PDF) as a source. Off by default → every * product that mounts this widget keeps its current UI untouched. Only hosts * whose transport can actually ingest attachments (BigConsole) turn it on. */ enableAttachments?: boolean; /** * `accept` filter for the attachment input. Defaults to the data-file types the * BigConsole assistant understands. */ attachmentAccept?: string; /** * Show a "Connect a source" button in the composer that navigates to the * platform's Connected Systems page (via `onNavigate`), so users can create a * vault-backed connection (REST/API-key/basic-auth) instead of pasting secrets * into the chat. Off by default → other product shells are unchanged. Requires * `onNavigate` to actually route. */ enableConnectSource?: boolean; /** In-app route the "Connect a source" button navigates to. */ connectSourceHref?: string; } /** External toggle hook so command palettes / plugins can open the widget. */ export declare const ASSISTANT_WIDGET_TOGGLE_EVENT = "bf:toggle-assistant-widget"; export declare const AssistantWidget: FC; //# sourceMappingURL=AssistantWidget.d.ts.map