@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,278 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Xmark } from '@gravity-ui/icons';
|
|
4
|
-
import { Icon } from '@gravity-ui/uikit';
|
|
5
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
6
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
7
|
-
import { ActionButton } from '../../../atoms/ActionButton';
|
|
8
|
-
import { PromptInput } from '../PromptInput';
|
|
9
|
-
import MDXDocs from './Docs.mdx';
|
|
10
|
-
export default {
|
|
11
|
-
title: 'organisms/PromptInput',
|
|
12
|
-
component: PromptInput,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
page: MDXDocs,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
const defaultDecorators = [
|
|
20
|
-
(Story) => (_jsx(ContentWrapper, { width: "450px", children: _jsx(Story, {}) })),
|
|
21
|
-
];
|
|
22
|
-
const handleSend = async (data) => {
|
|
23
|
-
// eslint-disable-next-line no-console
|
|
24
|
-
console.log('Sending:', data);
|
|
25
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
26
|
-
};
|
|
27
|
-
export const Playground = {
|
|
28
|
-
args: {
|
|
29
|
-
view: 'simple',
|
|
30
|
-
onSend: handleSend,
|
|
31
|
-
bodyProps: {
|
|
32
|
-
placeholder: 'Plan, code, build and test anything',
|
|
33
|
-
},
|
|
34
|
-
footerProps: {
|
|
35
|
-
showAttachment: true,
|
|
36
|
-
showMicrophone: true,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
decorators: defaultDecorators,
|
|
40
|
-
};
|
|
41
|
-
export const FullView = {
|
|
42
|
-
args: {
|
|
43
|
-
view: 'full',
|
|
44
|
-
onSend: handleSend,
|
|
45
|
-
bodyProps: {
|
|
46
|
-
placeholder: 'Plan, code, build and test anything',
|
|
47
|
-
},
|
|
48
|
-
headerProps: {
|
|
49
|
-
showContextIndicator: true,
|
|
50
|
-
contextIndicatorProps: {
|
|
51
|
-
type: 'percent',
|
|
52
|
-
usedContext: 24,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
footerProps: {
|
|
56
|
-
showSettings: true,
|
|
57
|
-
showAttachment: true,
|
|
58
|
-
showMicrophone: true,
|
|
59
|
-
// eslint-disable-next-line no-console
|
|
60
|
-
onSettingsClick: () => console.log('Settings clicked'),
|
|
61
|
-
// eslint-disable-next-line no-console
|
|
62
|
-
onAttachmentClick: () => console.log('Attachment clicked'),
|
|
63
|
-
// eslint-disable-next-line no-console
|
|
64
|
-
onMicrophoneClick: () => console.log('Microphone clicked'),
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
decorators: defaultDecorators,
|
|
68
|
-
};
|
|
69
|
-
export const WithSuggestions = {
|
|
70
|
-
args: {
|
|
71
|
-
view: 'simple',
|
|
72
|
-
onSend: handleSend,
|
|
73
|
-
bodyProps: {
|
|
74
|
-
placeholder: 'Plan, code, build and test anything',
|
|
75
|
-
},
|
|
76
|
-
suggestionsProps: {
|
|
77
|
-
showSuggestions: true,
|
|
78
|
-
suggestions: [
|
|
79
|
-
{ title: 'Write a Python function', view: 'action' },
|
|
80
|
-
{ title: 'Explain this code' },
|
|
81
|
-
],
|
|
82
|
-
// eslint-disable-next-line no-console
|
|
83
|
-
onSuggestionClick: (suggestion) => console.log('Suggestion clicked:', suggestion),
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
decorators: defaultDecorators,
|
|
87
|
-
};
|
|
88
|
-
export const WithContextIndicator = {
|
|
89
|
-
args: {
|
|
90
|
-
view: 'full',
|
|
91
|
-
onSend: handleSend,
|
|
92
|
-
bodyProps: {
|
|
93
|
-
placeholder: 'Plan, code, build and test anything',
|
|
94
|
-
},
|
|
95
|
-
headerProps: {
|
|
96
|
-
showContextIndicator: true,
|
|
97
|
-
contextIndicatorProps: {
|
|
98
|
-
type: 'percent',
|
|
99
|
-
usedContext: 24,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
decorators: defaultDecorators,
|
|
104
|
-
};
|
|
105
|
-
export const WithCustomTopContent = {
|
|
106
|
-
args: {
|
|
107
|
-
view: 'full',
|
|
108
|
-
onSend: handleSend,
|
|
109
|
-
bodyProps: {
|
|
110
|
-
placeholder: 'Plan, code, build and test anything',
|
|
111
|
-
},
|
|
112
|
-
headerProps: {
|
|
113
|
-
topContent: _jsx(SwapArea, {}),
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
decorators: defaultDecorators,
|
|
117
|
-
};
|
|
118
|
-
export const WithCustomBottomContent = {
|
|
119
|
-
args: {
|
|
120
|
-
view: 'full',
|
|
121
|
-
onSend: handleSend,
|
|
122
|
-
bodyProps: {
|
|
123
|
-
placeholder: 'Plan, code, build and test anything',
|
|
124
|
-
},
|
|
125
|
-
footerProps: {
|
|
126
|
-
bottomContent: _jsx(SwapArea, {}),
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
decorators: defaultDecorators,
|
|
130
|
-
};
|
|
131
|
-
export const WithTopPanel = {
|
|
132
|
-
args: {
|
|
133
|
-
view: 'simple',
|
|
134
|
-
onSend: handleSend,
|
|
135
|
-
bodyProps: {
|
|
136
|
-
placeholder: 'Plan, code, build and test anything',
|
|
137
|
-
},
|
|
138
|
-
topPanel: {
|
|
139
|
-
isOpen: true,
|
|
140
|
-
children: _jsx(SwapArea, {}),
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
decorators: defaultDecorators,
|
|
144
|
-
};
|
|
145
|
-
export const WithBottomPanel = {
|
|
146
|
-
args: {
|
|
147
|
-
view: 'simple',
|
|
148
|
-
onSend: handleSend,
|
|
149
|
-
bodyProps: {
|
|
150
|
-
placeholder: 'Plan, code, build and test anything',
|
|
151
|
-
},
|
|
152
|
-
bottomPanel: {
|
|
153
|
-
isOpen: true,
|
|
154
|
-
children: _jsx(SwapArea, {}),
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
decorators: defaultDecorators,
|
|
158
|
-
};
|
|
159
|
-
export const WithBothPanels = {
|
|
160
|
-
args: {
|
|
161
|
-
view: 'full',
|
|
162
|
-
onSend: handleSend,
|
|
163
|
-
bodyProps: {
|
|
164
|
-
placeholder: 'Plan, code, build and test anything',
|
|
165
|
-
},
|
|
166
|
-
headerProps: {
|
|
167
|
-
showContextIndicator: true,
|
|
168
|
-
contextIndicatorProps: {
|
|
169
|
-
type: 'percent',
|
|
170
|
-
usedContext: 24,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
topPanel: {
|
|
174
|
-
isOpen: true,
|
|
175
|
-
children: _jsx(SwapArea, {}),
|
|
176
|
-
},
|
|
177
|
-
bottomPanel: {
|
|
178
|
-
isOpen: true,
|
|
179
|
-
children: _jsx(SwapArea, {}),
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
decorators: defaultDecorators,
|
|
183
|
-
};
|
|
184
|
-
const PanelExample = ({ onClose }) => {
|
|
185
|
-
return (_jsxs(_Fragment, { children: [_jsx(SwapArea, {}), _jsx(ActionButton, { view: "flat", size: "m", onClick: onClose, children: _jsx(Icon, { data: Xmark, size: 16 }) })] }));
|
|
186
|
-
};
|
|
187
|
-
export const WithPanelToggle = {
|
|
188
|
-
render: () => {
|
|
189
|
-
const [isTopPanelOpen, setIsTopPanelOpen] = useState(false);
|
|
190
|
-
const [isBottomPanelOpen, setIsBottomPanelOpen] = useState(false);
|
|
191
|
-
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [_jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [_jsx(ActionButton, { view: "action", size: "m", onClick: () => setIsTopPanelOpen((prev) => !prev), children: "Toggle Top Panel" }), _jsx(ActionButton, { view: "action", size: "m", onClick: () => setIsBottomPanelOpen((prev) => !prev), children: "Toggle Bottom Panel" })] }), _jsx(PromptInput, { view: "full", onSend: handleSend, bodyProps: {
|
|
192
|
-
placeholder: 'Plan, code, build and test anything',
|
|
193
|
-
}, topPanel: {
|
|
194
|
-
isOpen: isTopPanelOpen,
|
|
195
|
-
children: _jsx(PanelExample, { onClose: () => setIsTopPanelOpen(false) }),
|
|
196
|
-
}, bottomPanel: {
|
|
197
|
-
isOpen: isBottomPanelOpen,
|
|
198
|
-
children: _jsx(PanelExample, { onClose: () => setIsBottomPanelOpen(false) }),
|
|
199
|
-
} })] }));
|
|
200
|
-
},
|
|
201
|
-
decorators: defaultDecorators,
|
|
202
|
-
};
|
|
203
|
-
export const Disabled = {
|
|
204
|
-
args: {
|
|
205
|
-
view: 'simple',
|
|
206
|
-
onSend: handleSend,
|
|
207
|
-
disabled: true,
|
|
208
|
-
bodyProps: {
|
|
209
|
-
placeholder: 'Plan, code, build and test anything',
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
decorators: defaultDecorators,
|
|
213
|
-
};
|
|
214
|
-
export const Streaming = {
|
|
215
|
-
render: (args) => {
|
|
216
|
-
const [status, setStatus] = useState('ready');
|
|
217
|
-
const handleSendWithStreaming = async (data) => {
|
|
218
|
-
// eslint-disable-next-line no-console
|
|
219
|
-
console.log('Sending:', data);
|
|
220
|
-
setStatus('streaming');
|
|
221
|
-
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
222
|
-
setStatus('ready');
|
|
223
|
-
};
|
|
224
|
-
const handleCancel = async () => {
|
|
225
|
-
// eslint-disable-next-line no-console
|
|
226
|
-
console.log('Cancelling');
|
|
227
|
-
setStatus('ready');
|
|
228
|
-
};
|
|
229
|
-
return (_jsx(PromptInput, Object.assign({}, args, { view: "full", onSend: handleSendWithStreaming, onCancel: handleCancel, status: status, bodyProps: {
|
|
230
|
-
placeholder: 'Plan, code, build and test anything',
|
|
231
|
-
}, footerProps: {
|
|
232
|
-
showSettings: true,
|
|
233
|
-
showAttachment: true,
|
|
234
|
-
showMicrophone: true,
|
|
235
|
-
} })));
|
|
236
|
-
},
|
|
237
|
-
decorators: defaultDecorators,
|
|
238
|
-
};
|
|
239
|
-
export const ComplexExample = {
|
|
240
|
-
render: (args) => {
|
|
241
|
-
const [status, setStatus] = useState('ready');
|
|
242
|
-
const handleSendComplex = async (data) => {
|
|
243
|
-
// eslint-disable-next-line no-console
|
|
244
|
-
console.log('Sending:', data);
|
|
245
|
-
setStatus('streaming');
|
|
246
|
-
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
247
|
-
setStatus('ready');
|
|
248
|
-
};
|
|
249
|
-
const handleCancel = async () => {
|
|
250
|
-
// eslint-disable-next-line no-console
|
|
251
|
-
console.log('Cancelling');
|
|
252
|
-
setStatus('ready');
|
|
253
|
-
};
|
|
254
|
-
return (_jsx(PromptInput, Object.assign({}, args, { view: "full", onSend: handleSendComplex, onCancel: handleCancel, status: status, bodyProps: {
|
|
255
|
-
placeholder: 'Plan, code, build and test anything',
|
|
256
|
-
}, headerProps: {
|
|
257
|
-
showContextIndicator: true,
|
|
258
|
-
contextIndicatorProps: {
|
|
259
|
-
type: 'percent',
|
|
260
|
-
usedContext: 24,
|
|
261
|
-
},
|
|
262
|
-
}, footerProps: {
|
|
263
|
-
showSettings: true,
|
|
264
|
-
showAttachment: true,
|
|
265
|
-
showMicrophone: true,
|
|
266
|
-
// eslint-disable-next-line no-console
|
|
267
|
-
onSettingsClick: () => console.log('Settings'),
|
|
268
|
-
// eslint-disable-next-line no-console
|
|
269
|
-
onAttachmentClick: () => console.log('Attachment'),
|
|
270
|
-
// eslint-disable-next-line no-console
|
|
271
|
-
onMicrophoneClick: () => console.log('Microphone'),
|
|
272
|
-
}, suggestionsProps: {
|
|
273
|
-
showSuggestions: status !== 'streaming',
|
|
274
|
-
suggestions: [{ title: 'Yes', view: 'action' }, { title: 'No' }],
|
|
275
|
-
} })));
|
|
276
|
-
},
|
|
277
|
-
decorators: defaultDecorators,
|
|
278
|
-
};
|
package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { type ThinkingMessageProps } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<ThinkingMessageProps>;
|
|
6
|
-
export declare const ThinkingState: StoryObj<ThinkingMessageProps>;
|
|
7
|
-
export declare const ThoughtState: StoryObj<ThinkingMessageProps>;
|
|
8
|
-
export declare const SingleContent: StoryObj<ThinkingMessageProps>;
|
|
9
|
-
export declare const Collapsed: StoryObj<ThinkingMessageProps>;
|
|
10
|
-
export declare const WithoutLoader: StoryObj<ThinkingMessageProps>;
|
|
11
|
-
export declare const WithCopyAction: StoryObj<ThinkingMessageProps>;
|
|
12
|
-
export declare const WithCustomStyle: StoryObj<ThinkingMessageProps>;
|
package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ThinkingMessage } from '..';
|
|
3
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
4
|
-
import { Showcase } from '../../../../demo/Showcase';
|
|
5
|
-
import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
|
|
6
|
-
import MDXDocs from './Docs.mdx';
|
|
7
|
-
export default {
|
|
8
|
-
title: 'organisms/ThinkingMessage',
|
|
9
|
-
component: ThinkingMessage,
|
|
10
|
-
parameters: {
|
|
11
|
-
docs: {
|
|
12
|
-
page: MDXDocs,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
data: {
|
|
17
|
-
control: 'object',
|
|
18
|
-
description: 'Thinking message data',
|
|
19
|
-
},
|
|
20
|
-
defaultExpanded: {
|
|
21
|
-
control: 'boolean',
|
|
22
|
-
description: 'Initial expanded state',
|
|
23
|
-
},
|
|
24
|
-
showStatusIndicator: {
|
|
25
|
-
control: 'boolean',
|
|
26
|
-
description: 'Show loader when status is "thinking"',
|
|
27
|
-
},
|
|
28
|
-
className: {
|
|
29
|
-
control: 'text',
|
|
30
|
-
description: 'Class name',
|
|
31
|
-
},
|
|
32
|
-
qa: {
|
|
33
|
-
control: 'text',
|
|
34
|
-
description: 'QA attribute',
|
|
35
|
-
},
|
|
36
|
-
style: {
|
|
37
|
-
control: 'object',
|
|
38
|
-
description: 'Style',
|
|
39
|
-
},
|
|
40
|
-
onCopyClick: {
|
|
41
|
-
action: 'copy clicked',
|
|
42
|
-
description: 'Copy button click handler',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
const defaultDecorators = [
|
|
47
|
-
(Story) => (_jsx(Showcase, { children: _jsx(Story, {}) })),
|
|
48
|
-
];
|
|
49
|
-
const thinkingData = {
|
|
50
|
-
data: {
|
|
51
|
-
content: [
|
|
52
|
-
'Lore ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
53
|
-
'Lore ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
54
|
-
],
|
|
55
|
-
status: 'thinking',
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
const thoughtData = {
|
|
59
|
-
data: {
|
|
60
|
-
content: [
|
|
61
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
62
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
63
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
64
|
-
],
|
|
65
|
-
status: 'thought',
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, args)) }));
|
|
69
|
-
Playground.args = Object.assign(Object.assign({}, thinkingData), { defaultExpanded: true, showStatusIndicator: true });
|
|
70
|
-
export const ThinkingState = {
|
|
71
|
-
render: () => (_jsx(ShowcaseItem, { title: "Thinking State (with loader)", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, thinkingData, { defaultExpanded: true, showStatusIndicator: true })) }) })),
|
|
72
|
-
decorators: defaultDecorators,
|
|
73
|
-
};
|
|
74
|
-
export const ThoughtState = {
|
|
75
|
-
render: () => (_jsx(ShowcaseItem, { title: "Thought State (completed)", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, thoughtData, { defaultExpanded: true, showStatusIndicator: true })) }) })),
|
|
76
|
-
decorators: defaultDecorators,
|
|
77
|
-
};
|
|
78
|
-
export const SingleContent = {
|
|
79
|
-
render: () => (_jsx(ShowcaseItem, { title: "Single Content String", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, { data: {
|
|
80
|
-
content: 'Processing your request and analyzing possible solutions.',
|
|
81
|
-
status: 'thinking',
|
|
82
|
-
}, defaultExpanded: true }) }) })),
|
|
83
|
-
decorators: defaultDecorators,
|
|
84
|
-
};
|
|
85
|
-
export const Collapsed = {
|
|
86
|
-
render: () => (_jsx(ShowcaseItem, { title: "Collapsed Initially", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, thoughtData, { defaultExpanded: false })) }) })),
|
|
87
|
-
decorators: defaultDecorators,
|
|
88
|
-
};
|
|
89
|
-
export const WithoutLoader = {
|
|
90
|
-
render: () => (_jsx(ShowcaseItem, { title: "Without Loader (showStatusIndicator=false)", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, thinkingData, { defaultExpanded: true, showStatusIndicator: false })) }) })),
|
|
91
|
-
decorators: defaultDecorators,
|
|
92
|
-
};
|
|
93
|
-
export const WithCopyAction = {
|
|
94
|
-
render: () => (_jsx(ShowcaseItem, { title: "With Copy Action", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, thoughtData, { defaultExpanded: true, onCopyClick: () => alert('Content copied to clipboard!') })) }) })),
|
|
95
|
-
decorators: defaultDecorators,
|
|
96
|
-
};
|
|
97
|
-
export const WithCustomStyle = {
|
|
98
|
-
render: (args) => (_jsx(ShowcaseItem, { title: "With Custom Style", children: _jsx(ContentWrapper, { width: "600px", children: _jsx(ThinkingMessage, Object.assign({}, args)) }) })),
|
|
99
|
-
decorators: defaultDecorators,
|
|
100
|
-
};
|
|
101
|
-
WithCustomStyle.args = Object.assign(Object.assign({}, thoughtData), { defaultExpanded: true, style: {
|
|
102
|
-
'--g-color-text-complementary': '#00aa00',
|
|
103
|
-
'--g-color-line-generic': '#ff6b35',
|
|
104
|
-
'--g-text-body-1-font-size': '16px',
|
|
105
|
-
'--g-text-body-font-weight': '500',
|
|
106
|
-
'--g-text-body-1-line-height': '18px',
|
|
107
|
-
}, onCopyClick: undefined });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import type { ToolMessageProps } from '../../../../types/tool';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<ToolMessageProps>;
|
|
6
|
-
export declare const WaitingSubmission: StoryObj<ToolMessageProps>;
|
|
7
|
-
export declare const WaitingConfirmation: StoryObj<ToolMessageProps>;
|
|
8
|
-
export declare const CustomHeaderActions: StoryObj<ToolMessageProps>;
|
|
9
|
-
export declare const CustomFooterActions: StoryObj<ToolMessageProps>;
|
|
10
|
-
export declare const Loading: StoryObj<ToolMessageProps>;
|
|
11
|
-
export declare const Error: StoryObj<ToolMessageProps>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Archive, Copy, Pencil } from '@gravity-ui/icons';
|
|
3
|
-
import { Icon, Text } from '@gravity-ui/uikit';
|
|
4
|
-
import { ToolMessage } from '..';
|
|
5
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
6
|
-
import { Showcase } from '../../../../demo/Showcase';
|
|
7
|
-
import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
|
|
8
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
9
|
-
import MDXDocs from './Docs.mdx';
|
|
10
|
-
export default {
|
|
11
|
-
title: 'organisms/ToolMessage',
|
|
12
|
-
component: ToolMessage,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
page: MDXDocs,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
argTypes: {
|
|
19
|
-
toolName: {
|
|
20
|
-
control: 'text',
|
|
21
|
-
description: 'Name of the tool',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
const defaultDecorators = [
|
|
26
|
-
(Story) => (_jsx(Showcase, { children: _jsx(Story, {}) })),
|
|
27
|
-
];
|
|
28
|
-
const defaultArgs = {
|
|
29
|
-
toolName: 'Writing',
|
|
30
|
-
toolIcon: _jsx(Icon, { data: Pencil, size: 16 }),
|
|
31
|
-
headerContent: _jsx(Text, { color: "secondary", children: "expectScreenshotFixture.ts" }),
|
|
32
|
-
};
|
|
33
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, args)) }));
|
|
34
|
-
Playground.args = Object.assign(Object.assign({}, defaultArgs), { status: 'success', bodyContent: _jsx(SwapArea, {}) });
|
|
35
|
-
export const WaitingSubmission = {
|
|
36
|
-
render: () => (_jsx(ShowcaseItem, { title: "Waiting Submission", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, { toolName: "Creating repository", status: "waitingSubmission", toolIcon: _jsx(Icon, { data: Archive, size: 16 }), bodyContent: _jsx(Text, { children: "Almost done creating your shiny new repository. Take a moment to review the name, visibility, and template. When you're ready, click 'Create repository' to finish!" }) }) }) })),
|
|
37
|
-
decorators: defaultDecorators,
|
|
38
|
-
};
|
|
39
|
-
export const WaitingConfirmation = {
|
|
40
|
-
render: () => (_jsx(ShowcaseItem, { title: "Waiting Confirmation", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, defaultArgs, { status: "waitingConfirmation", bodyContent: _jsx(SwapArea, {}) })) }) })),
|
|
41
|
-
decorators: defaultDecorators,
|
|
42
|
-
};
|
|
43
|
-
export const CustomHeaderActions = {
|
|
44
|
-
render: () => (_jsx(ShowcaseItem, { title: "With Custom Header Actions", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, defaultArgs, { headerActions: [
|
|
45
|
-
{
|
|
46
|
-
label: 'Copy',
|
|
47
|
-
onClick: () => alert('Copied'),
|
|
48
|
-
icon: _jsx(Icon, { data: Copy, size: 16 }),
|
|
49
|
-
},
|
|
50
|
-
] })) }) })),
|
|
51
|
-
decorators: defaultDecorators,
|
|
52
|
-
};
|
|
53
|
-
export const CustomFooterActions = {
|
|
54
|
-
render: () => (_jsx(ShowcaseItem, { title: "With Custom Footer Actions", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, defaultArgs, { status: "waitingConfirmation", footerActions: [
|
|
55
|
-
{
|
|
56
|
-
label: 'Custom action',
|
|
57
|
-
onClick: () => alert('Custom action'),
|
|
58
|
-
view: 'action',
|
|
59
|
-
},
|
|
60
|
-
], bodyContent: _jsx(SwapArea, {}), footerContent: "Custom footer content" })) }) })),
|
|
61
|
-
decorators: defaultDecorators,
|
|
62
|
-
};
|
|
63
|
-
export const Loading = {
|
|
64
|
-
render: () => (_jsx(ShowcaseItem, { title: "Loading", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, defaultArgs, { status: "loading" })) }) })),
|
|
65
|
-
decorators: defaultDecorators,
|
|
66
|
-
};
|
|
67
|
-
export const Error = {
|
|
68
|
-
render: () => (_jsx(ShowcaseItem, { title: "Error", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolMessage, Object.assign({}, defaultArgs, { status: "error", bodyContent: _jsx(SwapArea, {}) })) }) })),
|
|
69
|
-
decorators: defaultDecorators,
|
|
70
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"action-reject": "Reject",
|
|
3
|
-
"action-accept": "Accept",
|
|
4
|
-
"action-cancel": "Cancel",
|
|
5
|
-
"action-collapse": "Collapse",
|
|
6
|
-
"action-expand": "Expand",
|
|
7
|
-
"status-waiting-confirmation": "Awaiting confirmation",
|
|
8
|
-
"status-waiting-submission": "Awaiting form submission"
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"action-reject": "Отклонить",
|
|
3
|
-
"action-accept": "Принять",
|
|
4
|
-
"action-cancel": "Отменить",
|
|
5
|
-
"action-collapse": "Свернуть",
|
|
6
|
-
"action-expand": "Развернуть",
|
|
7
|
-
"status-waiting-confirmation": "Ожидание подтверждения",
|
|
8
|
-
"status-waiting-submission": "Ожидание отправки формы"
|
|
9
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/react-webpack5';
|
|
2
|
-
import { type UserMessageProps } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<UserMessageProps>;
|
|
6
|
-
export declare const ShowAvatar: StoryFn<UserMessageProps>;
|
|
7
|
-
export declare const ShowTimestamp: StoryFn<UserMessageProps>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { UserMessage } from '..';
|
|
3
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
4
|
-
import MDXDocs from './Docs.mdx';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'organisms/UserMessage',
|
|
7
|
-
component: UserMessage,
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
page: MDXDocs,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
data: {
|
|
15
|
-
control: 'text',
|
|
16
|
-
description: 'Message text',
|
|
17
|
-
},
|
|
18
|
-
actions: {
|
|
19
|
-
control: 'object',
|
|
20
|
-
description: 'Actions',
|
|
21
|
-
},
|
|
22
|
-
showActionsOnHover: {
|
|
23
|
-
control: 'boolean',
|
|
24
|
-
description: 'Show actions on hover',
|
|
25
|
-
},
|
|
26
|
-
showTimestamp: {
|
|
27
|
-
control: 'boolean',
|
|
28
|
-
description: 'Show timestamp',
|
|
29
|
-
},
|
|
30
|
-
timestamp: {
|
|
31
|
-
control: 'text',
|
|
32
|
-
description: 'Timestamp',
|
|
33
|
-
},
|
|
34
|
-
withAvatar: {
|
|
35
|
-
control: 'boolean',
|
|
36
|
-
description: 'Show avatar',
|
|
37
|
-
},
|
|
38
|
-
avatarUrl: {
|
|
39
|
-
control: 'text',
|
|
40
|
-
description: 'Avatar URL',
|
|
41
|
-
},
|
|
42
|
-
className: {
|
|
43
|
-
control: 'text',
|
|
44
|
-
description: 'Additional CSS class',
|
|
45
|
-
},
|
|
46
|
-
qa: {
|
|
47
|
-
control: 'text',
|
|
48
|
-
description: 'QA/test identifier',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
const buttons = [
|
|
53
|
-
{ type: 'copy', onClick: () => ({}) },
|
|
54
|
-
{ type: 'edit', onClick: () => ({}) },
|
|
55
|
-
];
|
|
56
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(UserMessage, Object.assign({}, args)) }));
|
|
57
|
-
Playground.args = {
|
|
58
|
-
content: 'Analyze the project and suggest a better solution to implement a feature-name',
|
|
59
|
-
actions: buttons,
|
|
60
|
-
};
|
|
61
|
-
export const ShowAvatar = (args) => (_jsx(ContentWrapper, { children: _jsx(UserMessage, Object.assign({}, args, { showAvatar: true })) }));
|
|
62
|
-
ShowAvatar.args = {
|
|
63
|
-
content: 'Analyze the project and suggest a better solution to implement a feature-name',
|
|
64
|
-
actions: buttons,
|
|
65
|
-
};
|
|
66
|
-
export const ShowTimestamp = (args) => (_jsx(ContentWrapper, { children: _jsx(UserMessage, Object.assign({}, args, { showTimestamp: true, timestamp: "1705312234567" })) }));
|
|
67
|
-
ShowTimestamp.args = {
|
|
68
|
-
content: 'Analyze the project and suggest a better solution to implement a feature-name',
|
|
69
|
-
actions: buttons,
|
|
70
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { ChatContainer } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof ChatContainer>;
|
|
6
|
-
/**
|
|
7
|
-
* Playground story for interactive testing
|
|
8
|
-
*/
|
|
9
|
-
export declare const Playground: Story;
|
|
10
|
-
/**
|
|
11
|
-
* Empty state with welcome screen
|
|
12
|
-
*/
|
|
13
|
-
export declare const EmptyState: Story;
|
|
14
|
-
/**
|
|
15
|
-
* State with messages
|
|
16
|
-
*/
|
|
17
|
-
export declare const WithMessages: Story;
|
|
18
|
-
/**
|
|
19
|
-
* With streaming
|
|
20
|
-
*/
|
|
21
|
-
export declare const WithStreaming: Story;
|
|
22
|
-
/**
|
|
23
|
-
* With history
|
|
24
|
-
*/
|
|
25
|
-
export declare const WithHistory: Story;
|
|
26
|
-
/**
|
|
27
|
-
* With custom i18n configuration
|
|
28
|
-
*/
|
|
29
|
-
export declare const WithI18nConfig: Story;
|
|
30
|
-
/**
|
|
31
|
-
* With component props override
|
|
32
|
-
*/
|
|
33
|
-
export declare const WithComponentPropsOverride: Story;
|
|
34
|
-
/**
|
|
35
|
-
* With context items
|
|
36
|
-
*/
|
|
37
|
-
export declare const WithContextItems: Story;
|
|
38
|
-
/**
|
|
39
|
-
* With context items and indicator
|
|
40
|
-
*/
|
|
41
|
-
export declare const WithContextItemsAndIndicator: Story;
|
|
42
|
-
/**
|
|
43
|
-
* With loading state
|
|
44
|
-
*/
|
|
45
|
-
export declare const LoadingState: Story;
|
|
46
|
-
/**
|
|
47
|
-
* With error
|
|
48
|
-
*/
|
|
49
|
-
export declare const ErrorState: Story;
|
|
50
|
-
/**
|
|
51
|
-
* Full example with realistic streaming via fetch API
|
|
52
|
-
*/
|
|
53
|
-
export declare const FullStreamingExample: Story;
|