@redocly/theme 0.70.0-next.1 → 0.70.0-next.11
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/lib/components/Buttons/ConnectMCPButton.js +19 -14
- package/lib/components/Buttons/variables.d.ts +1 -0
- package/lib/components/Buttons/variables.js +4 -1
- package/lib/components/Catalog/Catalog.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +30 -11
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +2 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +3 -5
- package/lib/components/Consent/Consent.d.ts +2 -0
- package/lib/components/Consent/Consent.js +17 -0
- package/lib/components/Consent/ConsentBanner.d.ts +2 -0
- package/lib/components/Consent/ConsentBanner.js +120 -0
- package/lib/components/Consent/ConsentDialog.d.ts +2 -0
- package/lib/components/Consent/ConsentDialog.js +128 -0
- package/lib/components/Consent/ConsentSettingsLink.d.ts +2 -0
- package/lib/components/Consent/ConsentSettingsLink.js +35 -0
- package/lib/components/Consent/variables.d.ts +1 -0
- package/lib/components/Consent/variables.js +31 -0
- package/lib/components/Dropdown/Dropdown.d.ts +4 -2
- package/lib/components/Dropdown/Dropdown.js +31 -9
- package/lib/components/Dropdown/DropdownMenu.d.ts +1 -0
- package/lib/components/Dropdown/DropdownMenu.js +1 -1
- package/lib/components/Feedback/Reasons.js +3 -2
- package/lib/components/Filter/FilterCheckboxes.js +30 -11
- package/lib/components/Filter/FilterDateRange.js +36 -2
- package/lib/components/Footer/Footer.js +4 -1
- package/lib/components/Image/Image.js +24 -4
- package/lib/components/JsonViewer/Helpers.d.ts +10 -2
- package/lib/components/JsonViewer/Helpers.js +32 -36
- package/lib/components/JsonViewer/JsonViewer.js +15 -18
- package/lib/components/LoadProgressBar/LoadProgressBar.d.ts +8 -0
- package/lib/components/LoadProgressBar/LoadProgressBar.js +122 -0
- package/lib/components/MCP/McpConnectionTabs.js +9 -2
- package/lib/components/Markdown/Markdown.js +3 -2
- package/lib/components/Markdown/styles/base-table.js +14 -1
- package/lib/components/Markdown/variables.js +1 -0
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/MenuSelect.d.ts +7 -0
- package/lib/components/Menu/MenuSelect.js +129 -0
- package/lib/components/Menu/variables.js +43 -4
- package/lib/components/Navbar/Navbar.js +44 -5
- package/lib/components/Navbar/variables.js +3 -0
- package/lib/components/NavigationTabs/NavigationTab.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTab.js +93 -0
- package/lib/components/NavigationTabs/NavigationTabContent.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabContent.js +50 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.js +18 -0
- package/lib/components/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabs.js +97 -0
- package/lib/components/NavigationTabs/variables.d.ts +1 -0
- package/lib/components/NavigationTabs/variables.js +37 -0
- package/lib/components/Portal/Portal.js +37 -5
- package/lib/components/Product/utils.js +1 -1
- package/lib/components/Search/SearchAiActionButtons.js +8 -3
- package/lib/components/Search/SearchAiActivity.d.ts +10 -0
- package/lib/components/Search/SearchAiActivity.js +278 -0
- package/lib/components/Search/SearchAiConversationInput.js +10 -6
- package/lib/components/Search/SearchAiDialog.js +13 -2
- package/lib/components/Search/SearchAiMessage.d.ts +2 -1
- package/lib/components/Search/SearchAiMessage.js +21 -109
- package/lib/components/Search/SearchAiResponse.js +1 -0
- package/lib/components/Search/SearchDialog.js +10 -0
- package/lib/components/Search/SearchItem.js +11 -10
- package/lib/components/Search/SearchTrigger.js +37 -6
- package/lib/components/Search/variables.js +17 -2
- package/lib/components/Segmented/Segmented.js +23 -3
- package/lib/components/Select/Select.js +10 -3
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +5 -11
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/SplitButton/SplitButton.js +37 -3
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +1 -0
- package/lib/core/constants/consent.d.ts +2 -0
- package/lib/core/constants/consent.js +30 -0
- package/lib/core/constants/index.d.ts +2 -0
- package/lib/core/constants/index.js +2 -0
- package/lib/core/constants/mcp.d.ts +2 -2
- package/lib/core/constants/mcp.js +3 -8
- package/lib/core/constants/prompt.d.ts +9 -0
- package/lib/core/constants/prompt.js +33 -0
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/constants/search.js +6 -2
- package/lib/core/contexts/PortalContainerContext.d.ts +2 -0
- package/lib/core/contexts/PortalContainerContext.js +7 -0
- package/lib/core/hooks/code-walkthrough/use-code-panel.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +1 -2
- package/lib/core/hooks/code-walkthrough/use-renderable-files.d.ts +1 -1
- package/lib/core/hooks/index.d.ts +9 -0
- package/lib/core/hooks/index.js +9 -0
- package/lib/core/hooks/menu/use-collapse.js +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.js +75 -51
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +12 -7
- package/lib/core/hooks/prompt/use-prompt-actions.d.ts +7 -0
- package/lib/core/hooks/prompt/use-prompt-actions.js +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.d.ts +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.js +35 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.d.ts +21 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.js +92 -0
- package/lib/core/hooks/search/use-search-ai-activity.d.ts +11 -0
- package/lib/core/hooks/search/use-search-ai-activity.js +15 -0
- package/lib/core/hooks/use-connect-mcp-button.js +3 -1
- package/lib/core/hooks/use-consent-dialog.d.ts +12 -0
- package/lib/core/hooks/use-consent-dialog.js +36 -0
- package/lib/core/hooks/use-consent-telemetry.d.ts +1 -0
- package/lib/core/hooks/use-consent-telemetry.js +42 -0
- package/lib/core/hooks/use-dialog-hotkeys.js +4 -2
- package/lib/core/hooks/use-full-height.d.ts +1 -1
- package/lib/core/hooks/use-full-height.js +8 -8
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +10 -8
- package/lib/core/hooks/use-pointer-border-highlight.d.ts +7 -0
- package/lib/core/hooks/use-pointer-border-highlight.js +29 -0
- package/lib/core/hooks/use-scroll-item-into-view.d.ts +2 -0
- package/lib/core/hooks/use-scroll-item-into-view.js +16 -0
- package/lib/core/hooks/use-tab-list.d.ts +31 -0
- package/lib/core/hooks/use-tab-list.js +49 -0
- package/lib/core/hooks/use-telemetry-fallback.d.ts +2 -0
- package/lib/core/hooks/use-telemetry-fallback.js +2 -0
- package/lib/core/hooks/use-theme-hooks.js +16 -0
- package/lib/core/styles/dark.js +14 -12
- package/lib/core/styles/global.d.ts +2 -0
- package/lib/core/styles/global.js +115 -136
- package/lib/core/styles/index.d.ts +1 -0
- package/lib/core/styles/index.js +3 -1
- package/lib/core/styles/search-ai-appear.d.ts +1 -0
- package/lib/core/styles/search-ai-appear.js +18 -0
- package/lib/core/types/code-walkthrough.d.ts +84 -0
- package/lib/core/types/consent.d.ts +54 -0
- package/lib/core/types/consent.js +3 -0
- package/lib/core/types/dropdown.d.ts +1 -0
- package/lib/core/types/dropdown.js +3 -0
- package/lib/core/types/hooks.d.ts +8 -1
- package/lib/core/types/index.d.ts +4 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/mcp.d.ts +3 -2
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/types/prompt.d.ts +9 -0
- package/lib/core/types/prompt.js +3 -0
- package/lib/core/types/search.d.ts +25 -0
- package/lib/core/utils/Dynamic.d.ts +8 -1
- package/lib/core/utils/Dynamic.js +34 -3
- package/lib/core/utils/assign-ref.d.ts +2 -0
- package/lib/core/utils/assign-ref.js +12 -0
- package/lib/core/utils/consent-settings-link-placement.d.ts +3 -0
- package/lib/core/utils/consent-settings-link-placement.js +15 -0
- package/lib/core/utils/content-segments.d.ts +12 -1
- package/lib/core/utils/content-segments.js +90 -5
- package/lib/core/utils/download-code-walkthrough.d.ts +1 -1
- package/lib/core/utils/dropdown.d.ts +2 -0
- package/lib/core/utils/dropdown.js +12 -0
- package/lib/core/utils/get-ai-prompt-link.d.ts +15 -0
- package/lib/core/utils/get-ai-prompt-link.js +29 -0
- package/lib/core/utils/get-code-walkthrough-file-text.d.ts +1 -1
- package/lib/core/utils/index.d.ts +5 -0
- package/lib/core/utils/index.js +5 -0
- package/lib/core/utils/match-code-walkthrough-conditions.d.ts +1 -1
- package/lib/core/utils/mcp.d.ts +2 -1
- package/lib/core/utils/mcp.js +13 -3
- package/lib/core/utils/menu.d.ts +4 -0
- package/lib/core/utils/menu.js +48 -8
- package/lib/core/utils/navigation-tabs.d.ts +8 -0
- package/lib/core/utils/navigation-tabs.js +71 -0
- package/lib/core/utils/search-ai-activity.d.ts +4 -0
- package/lib/core/utils/search-ai-activity.js +83 -0
- package/lib/core/utils/urls.js +3 -1
- package/lib/core/utils/with-load-progress.d.ts +3 -0
- package/lib/core/utils/with-load-progress.js +24 -19
- package/lib/ext/configure.d.ts +1 -1
- package/lib/ext/configure.js +0 -1
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.d.ts +29 -0
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.js +81 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.d.ts +12 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.js +41 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +9 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/lib/markdoc/components/Prompt/Prompt.d.ts +15 -0
- package/lib/markdoc/components/Prompt/Prompt.js +163 -0
- package/lib/markdoc/components/Prompt/PromptActions.d.ts +13 -0
- package/lib/markdoc/components/Prompt/PromptActions.js +43 -0
- package/lib/markdoc/components/Prompt/PromptBody.d.ts +14 -0
- package/lib/markdoc/components/Prompt/PromptBody.js +99 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.d.ts +10 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.js +28 -0
- package/lib/markdoc/components/Prompt/PromptHeader.d.ts +9 -0
- package/lib/markdoc/components/Prompt/PromptHeader.js +57 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.js +21 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.js +28 -0
- package/lib/markdoc/components/Prompt/variables.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.js +8 -0
- package/lib/markdoc/components/Prompt/variables.js +44 -0
- package/lib/markdoc/components/Tabs/TabList.js +8 -6
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +2 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/connect-mcp.js +15 -0
- package/lib/markdoc/tags/prompt.d.ts +2 -0
- package/lib/markdoc/tags/prompt.js +56 -0
- package/package.json +4 -8
- package/src/components/Buttons/ConnectMCPButton.tsx +21 -16
- package/src/components/Buttons/variables.ts +4 -0
- package/src/components/Catalog/Catalog.tsx +6 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +3 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +37 -22
- package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +3 -2
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -2
- package/src/components/CodeBlock/CodeBlockControls.tsx +4 -7
- package/src/components/Consent/Consent.tsx +18 -0
- package/src/components/Consent/ConsentBanner.tsx +110 -0
- package/src/components/Consent/ConsentDialog.tsx +210 -0
- package/src/components/Consent/ConsentSettingsLink.tsx +44 -0
- package/src/components/Consent/variables.ts +28 -0
- package/src/components/Dropdown/Dropdown.tsx +32 -7
- package/src/components/Dropdown/DropdownMenu.tsx +7 -1
- package/src/components/Feedback/Reasons.tsx +3 -2
- package/src/components/Filter/FilterCheckboxes.tsx +33 -18
- package/src/components/Filter/FilterDateRange.tsx +3 -2
- package/src/components/Footer/Footer.tsx +2 -0
- package/src/components/Image/Image.tsx +26 -5
- package/src/components/JsonViewer/Helpers.tsx +51 -54
- package/src/components/JsonViewer/JsonViewer.tsx +23 -25
- package/src/components/LoadProgressBar/LoadProgressBar.tsx +113 -0
- package/src/components/MCP/McpConnectionTabs.tsx +22 -5
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/Markdown/styles/base-table.ts +14 -1
- package/src/components/Markdown/variables.ts +1 -0
- package/src/components/Menu/Menu.tsx +5 -0
- package/src/components/Menu/MenuSelect.tsx +198 -0
- package/src/components/Menu/variables.ts +43 -4
- package/src/components/Navbar/Navbar.tsx +22 -5
- package/src/components/Navbar/variables.ts +3 -0
- package/src/components/NavigationTabs/NavigationTab.tsx +148 -0
- package/src/components/NavigationTabs/NavigationTabContent.tsx +66 -0
- package/src/components/NavigationTabs/NavigationTabMenu.tsx +40 -0
- package/src/components/NavigationTabs/NavigationTabs.tsx +83 -0
- package/src/components/NavigationTabs/variables.ts +34 -0
- package/src/components/Portal/Portal.tsx +4 -2
- package/src/components/Product/utils.ts +1 -1
- package/src/components/Search/SearchAiActionButtons.tsx +31 -19
- package/src/components/Search/SearchAiActivity.tsx +318 -0
- package/src/components/Search/SearchAiConversationInput.tsx +13 -7
- package/src/components/Search/SearchAiDialog.tsx +20 -4
- package/src/components/Search/SearchAiMessage.tsx +28 -136
- package/src/components/Search/SearchAiResponse.tsx +1 -0
- package/src/components/Search/SearchDialog.tsx +11 -0
- package/src/components/Search/SearchItem.tsx +19 -10
- package/src/components/Search/SearchTrigger.tsx +47 -3
- package/src/components/Search/variables.ts +17 -2
- package/src/components/Segmented/Segmented.tsx +25 -16
- package/src/components/Select/Select.tsx +12 -6
- package/src/components/Select/SelectInput.tsx +10 -18
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/SplitButton/SplitButton.tsx +8 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/core/constants/common.ts +1 -0
- package/src/core/constants/consent.ts +29 -0
- package/src/core/constants/index.ts +2 -0
- package/src/core/constants/mcp.ts +3 -9
- package/src/core/constants/prompt.ts +34 -0
- package/src/core/constants/search.ts +6 -2
- package/src/core/contexts/PortalContainerContext.tsx +4 -0
- package/src/core/hooks/__mocks__/index.ts +5 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +20 -0
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -2
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -2
- package/src/core/hooks/code-walkthrough/use-code-panel.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +2 -2
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +1 -1
- package/src/core/hooks/index.ts +9 -0
- package/src/core/hooks/menu/use-collapse.ts +1 -1
- package/src/core/hooks/menu/use-mobile-menu-items.ts +91 -56
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +14 -6
- package/src/core/hooks/prompt/use-prompt-actions.ts +28 -0
- package/src/core/hooks/prompt/use-prompt-text-limit.ts +59 -0
- package/src/core/hooks/search/use-persisted-quick-filter.ts +125 -0
- package/src/core/hooks/search/use-search-ai-activity.ts +31 -0
- package/src/core/hooks/use-connect-mcp-button.ts +13 -2
- package/src/core/hooks/use-consent-dialog.ts +51 -0
- package/src/core/hooks/use-consent-telemetry.ts +56 -0
- package/src/core/hooks/use-dialog-hotkeys.ts +11 -5
- package/src/core/hooks/use-full-height.ts +8 -8
- package/src/core/hooks/use-page-actions.ts +21 -9
- package/src/core/hooks/use-pointer-border-highlight.ts +46 -0
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-tab-list.ts +63 -0
- package/src/core/hooks/use-telemetry-fallback.ts +2 -0
- package/src/core/hooks/use-theme-hooks.ts +16 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +96 -116
- package/src/core/styles/index.ts +2 -1
- package/src/core/styles/search-ai-appear.ts +16 -0
- package/src/core/types/code-walkthrough.ts +103 -0
- package/src/core/types/consent.ts +51 -0
- package/src/core/types/dropdown.ts +1 -0
- package/src/core/types/hooks.ts +8 -0
- package/src/core/types/index.ts +4 -0
- package/src/core/types/l10n.ts +46 -2
- package/src/core/types/mcp.ts +4 -2
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/types/prompt.ts +11 -0
- package/src/core/types/search.ts +23 -0
- package/src/core/utils/Dynamic.tsx +67 -35
- package/src/core/utils/assign-ref.ts +9 -0
- package/src/core/utils/consent-settings-link-placement.ts +18 -0
- package/src/core/utils/content-segments.ts +98 -6
- package/src/core/utils/download-code-walkthrough.ts +1 -1
- package/src/core/utils/dropdown.ts +14 -0
- package/src/core/utils/get-ai-prompt-link.ts +30 -0
- package/src/core/utils/get-code-walkthrough-file-text.ts +1 -1
- package/src/core/utils/index.ts +5 -0
- package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
- package/src/core/utils/mcp.ts +16 -4
- package/src/core/utils/menu.ts +54 -9
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/core/utils/search-ai-activity.ts +110 -0
- package/src/core/utils/urls.ts +3 -1
- package/src/core/utils/with-load-progress.ts +23 -18
- package/src/ext/configure.ts +1 -1
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +1 -0
- package/src/icons/ChevronSortIcon/ChevronSortIcon.tsx +1 -0
- package/src/icons/ExpandCollapseIcon/ExpandCollapseIcon.tsx +56 -0
- package/src/icons/LinkIcon/LinkIconSymbol.tsx +51 -0
- package/src/index.ts +8 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelToolbar.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -2
- package/src/markdoc/components/Prompt/Prompt.tsx +219 -0
- package/src/markdoc/components/Prompt/PromptActions.tsx +104 -0
- package/src/markdoc/components/Prompt/PromptBody.tsx +107 -0
- package/src/markdoc/components/Prompt/PromptCopyButton.tsx +73 -0
- package/src/markdoc/components/Prompt/PromptHeader.tsx +81 -0
- package/src/markdoc/components/Prompt/PromptShowHideButton.tsx +43 -0
- package/src/markdoc/components/Prompt/PromptToggleLabel.tsx +41 -0
- package/src/markdoc/components/Prompt/variables.dark.ts +5 -0
- package/src/markdoc/components/Prompt/variables.ts +41 -0
- package/src/markdoc/components/Tabs/TabList.tsx +9 -12
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/code-walkthrough.ts +1 -1
- package/src/markdoc/tags/connect-mcp.ts +16 -1
- package/src/markdoc/tags/prompt.ts +58 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import React, { useId, useState, type ComponentType, type JSX } from 'react';
|
|
2
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { ToolCall, SearchAiActivityKind } from '@redocly/theme/core/types';
|
|
5
|
+
import type { IconProps } from '@redocly/theme/icons/types';
|
|
6
|
+
|
|
7
|
+
import { useSearchAiActivity } from '@redocly/theme/core/hooks';
|
|
8
|
+
import { searchAiAppearAnimation } from '@redocly/theme/core/styles';
|
|
9
|
+
import { AiStarsIcon } from '@redocly/theme/icons/AiStarsIcon/AiStarsIcon';
|
|
10
|
+
import { ChatIcon } from '@redocly/theme/icons/ChatIcon/ChatIcon';
|
|
11
|
+
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
12
|
+
import { CodeIcon } from '@redocly/theme/icons/CodeIcon/CodeIcon';
|
|
13
|
+
import { SearchIcon } from '@redocly/theme/icons/SearchIcon/SearchIcon';
|
|
14
|
+
|
|
15
|
+
const ACTIVITY_KIND_ICONS: Record<SearchAiActivityKind, ComponentType<IconProps>> = {
|
|
16
|
+
thinking: AiStarsIcon,
|
|
17
|
+
search: SearchIcon,
|
|
18
|
+
support: ChatIcon,
|
|
19
|
+
code: CodeIcon,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type SearchAiActivityProps = {
|
|
23
|
+
/** One run of consecutive tool calls; an empty list means the assistant has not called a tool yet. */
|
|
24
|
+
toolCalls: ToolCall[];
|
|
25
|
+
/** The assistant works on this group now; once it moves on, a call without a result counts as finished. */
|
|
26
|
+
isActive: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export function SearchAiActivity({
|
|
31
|
+
toolCalls,
|
|
32
|
+
isActive,
|
|
33
|
+
className,
|
|
34
|
+
}: SearchAiActivityProps): JSX.Element {
|
|
35
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
36
|
+
const listId = useId();
|
|
37
|
+
const { status, steps } = useSearchAiActivity({ toolCalls, isActive });
|
|
38
|
+
const StatusIcon = ACTIVITY_KIND_ICONS[status.kind];
|
|
39
|
+
|
|
40
|
+
const header = (
|
|
41
|
+
<>
|
|
42
|
+
<IconWrapper aria-hidden>
|
|
43
|
+
<StatusIcon size="var(--search-ai-activity-icon-size)" />
|
|
44
|
+
</IconWrapper>
|
|
45
|
+
<StatusLabel
|
|
46
|
+
key={`${status.label}${status.detail ?? ''}`}
|
|
47
|
+
title={status.detail ? `${status.label} “${status.detail}”` : status.label}
|
|
48
|
+
$isRunning={status.isRunning}
|
|
49
|
+
>
|
|
50
|
+
{status.label}
|
|
51
|
+
{status.detail && <StatusDetail> “{status.detail}”</StatusDetail>}
|
|
52
|
+
</StatusLabel>
|
|
53
|
+
{steps.length > 1 && (
|
|
54
|
+
<>
|
|
55
|
+
{' '}
|
|
56
|
+
<ToolCallCount>{steps.length}</ToolCallCount>
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
59
|
+
{steps.length > 0 && (
|
|
60
|
+
<ExpandIcon size="var(--search-ai-activity-icon-size)" $isExpanded={isExpanded} />
|
|
61
|
+
)}
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<SearchAiActivityWrapper
|
|
67
|
+
data-component-name="Search/SearchAiActivity"
|
|
68
|
+
data-testid="tool-calls-info"
|
|
69
|
+
className={className}
|
|
70
|
+
>
|
|
71
|
+
{steps.length > 0 ? (
|
|
72
|
+
<>
|
|
73
|
+
<HeaderButton
|
|
74
|
+
type="button"
|
|
75
|
+
aria-expanded={isExpanded}
|
|
76
|
+
aria-controls={listId}
|
|
77
|
+
onClick={() => setIsExpanded((expanded) => !expanded)}
|
|
78
|
+
>
|
|
79
|
+
{header}
|
|
80
|
+
</HeaderButton>
|
|
81
|
+
<StepsWrapper id={listId} $isExpanded={isExpanded}>
|
|
82
|
+
<StepList>
|
|
83
|
+
{steps.map((step) => {
|
|
84
|
+
const StepIcon = ACTIVITY_KIND_ICONS[step.kind];
|
|
85
|
+
return (
|
|
86
|
+
<StepItem key={step.id}>
|
|
87
|
+
<StepIconWrapper aria-hidden>
|
|
88
|
+
<StepIcon size="var(--search-ai-activity-icon-size)" />
|
|
89
|
+
</StepIconWrapper>
|
|
90
|
+
<StepText $isRunning={step.isRunning && isExpanded}>{step.label}</StepText>
|
|
91
|
+
</StepItem>
|
|
92
|
+
);
|
|
93
|
+
})}
|
|
94
|
+
</StepList>
|
|
95
|
+
</StepsWrapper>
|
|
96
|
+
</>
|
|
97
|
+
) : (
|
|
98
|
+
<HeaderWrapper>{header}</HeaderWrapper>
|
|
99
|
+
)}
|
|
100
|
+
</SearchAiActivityWrapper>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const labelIn = keyframes`
|
|
105
|
+
from {
|
|
106
|
+
opacity: 0.35;
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
|
|
110
|
+
const shimmerSweep = keyframes`
|
|
111
|
+
from {
|
|
112
|
+
background-position: 100% 0;
|
|
113
|
+
}
|
|
114
|
+
to {
|
|
115
|
+
background-position: 0 0;
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
const shimmer = css`
|
|
120
|
+
@supports (background-clip: text) or (-webkit-background-clip: text) {
|
|
121
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
122
|
+
background:
|
|
123
|
+
linear-gradient(
|
|
124
|
+
90deg,
|
|
125
|
+
transparent 0%,
|
|
126
|
+
transparent 40%,
|
|
127
|
+
var(--search-ai-activity-shimmer-color) 50%,
|
|
128
|
+
transparent 60%,
|
|
129
|
+
transparent 100%
|
|
130
|
+
)
|
|
131
|
+
100% 0 / 250% 100% no-repeat,
|
|
132
|
+
linear-gradient(currentColor, currentColor);
|
|
133
|
+
-webkit-background-clip: text;
|
|
134
|
+
background-clip: text;
|
|
135
|
+
-webkit-text-fill-color: transparent;
|
|
136
|
+
animation:
|
|
137
|
+
${labelIn} var(--search-ai-activity-fade-duration) ease-out,
|
|
138
|
+
${shimmerSweep} var(--search-ai-activity-shimmer-duration) linear
|
|
139
|
+
infinite;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
|
|
144
|
+
const SearchAiActivityWrapper = styled.div`
|
|
145
|
+
font-size: var(--search-ai-activity-font-size);
|
|
146
|
+
line-height: var(--search-ai-activity-line-height);
|
|
147
|
+
color: var(--search-ai-activity-text-color);
|
|
148
|
+
`;
|
|
149
|
+
|
|
150
|
+
const headerStyles = css`
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
gap: var(--spacing-xs);
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
min-height: var(--search-ai-activity-line-height);
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
const HeaderWrapper = styled.div`
|
|
160
|
+
${headerStyles}
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
const HeaderButton = styled.button`
|
|
164
|
+
${headerStyles}
|
|
165
|
+
margin: 0;
|
|
166
|
+
padding: 0;
|
|
167
|
+
border: 0;
|
|
168
|
+
border-radius: var(--border-radius);
|
|
169
|
+
background: none;
|
|
170
|
+
font: inherit;
|
|
171
|
+
color: inherit;
|
|
172
|
+
text-align: start;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
transition: color var(--search-ai-activity-fade-duration) ease-out;
|
|
175
|
+
|
|
176
|
+
&:hover {
|
|
177
|
+
color: var(--search-ai-activity-text-color-hover);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:focus-visible {
|
|
181
|
+
outline: 2px solid var(--button-border-color-focused);
|
|
182
|
+
outline-offset: 2px;
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
185
|
+
|
|
186
|
+
const IconWrapper = styled.span`
|
|
187
|
+
display: inline-flex;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
width: var(--search-ai-activity-icon-size);
|
|
190
|
+
height: var(--search-ai-activity-icon-size);
|
|
191
|
+
`;
|
|
192
|
+
|
|
193
|
+
const StatusLabel = styled.span<{ $isRunning: boolean }>`
|
|
194
|
+
min-width: 0;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
text-overflow: ellipsis;
|
|
197
|
+
font-weight: var(--font-weight-regular);
|
|
198
|
+
animation: ${labelIn} var(--search-ai-activity-fade-duration) ease-out;
|
|
199
|
+
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
animation: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
${({ $isRunning }) => $isRunning && shimmer}
|
|
205
|
+
`;
|
|
206
|
+
|
|
207
|
+
const StatusDetail = styled.span`
|
|
208
|
+
color: var(--search-ai-activity-detail-color);
|
|
209
|
+
`;
|
|
210
|
+
|
|
211
|
+
const ToolCallCount = styled.span`
|
|
212
|
+
flex-shrink: 0;
|
|
213
|
+
min-width: calc(var(--search-ai-activity-line-height) - 4px);
|
|
214
|
+
padding: 0 var(--spacing-xxs);
|
|
215
|
+
border-radius: calc(var(--search-ai-activity-line-height) / 2);
|
|
216
|
+
background: var(--search-ai-activity-count-bg-color);
|
|
217
|
+
font-size: var(--search-ai-activity-count-font-size);
|
|
218
|
+
line-height: calc(var(--search-ai-activity-line-height) - 4px);
|
|
219
|
+
font-variant-numeric: tabular-nums;
|
|
220
|
+
text-align: center;
|
|
221
|
+
`;
|
|
222
|
+
|
|
223
|
+
const ExpandIcon = styled(ChevronDownIcon)<{ $isExpanded: boolean }>`
|
|
224
|
+
flex-shrink: 0;
|
|
225
|
+
margin-inline-start: calc(var(--spacing-xxs) * -1);
|
|
226
|
+
transform: rotate(${({ $isExpanded }) => ($isExpanded ? '180deg' : '0deg')});
|
|
227
|
+
transition: transform var(--search-ai-activity-expand-duration)
|
|
228
|
+
var(--search-ai-activity-easing);
|
|
229
|
+
|
|
230
|
+
@media (prefers-reduced-motion: reduce) {
|
|
231
|
+
transition: none;
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
|
|
235
|
+
const StepsWrapper = styled.div<{ $isExpanded: boolean }>`
|
|
236
|
+
display: grid;
|
|
237
|
+
grid-template-rows: ${({ $isExpanded }) => ($isExpanded ? '1fr' : '0fr')};
|
|
238
|
+
opacity: ${({ $isExpanded }) => ($isExpanded ? 1 : 0)};
|
|
239
|
+
visibility: ${({ $isExpanded }) => ($isExpanded ? 'visible' : 'hidden')};
|
|
240
|
+
${({ $isExpanded }) =>
|
|
241
|
+
!$isExpanded &&
|
|
242
|
+
css`
|
|
243
|
+
contain: inline-size;
|
|
244
|
+
`}
|
|
245
|
+
transition:
|
|
246
|
+
grid-template-rows var(--search-ai-activity-expand-duration) var(--search-ai-activity-easing),
|
|
247
|
+
opacity var(--search-ai-activity-expand-duration) ease-out,
|
|
248
|
+
visibility var(--search-ai-activity-expand-duration);
|
|
249
|
+
|
|
250
|
+
@media (prefers-reduced-motion: reduce) {
|
|
251
|
+
transition: none;
|
|
252
|
+
}
|
|
253
|
+
`;
|
|
254
|
+
|
|
255
|
+
const STEP_GAP = 'var(--spacing-xs)';
|
|
256
|
+
const ICON_OFFSET =
|
|
257
|
+
'calc((var(--search-ai-activity-line-height) - var(--search-ai-activity-icon-size)) / 2)';
|
|
258
|
+
const RAIL_GAP = '3px';
|
|
259
|
+
const RAIL_INSET = 'calc(var(--search-ai-activity-icon-size) / 2 - 0.5px)';
|
|
260
|
+
|
|
261
|
+
const StepList = styled.ol`
|
|
262
|
+
min-height: 0;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
margin: 0;
|
|
265
|
+
padding: 0;
|
|
266
|
+
list-style: none;
|
|
267
|
+
|
|
268
|
+
/* Padding would stay visible while the list is collapsed; the spacer collapses with it. */
|
|
269
|
+
&::before {
|
|
270
|
+
content: "";
|
|
271
|
+
display: block;
|
|
272
|
+
height: ${STEP_GAP};
|
|
273
|
+
}
|
|
274
|
+
`;
|
|
275
|
+
|
|
276
|
+
const StepItem = styled.li`
|
|
277
|
+
position: relative;
|
|
278
|
+
display: flex;
|
|
279
|
+
gap: var(--spacing-xs);
|
|
280
|
+
padding-bottom: ${STEP_GAP};
|
|
281
|
+
${searchAiAppearAnimation}
|
|
282
|
+
|
|
283
|
+
&:last-child {
|
|
284
|
+
padding-bottom: 0;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&:first-child::before,
|
|
288
|
+
&:not(:last-child)::after {
|
|
289
|
+
content: "";
|
|
290
|
+
position: absolute;
|
|
291
|
+
inset-inline-start: ${RAIL_INSET};
|
|
292
|
+
width: 1px;
|
|
293
|
+
background: var(--search-ai-activity-rail-color);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&:first-child::before {
|
|
297
|
+
top: calc(${STEP_GAP} * -1 - ${ICON_OFFSET} + ${RAIL_GAP});
|
|
298
|
+
height: calc(${STEP_GAP} + ${ICON_OFFSET} * 2 - ${RAIL_GAP} * 2);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&:not(:last-child)::after {
|
|
302
|
+
top: calc(
|
|
303
|
+
${ICON_OFFSET} + var(--search-ai-activity-icon-size) + ${RAIL_GAP}
|
|
304
|
+
);
|
|
305
|
+
bottom: calc(${RAIL_GAP} - ${ICON_OFFSET});
|
|
306
|
+
}
|
|
307
|
+
`;
|
|
308
|
+
|
|
309
|
+
const StepIconWrapper = styled(IconWrapper)`
|
|
310
|
+
margin-top: ${ICON_OFFSET};
|
|
311
|
+
`;
|
|
312
|
+
|
|
313
|
+
const StepText = styled.span<{ $isRunning: boolean }>`
|
|
314
|
+
min-width: 0;
|
|
315
|
+
overflow-wrap: anywhere;
|
|
316
|
+
|
|
317
|
+
${({ $isRunning }) => $isRunning && shimmer}
|
|
318
|
+
`;
|
|
@@ -30,18 +30,24 @@ export function SearchAiConversationInput({
|
|
|
30
30
|
const { translate } = useTranslate();
|
|
31
31
|
|
|
32
32
|
const inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);
|
|
33
|
+
const wasGeneratingResponseRef = useRef(isGeneratingResponse);
|
|
33
34
|
const [query, setQuery] = useState('');
|
|
34
35
|
|
|
35
36
|
useEffect(() => {
|
|
36
|
-
|
|
37
|
+
const wasGeneratingResponse = wasGeneratingResponseRef.current;
|
|
38
|
+
wasGeneratingResponseRef.current = isGeneratingResponse;
|
|
39
|
+
|
|
40
|
+
if (wasGeneratingResponse && !isGeneratingResponse) {
|
|
37
41
|
requestAnimationFrame(() => {
|
|
38
42
|
inputRef.current?.focus();
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
}, [isGeneratingResponse]);
|
|
42
46
|
|
|
47
|
+
const isDisabled = disabled || isGeneratingResponse || query.trim().length === 0;
|
|
48
|
+
|
|
43
49
|
const handleSendMessage = () => {
|
|
44
|
-
if (
|
|
50
|
+
if (isDisabled) return;
|
|
45
51
|
|
|
46
52
|
setQuery('');
|
|
47
53
|
onMessageSent(query);
|
|
@@ -59,8 +65,6 @@ export function SearchAiConversationInput({
|
|
|
59
65
|
}
|
|
60
66
|
};
|
|
61
67
|
|
|
62
|
-
const isDisabled = disabled || isGeneratingResponse || query.trim().length === 0;
|
|
63
|
-
|
|
64
68
|
const commonProps = {
|
|
65
69
|
placeholder:
|
|
66
70
|
placeholder || translate('search.ai.followUpQuestion', 'Ask a follow up question?'),
|
|
@@ -91,7 +95,8 @@ export function SearchAiConversationInput({
|
|
|
91
95
|
)}
|
|
92
96
|
|
|
93
97
|
<SendButton
|
|
94
|
-
|
|
98
|
+
aria-label={translate('search.ai.send', 'Send question')}
|
|
99
|
+
aria-disabled={isDisabled}
|
|
95
100
|
size="small"
|
|
96
101
|
icon={
|
|
97
102
|
<SendIcon
|
|
@@ -176,11 +181,12 @@ const SendButton = styled(Button)`
|
|
|
176
181
|
border-radius: var(--search-ai-conversation-input-send-button-border-radius);
|
|
177
182
|
padding: var(--search-ai-conversation-input-send-button-padding);
|
|
178
183
|
|
|
179
|
-
&:hover {
|
|
184
|
+
&:hover:not([aria-disabled='true']) {
|
|
180
185
|
background-color: var(--search-ai-conversation-input-send-button-bg-color-hover);
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
|
|
188
|
+
&[aria-disabled='true'] {
|
|
189
|
+
cursor: default;
|
|
184
190
|
background-color: var(--search-ai-conversation-input-send-button-bg-color-disabled);
|
|
185
191
|
border: var(--search-ai-conversation-input-send-button-border-disabled);
|
|
186
192
|
}
|
|
@@ -58,6 +58,17 @@ export function SearchAiDialog({
|
|
|
58
58
|
const { translate } = useTranslate();
|
|
59
59
|
|
|
60
60
|
const conversationEndRef = React.useRef<HTMLDivElement>(null);
|
|
61
|
+
const wrapperRef = React.useRef<HTMLDivElement>(null);
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
requestAnimationFrame(() => {
|
|
65
|
+
wrapperRef.current
|
|
66
|
+
?.querySelector<HTMLElement>(
|
|
67
|
+
'[data-component-name="Search/SearchAiConversationInput"] :is(input, textarea):not(:disabled)',
|
|
68
|
+
)
|
|
69
|
+
?.focus();
|
|
70
|
+
});
|
|
71
|
+
}, []);
|
|
61
72
|
|
|
62
73
|
const suggestions = aiAssistant?.suggestions ?? [];
|
|
63
74
|
|
|
@@ -108,6 +119,10 @@ export function SearchAiDialog({
|
|
|
108
119
|
|
|
109
120
|
// oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent -- merges the streamed assistant response into the lifted conversation state as chunks arrive
|
|
110
121
|
setConversation((prev) => {
|
|
122
|
+
// A reset can land between this effect's render and its update.
|
|
123
|
+
if (prev.length === 0) {
|
|
124
|
+
return prev;
|
|
125
|
+
}
|
|
111
126
|
const lastMessage = prev[prev.length - 1];
|
|
112
127
|
const content: string = response || '';
|
|
113
128
|
|
|
@@ -167,7 +182,11 @@ export function SearchAiDialog({
|
|
|
167
182
|
);
|
|
168
183
|
|
|
169
184
|
return (
|
|
170
|
-
<SearchAiDialogWrapper
|
|
185
|
+
<SearchAiDialogWrapper
|
|
186
|
+
ref={wrapperRef}
|
|
187
|
+
data-component-name="Search/SearchAiDialog"
|
|
188
|
+
className={className}
|
|
189
|
+
>
|
|
171
190
|
{!conversation.length && (
|
|
172
191
|
<WelcomeWrapper>
|
|
173
192
|
<AiStarsIcon
|
|
@@ -199,9 +218,6 @@ export function SearchAiDialog({
|
|
|
199
218
|
messageId={item.messageId}
|
|
200
219
|
feedback={item.feedback}
|
|
201
220
|
onFeedbackChange={handleFeedbackChange}
|
|
202
|
-
toolCalls={
|
|
203
|
-
item.toolCalls || (index === conversation.length - 1 ? toolCalls : undefined)
|
|
204
|
-
}
|
|
205
221
|
contentSegments={item.contentSegments}
|
|
206
222
|
/>
|
|
207
223
|
))}
|