ChatCommonProps
Agent Runtimes / types/chat / ChatCommonProps
Interface: ChatCommonProps
Defined in: src/types/chat.ts:280
Common props shared by all Chat wrapper components (Chat, ChatFloating, ChatSidebar, ChatStandalone, ChatPopupStandalone).
These props represent the public API surface that consumers interact with.
Wrapper components forward most of them to ChatBase and translate others
(e.g. showNewChatButton → headerButtons.showNewChat).
Each wrapper extends this interface with component-specific props
(e.g. position, defaultOpen, width for floating variants).
Use panelProps as an escape hatch to pass any ChatBase prop not
directly surfaced in this interface.
Extended by
Properties
authToken?
optionalauthToken?:string
Defined in: src/types/chat.ts:521
Auth token for the agent runtime
autoFocus?
optionalautoFocus?:boolean
Defined in: src/types/chat.ts:613
Auto-focus the input on mount
availableModels?
optionalavailableModels?:ModelConfig[]
Defined in: src/types/chat.ts:432
Override the list of available models. When provided, replaces models returned by the config endpoint.
brandIcon?
optionalbrandIcon?:ReactNode
Defined in: src/types/chat.ts:347
Custom brand icon for header / empty state
chatViewMode?
optionalchatViewMode?:ChatViewMode
Defined in: src/types/chat.ts:545
Current chat view mode for header segmented toggle
children?
optionalchildren?:ReactNode
Defined in: src/types/chat.ts:344
Children to render in the messages area
className?
optionalclassName?:string
Defined in: src/types/chat.ts:341
Custom class name
codemodeEnabled?
optionalcodemodeEnabled?:boolean
Defined in: src/types/chat.ts:417
Indicate tools are accessed via Codemode meta-tools
codemodeStatusData?
optionalcodemodeStatusData?:CodemodeStatusData|null
Defined in: src/types/chat.ts:559
External codemode status data (e.g. from WebSocket stream).
collapsed?
optionalcollapsed?:boolean
Defined in: src/types/chat.ts:478
Collapse chat panel while keeping the ephemeral notebook visible.
contextSnapshot?
optionalcontextSnapshot?:ContextSnapshotData
Defined in: src/types/chat.ts:553
External context snapshot data for the token usage bar
description?
optionaldescription?:string
Defined in: src/types/chat.ts:309
Description shown in empty state
disableInputPrompt?
optionaldisableInputPrompt?:boolean
Defined in: src/types/chat.ts:318
Keep input visible but disabled
disableInternalJupyterTheme?
optionaldisableInternalJupyterTheme?:boolean
Defined in: src/types/chat.ts:577
Disable ChatBase's internal JupyterReactTheme wrapper. Use this when the host page already provides a JupyterReactTheme boundary.
Default
false
enableEphemeralDocument?
optionalenableEphemeralDocument?:boolean
Defined in: src/types/chat.ts:460
Enable the in-memory "ephemeral document" (Lexical rich-text) companion surface. When enabled it appears as an option in the companion-surface segmented control alongside the notebook.
Default
false
enableEphemeralNotebook?
optionalenableEphemeralNotebook?:boolean
Defined in: src/types/chat.ts:453
Show an in-memory "ephemeral notebook" next to the chat, toggled from the input footer. The notebook model lives purely in memory (never persisted) and its frontend tools are registered while visible.
Default
true
enableStreaming?
optionalenableStreaming?:boolean
Defined in: src/types/chat.ts:397
Enable streaming mode for custom message handler.
Default
false
ephemeralNotebookToolbar?
optionalephemeralNotebookToolbar?:EphemeralNotebookToolbarComponent
Defined in: src/types/chat.ts:487
Optional toolbar component used by the ephemeral notebook.
Defaults to the toolbar from @datalayer/jupyter-react when omitted.
frontendTools?
optionalfrontendTools?:FrontendToolDefinition<Record<string,unknown>,unknown>[]
Defined in: src/types/chat.ts:446
Frontend tool definitions to register with the chat
headerActions?
optionalheaderActions?:ReactNode
Defined in: src/types/chat.ts:608
Custom header actions (rendered in title row, right side)
headerContent?
optionalheaderContent?:ReactNode
Defined in: src/types/chat.ts:605
Custom header content (rendered below title row)
hideMessagesAfterToolUI?
optionalhideMessagesAfterToolUI?:boolean
Defined in: src/types/chat.ts:510
Hide assistant messages that follow a rendered tool call UI.
Default
false
historyAuthToken?
optionalhistoryAuthToken?:string
Defined in: src/types/chat.ts:524
Optional auth token for the legacy history endpoint
historyEndpoint?
optionalhistoryEndpoint?:string
Defined in: src/types/chat.ts:518
Optional legacy endpoint URL for fetching conversation history
initialEphemeralNotebookOpen?
optionalinitialEphemeralNotebookOpen?:boolean
Defined in: src/types/chat.ts:472
Initial open state of the ephemeral notebook.
Default
true
initialEphemeralSurfaceMode?
optionalinitialEphemeralSurfaceMode?:EphemeralSurfaceMode
Defined in: src/types/chat.ts:466
Initial companion surface shown next to the chat. Defaults to 'notebook'
when enableEphemeralNotebook is true, otherwise 'none'.
initialModel?
optionalinitialModel?:string
Defined in: src/types/chat.ts:426
Initial model ID to select (e.g., 'bedrock:us.anthropic.claude-sonnet-4-5-20250929-v1:0')
initialSkills?
optionalinitialSkills?:string[]
Defined in: src/types/chat.ts:438
Initial skill IDs to enable
kernel?
optionalkernel?:IKernelConnection|null
Defined in: src/types/chat.ts:569
Live kernel connection of the companion notebook/document sandbox.
When provided, it is forwarded to the chat header's <KernelIndicator>
so the indicator reflects the surface's runtime.
launching?
optionallaunching?:boolean
Defined in: src/types/chat.ts:326
Whether the underlying agent runtime is still launching. When true, the chat shell is rendered with the input and controls disabled and a spinner overlay is shown, so the plain chat view appears as soon as the agent starts being created and stays interactive-disabled until it is ready.
launchingMessage?
optionallaunchingMessage?:ReactNode
Defined in: src/types/chat.ts:331
Optional message shown next to the spinner while launching is true.
mcpServers?
optionalmcpServers?:McpServerSelection[]
Defined in: src/types/chat.ts:435
MCP server selections to enable (others disabled)
mcpStatusData?
optionalmcpStatusData?:McpToolsetsStatusResponse|null
Defined in: src/types/chat.ts:556
External MCP toolsets status data
onApproveApproval?
optionalonApproveApproval?: (approvalId,note?) =>void|Promise<boolean|void>
Defined in: src/types/chat.ts:591
Called when the user approves a pending request.
Parameters
approvalId
string
note?
string
Returns
void | Promise<boolean | void>
onChatViewModeChange?
optionalonChatViewModeChange?: (mode) =>void
Defined in: src/types/chat.ts:548
Callback when user switches chat view mode
Parameters
mode
Returns
void
onClose?
optionalonClose?: () =>void
Defined in: src/types/chat.ts:383
Callback when the component closes
Returns
void
onEphemeralNotebookOpenChange?
optionalonEphemeralNotebookOpenChange?: (open) =>void
Defined in: src/types/chat.ts:475
Controlled callback for ephemeral notebook open-state changes.
Parameters
open
boolean
Returns
void
onEphemeralSurfaceModeChange?
optionalonEphemeralSurfaceModeChange?: (mode) =>void
Defined in: src/types/chat.ts:469
Controlled callback for companion surface mode changes.
Parameters
mode
Returns
void
onExpandFromCollapsed?
optionalonExpandFromCollapsed?: () =>void
Defined in: src/types/chat.ts:481
Callback to reopen chat panel from collapsed notebook mode.
Returns
void
onInformationClick?
optionalonInformationClick?: () =>void
Defined in: src/types/chat.ts:540
Callback when the information icon is clicked
Returns
void
onNewChat?
optionalonNewChat?: () =>void
Defined in: src/types/chat.ts:377
Callback when new chat is triggered
Returns
void
onOpen?
optionalonOpen?: () =>void
Defined in: src/types/chat.ts:380
Callback when the component opens
Returns
void
onRejectApproval?
optionalonRejectApproval?: (approvalId,note?) =>void|Promise<boolean|void>
Defined in: src/types/chat.ts:597
Called when the user rejects a pending request.
Parameters
approvalId
string
note?
string
Returns
void | Promise<boolean | void>
onSendMessage?
optionalonSendMessage?:MessageHandler
Defined in: src/types/chat.ts:391
Custom message handler. When provided, uses this handler instead of protocol mode.
onSettingsClick?
optionalonSettingsClick?: () =>void
Defined in: src/types/chat.ts:374
Callback when settings is clicked
Returns
void
onStateUpdate?
optionalonStateUpdate?: (state) =>void
Defined in: src/types/chat.ts:616
Callback for state updates
Parameters
state
unknown
Returns
void
onToggleCodemode?
optionalonToggleCodemode?: (enabled) =>void|Promise<void>
Defined in: src/types/chat.ts:423
Callback fired when the user toggles codemode from the Tools menu. When omitted, the toggle renders in read-only mode.
Parameters
enabled
boolean
Returns
void | Promise<void>
onToolCallComplete?
optionalonToolCallComplete?: (context) =>void
Defined in: src/types/chat.ts:493
Post-hook: fires when a tool result is received
Parameters
context
Returns
void
onToolCallStart?
optionalonToolCallStart?: (context) =>void
Defined in: src/types/chat.ts:490
Pre-hook: fires when a tool call starts executing
Parameters
context
Returns
void
overlay?
optionaloverlay?:ReactNode
Defined in: src/types/chat.ts:338
Optional overlay rendered above the chat surface (messages + input). Use this to show a gating UI such as a sign-in form for anonymous users while keeping the chat visible and its controls disabled behind it.
panelProps?
optionalpanelProps?:Partial<ChatBaseProps>
Defined in: src/types/chat.ts:622
Additional ChatBase props (escape hatch). Props set here are spread onto ChatBase as overrides.
pendingApprovals?
optionalpendingApprovals?:PendingApproval[]
Defined in: src/types/chat.ts:588
Pending tool approval requests to render in the top banner.
pendingPrompt?
optionalpendingPrompt?:string
Defined in: src/types/chat.ts:529
A prompt to send after conversation history is loaded (sent once).
placeholder?
optionalplaceholder?:string
Defined in: src/types/chat.ts:350
Input placeholder
poweredByProps?
optionalpoweredByProps?:Partial<PoweredByTagProps>
Defined in: src/types/chat.ts:369
Powered by tag props
protocol?
optionalprotocol?:Protocol|ProtocolConfig
Defined in: src/types/chat.ts:292
Protocol type or full configuration.
When a Protocol string is provided (e.g. 'vercel-ai'), it is forwarded
to ChatBase. When a full ProtocolConfig object is provided, it is used
directly.
Default
'vercel-ai'
renderToolResult?
optionalrenderToolResult?:RenderToolResult
Defined in: src/types/chat.ts:443
Custom render function for tool results
runtimeId?
optionalruntimeId?:string
Defined in: src/types/chat.ts:515
Runtime ID for conversation persistence
sandboxStatusData?
optionalsandboxStatusData?:SandboxWsStatus|null
Defined in: src/types/chat.ts:562
Optional sandbox status override for immediate UI updates.
showClearButton?
optionalshowClearButton?:boolean
Defined in: src/types/chat.ts:358
Show clear button in header
showHeader?
optionalshowHeader?:boolean
Defined in: src/types/chat.ts:312
Show header
showInformation?
optionalshowInformation?:boolean
Defined in: src/types/chat.ts:537
Show the information icon in the header.
Default
false
showInput?
optionalshowInput?:boolean
Defined in: src/types/chat.ts:315
Show input area
showModelSelector?
optionalshowModelSelector?:boolean
Defined in: src/types/chat.ts:402
Show model selector
showNewChatButton?
optionalshowNewChatButton?:boolean
Defined in: src/types/chat.ts:355
Show new chat button in header
showPoweredBy?
optionalshowPoweredBy?:boolean
Defined in: src/types/chat.ts:366
Show powered by tag
showSettingsButton?
optionalshowSettingsButton?:boolean
Defined in: src/types/chat.ts:361
Show settings button in header
showSkillsMenu?
optionalshowSkillsMenu?:boolean
Defined in: src/types/chat.ts:408
Show skills menu
showTokenUsage?
optionalshowTokenUsage?:boolean
Defined in: src/types/chat.ts:414
Show token usage bar.
Default
true
showToolApprovalBanner?
optionalshowToolApprovalBanner?:boolean
Defined in: src/types/chat.ts:585
Whether to render the top-of-chat tool approval banner when there are pending approvals.
Default
true
showToolsMenu?
optionalshowToolsMenu?:boolean
Defined in: src/types/chat.ts:405
Show tools menu
submitOnSuggestionClick?
optionalsubmitOnSuggestionClick?:boolean
Defined in: src/types/chat.ts:504
Whether to auto-submit when a suggestion is clicked.
Default
true
subtitle?
optionalsubtitle?:string
Defined in: src/types/chat.ts:306
Chat subtitle (rendered under the title in the header)
suggestions?
optionalsuggestions?:Suggestion[]
Defined in: src/types/chat.ts:498
Suggestions to show in empty state
title?
optionaltitle?:string
Defined in: src/types/chat.ts:303
Chat title
useStore?
optionaluseStore?:boolean
Defined in: src/types/chat.ts:298
Use Zustand store for state management instead of protocol endpoint.
Default
true