@page-speed/agent-everywhere 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -0
- package/dist/index.cjs +464 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -1
- package/dist/index.d.ts +153 -1
- package/dist/index.js +461 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2875,6 +2875,158 @@ interface AgentConversationProps {
|
|
|
2875
2875
|
*/
|
|
2876
2876
|
declare function AgentConversation({ messages: messagesProp, isLoading: isLoadingProp, header, emptyState, showAvatars, renderMessage, onFeedback, onConfirmAction, autoScroll, className, contentClassName, }: AgentConversationProps): react.JSX.Element;
|
|
2877
2877
|
|
|
2878
|
+
interface AgentWorkspaceProps {
|
|
2879
|
+
/** The host page content rendered in the center column. */
|
|
2880
|
+
children: ReactNode;
|
|
2881
|
+
leftPanel?: ReactNode;
|
|
2882
|
+
rightPanel?: ReactNode;
|
|
2883
|
+
/** Open width in px. Defaults: left 320, right 460. */
|
|
2884
|
+
leftPanelWidth?: number;
|
|
2885
|
+
rightPanelWidth?: number;
|
|
2886
|
+
/** Initial open state for uncontrolled panels. Default true. */
|
|
2887
|
+
defaultLeftPanelOpen?: boolean;
|
|
2888
|
+
defaultRightPanelOpen?: boolean;
|
|
2889
|
+
/** Controlled open state (pair with the change callback). */
|
|
2890
|
+
leftPanelOpen?: boolean;
|
|
2891
|
+
rightPanelOpen?: boolean;
|
|
2892
|
+
onLeftPanelOpenChange?: (open: boolean) => void;
|
|
2893
|
+
onRightPanelOpenChange?: (open: boolean) => void;
|
|
2894
|
+
/**
|
|
2895
|
+
* Render extra floating panel toggles in the top corners of the center
|
|
2896
|
+
* column. Default false — the persistent workspace header already hosts a
|
|
2897
|
+
* toggle at each end. Mount `<AgentWorkspacePanelToggle/>` in your own
|
|
2898
|
+
* chrome for fully custom placement.
|
|
2899
|
+
*/
|
|
2900
|
+
showPanelToggles?: boolean;
|
|
2901
|
+
/**
|
|
2902
|
+
* Show the workspace header bar: left panel toggle, icon + title + status
|
|
2903
|
+
* on the left; `headerActions`, reset, the conversation chevron, and the
|
|
2904
|
+
* right panel toggle on the right. Default true.
|
|
2905
|
+
*/
|
|
2906
|
+
showHeader?: boolean;
|
|
2907
|
+
/** @deprecated Use `showHeader`. Honored when `showHeader` is not set. */
|
|
2908
|
+
showConversationHeader?: boolean;
|
|
2909
|
+
/**
|
|
2910
|
+
* Host actions rendered at the start of the header's right action group —
|
|
2911
|
+
* e.g. a "+ New" button that mirrors the page's primary action.
|
|
2912
|
+
*/
|
|
2913
|
+
headerActions?: ReactNode;
|
|
2914
|
+
/**
|
|
2915
|
+
* Status line under the title. Defaults to the shared session's
|
|
2916
|
+
* error/status label; pass this when running disconnected (no provider).
|
|
2917
|
+
*/
|
|
2918
|
+
headerStatus?: ReactNode;
|
|
2919
|
+
/**
|
|
2920
|
+
* Custom conversation node for the slide-in layer. Defaults to
|
|
2921
|
+
* `<AgentConversation/>` bound to the shared session.
|
|
2922
|
+
*/
|
|
2923
|
+
conversation?: ReactNode;
|
|
2924
|
+
/** Controlled visibility for the conversation layer. */
|
|
2925
|
+
conversationOpen?: boolean;
|
|
2926
|
+
onConversationOpenChange?: (open: boolean) => void;
|
|
2927
|
+
/** Title shown in the workspace header. Default "AI Assistant". */
|
|
2928
|
+
conversationTitle?: ReactNode;
|
|
2929
|
+
/**
|
|
2930
|
+
* `false` removes the dock; a ReactNode replaces the default
|
|
2931
|
+
* `<AgentWorkspaceComposer/>`; `true`/omitted renders the default.
|
|
2932
|
+
*/
|
|
2933
|
+
composer?: boolean | ReactNode;
|
|
2934
|
+
composerPlaceholder?: string;
|
|
2935
|
+
/** Hint line centered under the input (e.g. grounding/compliance note). */
|
|
2936
|
+
composerHint?: ReactNode;
|
|
2937
|
+
/** Intercept dock submits (the conversation layer still auto-opens). */
|
|
2938
|
+
onComposerSubmit?: (value: string) => void;
|
|
2939
|
+
className?: string;
|
|
2940
|
+
/** The scrollable center content region (under the conversation layer). */
|
|
2941
|
+
contentClassName?: string;
|
|
2942
|
+
conversationClassName?: string;
|
|
2943
|
+
leftPanelClassName?: string;
|
|
2944
|
+
rightPanelClassName?: string;
|
|
2945
|
+
/** The composer dock container. */
|
|
2946
|
+
composerClassName?: string;
|
|
2947
|
+
}
|
|
2948
|
+
/**
|
|
2949
|
+
* The AI layout wrapper. Composes the native pieces (provider session,
|
|
2950
|
+
* conversation, composer) into a page-level workspace with toggleable side
|
|
2951
|
+
* panels and a sliding center conversation.
|
|
2952
|
+
*/
|
|
2953
|
+
declare function AgentWorkspace({ children, leftPanel, rightPanel, leftPanelWidth, rightPanelWidth, defaultLeftPanelOpen, defaultRightPanelOpen, leftPanelOpen: leftPanelOpenProp, rightPanelOpen: rightPanelOpenProp, onLeftPanelOpenChange, onRightPanelOpenChange, showPanelToggles, showHeader, showConversationHeader, headerActions, headerStatus, conversation, conversationOpen: conversationOpenProp, onConversationOpenChange, conversationTitle, composer, composerPlaceholder, composerHint, onComposerSubmit, className, contentClassName, conversationClassName, leftPanelClassName, rightPanelClassName, composerClassName, }: AgentWorkspaceProps): react.JSX.Element;
|
|
2954
|
+
|
|
2955
|
+
interface AgentWorkspaceComposerProps {
|
|
2956
|
+
/** Controlled draft value. Pair with `onChange` for caller-controlled editing. */
|
|
2957
|
+
value?: string;
|
|
2958
|
+
/** Draft change handler. Presence switches editing to caller-controlled. */
|
|
2959
|
+
onChange?: (value: string) => void;
|
|
2960
|
+
/** Submit handler, receives the current value. Overrides the shared `submit`. */
|
|
2961
|
+
onSubmit?: (value: string) => void;
|
|
2962
|
+
/** Loading state for the send affordance (blocks submit, keeps typing live). */
|
|
2963
|
+
loading?: boolean;
|
|
2964
|
+
/** Force-disable the input. */
|
|
2965
|
+
disabled?: boolean;
|
|
2966
|
+
placeholder?: string;
|
|
2967
|
+
/** Renders a paperclip attach button left of the input when provided. */
|
|
2968
|
+
onAttach?: () => void;
|
|
2969
|
+
/** Custom node(s) left of the textarea. Takes precedence over `onAttach`. */
|
|
2970
|
+
leftActions?: ReactNode;
|
|
2971
|
+
/** Minimum visible rows. Default 1 (grows as the user types). */
|
|
2972
|
+
minRows?: number;
|
|
2973
|
+
/** Maximum rows before the textarea scrolls internally. Default 6. */
|
|
2974
|
+
maxRows?: number;
|
|
2975
|
+
autoFocus?: boolean;
|
|
2976
|
+
className?: string;
|
|
2977
|
+
inputClassName?: string;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* The workspace prompt pill. Renders unpositioned — `<AgentWorkspace>` docks it
|
|
2981
|
+
* at the bottom of the center column, but it works anywhere.
|
|
2982
|
+
*/
|
|
2983
|
+
declare function AgentWorkspaceComposer({ value: valueProp, onChange, onSubmit, loading: loadingProp, disabled, placeholder, onAttach, leftActions, minRows, maxRows, autoFocus, className, inputClassName, }: AgentWorkspaceComposerProps): react.JSX.Element;
|
|
2984
|
+
|
|
2985
|
+
interface AgentWorkspacePanelToggleProps {
|
|
2986
|
+
/** Which panel this button controls. */
|
|
2987
|
+
side: 'left' | 'right';
|
|
2988
|
+
/** Explicit open state (used outside an <AgentWorkspace>). */
|
|
2989
|
+
open?: boolean;
|
|
2990
|
+
/** Explicit toggle handler (used outside an <AgentWorkspace>). */
|
|
2991
|
+
onToggle?: () => void;
|
|
2992
|
+
className?: string;
|
|
2993
|
+
}
|
|
2994
|
+
/**
|
|
2995
|
+
* Panel visibility toggle button. Place it anywhere inside the workspace (or
|
|
2996
|
+
* pass `open`/`onToggle` to use it standalone).
|
|
2997
|
+
*/
|
|
2998
|
+
declare function AgentWorkspacePanelToggle({ side, open: openProp, onToggle, className, }: AgentWorkspacePanelToggleProps): react.JSX.Element | null;
|
|
2999
|
+
|
|
3000
|
+
interface AgentWorkspaceContextValue {
|
|
3001
|
+
/** Whether a left/right panel slot was provided to the workspace. */
|
|
3002
|
+
hasLeftPanel: boolean;
|
|
3003
|
+
hasRightPanel: boolean;
|
|
3004
|
+
/** Current open state for each side panel. */
|
|
3005
|
+
leftPanelOpen: boolean;
|
|
3006
|
+
rightPanelOpen: boolean;
|
|
3007
|
+
setLeftPanelOpen: (open: boolean) => void;
|
|
3008
|
+
setRightPanelOpen: (open: boolean) => void;
|
|
3009
|
+
toggleLeftPanel: () => void;
|
|
3010
|
+
toggleRightPanel: () => void;
|
|
3011
|
+
/**
|
|
3012
|
+
* Whether the center conversation layer is shown over the page content.
|
|
3013
|
+
* Opens automatically when the shared agent session activates (first submit
|
|
3014
|
+
* or `activate()`), and can be driven programmatically from anywhere inside
|
|
3015
|
+
* the workspace.
|
|
3016
|
+
*/
|
|
3017
|
+
conversationOpen: boolean;
|
|
3018
|
+
setConversationOpen: (open: boolean) => void;
|
|
3019
|
+
openConversation: () => void;
|
|
3020
|
+
closeConversation: () => void;
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* Workspace state + controls. Throws when used outside `<AgentWorkspace>` so a
|
|
3024
|
+
* mis-mounted control fails loudly during development.
|
|
3025
|
+
*/
|
|
3026
|
+
declare function useAgentWorkspace(): AgentWorkspaceContextValue;
|
|
3027
|
+
/** Nullable variant for components that optionally live inside a workspace. */
|
|
3028
|
+
declare function useAgentWorkspaceOptional(): AgentWorkspaceContextValue | null;
|
|
3029
|
+
|
|
2878
3030
|
interface NativeSurfaceProps {
|
|
2879
3031
|
/** Conversation content (typically a MessageList). */
|
|
2880
3032
|
children: React.ReactNode;
|
|
@@ -2901,4 +3053,4 @@ interface NativeSurfaceProps {
|
|
|
2901
3053
|
}
|
|
2902
3054
|
declare function NativeSurface({ children, input, title, subtitle, icon, headerActions, suggestions, footer, isLoading, autoScroll, className, contentClassName, }: NativeSurfaceProps): react.JSX.Element;
|
|
2903
3055
|
|
|
2904
|
-
export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };
|
|
3056
|
+
export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AgentWorkspace, AgentWorkspaceComposer, type AgentWorkspaceComposerProps, type AgentWorkspaceContextValue, AgentWorkspacePanelToggle, type AgentWorkspacePanelToggleProps, type AgentWorkspaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useAgentWorkspace, useAgentWorkspaceOptional, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };
|
package/dist/index.d.ts
CHANGED
|
@@ -2875,6 +2875,158 @@ interface AgentConversationProps {
|
|
|
2875
2875
|
*/
|
|
2876
2876
|
declare function AgentConversation({ messages: messagesProp, isLoading: isLoadingProp, header, emptyState, showAvatars, renderMessage, onFeedback, onConfirmAction, autoScroll, className, contentClassName, }: AgentConversationProps): react.JSX.Element;
|
|
2877
2877
|
|
|
2878
|
+
interface AgentWorkspaceProps {
|
|
2879
|
+
/** The host page content rendered in the center column. */
|
|
2880
|
+
children: ReactNode;
|
|
2881
|
+
leftPanel?: ReactNode;
|
|
2882
|
+
rightPanel?: ReactNode;
|
|
2883
|
+
/** Open width in px. Defaults: left 320, right 460. */
|
|
2884
|
+
leftPanelWidth?: number;
|
|
2885
|
+
rightPanelWidth?: number;
|
|
2886
|
+
/** Initial open state for uncontrolled panels. Default true. */
|
|
2887
|
+
defaultLeftPanelOpen?: boolean;
|
|
2888
|
+
defaultRightPanelOpen?: boolean;
|
|
2889
|
+
/** Controlled open state (pair with the change callback). */
|
|
2890
|
+
leftPanelOpen?: boolean;
|
|
2891
|
+
rightPanelOpen?: boolean;
|
|
2892
|
+
onLeftPanelOpenChange?: (open: boolean) => void;
|
|
2893
|
+
onRightPanelOpenChange?: (open: boolean) => void;
|
|
2894
|
+
/**
|
|
2895
|
+
* Render extra floating panel toggles in the top corners of the center
|
|
2896
|
+
* column. Default false — the persistent workspace header already hosts a
|
|
2897
|
+
* toggle at each end. Mount `<AgentWorkspacePanelToggle/>` in your own
|
|
2898
|
+
* chrome for fully custom placement.
|
|
2899
|
+
*/
|
|
2900
|
+
showPanelToggles?: boolean;
|
|
2901
|
+
/**
|
|
2902
|
+
* Show the workspace header bar: left panel toggle, icon + title + status
|
|
2903
|
+
* on the left; `headerActions`, reset, the conversation chevron, and the
|
|
2904
|
+
* right panel toggle on the right. Default true.
|
|
2905
|
+
*/
|
|
2906
|
+
showHeader?: boolean;
|
|
2907
|
+
/** @deprecated Use `showHeader`. Honored when `showHeader` is not set. */
|
|
2908
|
+
showConversationHeader?: boolean;
|
|
2909
|
+
/**
|
|
2910
|
+
* Host actions rendered at the start of the header's right action group —
|
|
2911
|
+
* e.g. a "+ New" button that mirrors the page's primary action.
|
|
2912
|
+
*/
|
|
2913
|
+
headerActions?: ReactNode;
|
|
2914
|
+
/**
|
|
2915
|
+
* Status line under the title. Defaults to the shared session's
|
|
2916
|
+
* error/status label; pass this when running disconnected (no provider).
|
|
2917
|
+
*/
|
|
2918
|
+
headerStatus?: ReactNode;
|
|
2919
|
+
/**
|
|
2920
|
+
* Custom conversation node for the slide-in layer. Defaults to
|
|
2921
|
+
* `<AgentConversation/>` bound to the shared session.
|
|
2922
|
+
*/
|
|
2923
|
+
conversation?: ReactNode;
|
|
2924
|
+
/** Controlled visibility for the conversation layer. */
|
|
2925
|
+
conversationOpen?: boolean;
|
|
2926
|
+
onConversationOpenChange?: (open: boolean) => void;
|
|
2927
|
+
/** Title shown in the workspace header. Default "AI Assistant". */
|
|
2928
|
+
conversationTitle?: ReactNode;
|
|
2929
|
+
/**
|
|
2930
|
+
* `false` removes the dock; a ReactNode replaces the default
|
|
2931
|
+
* `<AgentWorkspaceComposer/>`; `true`/omitted renders the default.
|
|
2932
|
+
*/
|
|
2933
|
+
composer?: boolean | ReactNode;
|
|
2934
|
+
composerPlaceholder?: string;
|
|
2935
|
+
/** Hint line centered under the input (e.g. grounding/compliance note). */
|
|
2936
|
+
composerHint?: ReactNode;
|
|
2937
|
+
/** Intercept dock submits (the conversation layer still auto-opens). */
|
|
2938
|
+
onComposerSubmit?: (value: string) => void;
|
|
2939
|
+
className?: string;
|
|
2940
|
+
/** The scrollable center content region (under the conversation layer). */
|
|
2941
|
+
contentClassName?: string;
|
|
2942
|
+
conversationClassName?: string;
|
|
2943
|
+
leftPanelClassName?: string;
|
|
2944
|
+
rightPanelClassName?: string;
|
|
2945
|
+
/** The composer dock container. */
|
|
2946
|
+
composerClassName?: string;
|
|
2947
|
+
}
|
|
2948
|
+
/**
|
|
2949
|
+
* The AI layout wrapper. Composes the native pieces (provider session,
|
|
2950
|
+
* conversation, composer) into a page-level workspace with toggleable side
|
|
2951
|
+
* panels and a sliding center conversation.
|
|
2952
|
+
*/
|
|
2953
|
+
declare function AgentWorkspace({ children, leftPanel, rightPanel, leftPanelWidth, rightPanelWidth, defaultLeftPanelOpen, defaultRightPanelOpen, leftPanelOpen: leftPanelOpenProp, rightPanelOpen: rightPanelOpenProp, onLeftPanelOpenChange, onRightPanelOpenChange, showPanelToggles, showHeader, showConversationHeader, headerActions, headerStatus, conversation, conversationOpen: conversationOpenProp, onConversationOpenChange, conversationTitle, composer, composerPlaceholder, composerHint, onComposerSubmit, className, contentClassName, conversationClassName, leftPanelClassName, rightPanelClassName, composerClassName, }: AgentWorkspaceProps): react.JSX.Element;
|
|
2954
|
+
|
|
2955
|
+
interface AgentWorkspaceComposerProps {
|
|
2956
|
+
/** Controlled draft value. Pair with `onChange` for caller-controlled editing. */
|
|
2957
|
+
value?: string;
|
|
2958
|
+
/** Draft change handler. Presence switches editing to caller-controlled. */
|
|
2959
|
+
onChange?: (value: string) => void;
|
|
2960
|
+
/** Submit handler, receives the current value. Overrides the shared `submit`. */
|
|
2961
|
+
onSubmit?: (value: string) => void;
|
|
2962
|
+
/** Loading state for the send affordance (blocks submit, keeps typing live). */
|
|
2963
|
+
loading?: boolean;
|
|
2964
|
+
/** Force-disable the input. */
|
|
2965
|
+
disabled?: boolean;
|
|
2966
|
+
placeholder?: string;
|
|
2967
|
+
/** Renders a paperclip attach button left of the input when provided. */
|
|
2968
|
+
onAttach?: () => void;
|
|
2969
|
+
/** Custom node(s) left of the textarea. Takes precedence over `onAttach`. */
|
|
2970
|
+
leftActions?: ReactNode;
|
|
2971
|
+
/** Minimum visible rows. Default 1 (grows as the user types). */
|
|
2972
|
+
minRows?: number;
|
|
2973
|
+
/** Maximum rows before the textarea scrolls internally. Default 6. */
|
|
2974
|
+
maxRows?: number;
|
|
2975
|
+
autoFocus?: boolean;
|
|
2976
|
+
className?: string;
|
|
2977
|
+
inputClassName?: string;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* The workspace prompt pill. Renders unpositioned — `<AgentWorkspace>` docks it
|
|
2981
|
+
* at the bottom of the center column, but it works anywhere.
|
|
2982
|
+
*/
|
|
2983
|
+
declare function AgentWorkspaceComposer({ value: valueProp, onChange, onSubmit, loading: loadingProp, disabled, placeholder, onAttach, leftActions, minRows, maxRows, autoFocus, className, inputClassName, }: AgentWorkspaceComposerProps): react.JSX.Element;
|
|
2984
|
+
|
|
2985
|
+
interface AgentWorkspacePanelToggleProps {
|
|
2986
|
+
/** Which panel this button controls. */
|
|
2987
|
+
side: 'left' | 'right';
|
|
2988
|
+
/** Explicit open state (used outside an <AgentWorkspace>). */
|
|
2989
|
+
open?: boolean;
|
|
2990
|
+
/** Explicit toggle handler (used outside an <AgentWorkspace>). */
|
|
2991
|
+
onToggle?: () => void;
|
|
2992
|
+
className?: string;
|
|
2993
|
+
}
|
|
2994
|
+
/**
|
|
2995
|
+
* Panel visibility toggle button. Place it anywhere inside the workspace (or
|
|
2996
|
+
* pass `open`/`onToggle` to use it standalone).
|
|
2997
|
+
*/
|
|
2998
|
+
declare function AgentWorkspacePanelToggle({ side, open: openProp, onToggle, className, }: AgentWorkspacePanelToggleProps): react.JSX.Element | null;
|
|
2999
|
+
|
|
3000
|
+
interface AgentWorkspaceContextValue {
|
|
3001
|
+
/** Whether a left/right panel slot was provided to the workspace. */
|
|
3002
|
+
hasLeftPanel: boolean;
|
|
3003
|
+
hasRightPanel: boolean;
|
|
3004
|
+
/** Current open state for each side panel. */
|
|
3005
|
+
leftPanelOpen: boolean;
|
|
3006
|
+
rightPanelOpen: boolean;
|
|
3007
|
+
setLeftPanelOpen: (open: boolean) => void;
|
|
3008
|
+
setRightPanelOpen: (open: boolean) => void;
|
|
3009
|
+
toggleLeftPanel: () => void;
|
|
3010
|
+
toggleRightPanel: () => void;
|
|
3011
|
+
/**
|
|
3012
|
+
* Whether the center conversation layer is shown over the page content.
|
|
3013
|
+
* Opens automatically when the shared agent session activates (first submit
|
|
3014
|
+
* or `activate()`), and can be driven programmatically from anywhere inside
|
|
3015
|
+
* the workspace.
|
|
3016
|
+
*/
|
|
3017
|
+
conversationOpen: boolean;
|
|
3018
|
+
setConversationOpen: (open: boolean) => void;
|
|
3019
|
+
openConversation: () => void;
|
|
3020
|
+
closeConversation: () => void;
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* Workspace state + controls. Throws when used outside `<AgentWorkspace>` so a
|
|
3024
|
+
* mis-mounted control fails loudly during development.
|
|
3025
|
+
*/
|
|
3026
|
+
declare function useAgentWorkspace(): AgentWorkspaceContextValue;
|
|
3027
|
+
/** Nullable variant for components that optionally live inside a workspace. */
|
|
3028
|
+
declare function useAgentWorkspaceOptional(): AgentWorkspaceContextValue | null;
|
|
3029
|
+
|
|
2878
3030
|
interface NativeSurfaceProps {
|
|
2879
3031
|
/** Conversation content (typically a MessageList). */
|
|
2880
3032
|
children: React.ReactNode;
|
|
@@ -2901,4 +3053,4 @@ interface NativeSurfaceProps {
|
|
|
2901
3053
|
}
|
|
2902
3054
|
declare function NativeSurface({ children, input, title, subtitle, icon, headerActions, suggestions, footer, isLoading, autoScroll, className, contentClassName, }: NativeSurfaceProps): react.JSX.Element;
|
|
2903
3055
|
|
|
2904
|
-
export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };
|
|
3056
|
+
export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AgentWorkspace, AgentWorkspaceComposer, type AgentWorkspaceComposerProps, type AgentWorkspaceContextValue, AgentWorkspacePanelToggle, type AgentWorkspacePanelToggleProps, type AgentWorkspaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useAgentWorkspace, useAgentWorkspaceOptional, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };
|