import React from 'react'; import type { AiAssistantLimits, AiAssistantTool, AiProposalConfig } from './types'; /** * The chat itself — message list, proposal cards, composer, model picker — as * a column that fills its host. INTERNAL: `UdpAiAssistant` is the exported * surface; it assembles the prompt, tools and proposals from the capability * registry and renders this. * * The connection and the tenant's allowed models come from `useAiAccess()` — * the app's UdpAiProvider, which has already asked the gateway. Which of those * models THIS function runs on is stated here. Renders nothing without access. */ export interface AssistantChatProps { /** * The models this function runs on, by gateway id. Intersected with what the * gateway allows the tenant; if none remain, the surface renders nothing — * a function tuned for certain models should not quietly run on others. * Omit to accept whatever the gateway offers. */ models?: string[]; /** * The model to start on when the tenant has it; otherwise the first allowed * model. The picker shows only when more than one model remains. */ preferredModel?: string; /** Extra OpenAI request-body params merged into every completion — pass-through */ requestParams?: Record; /** * The stable part of the prompt (role, rules, schema). Called per request, * but should come back identical turn to turn — it is the cached prefix. */ buildSystemPrompt: () => string; /** * The live part (selection, view state, today's date). Called per request * and delivered inside the incoming user message, after the history. */ buildContext?: () => string; /** Client-side tools (raw OpenAI definitions + execute/respond behavior) */ tools?: AiAssistantTool[]; /** * Enables copilot mode: propose → validate → card → apply/undo. Keyed by * tool name, so several flows can be live at once; each proposal card is * applied by the flow that produced it. */ proposals?: Record; /** * Identifies what proposals are built against (e.g. the selected entity). * When it changes mid-conversation, a divider + history marker are added * and pending proposals from the old context are blocked. */ contextKey?: string; /** Divider text on context switch (default: "Switched to ") */ contextSwitchNotice?: (previous: string, next: string) => string; /** Note added to the model's history (as a user-role message) on context switch */ contextSwitchHistoryMarker?: (previous: string, next: string) => string; /** Shown on a pending proposal whose context no longer matches */ contextMismatchText?: (proposalContextKey: string) => string; /** * Names the conversation this surface drives. With UdpAiProvider in scope * the same conversation comes back for the same id across remounts (a dock * that collapses keeps its chat) and from any other surface showing it. * Omitted, the conversation is private to this mount. */ conversationId?: string; emptyStateText?: React.ReactNode; placeholder?: string; /** Disable the composer (e.g. until the host has a selection to work with) */ disabled?: boolean; limits?: AiAssistantLimits; } export declare const AssistantChat: ({ models, ...props }: AssistantChatProps) => React.JSX.Element; //# sourceMappingURL=AssistantChat.d.ts.map