@gravity-ui/aikit 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Alert/Alert.scss +29 -0
- package/dist/components/atoms/ChatDate/ChatDate.scss +15 -0
- package/dist/components/atoms/ChatDate/i18n/en.json +8 -0
- package/dist/components/atoms/ChatDate/i18n/ru.json +10 -0
- package/dist/components/atoms/ContextIndicator/ContextIndicator.scss +93 -0
- package/dist/components/atoms/DiffStat/DiffStat.scss +36 -0
- package/dist/components/atoms/Disclaimer/Disclaimer.scss +13 -0
- package/dist/components/atoms/Loader/Loader.scss +72 -0
- package/dist/components/atoms/MarkdownRenderer/MarkdownRenderer.scss +5 -0
- package/dist/components/atoms/MessageBalloon/MessageBalloon.scss +11 -0
- package/dist/components/atoms/Shimmer/Shimmer.scss +32 -0
- package/dist/components/atoms/SubmitButton/SubmitButton.scss +29 -0
- package/dist/components/atoms/SubmitButton/i18n/en.json +3 -0
- package/dist/components/atoms/SubmitButton/i18n/ru.json +3 -0
- package/dist/components/atoms/ToolIndicator/ToolIndicator.scss +15 -0
- package/dist/components/molecules/BaseMessage/BaseMessage.scss +41 -0
- package/dist/components/molecules/BaseMessage/i18n/en.json +8 -0
- package/dist/components/molecules/BaseMessage/i18n/ru.json +8 -0
- package/dist/components/molecules/ButtonGroup/ButtonGroup.scss +19 -0
- package/dist/components/molecules/PromptInputBody/PromptInputBody.scss +22 -0
- package/dist/components/molecules/PromptInputFooter/PromptInputFooter.scss +25 -0
- package/dist/components/molecules/PromptInputFooter/i18n/en.json +5 -0
- package/dist/components/molecules/PromptInputFooter/i18n/ru.json +5 -0
- package/dist/components/molecules/PromptInputHeader/PromptInputHeader.scss +27 -0
- package/dist/components/molecules/PromptInputPanel/PromptInputPanel.scss +11 -0
- package/dist/{src/components → components}/molecules/Suggestions/Suggestions.d.ts +4 -0
- package/dist/{src/components → components}/molecules/Suggestions/Suggestions.js +3 -3
- package/dist/components/molecules/Suggestions/Suggestions.scss +90 -0
- package/dist/components/molecules/Tabs/Tabs.scss +46 -0
- package/dist/components/molecules/Tabs/i18n/en.json +3 -0
- package/dist/components/molecules/Tabs/i18n/ru.json +3 -0
- package/dist/components/molecules/ToolFooter/ToolFooter.scss +15 -0
- package/dist/components/molecules/ToolHeader/ToolHeader.scss +24 -0
- package/dist/components/organisms/AssistantMessage/AssistantMessage.scss +10 -0
- package/dist/components/organisms/Header/Header.scss +51 -0
- package/dist/components/organisms/Header/i18n/en.json +7 -0
- package/dist/components/organisms/Header/i18n/ru.json +7 -0
- package/dist/components/organisms/MessageList/MessageList.scss +30 -0
- package/dist/components/organisms/MessageList/i18n/en.json +4 -0
- package/dist/components/organisms/MessageList/i18n/ru.json +4 -0
- package/dist/components/organisms/PromptInput/PromptInput.scss +73 -0
- package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.js +2 -2
- package/dist/{src/components → components}/organisms/PromptInput/types.d.ts +2 -0
- package/dist/components/organisms/ThinkingMessage/ThinkingMessage.scss +27 -0
- package/dist/components/organisms/ThinkingMessage/i18n/en.json +4 -0
- package/dist/components/organisms/ThinkingMessage/i18n/ru.json +4 -0
- package/dist/{src/components → components}/organisms/ThinkingMessage/index.js +1 -1
- package/dist/components/organisms/ToolMessage/ToolMessage.scss +19 -0
- package/dist/components/organisms/ToolMessage/i18n/en.json +9 -0
- package/dist/components/organisms/ToolMessage/i18n/ru.json +9 -0
- package/dist/components/organisms/UserMessage/UserMessage.scss +10 -0
- package/dist/components/pages/ChatContainer/ChatContainer.scss +44 -0
- package/dist/components/pages/ChatContainer/i18n/en.json +10 -0
- package/dist/components/pages/ChatContainer/i18n/ru.json +10 -0
- package/dist/components/templates/ChatContent/ChatContent.scss +27 -0
- package/dist/components/templates/EmptyContainer/EmptyContainer.scss +86 -0
- package/dist/components/templates/EmptyContainer/i18n/en.json +3 -0
- package/dist/components/templates/EmptyContainer/i18n/ru.json +3 -0
- package/dist/components/templates/History/History.scss +90 -0
- package/dist/components/templates/History/i18n/en.json +7 -0
- package/dist/components/templates/History/i18n/ru.json +7 -0
- package/dist/styles/_functions.scss +5 -0
- package/dist/styles/styles.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/themes/dark.css +19 -0
- package/dist/themes/light.css +19 -0
- package/dist/themes/variables.css +69 -0
- package/package.json +22 -4
- package/dist/.storybook/theme.d.ts +0 -6
- package/dist/.storybook/theme.js +0 -28
- package/dist/package.json +0 -123
- package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.d.ts +0 -8
- package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.js +0 -48
- package/dist/src/components/atoms/Alert/__stories__/Alert.stories.d.ts +0 -9
- package/dist/src/components/atoms/Alert/__stories__/Alert.stories.js +0 -56
- package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.d.ts +0 -16
- package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.js +0 -83
- package/dist/src/components/atoms/ChatDate/i18n/en.json +0 -8
- package/dist/src/components/atoms/ChatDate/i18n/ru.json +0 -10
- package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.d.ts +0 -17
- package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.js +0 -72
- package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.d.ts +0 -6
- package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.js +0 -32
- package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.d.ts +0 -7
- package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.js +0 -45
- package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.d.ts +0 -8
- package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.js +0 -32
- package/dist/src/components/atoms/Loader/__stories__/Loader.stories.d.ts +0 -8
- package/dist/src/components/atoms/Loader/__stories__/Loader.stories.js +0 -47
- package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.d.ts +0 -6
- package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.js +0 -49
- package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.d.ts +0 -6
- package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.js +0 -32
- package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.d.ts +0 -5
- package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.js +0 -28
- package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.d.ts +0 -12
- package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.js +0 -95
- package/dist/src/components/atoms/SubmitButton/i18n/en.json +0 -3
- package/dist/src/components/atoms/SubmitButton/i18n/ru.json +0 -3
- package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.d.ts +0 -9
- package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.js +0 -34
- package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.d.ts +0 -8
- package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.js +0 -66
- package/dist/src/components/molecules/BaseMessage/i18n/en.json +0 -8
- package/dist/src/components/molecules/BaseMessage/i18n/ru.json +0 -8
- package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.d.ts +0 -6
- package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.js +0 -44
- package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.d.ts +0 -11
- package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.js +0 -62
- package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.d.ts +0 -11
- package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.js +0 -96
- package/dist/src/components/molecules/PromptInputFooter/i18n/en.json +0 -5
- package/dist/src/components/molecules/PromptInputFooter/i18n/ru.json +0 -5
- package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.d.ts +0 -13
- package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.js +0 -103
- package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.d.ts +0 -8
- package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.js +0 -38
- package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.d.ts +0 -19
- package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.js +0 -143
- package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.d.ts +0 -9
- package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.js +0 -103
- package/dist/src/components/molecules/Tabs/i18n/en.json +0 -3
- package/dist/src/components/molecules/Tabs/i18n/ru.json +0 -3
- package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.d.ts +0 -7
- package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.js +0 -58
- package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.d.ts +0 -7
- package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.js +0 -55
- package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.d.ts +0 -13
- package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.js +0 -151
- package/dist/src/components/organisms/Header/__stories__/Header.stories.d.ts +0 -13
- package/dist/src/components/organisms/Header/__stories__/Header.stories.js +0 -130
- package/dist/src/components/organisms/Header/i18n/en.json +0 -7
- package/dist/src/components/organisms/Header/i18n/ru.json +0 -7
- package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.d.ts +0 -24
- package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.js +0 -288
- package/dist/src/components/organisms/MessageList/i18n/en.json +0 -4
- package/dist/src/components/organisms/MessageList/i18n/ru.json +0 -4
- package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.d.ts +0 -18
- package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.js +0 -278
- package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.d.ts +0 -12
- package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.js +0 -107
- package/dist/src/components/organisms/ThinkingMessage/i18n/en.json +0 -4
- package/dist/src/components/organisms/ThinkingMessage/i18n/ru.json +0 -4
- package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.d.ts +0 -11
- package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.js +0 -70
- package/dist/src/components/organisms/ToolMessage/i18n/en.json +0 -9
- package/dist/src/components/organisms/ToolMessage/i18n/ru.json +0 -9
- package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.d.ts +0 -7
- package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.js +0 -70
- package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.d.ts +0 -53
- package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.js +0 -743
- package/dist/src/components/pages/ChatContainer/i18n/en.json +0 -10
- package/dist/src/components/pages/ChatContainer/i18n/ru.json +0 -10
- package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.d.ts +0 -14
- package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.js +0 -327
- package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.d.ts +0 -20
- package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.js +0 -250
- package/dist/src/components/templates/EmptyContainer/i18n/en.json +0 -3
- package/dist/src/components/templates/EmptyContainer/i18n/ru.json +0 -3
- package/dist/src/components/templates/History/__stories__/History.stories.d.ts +0 -17
- package/dist/src/components/templates/History/__stories__/History.stories.js +0 -271
- package/dist/src/components/templates/History/i18n/en.json +0 -7
- package/dist/src/components/templates/History/i18n/ru.json +0 -7
- package/dist/src/demo/ContentWrapper/ContentWrapper.d.ts +0 -4
- package/dist/src/demo/ContentWrapper/ContentWrapper.js +0 -9
- package/dist/src/demo/ContentWrapper/index.d.ts +0 -1
- package/dist/src/demo/ContentWrapper/index.js +0 -1
- package/dist/src/demo/DocsDecorator/DocsDecorator.d.ts +0 -6
- package/dist/src/demo/DocsDecorator/DocsDecorator.js +0 -12
- package/dist/src/demo/DocsDecorator/ThemeContext.d.ts +0 -2
- package/dist/src/demo/DocsDecorator/ThemeContext.js +0 -2
- package/dist/src/demo/Showcase/Showcase.d.ts +0 -9
- package/dist/src/demo/Showcase/Showcase.js +0 -7
- package/dist/src/demo/Showcase/index.d.ts +0 -1
- package/dist/src/demo/Showcase/index.js +0 -1
- package/dist/src/demo/ShowcaseItem/ShowcaseItem.d.ts +0 -7
- package/dist/src/demo/ShowcaseItem/ShowcaseItem.js +0 -7
- package/dist/src/demo/ShowcaseItem/index.d.ts +0 -1
- package/dist/src/demo/ShowcaseItem/index.js +0 -1
- package/dist/src/demo/SwapArea/SwapArea.d.ts +0 -2
- package/dist/src/demo/SwapArea/SwapArea.js +0 -7
- package/dist/src/demo/SwapArea/index.d.ts +0 -1
- package/dist/src/demo/SwapArea/index.js +0 -1
- /package/dist/{src/components → components}/atoms/ActionButton/ActionButton.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/ActionButton.js +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Alert/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Alert/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/utils.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/utils.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextItem/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextItem/index.js +0 -0
- /package/dist/{src/components → components}/atoms/DiffStat/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/DiffStat/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.js +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/InlineCitation/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/InlineCitation/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Loader/Loader.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Loader/Loader.js +0 -0
- /package/dist/{src/components → components}/atoms/Loader/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Loader/index.js +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.js +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/MessageBalloon/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MessageBalloon/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Shimmer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Shimmer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ToolIndicator/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ToolIndicator/index.js +0 -0
- /package/dist/{src/components → components}/atoms/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/index.js +0 -0
- /package/dist/{src/components → components}/index.d.ts +0 -0
- /package/dist/{src/components → components}/index.js +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ButtonGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ButtonGroup/index.js +0 -0
- /package/dist/{src/components → components}/molecules/InputContext/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/InputContext/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Suggestions/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Suggestions/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/Tabs.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/Tabs.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ToolFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ToolFooter/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ToolHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ToolHeader/index.js +0 -0
- /package/dist/{src/components → components}/molecules/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/index.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/Header.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/Header.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/types.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/types.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/useHeader.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/useHeader.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/MessageList.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/MessageList.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/index.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/index.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/types.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.js +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.js +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/UserMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/UserMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/types.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/types.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.js +0 -0
- /package/dist/{src/components → components}/pages/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/index.js +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/ChatContent.d.ts +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/ChatContent.js +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/index.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/index.js +0 -0
- /package/dist/{src/components → components}/templates/History/ChatItem.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/ChatItem.js +0 -0
- /package/dist/{src/components → components}/templates/History/DateHeaderItem.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/DateHeaderItem.js +0 -0
- /package/dist/{src/components → components}/templates/History/History.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/History.js +0 -0
- /package/dist/{src/components → components}/templates/History/HistoryList.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/HistoryList.js +0 -0
- /package/dist/{src/components → components}/templates/History/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/i18n/index.js +0 -0
- /package/dist/{src/components → components}/templates/History/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/index.js +0 -0
- /package/dist/{src/components → components}/templates/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/index.js +0 -0
- /package/dist/{src/constants → constants}/index.d.ts +0 -0
- /package/dist/{src/constants → constants}/index.js +0 -0
- /package/dist/{src/hooks → hooks}/index.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/index.js +0 -0
- /package/dist/{src/hooks → hooks}/useDateFormatter/index.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useDateFormatter/index.js +0 -0
- /package/dist/{src/hooks → hooks}/useSmartScroll.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useSmartScroll.js +0 -0
- /package/dist/{src/hooks → hooks}/useToolMessage.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useToolMessage.js +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/types → types}/chat.d.ts +0 -0
- /package/dist/{src/types → types}/chat.js +0 -0
- /package/dist/{src/types → types}/common.d.ts +0 -0
- /package/dist/{src/types → types}/common.js +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/types → types}/index.js +0 -0
- /package/dist/{src/types → types}/messages.d.ts +0 -0
- /package/dist/{src/types → types}/messages.js +0 -0
- /package/dist/{src/types → types}/tool.d.ts +0 -0
- /package/dist/{src/types → types}/tool.js +0 -0
- /package/dist/{src/utils → utils}/chatUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/chatUtils.js +0 -0
- /package/dist/{src/utils → utils}/cn.d.ts +0 -0
- /package/dist/{src/utils → utils}/cn.js +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/index.js +0 -0
- /package/dist/{src/utils → utils}/messageTypeRegistry.d.ts +0 -0
- /package/dist/{src/utils → utils}/messageTypeRegistry.js +0 -0
- /package/dist/{src/utils → utils}/messageUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/messageUtils.js +0 -0
- /package/dist/{src/utils → utils}/validation.d.ts +0 -0
- /package/dist/{src/utils → utils}/validation.js +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header-default-title": "AI Chat",
|
|
3
|
-
"empty-state-title": "Welcome to AI Chat",
|
|
4
|
-
"empty-state-description": "Start a conversation by typing a message below or selecting a suggestion.",
|
|
5
|
-
"empty-state-suggestions-title": "Try asking:",
|
|
6
|
-
"empty-state-show-more": "Show more examples",
|
|
7
|
-
"prompt-placeholder": "Type your message...",
|
|
8
|
-
"history-empty": "No chat history yet",
|
|
9
|
-
"disclaimer-text": "AI can make mistakes. Check important info."
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header-default-title": "AI Чат",
|
|
3
|
-
"empty-state-title": "Добро пожаловать в AI Чат",
|
|
4
|
-
"empty-state-description": "Начните разговор, введя сообщение ниже или выбрав подсказку.",
|
|
5
|
-
"empty-state-suggestions-title": "Попробуйте спросить:",
|
|
6
|
-
"empty-state-show-more": "Показать больше примеров",
|
|
7
|
-
"prompt-placeholder": "Введите ваше сообщение...",
|
|
8
|
-
"history-empty": "История чатов пока пуста",
|
|
9
|
-
"disclaimer-text": "ИИ может ошибаться. Проверяйте важную информацию."
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { ChatContent } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof ChatContent>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const EmptyState: Story;
|
|
8
|
-
export declare const EmptyStateWithSuggestions: Story;
|
|
9
|
-
export declare const ChatStateWithMessages: Story;
|
|
10
|
-
export declare const ChatStateWithActionsOnHover: Story;
|
|
11
|
-
export declare const WithLongMessages: Story;
|
|
12
|
-
export declare const WithManyMessages: Story;
|
|
13
|
-
export declare const Interactive: Story;
|
|
14
|
-
export declare const LongConversation: Story;
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { CircleInfo } from '@gravity-ui/icons';
|
|
5
|
-
import { Icon } from '@gravity-ui/uikit';
|
|
6
|
-
import { ChatContent } from '..';
|
|
7
|
-
import { BaseMessageAction } from '../../../../components/molecules/BaseMessage';
|
|
8
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
9
|
-
import MDXDocs from './Docs.mdx';
|
|
10
|
-
export default {
|
|
11
|
-
title: 'templates/ChatContent',
|
|
12
|
-
component: ChatContent,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
page: MDXDocs,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
const defaultDecorators = [
|
|
20
|
-
(Story) => (_jsx(ContentWrapper, { width: "600px", height: "800px", children: _jsx(Story, {}) })),
|
|
21
|
-
];
|
|
22
|
-
const sampleActions = [
|
|
23
|
-
{
|
|
24
|
-
type: BaseMessageAction.Copy,
|
|
25
|
-
onClick: () => console.log('Copy clicked'),
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: BaseMessageAction.Edit,
|
|
29
|
-
onClick: () => console.log('Edit clicked'),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: BaseMessageAction.Retry,
|
|
33
|
-
onClick: () => console.log('Retry clicked'),
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: BaseMessageAction.Like,
|
|
37
|
-
onClick: () => console.log('Like clicked'),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
type: BaseMessageAction.Unlike,
|
|
41
|
-
onClick: () => console.log('Unlike clicked'),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: BaseMessageAction.Delete,
|
|
45
|
-
onClick: () => console.log('Delete clicked'),
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
// Sample messages for stories
|
|
49
|
-
const sampleMessages = [
|
|
50
|
-
{
|
|
51
|
-
id: '1',
|
|
52
|
-
role: 'user',
|
|
53
|
-
content: 'Hello! Can you help me with React?',
|
|
54
|
-
timestamp: '2024-01-01T12:00:00Z',
|
|
55
|
-
status: 'complete',
|
|
56
|
-
actions: sampleActions,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: '2',
|
|
60
|
-
role: 'assistant',
|
|
61
|
-
content: 'Of course! I would be happy to help you with React. What would you like to know?',
|
|
62
|
-
timestamp: '2024-01-01T12:00:05Z',
|
|
63
|
-
status: 'complete',
|
|
64
|
-
actions: sampleActions,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: '3',
|
|
68
|
-
role: 'user',
|
|
69
|
-
content: 'How do I use hooks?',
|
|
70
|
-
timestamp: '2024-01-01T12:01:00Z',
|
|
71
|
-
status: 'complete',
|
|
72
|
-
actions: sampleActions,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: '4',
|
|
76
|
-
role: 'assistant',
|
|
77
|
-
content: 'React Hooks are functions that let you use state and other React features without writing a class. The most commonly used hooks are:\n\n1. **useState** - for managing component state\n2. **useEffect** - for side effects\n3. **useContext** - for consuming context\n\nWould you like examples of how to use any of these?',
|
|
78
|
-
timestamp: '2024-01-01T12:01:10Z',
|
|
79
|
-
status: 'complete',
|
|
80
|
-
actions: sampleActions,
|
|
81
|
-
},
|
|
82
|
-
];
|
|
83
|
-
// Sample suggestions for empty state
|
|
84
|
-
const sampleSuggestions = [
|
|
85
|
-
{ id: '1', title: 'Explain React hooks' },
|
|
86
|
-
{ id: '2', title: 'How to use TypeScript with React?' },
|
|
87
|
-
{ id: '3', title: 'Best practices for component structure' },
|
|
88
|
-
{ id: '4', title: 'State management options' },
|
|
89
|
-
];
|
|
90
|
-
export const Playground = {
|
|
91
|
-
args: {
|
|
92
|
-
view: 'empty',
|
|
93
|
-
emptyContainerProps: {
|
|
94
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 120, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
95
|
-
title: 'Welcome to AI Chat',
|
|
96
|
-
description: 'Start a conversation or choose a suggestion below',
|
|
97
|
-
suggestionTitle: "Don't know where to start? Try this:",
|
|
98
|
-
suggestions: sampleSuggestions,
|
|
99
|
-
onSuggestionClick: (content, id) => {
|
|
100
|
-
console.log('Suggestion clicked:', content, id);
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
decorators: defaultDecorators,
|
|
105
|
-
};
|
|
106
|
-
export const EmptyState = {
|
|
107
|
-
args: {
|
|
108
|
-
view: 'empty',
|
|
109
|
-
emptyContainerProps: {
|
|
110
|
-
title: 'Welcome to AI Assistant',
|
|
111
|
-
description: 'I can help you with coding questions, explain concepts, and assist with your development tasks.',
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
decorators: defaultDecorators,
|
|
115
|
-
};
|
|
116
|
-
export const EmptyStateWithSuggestions = {
|
|
117
|
-
args: {
|
|
118
|
-
view: 'empty',
|
|
119
|
-
emptyContainerProps: {
|
|
120
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 100, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
121
|
-
title: 'AI Development Assistant',
|
|
122
|
-
description: 'Ask questions, get code suggestions, or explore best practices.',
|
|
123
|
-
suggestionTitle: 'Popular topics:',
|
|
124
|
-
suggestions: sampleSuggestions,
|
|
125
|
-
onSuggestionClick: (content, id) => {
|
|
126
|
-
console.log('Suggestion clicked:', content, id);
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
decorators: defaultDecorators,
|
|
131
|
-
};
|
|
132
|
-
export const ChatStateWithMessages = {
|
|
133
|
-
args: {
|
|
134
|
-
view: 'chat',
|
|
135
|
-
messageListProps: {
|
|
136
|
-
messages: sampleMessages,
|
|
137
|
-
showTimestamp: true,
|
|
138
|
-
showAvatar: false,
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
decorators: defaultDecorators,
|
|
142
|
-
};
|
|
143
|
-
export const ChatStateWithActionsOnHover = {
|
|
144
|
-
args: {
|
|
145
|
-
view: 'chat',
|
|
146
|
-
messageListProps: {
|
|
147
|
-
messages: sampleMessages,
|
|
148
|
-
showTimestamp: true,
|
|
149
|
-
showActionsOnHover: true,
|
|
150
|
-
showAvatar: true,
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
decorators: defaultDecorators,
|
|
154
|
-
};
|
|
155
|
-
export const WithLongMessages = {
|
|
156
|
-
args: {
|
|
157
|
-
view: 'chat',
|
|
158
|
-
messageListProps: {
|
|
159
|
-
messages: sampleMessages,
|
|
160
|
-
showTimestamp: true,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
decorators: defaultDecorators,
|
|
164
|
-
};
|
|
165
|
-
export const WithManyMessages = {
|
|
166
|
-
args: {
|
|
167
|
-
view: 'chat',
|
|
168
|
-
messageListProps: {
|
|
169
|
-
messages: [
|
|
170
|
-
...sampleMessages,
|
|
171
|
-
{
|
|
172
|
-
id: '5',
|
|
173
|
-
role: 'user',
|
|
174
|
-
content: 'Can you show me an example?',
|
|
175
|
-
timestamp: '2024-01-01T12:02:00Z',
|
|
176
|
-
status: 'complete',
|
|
177
|
-
actions: sampleActions,
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: '6',
|
|
181
|
-
role: 'assistant',
|
|
182
|
-
content: `Here's a simple useState example:
|
|
183
|
-
|
|
184
|
-
\`\`\`tsx
|
|
185
|
-
import { useState } from 'react';
|
|
186
|
-
|
|
187
|
-
function Counter() {
|
|
188
|
-
const [count, setCount] = useState(0);
|
|
189
|
-
|
|
190
|
-
return (
|
|
191
|
-
<div>
|
|
192
|
-
<p>Count: {count}</p>
|
|
193
|
-
<button onClick={() => setCount(count + 1)}>Increment</button>
|
|
194
|
-
</div>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
\`\`\`
|
|
198
|
-
|
|
199
|
-
This component maintains a count state and updates it when the button is clicked.`,
|
|
200
|
-
timestamp: '2024-01-01T12:02:05Z',
|
|
201
|
-
status: 'complete',
|
|
202
|
-
actions: sampleActions,
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
showTimestamp: true,
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
decorators: defaultDecorators,
|
|
209
|
-
};
|
|
210
|
-
export const Interactive = {
|
|
211
|
-
render: () => {
|
|
212
|
-
const [view, setView] = useState('empty');
|
|
213
|
-
const [messages, setMessages] = useState([]);
|
|
214
|
-
const handleSuggestionClick = (content) => {
|
|
215
|
-
// Add user message
|
|
216
|
-
const userMessage = {
|
|
217
|
-
id: Date.now().toString(),
|
|
218
|
-
role: 'user',
|
|
219
|
-
content,
|
|
220
|
-
timestamp: new Date().toISOString(),
|
|
221
|
-
status: 'complete',
|
|
222
|
-
};
|
|
223
|
-
setMessages([userMessage]);
|
|
224
|
-
setView('chat');
|
|
225
|
-
// Simulate assistant response
|
|
226
|
-
setTimeout(() => {
|
|
227
|
-
const assistantMessage = {
|
|
228
|
-
id: (Date.now() + 1).toString(),
|
|
229
|
-
role: 'assistant',
|
|
230
|
-
content: `I received your message: "${content}". How can I help you further?`,
|
|
231
|
-
timestamp: new Date().toISOString(),
|
|
232
|
-
status: 'complete',
|
|
233
|
-
};
|
|
234
|
-
setMessages((prev) => [...prev, assistantMessage]);
|
|
235
|
-
}, 1000);
|
|
236
|
-
};
|
|
237
|
-
return (_jsx(ChatContent, { view: view, emptyContainerProps: {
|
|
238
|
-
title: 'Welcome to AI Chat',
|
|
239
|
-
description: 'Start a conversation or choose a suggestion below',
|
|
240
|
-
suggestionTitle: 'Try asking:',
|
|
241
|
-
suggestions: sampleSuggestions,
|
|
242
|
-
onSuggestionClick: handleSuggestionClick,
|
|
243
|
-
}, messageListProps: {
|
|
244
|
-
messages,
|
|
245
|
-
showTimestamp: true,
|
|
246
|
-
} }));
|
|
247
|
-
},
|
|
248
|
-
decorators: defaultDecorators,
|
|
249
|
-
};
|
|
250
|
-
export const LongConversation = {
|
|
251
|
-
args: {
|
|
252
|
-
view: 'chat',
|
|
253
|
-
messageListProps: {
|
|
254
|
-
messages: [
|
|
255
|
-
...sampleMessages,
|
|
256
|
-
{
|
|
257
|
-
id: '5',
|
|
258
|
-
role: 'user',
|
|
259
|
-
content: 'Can you show me an example?',
|
|
260
|
-
timestamp: '2024-01-01T12:02:00Z',
|
|
261
|
-
status: 'complete',
|
|
262
|
-
actions: sampleActions,
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
id: '6',
|
|
266
|
-
role: 'assistant',
|
|
267
|
-
content: `Here's a simple useState example:
|
|
268
|
-
|
|
269
|
-
\`\`\`tsx
|
|
270
|
-
import { useState } from 'react';
|
|
271
|
-
|
|
272
|
-
function Counter() {
|
|
273
|
-
const [count, setCount] = useState(0);
|
|
274
|
-
|
|
275
|
-
return (
|
|
276
|
-
<div>
|
|
277
|
-
<p>Count: {count}</p>
|
|
278
|
-
<button onClick={() => setCount(count + 1)}>Increment</button>
|
|
279
|
-
</div>
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
\`\`\`
|
|
283
|
-
|
|
284
|
-
This component maintains a count state and updates it when the button is clicked.`,
|
|
285
|
-
timestamp: '2024-01-01T12:02:05Z',
|
|
286
|
-
status: 'complete',
|
|
287
|
-
actions: sampleActions,
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
id: '7',
|
|
291
|
-
role: 'user',
|
|
292
|
-
content: 'What about useEffect?',
|
|
293
|
-
timestamp: '2024-01-01T12:03:00Z',
|
|
294
|
-
status: 'complete',
|
|
295
|
-
actions: sampleActions,
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
id: '8',
|
|
299
|
-
role: 'assistant',
|
|
300
|
-
content: `useEffect is used for side effects. Here's an example:
|
|
301
|
-
|
|
302
|
-
\`\`\`tsx
|
|
303
|
-
import { useState, useEffect } from 'react';
|
|
304
|
-
|
|
305
|
-
function DataFetcher() {
|
|
306
|
-
const [data, setData] = useState(null);
|
|
307
|
-
|
|
308
|
-
useEffect(() => {
|
|
309
|
-
fetch('https://api.example.com/data')
|
|
310
|
-
.then(response => response.json())
|
|
311
|
-
.then(data => setData(data));
|
|
312
|
-
}, []); // Empty array means run once on mount
|
|
313
|
-
|
|
314
|
-
return <div>{data ? JSON.stringify(data) : 'Loading...'}</div>;
|
|
315
|
-
}
|
|
316
|
-
\`\`\``,
|
|
317
|
-
timestamp: '2024-01-01T12:03:10Z',
|
|
318
|
-
status: 'complete',
|
|
319
|
-
actions: sampleActions,
|
|
320
|
-
},
|
|
321
|
-
],
|
|
322
|
-
showTimestamp: true,
|
|
323
|
-
showActionsOnHover: true,
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
decorators: defaultDecorators,
|
|
327
|
-
};
|
package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { EmptyContainer } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof EmptyContainer>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const Default: Story;
|
|
8
|
-
export declare const WithImage: Story;
|
|
9
|
-
export declare const WithSuggestions: Story;
|
|
10
|
-
export declare const MinimalContent: Story;
|
|
11
|
-
export declare const OnlyDescription: Story;
|
|
12
|
-
export declare const CustomSuggestions: Story;
|
|
13
|
-
export declare const LongContent: Story;
|
|
14
|
-
export declare const WithLeftAlignment: Story;
|
|
15
|
-
export declare const WithRightAlignment: Story;
|
|
16
|
-
export declare const WithMixedAlignment: Story;
|
|
17
|
-
export declare const WithShowMoreButton: Story;
|
|
18
|
-
export declare const WithShowMoreButtonCustomText: Story;
|
|
19
|
-
export declare const WithShowMoreInteractive: Story;
|
|
20
|
-
export declare const CompleteExample: Story;
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { CircleInfo } from '@gravity-ui/icons';
|
|
5
|
-
import { Icon } from '@gravity-ui/uikit';
|
|
6
|
-
import { EmptyContainer } from '..';
|
|
7
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
8
|
-
import MDXDocs from './Docs.mdx';
|
|
9
|
-
export default {
|
|
10
|
-
title: 'templates/EmptyContainer',
|
|
11
|
-
component: EmptyContainer,
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
page: MDXDocs,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const defaultDecorators = [
|
|
19
|
-
(Story) => (_jsx(ContentWrapper, { width: "600px", children: _jsx(Story, {}) })),
|
|
20
|
-
];
|
|
21
|
-
const sampleSuggestions = [
|
|
22
|
-
{ id: '1', title: 'Summarize recent activity' },
|
|
23
|
-
{ id: '2', title: 'Check code for vulnerabilities' },
|
|
24
|
-
{ id: '3', title: 'Explain project structure' },
|
|
25
|
-
{ id: '4', title: 'Generate documentation' },
|
|
26
|
-
];
|
|
27
|
-
export const Playground = {
|
|
28
|
-
args: {
|
|
29
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 120, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
30
|
-
title: 'Welcome to AI Chat',
|
|
31
|
-
description: 'Experience smarter, faster teamwork right inside your product! AI chat seamlessly integrates with your workflow – helping you with answering technical questions and much more.',
|
|
32
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
33
|
-
suggestions: sampleSuggestions,
|
|
34
|
-
onSuggestionClick: (content, id) => {
|
|
35
|
-
console.log('Suggestion clicked:', content, id);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
decorators: defaultDecorators,
|
|
39
|
-
};
|
|
40
|
-
export const Default = {
|
|
41
|
-
args: {
|
|
42
|
-
title: 'Welcome to AI Chat',
|
|
43
|
-
description: 'Experience smarter, faster teamwork right inside your product! AI chat seamlessly integrates with your workflow – helping you with answering technical questions and much more.',
|
|
44
|
-
},
|
|
45
|
-
decorators: defaultDecorators,
|
|
46
|
-
};
|
|
47
|
-
export const WithImage = {
|
|
48
|
-
args: {
|
|
49
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 120, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
50
|
-
title: 'Welcome to AI Chat',
|
|
51
|
-
description: 'Ask me anything and I will help you with your tasks.',
|
|
52
|
-
},
|
|
53
|
-
decorators: defaultDecorators,
|
|
54
|
-
};
|
|
55
|
-
export const WithSuggestions = {
|
|
56
|
-
args: {
|
|
57
|
-
title: 'Welcome to AI Chat',
|
|
58
|
-
description: 'Get started with these helpful suggestions.',
|
|
59
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
60
|
-
suggestions: sampleSuggestions,
|
|
61
|
-
onSuggestionClick: (content, id) => {
|
|
62
|
-
console.log('Suggestion clicked:', content, id);
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
decorators: defaultDecorators,
|
|
66
|
-
};
|
|
67
|
-
export const MinimalContent = {
|
|
68
|
-
args: {
|
|
69
|
-
title: 'Welcome',
|
|
70
|
-
},
|
|
71
|
-
decorators: defaultDecorators,
|
|
72
|
-
};
|
|
73
|
-
export const OnlyDescription = {
|
|
74
|
-
args: {
|
|
75
|
-
description: 'This is a simple empty state with only a description.',
|
|
76
|
-
},
|
|
77
|
-
decorators: defaultDecorators,
|
|
78
|
-
};
|
|
79
|
-
export const CustomSuggestions = {
|
|
80
|
-
args: {
|
|
81
|
-
title: 'Quick Actions',
|
|
82
|
-
suggestionTitle: 'Choose an action:',
|
|
83
|
-
suggestions: [
|
|
84
|
-
{ id: '1', title: 'Start new conversation', view: 'outlined' },
|
|
85
|
-
{ id: '2', title: 'View history', view: 'flat', icon: 'right' },
|
|
86
|
-
{ id: '3', title: 'Settings', view: 'flat', icon: 'left' },
|
|
87
|
-
],
|
|
88
|
-
onSuggestionClick: (content, id) => {
|
|
89
|
-
console.log('Action clicked:', content, id);
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
decorators: defaultDecorators,
|
|
93
|
-
};
|
|
94
|
-
export const LongContent = {
|
|
95
|
-
args: {
|
|
96
|
-
title: 'Welcome to Our Advanced AI-Powered Chat Interface',
|
|
97
|
-
description: 'Experience the next generation of conversational AI technology that seamlessly integrates with your existing workflow. Our platform offers intelligent responses, context-aware suggestions, and advanced natural language processing capabilities to help you accomplish tasks faster and more efficiently. Whether you need help with code reviews, documentation, project planning, or answering complex technical questions, our AI assistant is here to support you every step of the way.',
|
|
98
|
-
suggestionTitle: 'Here are some popular ways to get started with the platform:',
|
|
99
|
-
suggestions: [
|
|
100
|
-
{ id: '1', title: 'Analyze and summarize recent project activity and changes' },
|
|
101
|
-
{
|
|
102
|
-
id: '2',
|
|
103
|
-
title: 'Run comprehensive security audit and check code for vulnerabilities',
|
|
104
|
-
},
|
|
105
|
-
{ id: '3', title: 'Generate detailed explanation of project structure and architecture' },
|
|
106
|
-
{
|
|
107
|
-
id: '4',
|
|
108
|
-
title: 'Create comprehensive documentation for all public APIs and methods',
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
onSuggestionClick: (content, id) => {
|
|
112
|
-
console.log('Suggestion clicked:', content, id);
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
decorators: defaultDecorators,
|
|
116
|
-
};
|
|
117
|
-
export const WithLeftAlignment = {
|
|
118
|
-
args: {
|
|
119
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 120, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
120
|
-
title: 'Welcome to AI Chat',
|
|
121
|
-
description: 'Experience smarter, faster teamwork right inside your product! All content is aligned to the left.',
|
|
122
|
-
alignment: {
|
|
123
|
-
image: 'left',
|
|
124
|
-
title: 'left',
|
|
125
|
-
description: 'left',
|
|
126
|
-
},
|
|
127
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
128
|
-
suggestions: sampleSuggestions.slice(0, 3),
|
|
129
|
-
onSuggestionClick: (content, id) => {
|
|
130
|
-
console.log('Suggestion clicked:', content, id);
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
decorators: defaultDecorators,
|
|
134
|
-
};
|
|
135
|
-
export const WithRightAlignment = {
|
|
136
|
-
args: {
|
|
137
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 80, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
138
|
-
title: 'Welcome to AI Chat',
|
|
139
|
-
description: 'Experience smarter, faster teamwork right inside your product! All content is aligned to the right.',
|
|
140
|
-
alignment: {
|
|
141
|
-
image: 'right',
|
|
142
|
-
title: 'right',
|
|
143
|
-
description: 'right',
|
|
144
|
-
},
|
|
145
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
146
|
-
suggestions: sampleSuggestions.slice(0, 3),
|
|
147
|
-
onSuggestionClick: (content, id) => {
|
|
148
|
-
console.log('Suggestion clicked:', content, id);
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
decorators: defaultDecorators,
|
|
152
|
-
};
|
|
153
|
-
export const WithMixedAlignment = {
|
|
154
|
-
args: {
|
|
155
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 64, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
156
|
-
title: 'Welcome to AI Chat',
|
|
157
|
-
description: 'This example demonstrates mixed alignment: left title, right description.',
|
|
158
|
-
alignment: {
|
|
159
|
-
image: 'center',
|
|
160
|
-
title: 'left',
|
|
161
|
-
description: 'right',
|
|
162
|
-
},
|
|
163
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
164
|
-
suggestions: sampleSuggestions.slice(0, 2),
|
|
165
|
-
onSuggestionClick: (content, id) => {
|
|
166
|
-
console.log('Suggestion clicked:', content, id);
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
decorators: defaultDecorators,
|
|
170
|
-
};
|
|
171
|
-
export const WithShowMoreButton = {
|
|
172
|
-
args: {
|
|
173
|
-
title: 'Welcome to AI Chat',
|
|
174
|
-
description: 'Click the button below to load more suggestions.',
|
|
175
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
176
|
-
suggestions: sampleSuggestions.slice(0, 2),
|
|
177
|
-
onSuggestionClick: (content, id) => {
|
|
178
|
-
console.log('Suggestion clicked:', content, id);
|
|
179
|
-
},
|
|
180
|
-
showMore: () => {
|
|
181
|
-
console.log('Show more clicked');
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
decorators: defaultDecorators,
|
|
185
|
-
};
|
|
186
|
-
export const WithShowMoreButtonCustomText = {
|
|
187
|
-
args: {
|
|
188
|
-
title: 'Welcome to AI Chat',
|
|
189
|
-
description: 'Custom button text for loading more suggestions.',
|
|
190
|
-
suggestionTitle: 'Popular actions:',
|
|
191
|
-
suggestions: sampleSuggestions.slice(0, 2),
|
|
192
|
-
onSuggestionClick: (content, id) => {
|
|
193
|
-
console.log('Suggestion clicked:', content, id);
|
|
194
|
-
},
|
|
195
|
-
showMore: () => {
|
|
196
|
-
console.log('Show more clicked');
|
|
197
|
-
},
|
|
198
|
-
showMoreText: 'Load more suggestions',
|
|
199
|
-
},
|
|
200
|
-
decorators: defaultDecorators,
|
|
201
|
-
};
|
|
202
|
-
export const WithShowMoreInteractive = {
|
|
203
|
-
render: (args) => {
|
|
204
|
-
const [suggestions, setSuggestions] = useState(sampleSuggestions.slice(0, 2));
|
|
205
|
-
const [hasMore, setHasMore] = useState(true);
|
|
206
|
-
const loadMore = () => {
|
|
207
|
-
if (suggestions.length < sampleSuggestions.length) {
|
|
208
|
-
setSuggestions([
|
|
209
|
-
...suggestions,
|
|
210
|
-
...sampleSuggestions.slice(suggestions.length, suggestions.length + 2),
|
|
211
|
-
]);
|
|
212
|
-
}
|
|
213
|
-
if (suggestions.length + 2 >= sampleSuggestions.length) {
|
|
214
|
-
setHasMore(false);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
return (_jsx(EmptyContainer, Object.assign({}, args, { suggestions: suggestions, showMore: hasMore ? loadMore : undefined })));
|
|
218
|
-
},
|
|
219
|
-
args: {
|
|
220
|
-
title: 'Welcome to AI Chat',
|
|
221
|
-
description: 'Interactive example: click "Show more" to load additional suggestions.',
|
|
222
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
223
|
-
onSuggestionClick: (content, id) => {
|
|
224
|
-
console.log('Suggestion clicked:', content, id);
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
decorators: defaultDecorators,
|
|
228
|
-
};
|
|
229
|
-
export const CompleteExample = {
|
|
230
|
-
args: {
|
|
231
|
-
image: (_jsx(Icon, { data: CircleInfo, size: 120, style: { color: 'var(--g-color-text-complementary)' } })),
|
|
232
|
-
title: 'Welcome to AI Chat',
|
|
233
|
-
description: 'Experience smarter, faster teamwork right inside your product! This example combines alignment and show more button.',
|
|
234
|
-
alignment: {
|
|
235
|
-
image: 'left',
|
|
236
|
-
title: 'left',
|
|
237
|
-
description: 'left',
|
|
238
|
-
},
|
|
239
|
-
suggestionTitle: "Don't know where to start from? Try this:",
|
|
240
|
-
suggestions: sampleSuggestions.slice(0, 2),
|
|
241
|
-
onSuggestionClick: (content, id) => {
|
|
242
|
-
console.log('Suggestion clicked:', content, id);
|
|
243
|
-
},
|
|
244
|
-
showMore: () => {
|
|
245
|
-
console.log('Show more clicked');
|
|
246
|
-
},
|
|
247
|
-
showMoreText: 'View all suggestions',
|
|
248
|
-
},
|
|
249
|
-
decorators: defaultDecorators,
|
|
250
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { History } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof History>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const WithSelectedChat: Story;
|
|
8
|
-
export declare const WithLoadMore: Story;
|
|
9
|
-
export declare const WithoutSearch: Story;
|
|
10
|
-
export declare const WithoutGrouping: Story;
|
|
11
|
-
export declare const WithoutActions: Story;
|
|
12
|
-
export declare const EmptyState: Story;
|
|
13
|
-
export declare const WithLoadMoreAndDelete: Story;
|
|
14
|
-
export declare const Interactive: Story;
|
|
15
|
-
export declare const WithCustomEmptyPlaceholder: Story;
|
|
16
|
-
export declare const WithCustomFilter: Story;
|
|
17
|
-
export declare const NotForceOpen: Story;
|