import type { AgentWidgetConfig, AgentWidgetLauncherConfig } from "./types"; import type { DeepPartial, PersonaTheme } from "./types/theme"; import { deepMerge } from "./utils/deep-merge"; /** * Default width for the floating launcher panel (when not overridden). * Benchmarks: many chat products use ~300–400px; 400px is a frequent “standard” default. * We use 440px to better fit code/JSON and structured replies while staying responsive via `min(..., 100vw)`. */ export const DEFAULT_FLOATING_LAUNCHER_WIDTH = "min(440px, calc(100vw - 24px))"; /** Max width cap paired with {@link DEFAULT_FLOATING_LAUNCHER_WIDTH} for theme defaults. */ export const DEFAULT_FLOATING_LAUNCHER_MAX_WIDTH = "440px"; export const DEFAULT_LAUNCHER_CONFIG: AgentWidgetLauncherConfig = { enabled: true, mountMode: "floating", dock: { side: "right", width: "420px", }, title: "Chat Assistant", subtitle: "Here to help you get answers fast", agentIconText: "💬", agentIconName: "bot", headerIconName: "bot", position: "bottom-right", width: DEFAULT_FLOATING_LAUNCHER_WIDTH, heightOffset: 0, autoExpand: false, callToActionIconHidden: false, agentIconSize: "40px", headerIconSize: "40px", closeButtonSize: "32px", // Zero out browser-default