@mgamadeus/ddd-agents 0.0.1-stage → 0.1.0-alpha.22
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 +11 -3
- package/dist/chat.js +5263 -0
- package/dist/chat.js.map +1 -0
- package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js +22 -0
- package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js.map +1 -0
- package/dist/chunks/ConversationMarkdown-W7NHglmL.js +399 -0
- package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +1 -0
- package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js +5059 -0
- package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +1 -0
- package/dist/chunks/canvas-behaviours-BRFR1ALE.js +45 -0
- package/dist/chunks/canvas-behaviours-BRFR1ALE.js.map +1 -0
- package/dist/chunks/canvas-feature-flags-BmmxC3bz.js +11 -0
- package/dist/chunks/canvas-feature-flags-BmmxC3bz.js.map +1 -0
- package/dist/chunks/canvasBodies-9SuF6NAB.js +289 -0
- package/dist/chunks/canvasBodies-9SuF6NAB.js.map +1 -0
- package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js +6 -0
- package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js.map +1 -0
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +20 -0
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +1 -0
- package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js +25 -0
- package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js.map +1 -0
- package/dist/chunks/widget-name-resolver-DyIY6Zu4.js +9736 -0
- package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +1 -0
- package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js +251 -0
- package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js.map +1 -0
- package/dist/client-testing.js +346 -0
- package/dist/client-testing.js.map +1 -0
- package/dist/client.js +16 -0
- package/dist/client.js.map +1 -0
- package/dist/contract.js +31 -0
- package/dist/contract.js.map +1 -0
- package/dist/image-render.js +334 -0
- package/dist/image-render.js.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.js +13 -0
- package/dist/kit.js.map +1 -0
- package/dist/preview.js +733 -0
- package/dist/preview.js.map +1 -0
- package/dist/renderer.js +115 -0
- package/dist/renderer.js.map +1 -0
- package/dist/styles.css +6768 -0
- package/dist/types/chat/AgentChat/AgentChat.d.ts +37 -0
- package/dist/types/chat/AgentChatActivityHistory/AgentChatActivityHistory.d.ts +6 -0
- package/dist/types/chat/AgentChatActivityIndicator/AgentChatActivityIndicator.d.ts +8 -0
- package/dist/types/chat/CanvasPane/CanvasPane.d.ts +15 -0
- package/dist/types/chat/CanvasResizeHandle/CanvasResizeHandle.d.ts +10 -0
- package/dist/types/chat/CanvasResizeHandle/use-canvas-resize.d.ts +43 -0
- package/dist/types/chat/ConversationClosedBar/ConversationClosedBar.d.ts +10 -0
- package/dist/types/chat/ConversationErrorCard/ConversationErrorCard.d.ts +13 -0
- package/dist/types/chat/ConversationIntroCard/ConversationIntroCard.d.ts +10 -0
- package/dist/types/chat/ConversationLoadingStates.d.ts +2 -0
- package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/ConversationCallMarkerChip.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/VoiceBarsIcon/VoiceBarsIcon.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystem.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystemHeader/ConversationMessageSystemHeader.d.ts +9 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUser.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUserWidgets.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageHeader/ConversationMessageHeader.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageThinking/ConversationMessageThinking.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageWidgets.d.ts +29 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/copyRichToClipboard.d.ts +1 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useFreshMessageBlockReveal.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useStreamingText.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useTypewriter.d.ts +12 -0
- package/dist/types/chat/ConversationMessage/ConversationTaskInstructionDisclosure/ConversationTaskInstructionDisclosure.d.ts +12 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInput.d.ts +111 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentPreviewCard.d.ts +34 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsErrorBox.d.ts +22 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsPreviewStrip.d.ts +12 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/convert-bytes-to-size-string.d.ts +2 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputComposerWidgets/ConversationMessageInputComposerWidgets.d.ts +12 -0
- package/dist/types/chat/ConversationMessageList/ConversationMessageList.d.ts +75 -0
- package/dist/types/chat/ConversationScrollToLatestMessageButton/ConversationScrollToLatestMessageButton.d.ts +6 -0
- package/dist/types/chat/ConversationSuggestionCard/ConversationSuggestionCard.d.ts +7 -0
- package/dist/types/chat/ConversationView.d.ts +216 -0
- package/dist/types/chat/ConversationViewBody/ConversationViewBody.d.ts +214 -0
- package/dist/types/chat/ConversationViewBody/hooks/useIsMessagesBottomOutOfView.d.ts +2 -0
- package/dist/types/chat/ConversationViewBody/hooks/usePinQuestionOnSend.d.ts +24 -0
- package/dist/types/chat/assistant-message-has-renderable-markdown.d.ts +13 -0
- package/dist/types/chat/chat-assistant-identity.d.ts +24 -0
- package/dist/types/chat/chat-message.d.ts +11 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +97 -0
- package/dist/types/chat/controller/activity-ticker.d.ts +120 -0
- package/dist/types/chat/controller/changed-messages-request.d.ts +12 -0
- package/dist/types/chat/controller/chat-scroll-target.d.ts +10 -0
- package/dist/types/chat/controller/conversation-change-signal-rules.d.ts +64 -0
- package/dist/types/chat/controller/derive-agent-activity.d.ts +31 -0
- package/dist/types/chat/controller/merge-activity-elements.d.ts +25 -0
- package/dist/types/chat/controller/pending-start-request.d.ts +38 -0
- package/dist/types/chat/controller/use-activity-ticker.d.ts +60 -0
- package/dist/types/chat/controller/use-conversation-activity.d.ts +38 -0
- package/dist/types/chat/controller/use-conversation-live-updates.d.ts +30 -0
- package/dist/types/chat/controller/use-conversation-message-pages.d.ts +24 -0
- package/dist/types/chat/controller/use-conversation-scroll-jump.d.ts +47 -0
- package/dist/types/chat/controller/use-conversation-search.d.ts +31 -0
- package/dist/types/chat/controller/use-conversation-signals.d.ts +44 -0
- package/dist/types/chat/controller/use-debounced-semantic-search.d.ts +15 -0
- package/dist/types/chat/conversation-send-message.d.ts +43 -0
- package/dist/types/chat/last-wire-message-is-unanswered-user-message.d.ts +22 -0
- package/dist/types/chat/normalize-server-message-to-markdown.d.ts +23 -0
- package/dist/types/chat/store/agents-chat-state.d.ts +132 -0
- package/dist/types/chat/store/conversation-error-type.d.ts +32 -0
- package/dist/types/chat/store/create-agents-chat-store.d.ts +23 -0
- package/dist/types/chat/store/index.d.ts +5 -0
- package/dist/types/chat/store/merge-chat-messages.d.ts +20 -0
- package/dist/types/chat/store/reduce-agents-chat-state.d.ts +7 -0
- package/dist/types/chat/store/use-agents-chat-store.d.ts +22 -0
- package/dist/types/chat/strip-pre-call-message-marker.d.ts +12 -0
- package/dist/types/chat/use-canvas-shell-transitions.d.ts +25 -0
- package/dist/types/client/AgentsConversationClient.d.ts +93 -0
- package/dist/types/client/AgentsConversationClientContext.d.ts +17 -0
- package/dist/types/client/polling/createPollingConversationChangeSubscription.d.ts +62 -0
- package/dist/types/client/polling/withPollingChangeSubscription.d.ts +11 -0
- package/dist/types/client/testing/createInMemoryAgentsConversationClient.d.ts +139 -0
- package/dist/types/contract/conversation.d.ts +370 -0
- package/dist/types/entries/chat.d.ts +21 -0
- package/dist/types/entries/client-testing.d.ts +1 -0
- package/dist/types/entries/client.d.ts +4 -0
- package/dist/types/entries/contract.d.ts +1 -0
- package/dist/types/entries/image-render.d.ts +9 -0
- package/dist/types/entries/index.d.ts +9 -0
- package/dist/types/entries/kit.d.ts +4 -0
- package/dist/types/entries/preview.d.ts +8 -0
- package/dist/types/entries/renderer.d.ts +15 -0
- package/dist/types/entries/widgets.d.ts +16 -0
- package/dist/types/image-render/ComposedViewEmailDataTimes/ComposedViewEmailDataTimes.d.ts +15 -0
- package/dist/types/image-render/WidgetImageRender.d.ts +55 -0
- package/dist/types/image-render/WidgetImageRenderContext.d.ts +14 -0
- package/dist/types/image-render/composed-view-data-times.d.ts +20 -0
- package/dist/types/image-render/frozen-widget-requests.d.ts +2 -0
- package/dist/types/image-render/live-widget-requests.d.ts +4 -0
- package/dist/types/image-render/widget-image-google-map.d.ts +7 -0
- package/dist/types/image-render/widget-image-readiness-signal.d.ts +16 -0
- package/dist/types/image-render/widget-image-readiness.d.ts +9 -0
- package/dist/types/image-render/widget-image-render.types.d.ts +47 -0
- package/dist/types/kit/ComposedViewConversationWidget.d.ts +14 -0
- package/dist/types/kit/ComposedViewDataSourceLoader.d.ts +20 -0
- package/dist/types/kit/ComposedViewRenderer.d.ts +30 -0
- package/dist/types/kit/ComposedViewSlotErrorBoundary.d.ts +23 -0
- package/dist/types/kit/ModelText/ModelText.d.ts +12 -0
- package/dist/types/kit/components/embedding/EmbeddedConversationWidget.d.ts +26 -0
- package/dist/types/kit/components/map/map-full-screen-instance.d.ts +26 -0
- package/dist/types/kit/components/map/map-presentation-context.d.ts +8 -0
- package/dist/types/kit/components/text/shared/text-node-values.d.ts +39 -0
- package/dist/types/kit/composed-view-component-types.d.ts +61 -0
- package/dist/types/kit/composed-view-components.d.ts +7 -0
- package/dist/types/kit/composed-view-tones.d.ts +20 -0
- package/dist/types/kit/entity-detail/EntityDetailCanvasBody.d.ts +9 -0
- package/dist/types/kit/entity-detail/entity-detail-bodies.d.ts +32 -0
- package/dist/types/kit/entity-detail/entity-detail-name.d.ts +9 -0
- package/dist/types/kit/hooks/use-debounced-value.d.ts +2 -0
- package/dist/types/kit/map-full-screen/MapFullScreenCanvasBody.d.ts +11 -0
- package/dist/types/preview/WidgetPreviewHost.d.ts +20 -0
- package/dist/types/preview/preview-stub-components.d.ts +3 -0
- package/dist/types/preview/widget-preview-fixtures.d.ts +17 -0
- package/dist/types/preview/widget-preview-hydration.d.ts +10 -0
- package/dist/types/preview/widget-preview-readiness.d.ts +27 -0
- package/dist/types/preview/widget-preview-requests.d.ts +16 -0
- package/dist/types/preview/widget-preview-signal.d.ts +10 -0
- package/dist/types/preview/widget-preview.types.d.ts +134 -0
- package/dist/types/provider/AgentsProvider.d.ts +33 -0
- package/dist/types/provider/class-names.d.ts +7 -0
- package/dist/types/provider/components/default-components.d.ts +3 -0
- package/dist/types/provider/components/icon-names.d.ts +9 -0
- package/dist/types/provider/components/index.d.ts +39 -0
- package/dist/types/provider/components/types.d.ts +463 -0
- package/dist/types/provider/environment.d.ts +262 -0
- package/dist/types/provider/index.d.ts +4 -0
- package/dist/types/renderer/ConversationDeepLinkedWidget.d.ts +18 -0
- package/dist/types/renderer/ConversationMarkdown.d.ts +21 -0
- package/dist/types/renderer/ConversationWidgetActions/ConversationWidgetActions.d.ts +7 -0
- package/dist/types/renderer/ConversationWidgetCallbacksContext.d.ts +234 -0
- package/dist/types/renderer/ConversationWidgetContext.d.ts +32 -0
- package/dist/types/renderer/ConversationWidgetErrorBoundary.d.ts +25 -0
- package/dist/types/renderer/ConversationWidgetHost.d.ts +36 -0
- package/dist/types/renderer/ConversationWidgetRenderContext.d.ts +3 -0
- package/dist/types/renderer/MarkdownLink.d.ts +6 -0
- package/dist/types/renderer/WindowedWidget/WindowedWidget.d.ts +16 -0
- package/dist/types/renderer/_access/ConversationWidgetFeatureGate.d.ts +21 -0
- package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceFrame.d.ts +12 -0
- package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceHeader.d.ts +15 -0
- package/dist/types/renderer/_agent-space/agent-space-name.hydrator.d.ts +7 -0
- package/dist/types/renderer/_agent-space/declared-agent-space-key-field-name.d.ts +8 -0
- package/dist/types/renderer/_agent-space/use-resolved-conversation-widget-agent-space-key.d.ts +16 -0
- package/dist/types/renderer/_agent-space/widget-agent-space-key-attribute.d.ts +13 -0
- package/dist/types/renderer/balanced-json-object.d.ts +12 -0
- package/dist/types/renderer/canvas/CanvasRestoreOnMount.d.ts +19 -0
- package/dist/types/renderer/canvas/canvas-behaviours.d.ts +84 -0
- package/dist/types/renderer/canvas/canvas-body-props.d.ts +18 -0
- package/dist/types/renderer/canvas/canvas-feature-flags.d.ts +11 -0
- package/dist/types/renderer/canvas/canvas-reducers.d.ts +46 -0
- package/dist/types/renderer/canvas/canvas-state.d.ts +107 -0
- package/dist/types/renderer/canvas/canvasBodies.d.ts +19 -0
- package/dist/types/renderer/canvas/canvasStorage.d.ts +25 -0
- package/dist/types/renderer/canvas/decide-canvas-open.d.ts +32 -0
- package/dist/types/renderer/canvas/entity-detail-instance.d.ts +27 -0
- package/dist/types/renderer/canvas/find-widget-fences-in-markdown.d.ts +32 -0
- package/dist/types/renderer/canvas/use-anchor-widget-payload.d.ts +8 -0
- package/dist/types/renderer/composer-widget-fence.d.ts +30 -0
- package/dist/types/renderer/conversation-composer-widget.d.ts +13 -0
- package/dist/types/renderer/conversation-widget-props.d.ts +54 -0
- package/dist/types/renderer/conversation-widget-state-partition.d.ts +31 -0
- package/dist/types/renderer/conversationWidgetAstPlugin.d.ts +11 -0
- package/dist/types/renderer/conversationWidgetRegistry.d.ts +74 -0
- package/dist/types/renderer/detect-unrendered-widgets.d.ts +42 -0
- package/dist/types/renderer/markdown-contains-widget.d.ts +13 -0
- package/dist/types/renderer/reference-naked-widget-json.d.ts +1 -0
- package/dist/types/renderer/remarkWidgetFencePlugin.d.ts +22 -0
- package/dist/types/renderer/render-report/widget-render-report-collector.d.ts +57 -0
- package/dist/types/renderer/render-report/widget-render-report.d.ts +29 -0
- package/dist/types/renderer/repair-malformed-widget-fences.d.ts +11 -0
- package/dist/types/renderer/resolve-deep-linkable-widget.d.ts +25 -0
- package/dist/types/renderer/restoreTextDirectivesPlugin.d.ts +12 -0
- package/dist/types/renderer/widget-click-signal-sources.d.ts +15 -0
- package/dist/types/renderer/widget-fence-json.d.ts +16 -0
- package/dist/types/renderer/widget-fence-syntax.d.ts +25 -0
- package/dist/types/renderer/widget-hydration/index.d.ts +8 -0
- package/dist/types/renderer/widget-hydration/section-hydration.d.ts +41 -0
- package/dist/types/renderer/widget-hydration/use-widget-hydration.d.ts +27 -0
- package/dist/types/renderer/widget-hydration/widget-hydration-state-store.d.ts +27 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.reducer.d.ts +39 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.registry.d.ts +7 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.slice.d.ts +8 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.types.d.ts +27 -0
- package/dist/types/renderer/widget-name-resolver.d.ts +22 -0
- package/dist/types/renderer/widget-tree/bounded-json.d.ts +23 -0
- package/dist/types/renderer/widget-tree/composed-node-schema.d.ts +143 -0
- package/dist/types/renderer/widget-tree/composed-view-data-sources.d.ts +41 -0
- package/dist/types/renderer/widget-tree/composed-view-tree.d.ts +111 -0
- package/dist/types/renderer/widget-tree/expression/evaluate-expression.d.ts +65 -0
- package/dist/types/renderer/widget-tree/expression/parse-expression.d.ts +71 -0
- package/dist/types/renderer/widget-tree/resolve-composed-view-values.d.ts +49 -0
- package/dist/types/renderer/widget-tree/use-composed-view-state.d.ts +16 -0
- package/dist/types/renderer/widget-windowing.d.ts +25 -0
- package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetCard.d.ts +79 -0
- package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetSwitch.d.ts +61 -0
- package/dist/types/widgets/CanvasWidgetCard/canvas-for-message-widget.d.ts +8 -0
- package/dist/types/widgets/CanvasWidgetCard/use-canvas-viable.d.ts +15 -0
- package/dist/types/widgets/ClockConversationWidget/ClockConversationWidget.d.ts +11 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/AnalogClockFace.d.ts +12 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockRow.d.ts +23 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockWidget.d.ts +21 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/DayNightGlyph.d.ts +8 -0
- package/dist/types/widgets/ClockConversationWidget/shared/clock-time.d.ts +52 -0
- package/dist/types/widgets/ClockConversationWidget/shared/clock-widget-payload.d.ts +23 -0
- package/dist/types/widgets/ClockConversationWidget/shared/use-clock-settings.d.ts +18 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.d.ts +14 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerWidget/ConceptExplainerWidget.d.ts +27 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/ConceptExplainerTextView.d.ts +11 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-type.d.ts +89 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-types.d.ts +17 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-widget-payload.d.ts +25 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/use-concept-explainer-language.d.ts +8 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvas.d.ts +9 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvasBody.d.ts +7 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.d.ts +15 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/conversation-search-results-widget-payload.d.ts +42 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/search-hit-excerpt.d.ts +1 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.d.ts +8 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyConverterWidget.d.ts +17 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyLabel/CurrencyLabel.d.ts +9 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-converter-widget-payload.d.ts +22 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-display.d.ts +30 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.d.ts +11 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationFrame.d.ts +14 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationWidget.d.ts +15 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-frame-protocol.d.ts +77 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-libraries.d.ts +25 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-sandbox-config.d.ts +21 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-widget-payload.d.ts +55 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/read-custom-visualization-theme.d.ts +5 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionAskButton/EntityMentionAskButton.d.ts +13 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionCard/EntityMentionCard.d.ts +11 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.d.ts +9 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention-presentation.d.ts +4 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention.d.ts +33 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/use-entity-mention-composer.d.ts +17 -0
- package/dist/types/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.d.ts +2 -0
- package/dist/types/widgets/MultiChoiceConversationWidget/shared/multi-choice-widget-payload.d.ts +16 -0
- package/dist/types/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.d.ts +38 -0
- package/dist/types/widgets/QuickRepliesConversationWidget/shared/quick-replies-widget-payload.d.ts +20 -0
- package/dist/types/widgets/SuggestedActions/SuggestedActions.d.ts +10 -0
- package/dist/types/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.d.ts +8 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/SourceFavicon.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchAnswer.d.ts +6 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchReferences.d.ts +12 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvas.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvasBody.d.ts +7 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.d.ts +14 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchSourcesList.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/shared/display-hostname.d.ts +9 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/shared/web-search-results-widget-payload.d.ts +30 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.d.ts +14 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftBody.d.ts +9 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftWidget.d.ts +44 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-mail-link.d.ts +17 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-plain-text.d.ts +7 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/remark-draft-line-breaks.d.ts +13 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/writing-draft-widget-payload.d.ts +23 -0
- package/dist/types/widgets/_shared/ConversationWidgetButton.d.ts +4 -0
- package/dist/types/widgets/_shared/DonePill.d.ts +14 -0
- package/dist/types/widgets/_shared/modern/WidgetKpiValue.d.ts +24 -0
- package/dist/types/widgets/_shared/modern/WidgetListRow.d.ts +14 -0
- package/dist/types/widgets/_shared/modern/WidgetStatusChip.d.ts +8 -0
- package/dist/types/widgets/_shared/modern/WidgetSurface.d.ts +13 -0
- package/dist/types/widgets/_shared/modern/WidgetSurfaceSkeleton.d.ts +11 -0
- package/dist/types/widgets/_shared/modern/index.d.ts +16 -0
- package/dist/types/widgets/_shared/skeleton-primitives.d.ts +20 -0
- package/dist/types/widgets/_shared/use-stack-when-wrapped.d.ts +6 -0
- package/dist/types/widgets/_shared/widget-payload-validation.d.ts +22 -0
- package/dist/widgets.js +84 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +120 -3
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type AgentsIconName } from "../../provider/components";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import type { CanvasId } from "../../renderer/canvas/canvas-behaviours";
|
|
4
|
+
import { CanvasAnchor } from "../../renderer/canvas/canvas-state";
|
|
5
|
+
/**
|
|
6
|
+
* The canvas a card opens: which canvas, which instance, anchored on which message. The body comes from
|
|
7
|
+
* `canvasBodies` and re-reads its payload from the anchor message — the card carries no rendered node. Layout
|
|
8
|
+
* (width, narrow-viewport rule, full bleed) is the canvas's behaviour (`canvas-behaviours.ts`), not a card prop.
|
|
9
|
+
*/
|
|
10
|
+
export interface CanvasWidgetCardCanvas {
|
|
11
|
+
canvasId: CanvasId;
|
|
12
|
+
instanceId: string;
|
|
13
|
+
anchor: CanvasAnchor;
|
|
14
|
+
}
|
|
15
|
+
export interface CanvasWidgetCardProps {
|
|
16
|
+
/**
|
|
17
|
+
* Headline shown on the inline card (e.g. "Search results for 'X'"). Rendered through the component library's `Text`, so
|
|
18
|
+
* it auto-translates: keep dynamic values out of the string and pass them via `titleReplacements` (`%token%`).
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/** `%token%` → value replacements for `title`, so an interpolated headline stays one stable translation key. */
|
|
22
|
+
titleReplacements?: Record<string, string | number>;
|
|
23
|
+
/** False when `title` is a business/user value that must render as-is (not a translation key). Default true. */
|
|
24
|
+
translateTitle?: boolean;
|
|
25
|
+
/** Optional second line (e.g. "5 conversations", a filter summary). Auto-translates — interpolate via `subtitleReplacements`. */
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
/** `%token%` → value replacements for `subtitle`, so an interpolated second line stays one stable translation key. */
|
|
28
|
+
subtitleReplacements?: Record<string, string | number>;
|
|
29
|
+
/** False when `subtitle` is a business/user value that must render as-is (not a translation key). Default true. */
|
|
30
|
+
translateSubtitle?: boolean;
|
|
31
|
+
/** Optional leading icon (a glyph hinting what the canvas holds). Falls back to a generic panel glyph. */
|
|
32
|
+
icon?: AgentsIconName;
|
|
33
|
+
/**
|
|
34
|
+
* A preview of the picture the canvas opens with. Set → the RICH card: the thumbnail replaces the icon badge, the
|
|
35
|
+
* title gets more weight, and the hover is the component library's `GlobalStateComponent` layer (e.g. an app's closing summary
|
|
36
|
+
* card with a hero picture).
|
|
37
|
+
*/
|
|
38
|
+
thumbnail?: ReactNode;
|
|
39
|
+
/** True when the host message was delivered live right now — auto-opens the canvas once. Never true after a reload or on history replay. */
|
|
40
|
+
justDelivered?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The canvas this card opens (`canvasForMessageWidget`). Undefined while the widget does not know its message (the
|
|
43
|
+
* reply is still streaming, a composer echo): the card renders but opens nothing.
|
|
44
|
+
*/
|
|
45
|
+
canvas?: CanvasWidgetCardCanvas;
|
|
46
|
+
/**
|
|
47
|
+
* The other agent space the canvas shows, when it is not the active one. The named card shows that agent space's chip on
|
|
48
|
+
* a row above it: floating over the card's corner, the chip would cover the open affordance, and inside the card
|
|
49
|
+
* (a `<button>`) its focusable popover trigger would nest one control in another. A `preview` names the agent space
|
|
50
|
+
* itself, so the narrow viewport's preview branch adds nothing.
|
|
51
|
+
*/
|
|
52
|
+
anotherAgentSpaceKey?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The real widget content (the lightweight inline list). Rendered directly in the chat on a NARROW viewport (no side
|
|
55
|
+
* canvas) so the user still sees the data; on a wide viewport the content lives only in the side canvas and this is
|
|
56
|
+
* not rendered — the card is just the card.
|
|
57
|
+
*/
|
|
58
|
+
preview?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The widget's root test id. The named card carries it, its open control `<testId>-open-canvas`; with a `preview`
|
|
61
|
+
* the preview carries the root id itself and only the open control is marked.
|
|
62
|
+
*/
|
|
63
|
+
testId?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The standard inline representation of a CANVAS widget in the conversation — ONE component shared by every canvas
|
|
67
|
+
* widget (web search, conversation search, and every list, gallery or summary canvas an app's widgets open).
|
|
68
|
+
*
|
|
69
|
+
* Wide viewport: a compact card (icon badge + title + subtitle + "open" affordance) that opens the canvas as the side
|
|
70
|
+
* split, auto-opening once on a just-delivered message. The opening rule (`decideCanvasOpen`) decides in the reducer:
|
|
71
|
+
* replay, the narrow-viewport rule of the canvas's behaviour and the customer's veto all live there.
|
|
72
|
+
*
|
|
73
|
+
* Narrow viewport (no side split, the canvas opens as a full-screen overlay), two shapes:
|
|
74
|
+
* - with a `preview`: the real inline content is rendered in the chat so the user sees the data, plus an "Open in
|
|
75
|
+
* canvas" affordance to open the full view over the chat. Tap to open — a live delivery is not a takeover.
|
|
76
|
+
* - without a `preview` (the canvas is the widget's only surface, behaviour `narrowViewport: "overlay"`): the same
|
|
77
|
+
* named card as on the wide viewport, so closing the canvas leaves a card to re-open.
|
|
78
|
+
*/
|
|
79
|
+
export declare const CanvasWidgetCard: ({ title, titleReplacements, translateTitle, subtitle, subtitleReplacements, translateSubtitle, icon, thumbnail, justDelivered, canvas, anotherAgentSpaceKey, preview, testId, }: CanvasWidgetCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type AgentsIconName } from "../../provider/components";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { CanvasWidgetCardCanvas } from "./CanvasWidgetCard";
|
|
4
|
+
export interface CanvasWidgetInlineRenderOptions {
|
|
5
|
+
/**
|
|
6
|
+
* True only when the inline render is the narrow-viewport preview inside the {@link CanvasWidgetCard}, above its
|
|
7
|
+
* "Open in canvas" button, so the canvas holds the full content. False in the chat's inline branch and in email /
|
|
8
|
+
* image renders, where no canvas exists and the inline render is the whole widget: never shorten it there.
|
|
9
|
+
*/
|
|
10
|
+
isWidgetPreview: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CanvasWidgetSwitchProps {
|
|
13
|
+
/**
|
|
14
|
+
* Agent hint that forces the branch. Normally OMITTED — the switch auto-picks by content size.
|
|
15
|
+
* `"canvas"` forces the canvas; `"inline"` keeps the content inline regardless of size.
|
|
16
|
+
*/
|
|
17
|
+
display?: "inline" | "canvas";
|
|
18
|
+
/**
|
|
19
|
+
* The per-widget content rule: true when the content is larger than fits comfortably inline (more items / a longer
|
|
20
|
+
* answer than the widget's inline limit). Combined with `display` to decide whether this is a canvas widget. Ignored
|
|
21
|
+
* when `display` is set. Canvas-only widgets pass `display="canvas"` instead of this.
|
|
22
|
+
*/
|
|
23
|
+
exceedsInlineLimit?: boolean;
|
|
24
|
+
/** Headline on the inline card (e.g. "Search results for 'X'"). Used only when it opens as a canvas. */
|
|
25
|
+
title: string;
|
|
26
|
+
/** `%token%` → value replacements for `title`, so an interpolated headline stays one stable translation key. */
|
|
27
|
+
titleReplacements?: Record<string, string | number>;
|
|
28
|
+
/** Optional second line on the card (e.g. "5 sources", a filter summary). Used only when it opens as a canvas. */
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
/** `%token%` → value replacements for `subtitle`, so an interpolated second line stays one stable translation key. */
|
|
31
|
+
subtitleReplacements?: Record<string, string | number>;
|
|
32
|
+
/** False when `subtitle` is already resolved text (a business value, a singular/plural value). Default true. */
|
|
33
|
+
translateSubtitle?: boolean;
|
|
34
|
+
/** Optional leading icon on the card. Used only when it opens as a canvas. */
|
|
35
|
+
icon?: AgentsIconName;
|
|
36
|
+
/** True when the host message was delivered live right now — auto-opens the canvas once. Never true after a reload or on history replay. */
|
|
37
|
+
justDelivered?: boolean;
|
|
38
|
+
/** The canvas the card opens (see {@link CanvasWidgetCardProps.canvas}). */
|
|
39
|
+
canvas?: CanvasWidgetCardCanvas;
|
|
40
|
+
/**
|
|
41
|
+
* The other agent space the content belongs to, when it is not the active one: the named card shows its chip (see
|
|
42
|
+
* {@link CanvasWidgetCardProps.anotherAgentSpaceKey}). The inline render names it itself.
|
|
43
|
+
*/
|
|
44
|
+
anotherAgentSpaceKey?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The inline render of the widget. Shown directly in the chat when the content is small enough to stay inline, and
|
|
47
|
+
* reused by the {@link CanvasWidgetCard} as the narrow-viewport inline render below its card. Called once per render.
|
|
48
|
+
* A widget that shortens its content for the widget preview does so only when `isWidgetPreview` is true.
|
|
49
|
+
*/
|
|
50
|
+
renderInline: (options: CanvasWidgetInlineRenderOptions) => ReactNode;
|
|
51
|
+
/** The widget's root test id (`<kebab wire name>-widget`), handed to the {@link CanvasWidgetCard}. */
|
|
52
|
+
testId?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The single switch shared by every canvas widget. It owns the one decision — is this a CANVAS widget at all: the
|
|
56
|
+
* agent forced it (`display`) or the content exceeds the widget's inline limit. Small content renders inline in the
|
|
57
|
+
* chat. A canvas widget hands off to {@link CanvasWidgetCard}, which itself decides the viewport-dependent shape: on a
|
|
58
|
+
* wide viewport a clickable card (opens the side split), on a narrow viewport the inline render plus an "Open in
|
|
59
|
+
* canvas" CTA (opens over the chat). Centralising this here keeps all widgets consistent and free of the branch.
|
|
60
|
+
*/
|
|
61
|
+
export declare const CanvasWidgetSwitch: ({ display, exceedsInlineLimit, title, titleReplacements, subtitle, subtitleReplacements, translateSubtitle, icon, justDelivered, canvas, anotherAgentSpaceKey, renderInline, testId, }: CanvasWidgetSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CanvasId } from "../../renderer/canvas/canvas-behaviours";
|
|
2
|
+
import type { CanvasWidgetCardCanvas } from "./CanvasWidgetCard";
|
|
3
|
+
/**
|
|
4
|
+
* The canvas a payload widget in a message opens: anchored on the host message, one instance per message + payload.
|
|
5
|
+
* Undefined while the widget does not know its message (the reply is still streaming, a composer echo, a story that
|
|
6
|
+
* mounts the widget without a message) — the card then renders but opens nothing.
|
|
7
|
+
*/
|
|
8
|
+
export declare const canvasForMessageWidget: (canvasId: CanvasId, messageId: string | number | undefined, payload: string) => CanvasWidgetCardCanvas | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Min viewport width (px) at which the canvas side-panel split is usable. Mirrors the ModalSplitView `autoCloseWidth`
|
|
3
|
+
* in ConversationView — below it the split auto-collapses, so a canvas widget must render its content inline instead of opening
|
|
4
|
+
* a panel that immediately closes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CANVAS_VIABLE_MIN_WIDTH = 850;
|
|
7
|
+
/**
|
|
8
|
+
* True when the viewport is wide enough for the canvas side panel. Re-renders the consumer ONLY when the boolean
|
|
9
|
+
* crosses {@link CANVAS_VIABLE_MIN_WIDTH} — NOT on every resize pixel. This matters because the consumers (the canvas
|
|
10
|
+
* widgets, ConversationView) re-mount heavy, self-fetching lists; a width-tracking
|
|
11
|
+
* hook would re-render them on every resize tick and make dragging the window janky. We store the derived boolean and
|
|
12
|
+
* skip the state update when it hasn't flipped, so React bails out and a drag that stays on one side of the threshold
|
|
13
|
+
* costs zero re-renders.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useCanvasViable: () => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PayloadConversationWidgetProps } from "../../renderer/conversation-widget-props";
|
|
2
|
+
type ClockConversationWidgetProps = PayloadConversationWidgetProps;
|
|
3
|
+
/**
|
|
4
|
+
* The `Clock` widget: the live time of one place or a world clock of several, from the
|
|
5
|
+
* IANA zone ids and labels the model passes. DATA-COMPLETE without data: the time is computed in the browser every
|
|
6
|
+
* second (`Intl`), nothing is fetched. A zone id the browser does not know is dropped and reported `failed`
|
|
7
|
+
* (`INVALID_PROP`, the dropped ids in the detail) while the other clocks render; a payload without clocks reports
|
|
8
|
+
* `empty`. In the e-mail capture the clocks freeze at the capture moment and an "As of" line names it. Inline only.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ClockConversationWidget: (props: ClockConversationWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ZonedWallClock } from "../shared/clock-time";
|
|
2
|
+
export interface AnalogClockFaceProps {
|
|
3
|
+
wallClock: ZonedWallClock;
|
|
4
|
+
/** The accessible name — the digital time it shows, already formatted. */
|
|
5
|
+
accessibleLabel: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The analog dial of one clock: twelve ticks (the quarters longer), hour and minute hand in the text colour, the second
|
|
9
|
+
* hand and the hub in the call-to-action colour — every colour a theme token, so it flips with the scheme. Purely a
|
|
10
|
+
* picture of the digital time next to it: `role="img"` with that time as its name.
|
|
11
|
+
*/
|
|
12
|
+
export declare const AnalogClockFace: (props: AnalogClockFaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ClockTimeFormat } from "../shared/clock-widget-payload";
|
|
2
|
+
/** One clock ready to render: a zone the browser knows and the place's label. */
|
|
3
|
+
export interface ClockWidgetEntry {
|
|
4
|
+
timeZone: string;
|
|
5
|
+
/** The place — the model's label, or the city derived from the zone id; business content, never translated. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The model's zone abbreviation; undefined → the browser's short zone name. */
|
|
8
|
+
abbreviation?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ClockRowProps {
|
|
11
|
+
clock: ClockWidgetEntry;
|
|
12
|
+
now: Date;
|
|
13
|
+
ownerTimeZone: string;
|
|
14
|
+
timeFormat: ClockTimeFormat;
|
|
15
|
+
language: string;
|
|
16
|
+
dateLocale: string;
|
|
17
|
+
testId?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One place: the digital time as the hero, the place with its zone abbreviation, the day there and the hour difference
|
|
21
|
+
* to the owner's zone, then the date, the UTC offset and day or night; the analog dial on the right.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ClockRow: (props: ClockRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ClockTimeFormat } from "../shared/clock-widget-payload";
|
|
2
|
+
import { type ClockWidgetEntry } from "./ClockRow";
|
|
3
|
+
export interface ClockWidgetProps {
|
|
4
|
+
clocks: ClockWidgetEntry[];
|
|
5
|
+
/** The model's headline, shown as written. */
|
|
6
|
+
title?: string;
|
|
7
|
+
now: Date;
|
|
8
|
+
ownerTimeZone: string;
|
|
9
|
+
timeFormat: ClockTimeFormat;
|
|
10
|
+
language: string;
|
|
11
|
+
dateLocale: string;
|
|
12
|
+
/** Set in an e-mail render: the frozen capture moment the "As of" line names. */
|
|
13
|
+
captureMoment?: string;
|
|
14
|
+
testId?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The presentational clock: one elevated surface, one row per place divided by hairlines (one row = the single clock,
|
|
18
|
+
* several = the world clock), the optional title above and, in an e-mail, the "As of" line below. Knows nothing about
|
|
19
|
+
* payloads or the registry.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ClockWidget: (props: ClockWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DayNightGlyphProps {
|
|
2
|
+
isDaytime: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A sun or a moon (the component library has neither icon) beside the "Day" / "Night" word — decoration only, the word carries the
|
|
6
|
+
* meaning, so the glyph is hidden from assistive technology.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DayNightGlyph: (props: DayNightGlyphProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The time arithmetic of the `Clock` widget — pure functions over a `Date` and IANA zone ids, computed from the
|
|
3
|
+
* browser's own time-zone data (`Intl.DateTimeFormat`), so nothing is fetched and daylight-saving changes come with the
|
|
4
|
+
* browser. Every function is total: an unknown zone is filtered out before (see {@link isKnownTimeZone}).
|
|
5
|
+
*/
|
|
6
|
+
/** One zone's wall clock at one instant. */
|
|
7
|
+
export interface ZonedWallClock {
|
|
8
|
+
year: number;
|
|
9
|
+
month: number;
|
|
10
|
+
day: number;
|
|
11
|
+
hour: number;
|
|
12
|
+
minute: number;
|
|
13
|
+
second: number;
|
|
14
|
+
/** Minutes east of UTC at that instant (Berlin in winter: 60, New York in summer: -240). */
|
|
15
|
+
utcOffsetMinutes: number;
|
|
16
|
+
}
|
|
17
|
+
/** Whether the place there is today, yesterday or tomorrow, seen from the owner's zone. */
|
|
18
|
+
export type ClockRelativeDay = "today" | "yesterday" | "tomorrow";
|
|
19
|
+
/** True when the browser knows the zone — the widget drops (and reports) every other id. */
|
|
20
|
+
export declare const isKnownTimeZone: (timeZone: string) => boolean;
|
|
21
|
+
/** The zone's wall clock at `instant`; the UTC offset is the difference between that wall clock and UTC. */
|
|
22
|
+
export declare const readZonedWallClock: (instant: Date, timeZone: string) => ZonedWallClock;
|
|
23
|
+
/** The calendar day at the clock's place compared with the owner's: one day apart at most (UTC−12 … UTC+14). */
|
|
24
|
+
export declare const readRelativeDay: (clockWallClock: ZonedWallClock, ownerWallClock: ZonedWallClock) => ClockRelativeDay;
|
|
25
|
+
/** `+0`, `+8`, `−5`, `+5:30` — hours (and minutes) the clock's zone is ahead of the owner's. */
|
|
26
|
+
export declare const formatHourDifference: (differenceMinutes: number) => string;
|
|
27
|
+
/** `UTC+1`, `UTC−4`, `UTC+5:30`, and `UTC` for no offset. */
|
|
28
|
+
export declare const formatUtcOffset: (utcOffsetMinutes: number) => string;
|
|
29
|
+
/** The sun is shown from 06:00 to 19:59 local time, the moon otherwise. */
|
|
30
|
+
export declare const isDaytime: (wallClock: ZonedWallClock) => boolean;
|
|
31
|
+
/** The place a zone id names: `America/New_York` → `New York`, `UTC` → `UTC`. */
|
|
32
|
+
export declare const readCityOfTimeZone: (timeZone: string) => string;
|
|
33
|
+
/**
|
|
34
|
+
* The browser's short zone name in the owner's locale (`MEZ`), else in US English (`EDT` — most locales name foreign
|
|
35
|
+
* zones only by offset), or undefined when both know only an offset (`GMT+9`): the UTC offset has its own line anyway.
|
|
36
|
+
*/
|
|
37
|
+
export declare const readZoneAbbreviation: (instant: Date, timeZone: string, locale: string) => string | undefined;
|
|
38
|
+
/** The digital time: `02:58` (24 h, zero-padded) or `2:58` plus the locale's day period (`AM`, `PM`) for 12 h. */
|
|
39
|
+
export declare const formatDigitalTime: (wallClock: ZonedWallClock, timeFormat: "24h" | "12h", instant: Date, timeZone: string, locale: string) => {
|
|
40
|
+
time: string;
|
|
41
|
+
dayPeriod?: string;
|
|
42
|
+
};
|
|
43
|
+
/** The date at the clock's place in the owner's date locale: `So., 26. Okt.` / `Sun, Oct 26`. */
|
|
44
|
+
export declare const formatZonedDate: (instant: Date, timeZone: string, dateLocale: string) => string;
|
|
45
|
+
/** The capture moment of an e-mail render, in the owner's zone and date locale: `26.10.2026, 02:58`. */
|
|
46
|
+
export declare const formatCaptureMoment: (instant: Date, timeZone: string, dateLocale: string, timeFormat: "24h" | "12h") => string;
|
|
47
|
+
/** The angles of the three hands in degrees, clockwise from 12. */
|
|
48
|
+
export declare const readHandAngles: (wallClock: ZonedWallClock) => {
|
|
49
|
+
hour: number;
|
|
50
|
+
minute: number;
|
|
51
|
+
second: number;
|
|
52
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `Clock` payload (DATA-COMPLETE: zone ids and labels only, the time is computed in the browser). The parser is
|
|
3
|
+
* alias-tolerant (weak models rename fields while they write: `tz_name`, `city`, `zones`, …), caps every list and every
|
|
4
|
+
* string, and never throws — malformed JSON gives an empty payload, which the widget reports as `empty`.
|
|
5
|
+
*/
|
|
6
|
+
/** At most this many clocks render; the rest are dropped silently, as every list cap in the widgets. */
|
|
7
|
+
export declare const MAX_CLOCKS = 8;
|
|
8
|
+
export type ClockTimeFormat = "24h" | "12h";
|
|
9
|
+
/** One clock as the model wrote it — the time zone not yet checked against the browser's zone data. */
|
|
10
|
+
export interface ClockPayloadEntry {
|
|
11
|
+
/** The IANA time zone id exactly as written (trimmed): "Europe/Berlin". */
|
|
12
|
+
timeZone: string;
|
|
13
|
+
/** The place in the owner's language; undefined → derived from the zone id. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** The zone abbreviation the model passed ("CET"); undefined → the browser's short zone name. */
|
|
16
|
+
abbreviation?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ClockPayload {
|
|
19
|
+
title?: string;
|
|
20
|
+
timeFormat?: ClockTimeFormat;
|
|
21
|
+
clocks: ClockPayloadEntry[];
|
|
22
|
+
}
|
|
23
|
+
export declare const parseClockPayload: (payload: string | undefined) => ClockPayload;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ClockTimeFormat } from "./clock-widget-payload";
|
|
2
|
+
export interface ClockSettings {
|
|
3
|
+
/** The owner's own zone: the one of the owner settings, else the browser's, else UTC. */
|
|
4
|
+
ownerTimeZone: string;
|
|
5
|
+
/** The owner's language — zone names and the 12 h day period. */
|
|
6
|
+
language: string;
|
|
7
|
+
/** The owner's date locale (`de-DE`) — the date lines. */
|
|
8
|
+
dateLocale: string;
|
|
9
|
+
/** `12h` when the owner settings use AM/PM. */
|
|
10
|
+
ownerTimeFormat: ClockTimeFormat;
|
|
11
|
+
}
|
|
12
|
+
/** The owner's settings come from the app, read defensively: the widget renders in hosts that know only some of them. */
|
|
13
|
+
export declare const useClockSettings: () => ClockSettings;
|
|
14
|
+
/**
|
|
15
|
+
* The current instant, re-read at every full second while `isTicking` — the one timer of the widget, cleared on unmount.
|
|
16
|
+
* Not ticking (the e-mail capture) keeps the instant of the first render: the capture time the "As of" line names.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useClockNow: (isTicking: boolean) => Date;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PayloadConversationWidgetProps } from "../../renderer/conversation-widget-props";
|
|
2
|
+
type ConceptExplainerConversationWidgetProps = PayloadConversationWidgetProps;
|
|
3
|
+
/**
|
|
4
|
+
* The `ConceptExplainer` widget (ChatGPT's LearningViz — as the interaction model): an
|
|
5
|
+
* interactive explanation of how something works for the business, with a slider over the states, a picture per state
|
|
6
|
+
* and a caption. Each explainer TYPE is one `*.concept-explainer.tsx` file in its domain, found by folder glob
|
|
7
|
+
* (`shared/concept-explainer-types.ts`). DATA-COMPLETE and small: the block names the type and, where the type can
|
|
8
|
+
* show the business's own figures, the few numbers it computes from (copied from a read of this conversation) —
|
|
9
|
+
* without them the type shows an illustration that claims no number. The slider and the variants only change local
|
|
10
|
+
* state, so they stay usable on a replay; the e-mail capture shows one step without controls. Reports `empty` for a
|
|
11
|
+
* block without a type, `failed` for an unknown type (nothing shown) or dropped values (the illustration shown).
|
|
12
|
+
*/
|
|
13
|
+
export declare const ConceptExplainerConversationWidget: (props: ConceptExplainerConversationWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConceptExplainerStep, ConceptExplainerTypeDefinition, ConceptExplainerValuesReading, ConceptExplainerVariant } from "../shared/concept-explainer-type";
|
|
2
|
+
/** At most this many steps get a labelled button under the slider; more steps are reached by the slider alone. */
|
|
3
|
+
export declare const MAX_LABELLED_STEPS = 6;
|
|
4
|
+
export interface ConceptExplainerWidgetProps {
|
|
5
|
+
definition: ConceptExplainerTypeDefinition;
|
|
6
|
+
/** The model's headline; undefined → the type's default title. */
|
|
7
|
+
modelTitle?: string;
|
|
8
|
+
valuesReading: ConceptExplainerValuesReading;
|
|
9
|
+
steps: ConceptExplainerStep[];
|
|
10
|
+
stepIndex: number;
|
|
11
|
+
onStepIndexChange: (stepIndex: number) => void;
|
|
12
|
+
variants: ConceptExplainerVariant[];
|
|
13
|
+
variantId: string | undefined;
|
|
14
|
+
onVariantIdChange: (variantId: string) => void;
|
|
15
|
+
languageCode: string;
|
|
16
|
+
/** The static render (the report e-mail capture): the picture of one step, no controls. */
|
|
17
|
+
isStatic: boolean;
|
|
18
|
+
testId?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The ConceptExplainer frame — ChatGPT's LearningViz as the interaction model, our design: one
|
|
22
|
+
* elevated surface with the title, the type's picture on a flat tile, the caption of the current state under it, the
|
|
23
|
+
* variant pills (effect-free, so rounded), the slider over the states with its label and the current state's name,
|
|
24
|
+
* labelled step buttons under the slider, and a footer naming the source and whether the picture carries the
|
|
25
|
+
* business's numbers or is an illustration. Presentational: the outer widget owns the step and the variant.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ConceptExplainerWidget: (props: ConceptExplainerWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/widgets/ConceptExplainerConversationWidget/shared/ConceptExplainerTextView.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Text } from "../../../provider/components";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import type { ConceptExplainerText } from "./concept-explainer-type";
|
|
4
|
+
export type ConceptExplainerTextViewProps = Omit<ComponentProps<typeof Text>, "children" | "translate" | "replacements" | "context"> & {
|
|
5
|
+
text: ConceptExplainerText;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* One translated text of an explainer: the key through the component library's `Text`, its `%placeholders%` from `replacements`, the
|
|
9
|
+
* singular / plural value picked by `context`. Never model text — that goes through `ModelText`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ConceptExplainerTextView: (props: ConceptExplainerTextViewProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-type.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The contract of one ConceptExplainer TYPE. The `ConceptExplainer` widget is a frame — title,
|
|
4
|
+
* the type's picture, the caption of the current state, a slider over the states — and every explainer type is one
|
|
5
|
+
* file `*.concept-explainer.tsx` in the app's domain folder that owns its content, exporting `conceptExplainerType`;
|
|
6
|
+
* the app registers them (`registerConceptExplainerTypes`), and the backend declares each type in a class of its own
|
|
7
|
+
* — no list to edit.
|
|
8
|
+
*/
|
|
9
|
+
/** The numbers and words a type reads from the block's `values` (after its own alias-tolerant reading). */
|
|
10
|
+
export type ConceptExplainerValues = Readonly<Record<string, number | string>>;
|
|
11
|
+
/**
|
|
12
|
+
* A text the frame renders through the component library's `Text`: `key` is a translation key (the English source string), never
|
|
13
|
+
* model text — a model-written word reaches a text only as a `replacements` value the type escaped itself.
|
|
14
|
+
*/
|
|
15
|
+
export interface ConceptExplainerText {
|
|
16
|
+
key: string;
|
|
17
|
+
replacements?: Readonly<Record<string, string | number>>;
|
|
18
|
+
/** Singular / plural of one key (`"one"` default, `"other"` = the key's MANY value). */
|
|
19
|
+
context?: "one" | "other";
|
|
20
|
+
}
|
|
21
|
+
/** One state of the explainer — one position of the slider. */
|
|
22
|
+
export interface ConceptExplainerStep {
|
|
23
|
+
/** Stable id (the payload's `step` may name it to start there). */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Short label of the slider position ("Reviews", "+5"). */
|
|
26
|
+
label: ConceptExplainerText;
|
|
27
|
+
/** The state's name, shown large under the picture (ChatGPT's "New moon"). */
|
|
28
|
+
caption: ConceptExplainerText;
|
|
29
|
+
/** One or two sentences: what changes in this state and why. */
|
|
30
|
+
description: ConceptExplainerText;
|
|
31
|
+
}
|
|
32
|
+
/** One alternative the owner can switch between beside the slider (the star rating of the new reviews). */
|
|
33
|
+
export interface ConceptExplainerVariant {
|
|
34
|
+
id: string;
|
|
35
|
+
label: ConceptExplainerText;
|
|
36
|
+
}
|
|
37
|
+
/** The values as read: the kept values, the problems of the dropped ones, and whether real numbers are present. */
|
|
38
|
+
export interface ConceptExplainerValuesReading {
|
|
39
|
+
values: ConceptExplainerValues;
|
|
40
|
+
/** One short English line per dropped value ("currentAverage 7 is not between 1 and 5") — reported to the model. */
|
|
41
|
+
droppedValueProblems: string[];
|
|
42
|
+
/**
|
|
43
|
+
* False = the picture is an ILLUSTRATION without the business's numbers: the frame says so under the picture, and
|
|
44
|
+
* the type shows no figure it would otherwise have to invent.
|
|
45
|
+
*/
|
|
46
|
+
carriesBlockNumbers: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface ConceptExplainerVisualProps {
|
|
49
|
+
values: ConceptExplainerValues;
|
|
50
|
+
carriesBlockNumbers: boolean;
|
|
51
|
+
steps: ConceptExplainerStep[];
|
|
52
|
+
stepIndex: number;
|
|
53
|
+
variantId: string | undefined;
|
|
54
|
+
/** The owner's language (`de`, `en-GB`) for number formatting. */
|
|
55
|
+
languageCode: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ConceptExplainerStepsInput {
|
|
58
|
+
values: ConceptExplainerValues;
|
|
59
|
+
carriesBlockNumbers: boolean;
|
|
60
|
+
variantId: string | undefined;
|
|
61
|
+
languageCode: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ConceptExplainerTypeDefinition {
|
|
64
|
+
/** The wire id the block names in `explainer` (lower camel, e.g. `rankingFactors`) = the backend `TYPE_ID`. */
|
|
65
|
+
typeId: string;
|
|
66
|
+
/** The title when the block brings none. */
|
|
67
|
+
defaultTitle: ConceptExplainerText;
|
|
68
|
+
/** The sub-line under the title. */
|
|
69
|
+
subtitle: ConceptExplainerText;
|
|
70
|
+
/** The slider's label ("Step", "New reviews"). */
|
|
71
|
+
controlLabel: ConceptExplainerText;
|
|
72
|
+
/** The label of the variant row, when the type has variants. */
|
|
73
|
+
variantLabel?: ConceptExplainerText;
|
|
74
|
+
/** Where the explanation comes from; one line in the footer. */
|
|
75
|
+
sourceLine?: ConceptExplainerText;
|
|
76
|
+
/** The footer line when the picture carries no numbers of the business. */
|
|
77
|
+
illustrationLine: ConceptExplainerText;
|
|
78
|
+
/** The footer line when it does (how the figures were derived). */
|
|
79
|
+
computedLine?: ConceptExplainerText;
|
|
80
|
+
/** Reads the block's `values` — alias-tolerant, never throws. */
|
|
81
|
+
readValues: (rawValues: Readonly<Record<string, unknown>>) => ConceptExplainerValuesReading;
|
|
82
|
+
/** The variants in display order, the first picked at the start; none = no variant row. */
|
|
83
|
+
buildVariants?: (values: ConceptExplainerValues, carriesBlockNumbers: boolean) => ConceptExplainerVariant[];
|
|
84
|
+
buildSteps: (stepsInput: ConceptExplainerStepsInput) => ConceptExplainerStep[];
|
|
85
|
+
/** The step a static render (the report e-mail) shows; default the first. */
|
|
86
|
+
emailStepIndex?: (steps: ConceptExplainerStep[]) => number;
|
|
87
|
+
/** The picture of the current state. */
|
|
88
|
+
Visual: ComponentType<ConceptExplainerVisualProps>;
|
|
89
|
+
}
|
package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ConceptExplainerTypeDefinition } from "./concept-explainer-type";
|
|
2
|
+
export declare const buildConceptExplainerTypeRegistry: (definitions: readonly ConceptExplainerTypeDefinition[]) => Readonly<Record<string, ConceptExplainerTypeDefinition>>;
|
|
3
|
+
/** The type definitions a set of `*.concept-explainer.tsx` modules export (the package's or an app's glob). */
|
|
4
|
+
export declare const readConceptExplainerTypeDefinitions: (modules: Record<string, {
|
|
5
|
+
conceptExplainerType?: ConceptExplainerTypeDefinition;
|
|
6
|
+
}>) => ConceptExplainerTypeDefinition[];
|
|
7
|
+
/** Type id → type: the package's folders, then what an app registers (`registerConceptExplainerTypes`). */
|
|
8
|
+
export declare const conceptExplainerTypes: Record<string, ConceptExplainerTypeDefinition>;
|
|
9
|
+
/** Adds an app's ConceptExplainer types. Runs outside React, before the first render; a type id registers once. */
|
|
10
|
+
export declare const registerConceptExplainerTypes: (definitions: readonly ConceptExplainerTypeDefinition[]) => void;
|
|
11
|
+
/** `rankingFactors`, `RankingFactors`, `ranking_factors` and `ranking-factors` all read as `rankingfactors`. */
|
|
12
|
+
export declare const normalizeConceptExplainerTypeId: (typeId: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* The registered type of an id — exact first, then ignoring case, `_` and `-` (a model writes `RankingFactors` or
|
|
15
|
+
* `ranking_factors`; the backend's `ConceptExplainerTypes::findTypeClass()` applies the same rule); else undefined.
|
|
16
|
+
*/
|
|
17
|
+
export declare const findConceptExplainerType: (typeId: string, registry?: Readonly<Record<string, ConceptExplainerTypeDefinition>>) => ConceptExplainerTypeDefinition | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ConceptExplainer` payload — DATA-COMPLETE and small: which explainer, an optional title,
|
|
3
|
+
* the few numbers the type may show (copied from a read of this conversation) and an optional start step. Alias-
|
|
4
|
+
* tolerant (weak models rename fields, and ChatGPT's own LearningViz writes `type_id` inside `parameters`), capped,
|
|
5
|
+
* never throws: a payload that is not JSON reads as the empty shape.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConceptExplainerPayload {
|
|
8
|
+
/** The explainer type id as written (`rankingFactors`); "" when the payload names none. */
|
|
9
|
+
explainer: string;
|
|
10
|
+
/** The headline in the owner's language, model-written; undefined → the type's default title. */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** The raw values for the type to read — every key kept as written, scalars only. */
|
|
13
|
+
values: Readonly<Record<string, unknown>>;
|
|
14
|
+
/** The step id or index to start at; undefined → the first step. */
|
|
15
|
+
step?: string | number;
|
|
16
|
+
}
|
|
17
|
+
/** The backend's `ConceptExplainerConversationWidget::MAX_TITLE_LENGTH`. */
|
|
18
|
+
export declare const MAX_TITLE_LENGTH = 160;
|
|
19
|
+
/** The backend's `ConceptExplainerConversationWidget::MAX_VALUES`. */
|
|
20
|
+
export declare const MAX_VALUES = 20;
|
|
21
|
+
export declare const parseConceptExplainerPayload: (payload: string | undefined) => ConceptExplainerPayload;
|
|
22
|
+
/** Reads a finite number from a value the model wrote as a number or a numeric string (`"4,3"` included). */
|
|
23
|
+
export declare const readConceptExplainerNumber: (value: unknown) => number | undefined;
|
|
24
|
+
/** The first value present under one of the aliases. */
|
|
25
|
+
export declare const readConceptExplainerValue: (rawValues: Readonly<Record<string, unknown>>, aliases: readonly string[]) => unknown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The owner's language for the numbers an explainer formats, from the app (`useOwnerSettings`). Read defensively — the
|
|
3
|
+
* widget renders in hosts that know no language (the e-mail capture, the preview, a spec), and there the browser's
|
|
4
|
+
* language stands in.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useConceptExplainerLanguage: () => string;
|
|
7
|
+
/** A number in the owner's language with a fixed count of decimals (`4,3` in German, `4.3` in English). */
|
|
8
|
+
export declare const formatConceptExplainerNumber: (value: number, decimals: number, languageCode: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { parseConversationSearchResultsPayload } from "./shared/conversation-search-results-widget-payload";
|
|
2
|
+
type ConversationSearchResultsCanvasProps = {
|
|
3
|
+
query: string;
|
|
4
|
+
groups: ReturnType<typeof parseConversationSearchResultsPayload>["groups"];
|
|
5
|
+
onOpenConversation: (conversationId: number, messageId?: number) => void;
|
|
6
|
+
};
|
|
7
|
+
/** The canvas body — a titled wrapper around the same grouped results, scrollable + inset like the other canvas widgets. */
|
|
8
|
+
export declare const ConversationSearchResultsCanvas: (props: ConversationSearchResultsCanvasProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CanvasBodyProps } from "../../renderer/canvas/canvas-body-props";
|
|
2
|
+
/**
|
|
3
|
+
* The `conversationSearchResults` CANVAS BODY (`canvasBodies.tsx`): re-reads the `ConversationSearchResults` fence of
|
|
4
|
+
* the anchor message — the same payload the inline widget rendered from — and shows the grouped results. Nothing was
|
|
5
|
+
* stored for it but the pointer. Renders nothing when the anchor message no longer carries the fence.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ConversationSearchResultsCanvasBody: ({ canvas, anchorMessageMarkdown }: CanvasBodyProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PayloadConversationWidgetProps } from "../../renderer/conversation-widget-props";
|
|
2
|
+
type ConversationSearchResultsConversationWidgetProps = PayloadConversationWidgetProps;
|
|
3
|
+
/**
|
|
4
|
+
* Renders the result of `searchConversations` (cross-chat semantic recall) — the grouped "search all my chats" view
|
|
5
|
+
* (the replaceable `ConversationSearchResultsList`; the app supplies the component its chat's own search panel uses). DATA-COMPLETE: it
|
|
6
|
+
* renders entirely from the payload the agent passes (query + grouped hits); it NEVER re-runs the search.
|
|
7
|
+
*
|
|
8
|
+
* Few groups → inline in the message; many → opens in the canvas side panel (or whatever `display` forces). The
|
|
9
|
+
* open-conversation arrow jumps to the source chat via the widget context's `onOpenConversation` seam.
|
|
10
|
+
*
|
|
11
|
+
* The canvas is `conversationSearchResults`: the body (`ConversationSearchResultsCanvasBody`) re-reads this payload
|
|
12
|
+
* from the anchor message. Without a message id (a composer echo, a streaming reply) the card opens nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ConversationSearchResultsConversationWidget: (props: ConversationSearchResultsConversationWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One matched message inside a conversation group — the fields the search results list renders
|
|
3
|
+
* (`ConversationSearchResultsList`, a replaceable component).
|
|
4
|
+
*/
|
|
5
|
+
export interface ConversationSearchResultHit {
|
|
6
|
+
role?: string;
|
|
7
|
+
excerpt?: string;
|
|
8
|
+
indexInConversation?: number;
|
|
9
|
+
messageId?: number;
|
|
10
|
+
created?: string;
|
|
11
|
+
updated?: string;
|
|
12
|
+
dateTime?: string;
|
|
13
|
+
}
|
|
14
|
+
/** One conversation's worth of matches. */
|
|
15
|
+
export interface ConversationSearchResultGroup {
|
|
16
|
+
conversationId?: number;
|
|
17
|
+
title?: string;
|
|
18
|
+
summary?: string;
|
|
19
|
+
created?: string;
|
|
20
|
+
updated?: string;
|
|
21
|
+
dateTime?: string;
|
|
22
|
+
hits: ConversationSearchResultHit[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Payload carried by `::ConversationSearchResults{payload='...'}` — the result of `searchConversations`.
|
|
26
|
+
*
|
|
27
|
+
* DATA-COMPLETE: the widget renders ENTIRELY from this payload — it never re-runs the search or fetches anything
|
|
28
|
+
* (unlike a self-hydrating widget that reads its rows by id). The agent copies the `query` + the grouped `groups` from
|
|
29
|
+
* the `searchConversations` tool result straight into here.
|
|
30
|
+
*
|
|
31
|
+
* `display` lets the agent force inline vs canvas; omitted → the widget auto-picks (few groups inline, many in the
|
|
32
|
+
* canvas side panel).
|
|
33
|
+
*/
|
|
34
|
+
export interface ConversationSearchResultsPayload {
|
|
35
|
+
query: string;
|
|
36
|
+
/** The LLM-written headline for the canvas card (e.g. "Past chats about Facebook"); falls back to the query. */
|
|
37
|
+
title?: string;
|
|
38
|
+
display?: "inline" | "canvas";
|
|
39
|
+
/** The matched conversations, as the search results list takes them. */
|
|
40
|
+
groups: ConversationSearchResultGroup[];
|
|
41
|
+
}
|
|
42
|
+
export declare const parseConversationSearchResultsPayload: (payload: string | undefined) => ConversationSearchResultsPayload;
|