@stack-spot/ai-chat-widget 0.10.0 → 1.0.0-dev.1768314799914
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/CHANGELOG.md +972 -0
- package/README.md +1 -0
- package/dist/AbortedError.d.ts +5 -0
- package/dist/AbortedError.d.ts.map +1 -0
- package/dist/AbortedError.js +7 -0
- package/dist/AbortedError.js.map +1 -0
- package/dist/StackspotAIWidget.d.ts +48 -7
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +22 -15
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +171 -0
- package/dist/assets/placeholder.png +0 -0
- package/dist/chat-interceptors/CustomInputs.d.ts +22 -0
- package/dist/chat-interceptors/CustomInputs.d.ts.map +1 -0
- package/dist/chat-interceptors/CustomInputs.js +71 -0
- package/dist/chat-interceptors/CustomInputs.js.map +1 -0
- package/dist/chat-interceptors/quick-command-questions.d.ts +14 -0
- package/dist/chat-interceptors/quick-command-questions.d.ts.map +1 -0
- package/dist/chat-interceptors/quick-command-questions.js +28 -0
- package/dist/chat-interceptors/quick-command-questions.js.map +1 -0
- package/dist/chat-interceptors/quick-commands.d.ts +14 -1
- package/dist/chat-interceptors/quick-commands.d.ts.map +1 -1
- package/dist/chat-interceptors/quick-commands.js +442 -8
- package/dist/chat-interceptors/quick-commands.js.map +1 -1
- package/dist/chat-interceptors/send-message.d.ts +27 -2
- package/dist/chat-interceptors/send-message.d.ts.map +1 -1
- package/dist/chat-interceptors/send-message.js +230 -29
- package/dist/chat-interceptors/send-message.js.map +1 -1
- package/dist/components/AdaptiveTextArea.d.ts +15 -3
- package/dist/components/AdaptiveTextArea.d.ts.map +1 -1
- package/dist/components/AdaptiveTextArea.js +22 -10
- package/dist/components/AdaptiveTextArea.js.map +1 -1
- package/dist/components/AgentCard/AgentCardCreate.d.ts +4 -0
- package/dist/components/AgentCard/AgentCardCreate.d.ts.map +1 -0
- package/dist/components/AgentCard/AgentCardCreate.js +33 -0
- package/dist/components/AgentCard/AgentCardCreate.js.map +1 -0
- package/dist/components/AgentCard/dictionary.d.ts +23 -0
- package/dist/components/AgentCard/dictionary.d.ts.map +1 -0
- package/dist/components/AgentCard/dictionary.js +23 -0
- package/dist/components/AgentCard/dictionary.js.map +1 -0
- package/dist/components/AgentCard/index.d.ts +5 -0
- package/dist/components/AgentCard/index.d.ts.map +1 -0
- package/dist/components/AgentCard/index.js +55 -0
- package/dist/components/AgentCard/index.js.map +1 -0
- package/dist/components/AnimatedOpacity.d.ts +8 -0
- package/dist/components/AnimatedOpacity.d.ts.map +1 -0
- package/dist/components/AnimatedOpacity.js +46 -0
- package/dist/components/AnimatedOpacity.js.map +1 -0
- package/dist/components/AutoFocus.d.ts +23 -0
- package/dist/components/AutoFocus.d.ts.map +1 -0
- package/dist/components/AutoFocus.js +23 -0
- package/dist/components/AutoFocus.js.map +1 -0
- package/dist/components/ButtonFavorite.d.ts +40 -0
- package/dist/components/ButtonFavorite.d.ts.map +1 -0
- package/dist/components/ButtonFavorite.js +25 -0
- package/dist/components/ButtonFavorite.js.map +1 -0
- package/dist/components/Code.d.ts +2 -1
- package/dist/components/Code.d.ts.map +1 -1
- package/dist/components/Code.js +52 -24
- package/dist/components/Code.js.map +1 -1
- package/dist/components/ComponentNavigator.d.ts +38 -0
- package/dist/components/ComponentNavigator.d.ts.map +1 -0
- package/dist/components/ComponentNavigator.js +31 -0
- package/dist/components/ComponentNavigator.js.map +1 -0
- package/dist/components/Fading.d.ts +32 -0
- package/dist/components/Fading.d.ts.map +1 -0
- package/dist/components/Fading.js +33 -0
- package/dist/components/Fading.js.map +1 -0
- package/dist/components/FadingOverflow.d.ts +25 -0
- package/dist/components/FadingOverflow.d.ts.map +1 -1
- package/dist/components/FadingOverflow.js +16 -8
- package/dist/components/FadingOverflow.js.map +1 -1
- package/dist/components/FileDescription.d.ts +10 -0
- package/dist/components/FileDescription.d.ts.map +1 -0
- package/dist/components/FileDescription.js +84 -0
- package/dist/components/FileDescription.js.map +1 -0
- package/dist/components/HistoryList.d.ts +15 -0
- package/dist/components/HistoryList.d.ts.map +1 -1
- package/dist/components/HistoryList.js +6 -2
- package/dist/components/HistoryList.js.map +1 -1
- package/dist/components/ListResource.d.ts +29 -0
- package/dist/components/ListResource.d.ts.map +1 -0
- package/dist/components/ListResource.js +17 -0
- package/dist/components/ListResource.js.map +1 -0
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown.js +2 -2
- package/dist/components/Markdown.js.map +1 -1
- package/dist/components/Modal.d.ts +9 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +56 -0
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/QuickStartButton.d.ts +2 -4
- package/dist/components/QuickStartButton.d.ts.map +1 -1
- package/dist/components/QuickStartButton.js +7 -39
- package/dist/components/QuickStartButton.js.map +1 -1
- package/dist/components/RightPanelContentList.d.ts +10 -0
- package/dist/components/RightPanelContentList.d.ts.map +1 -0
- package/dist/components/RightPanelContentList.js +7 -0
- package/dist/components/RightPanelContentList.js.map +1 -0
- package/dist/components/RightPanelForm.d.ts +3 -0
- package/dist/components/RightPanelForm.d.ts.map +1 -1
- package/dist/components/RightPanelForm.js +57 -17
- package/dist/components/RightPanelForm.js.map +1 -1
- package/dist/components/RightPanelTabs.d.ts +4 -4
- package/dist/components/RightPanelTabs.d.ts.map +1 -1
- package/dist/components/RightPanelTabs.js +7 -16
- package/dist/components/RightPanelTabs.js.map +1 -1
- package/dist/components/Selector/index.d.ts +54 -0
- package/dist/components/Selector/index.d.ts.map +1 -0
- package/dist/components/Selector/index.js +143 -0
- package/dist/components/Selector/index.js.map +1 -0
- package/dist/components/Selector/styled.d.ts +4 -0
- package/dist/components/Selector/styled.d.ts.map +1 -0
- package/dist/components/Selector/styled.js +157 -0
- package/dist/components/Selector/styled.js.map +1 -0
- package/dist/components/StackedBadge.d.ts +14 -0
- package/dist/components/StackedBadge.d.ts.map +1 -0
- package/dist/components/StackedBadge.js +56 -0
- package/dist/components/StackedBadge.js.map +1 -0
- package/dist/components/TabManager.d.ts +6 -0
- package/dist/components/TabManager.d.ts.map +1 -1
- package/dist/components/TabManager.js +16 -28
- package/dist/components/TabManager.js.map +1 -1
- package/dist/components/ToolBadge.d.ts +9 -0
- package/dist/components/ToolBadge.d.ts.map +1 -0
- package/dist/components/ToolBadge.js +34 -0
- package/dist/components/ToolBadge.js.map +1 -0
- package/dist/components/WorkspaceTabNavigator.d.ts +17 -0
- package/dist/components/WorkspaceTabNavigator.d.ts.map +1 -0
- package/dist/components/WorkspaceTabNavigator.js +93 -0
- package/dist/components/WorkspaceTabNavigator.js.map +1 -0
- package/dist/components/form/DescribedCheckboxGroup.d.ts +30 -2
- package/dist/components/form/DescribedCheckboxGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.js +75 -21
- package/dist/components/form/DescribedCheckboxGroup.js.map +1 -1
- package/dist/components/form/DescribedRadioGroup.d.ts +31 -2
- package/dist/components/form/DescribedRadioGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedRadioGroup.js +65 -16
- package/dist/components/form/DescribedRadioGroup.js.map +1 -1
- package/dist/components/form/dictionary.d.ts +19 -0
- package/dist/components/form/dictionary.d.ts.map +1 -0
- package/dist/components/form/dictionary.js +19 -0
- package/dist/components/form/dictionary.js.map +1 -0
- package/dist/components/form/styled.d.ts.map +1 -1
- package/dist/components/form/styled.js +1 -2
- package/dist/components/form/styled.js.map +1 -1
- package/dist/components/form/types.d.ts +42 -0
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/context/AIWidgetProvider.d.ts +19 -0
- package/dist/context/AIWidgetProvider.d.ts.map +1 -1
- package/dist/context/AIWidgetProvider.js +19 -0
- package/dist/context/AIWidgetProvider.js.map +1 -1
- package/dist/context/hooks.d.ts +61 -4
- package/dist/context/hooks.d.ts.map +1 -1
- package/dist/context/hooks.js +83 -13
- package/dist/context/hooks.js.map +1 -1
- package/dist/features.d.ts +72 -10
- package/dist/features.d.ts.map +1 -1
- package/dist/features.js +23 -8
- package/dist/features.js.map +1 -1
- package/dist/hooks/midnight-update-view.d.ts +5 -0
- package/dist/hooks/midnight-update-view.d.ts.map +1 -0
- package/dist/hooks/midnight-update-view.js +30 -0
- package/dist/hooks/midnight-update-view.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/layout.css +95 -28
- package/dist/regex.d.ts +3 -0
- package/dist/regex.d.ts.map +1 -0
- package/dist/regex.js +3 -0
- package/dist/regex.js.map +1 -0
- package/dist/right-panel/DefaultPanel.d.ts +3 -0
- package/dist/right-panel/DefaultPanel.d.ts.map +1 -1
- package/dist/right-panel/DefaultPanel.js +5 -4
- package/dist/right-panel/DefaultPanel.js.map +1 -1
- package/dist/right-panel/RightPanel.d.ts +3 -0
- package/dist/right-panel/RightPanel.d.ts.map +1 -1
- package/dist/right-panel/RightPanel.js +3 -0
- package/dist/right-panel/RightPanel.js.map +1 -1
- package/dist/right-panel/RightPanelProvider.d.ts +15 -0
- package/dist/right-panel/RightPanelProvider.d.ts.map +1 -1
- package/dist/right-panel/RightPanelProvider.js.map +1 -1
- package/dist/right-panel/constants.d.ts +2 -0
- package/dist/right-panel/constants.d.ts.map +1 -0
- package/dist/right-panel/constants.js +2 -0
- package/dist/right-panel/constants.js.map +1 -0
- package/dist/right-panel/hooks.d.ts +6 -0
- package/dist/right-panel/hooks.d.ts.map +1 -1
- package/dist/right-panel/hooks.js +8 -1
- package/dist/right-panel/hooks.js.map +1 -1
- package/dist/state/ChatEntry.d.ts +189 -15
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js +29 -18
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/state/ChatState.d.ts +129 -15
- package/dist/state/ChatState.d.ts.map +1 -1
- package/dist/state/ChatState.js +87 -11
- package/dist/state/ChatState.js.map +1 -1
- package/dist/state/ChatTabsController.d.ts +50 -1
- package/dist/state/ChatTabsController.d.ts.map +1 -1
- package/dist/state/ChatTabsController.js +77 -8
- package/dist/state/ChatTabsController.js.map +1 -1
- package/dist/state/ObservableState.d.ts +15 -1
- package/dist/state/ObservableState.d.ts.map +1 -1
- package/dist/state/ObservableState.js +14 -0
- package/dist/state/ObservableState.js.map +1 -1
- package/dist/state/WidgetState.d.ts +62 -2
- package/dist/state/WidgetState.d.ts.map +1 -1
- package/dist/state/WidgetState.js +49 -2
- package/dist/state/WidgetState.js.map +1 -1
- package/dist/state/constants.d.ts +5 -0
- package/dist/state/constants.d.ts.map +1 -0
- package/dist/state/constants.js +10 -0
- package/dist/state/constants.js.map +1 -0
- package/dist/state/types.d.ts +10 -1
- package/dist/state/types.d.ts.map +1 -1
- package/dist/types.d.ts +20 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/chat.d.ts +11 -4
- package/dist/utils/chat.d.ts.map +1 -1
- package/dist/utils/chat.js +15 -12
- package/dist/utils/chat.js.map +1 -1
- package/dist/utils/check-is-trial.d.ts +2 -0
- package/dist/utils/check-is-trial.d.ts.map +1 -0
- package/dist/utils/check-is-trial.js +6 -0
- package/dist/utils/check-is-trial.js.map +1 -0
- package/dist/utils/copy-to-clipboard.d.ts +6 -0
- package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
- package/dist/utils/copy-to-clipboard.js +30 -0
- package/dist/utils/copy-to-clipboard.js.map +1 -0
- package/dist/utils/date.d.ts +26 -2
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +28 -3
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/download.d.ts +5 -0
- package/dist/utils/download.d.ts.map +1 -1
- package/dist/utils/download.js +5 -0
- package/dist/utils/download.js.map +1 -1
- package/dist/utils/error.d.ts +2 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +54 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/knowledge-source.d.ts +12 -2
- package/dist/utils/knowledge-source.d.ts.map +1 -1
- package/dist/utils/knowledge-source.js +20 -6
- package/dist/utils/knowledge-source.js.map +1 -1
- package/dist/utils/planning-tool.d.ts +17 -0
- package/dist/utils/planning-tool.d.ts.map +1 -0
- package/dist/utils/planning-tool.js +32 -0
- package/dist/utils/planning-tool.js.map +1 -0
- package/dist/utils/programming-languages.d.ts +1 -0
- package/dist/utils/programming-languages.d.ts.map +1 -1
- package/dist/utils/programming-languages.js +11 -0
- package/dist/utils/programming-languages.js.map +1 -1
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +11 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/utils/tools.d.ts +23 -0
- package/dist/utils/tools.d.ts.map +1 -0
- package/dist/utils/tools.js +23 -0
- package/dist/utils/tools.js.map +1 -0
- package/dist/utils/update-tool-step.d.ts +3 -0
- package/dist/utils/update-tool-step.d.ts.map +1 -0
- package/dist/utils/update-tool-step.js +23 -0
- package/dist/utils/update-tool-step.js.map +1 -0
- package/dist/utils/upload/FileUpload.d.ts +21 -0
- package/dist/utils/upload/FileUpload.d.ts.map +1 -0
- package/dist/utils/upload/FileUpload.js +54 -0
- package/dist/utils/upload/FileUpload.js.map +1 -0
- package/dist/utils/upload/UploadManager.d.ts +42 -0
- package/dist/utils/upload/UploadManager.d.ts.map +1 -0
- package/dist/utils/upload/UploadManager.js +138 -0
- package/dist/utils/upload/UploadManager.js.map +1 -0
- package/dist/utils/upload/context.d.ts +15 -0
- package/dist/utils/upload/context.d.ts.map +1 -0
- package/dist/utils/upload/context.js +37 -0
- package/dist/utils/upload/context.js.map +1 -0
- package/dist/utils/upload/errors.d.ts +17 -0
- package/dist/utils/upload/errors.d.ts.map +1 -0
- package/dist/utils/upload/errors.js +27 -0
- package/dist/utils/upload/errors.js.map +1 -0
- package/dist/utils/upload/types.d.ts +7 -0
- package/dist/utils/upload/types.d.ts.map +1 -0
- package/dist/{components/Tooltip → utils/upload}/types.js.map +1 -1
- package/dist/utils/upload/use-paste-upload.d.ts +8 -0
- package/dist/utils/upload/use-paste-upload.d.ts.map +1 -0
- package/dist/utils/upload/use-paste-upload.js +19 -0
- package/dist/utils/upload/use-paste-upload.js.map +1 -0
- package/dist/utils/upload/utils.d.ts +4 -0
- package/dist/utils/upload/utils.d.ts.map +1 -0
- package/dist/utils/upload/utils.js +10 -0
- package/dist/utils/upload/utils.js.map +1 -0
- package/dist/utils/url.d.ts +2 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/url.js +8 -0
- package/dist/utils/url.js.map +1 -0
- package/dist/views/Agents/AgentDescription.d.ts +4 -0
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -0
- package/dist/views/Agents/AgentDescription.js +38 -0
- package/dist/views/Agents/AgentDescription.js.map +1 -0
- package/dist/views/Agents/AgentsPanel.d.ts +5 -0
- package/dist/views/Agents/AgentsPanel.d.ts.map +1 -0
- package/dist/views/Agents/AgentsPanel.js +45 -0
- package/dist/views/Agents/AgentsPanel.js.map +1 -0
- package/dist/views/Agents/AgentsTab.d.ts +11 -0
- package/dist/views/Agents/AgentsTab.d.ts.map +1 -0
- package/dist/views/Agents/AgentsTab.js +82 -0
- package/dist/views/Agents/AgentsTab.js.map +1 -0
- package/dist/views/Agents/dictionary.d.ts +2 -0
- package/dist/views/Agents/dictionary.d.ts.map +1 -0
- package/dist/views/Agents/dictionary.js +43 -0
- package/dist/views/Agents/dictionary.js.map +1 -0
- package/dist/views/Agents/index.d.ts +5 -0
- package/dist/views/Agents/index.d.ts.map +1 -0
- package/dist/views/Agents/index.js +21 -0
- package/dist/views/Agents/index.js.map +1 -0
- package/dist/views/Agents/styled.d.ts +3 -0
- package/dist/views/Agents/styled.d.ts.map +1 -0
- package/dist/views/Agents/styled.js +68 -0
- package/dist/views/Agents/styled.js.map +1 -0
- package/dist/views/Agents/useAgentFavorites.d.ts +8 -0
- package/dist/views/Agents/useAgentFavorites.d.ts.map +1 -0
- package/dist/views/Agents/useAgentFavorites.js +59 -0
- package/dist/views/Agents/useAgentFavorites.js.map +1 -0
- package/dist/views/Chat/AgentInfo.d.ts +5 -1
- package/dist/views/Chat/AgentInfo.d.ts.map +1 -1
- package/dist/views/Chat/AgentInfo.js +6 -5
- package/dist/views/Chat/AgentInfo.js.map +1 -1
- package/dist/views/Chat/ButtonExecutionDetail.d.ts +5 -0
- package/dist/views/Chat/ButtonExecutionDetail.d.ts.map +1 -0
- package/dist/views/Chat/ButtonExecutionDetail.js +34 -0
- package/dist/views/Chat/ButtonExecutionDetail.js.map +1 -0
- package/dist/views/Chat/ChatMessage.d.ts +57 -4
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +167 -20
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/ChatMessages.d.ts +6 -2
- package/dist/views/Chat/ChatMessages.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessages.js +5 -2
- package/dist/views/Chat/ChatMessages.js.map +1 -1
- package/dist/views/Chat/StepsList.d.ts +14 -0
- package/dist/views/Chat/StepsList.d.ts.map +1 -0
- package/dist/views/Chat/StepsList.js +192 -0
- package/dist/views/Chat/StepsList.js.map +1 -0
- package/dist/views/Chat/chat-scroll.d.ts +1 -1
- package/dist/views/Chat/chat-scroll.js +1 -1
- package/dist/views/Chat/events.d.ts +22 -0
- package/dist/views/Chat/events.d.ts.map +1 -0
- package/dist/views/Chat/events.js +67 -0
- package/dist/views/Chat/events.js.map +1 -0
- package/dist/views/Chat/index.d.ts +9 -2
- package/dist/views/Chat/index.d.ts.map +1 -1
- package/dist/views/Chat/index.js +5 -2
- package/dist/views/Chat/index.js.map +1 -1
- package/dist/views/Chat/styled.d.ts +3 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +183 -31
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/ChatHistory/ChatHistoryPanel.d.ts +4 -4
- package/dist/views/ChatHistory/ChatHistoryPanel.d.ts.map +1 -1
- package/dist/views/ChatHistory/ChatHistoryPanel.js +6 -2
- package/dist/views/ChatHistory/ChatHistoryPanel.js.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.d.ts +4 -3
- package/dist/views/ChatHistory/HistoryItem.d.ts.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.js +16 -37
- package/dist/views/ChatHistory/HistoryItem.js.map +1 -1
- package/dist/views/ChatHistory/dictionary.d.ts +1 -1
- package/dist/views/ChatHistory/index.d.ts +4 -4
- package/dist/views/ChatHistory/index.d.ts.map +1 -1
- package/dist/views/ChatHistory/index.js +6 -3
- package/dist/views/ChatHistory/index.js.map +1 -1
- package/dist/views/ChatHistory/styled.d.ts.map +1 -1
- package/dist/views/ChatHistory/styled.js +3 -5
- package/dist/views/ChatHistory/styled.js.map +1 -1
- package/dist/views/ChatHistory/utils.d.ts +17 -2
- package/dist/views/ChatHistory/utils.d.ts.map +1 -1
- package/dist/views/ChatHistory/utils.js +140 -9
- package/dist/views/ChatHistory/utils.js.map +1 -1
- package/dist/views/ChatTabSelection.d.ts +6 -4
- package/dist/views/ChatTabSelection.d.ts.map +1 -1
- package/dist/views/ChatTabSelection.js +40 -15
- package/dist/views/ChatTabSelection.js.map +1 -1
- package/dist/views/Editor.d.ts +3 -0
- package/dist/views/Editor.d.ts.map +1 -1
- package/dist/views/Editor.js +26 -20
- package/dist/views/Editor.js.map +1 -1
- package/dist/views/Home/BuiltInAgent.d.ts +6 -0
- package/dist/views/Home/BuiltInAgent.d.ts.map +1 -0
- package/dist/views/Home/BuiltInAgent.js +37 -0
- package/dist/views/Home/BuiltInAgent.js.map +1 -0
- package/dist/views/Home/CustomAgent.d.ts +5 -0
- package/dist/views/Home/CustomAgent.d.ts.map +1 -0
- package/dist/views/Home/CustomAgent.js +23 -0
- package/dist/views/Home/CustomAgent.js.map +1 -0
- package/dist/views/Home/index.d.ts +8 -0
- package/dist/views/Home/index.d.ts.map +1 -0
- package/dist/views/Home/index.js +34 -0
- package/dist/views/Home/index.js.map +1 -0
- package/dist/views/Home/styled.d.ts +2 -0
- package/dist/views/Home/styled.d.ts.map +1 -0
- package/dist/views/Home/styled.js +74 -0
- package/dist/views/Home/styled.js.map +1 -0
- package/dist/views/Home/types.d.ts +16 -0
- package/dist/views/Home/types.d.ts.map +1 -0
- package/dist/views/Home/types.js +2 -0
- package/dist/views/Home/types.js.map +1 -0
- package/dist/views/KSDocument.d.ts +3 -0
- package/dist/views/KSDocument.d.ts.map +1 -1
- package/dist/views/KSDocument.js +7 -4
- package/dist/views/KSDocument.js.map +1 -1
- package/dist/views/KnowledgeSources.d.ts +12 -0
- package/dist/views/KnowledgeSources.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.js +123 -33
- package/dist/views/KnowledgeSources.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts +5 -0
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -0
- package/dist/views/MessageInput/AgentSelector.js +66 -0
- package/dist/views/MessageInput/AgentSelector.js.map +1 -0
- package/dist/views/MessageInput/ButtonAgent.d.ts +2 -0
- package/dist/views/MessageInput/ButtonAgent.d.ts.map +1 -0
- package/dist/views/MessageInput/ButtonAgent.js +35 -0
- package/dist/views/MessageInput/ButtonAgent.js.map +1 -0
- package/dist/views/MessageInput/ButtonBar.d.ts +13 -0
- package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -0
- package/dist/views/MessageInput/ButtonBar.js +15 -0
- package/dist/views/MessageInput/ButtonBar.js.map +1 -0
- package/dist/views/MessageInput/ContextBar.d.ts +9 -0
- package/dist/views/MessageInput/ContextBar.d.ts.map +1 -0
- package/dist/views/MessageInput/ContextBar.js +51 -0
- package/dist/views/MessageInput/ContextBar.js.map +1 -0
- package/dist/views/MessageInput/ModelSwitcher/index.d.ts +2 -0
- package/dist/views/MessageInput/ModelSwitcher/index.d.ts.map +1 -0
- package/dist/views/MessageInput/ModelSwitcher/index.js +25 -0
- package/dist/views/MessageInput/ModelSwitcher/index.js.map +1 -0
- package/dist/views/MessageInput/ModelSwitcher/utils.d.ts +30 -0
- package/dist/views/MessageInput/ModelSwitcher/utils.d.ts.map +1 -0
- package/dist/views/MessageInput/ModelSwitcher/utils.js +91 -0
- package/dist/views/MessageInput/ModelSwitcher/utils.js.map +1 -0
- package/dist/views/MessageInput/QuickCommandSelector.d.ts +5 -0
- package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -0
- package/dist/views/MessageInput/QuickCommandSelector.js +104 -0
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -0
- package/dist/views/MessageInput/SelectContent.d.ts +2 -0
- package/dist/views/MessageInput/SelectContent.d.ts.map +1 -0
- package/dist/views/MessageInput/SelectContent.js +84 -0
- package/dist/views/MessageInput/SelectContent.js.map +1 -0
- package/dist/views/MessageInput/UploadBar.d.ts +2 -0
- package/dist/views/MessageInput/UploadBar.d.ts.map +1 -0
- package/dist/views/MessageInput/UploadBar.js +74 -0
- package/dist/views/MessageInput/UploadBar.js.map +1 -0
- package/dist/views/MessageInput/UploadDragNDrop.d.ts +14 -0
- package/dist/views/MessageInput/UploadDragNDrop.d.ts.map +1 -0
- package/dist/views/MessageInput/UploadDragNDrop.js +51 -0
- package/dist/views/MessageInput/UploadDragNDrop.js.map +1 -0
- package/dist/views/MessageInput/chat-entry-history.d.ts +11 -0
- package/dist/views/MessageInput/chat-entry-history.d.ts.map +1 -0
- package/dist/views/MessageInput/chat-entry-history.js +78 -0
- package/dist/views/MessageInput/chat-entry-history.js.map +1 -0
- package/dist/views/MessageInput/dictionary.d.ts +1 -1
- package/dist/views/MessageInput/dictionary.d.ts.map +1 -1
- package/dist/views/MessageInput/dictionary.js +52 -10
- package/dist/views/MessageInput/dictionary.js.map +1 -1
- package/dist/views/MessageInput/index.d.ts +9 -6
- package/dist/views/MessageInput/index.d.ts.map +1 -1
- package/dist/views/MessageInput/index.js +116 -20
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/MessageInput/styled.d.ts +13 -1
- package/dist/views/MessageInput/styled.d.ts.map +1 -1
- package/dist/views/MessageInput/styled.js +223 -85
- package/dist/views/MessageInput/styled.js.map +1 -1
- package/dist/views/MinimizedHeader.d.ts +4 -0
- package/dist/views/MinimizedHeader.d.ts.map +1 -1
- package/dist/views/MinimizedHeader.js +9 -7
- package/dist/views/MinimizedHeader.js.map +1 -1
- package/dist/views/Resources.d.ts +2 -0
- package/dist/views/Resources.d.ts.map +1 -0
- package/dist/views/Resources.js +69 -0
- package/dist/views/Resources.js.map +1 -0
- package/dist/views/Stacks.d.ts +12 -0
- package/dist/views/Stacks.d.ts.map +1 -1
- package/dist/views/Stacks.js +117 -21
- package/dist/views/Stacks.js.map +1 -1
- package/dist/views/Steps/FlowChart/HandleGroup.d.ts +10 -0
- package/dist/views/Steps/FlowChart/HandleGroup.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/HandleGroup.js +4 -0
- package/dist/views/Steps/FlowChart/HandleGroup.js.map +1 -0
- package/dist/views/Steps/FlowChart/NodeDynamic.d.ts +15 -0
- package/dist/views/Steps/FlowChart/NodeDynamic.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/NodeDynamic.js +41 -0
- package/dist/views/Steps/FlowChart/NodeDynamic.js.map +1 -0
- package/dist/views/Steps/FlowChart/NodeStep.d.ts +10 -0
- package/dist/views/Steps/FlowChart/NodeStep.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/NodeStep.js +13 -0
- package/dist/views/Steps/FlowChart/NodeStep.js.map +1 -0
- package/dist/views/Steps/FlowChart/hooks.d.ts +7 -0
- package/dist/views/Steps/FlowChart/hooks.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/hooks.js +31 -0
- package/dist/views/Steps/FlowChart/hooks.js.map +1 -0
- package/dist/views/Steps/FlowChart/index.d.ts +12 -0
- package/dist/views/Steps/FlowChart/index.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/index.js +78 -0
- package/dist/views/Steps/FlowChart/index.js.map +1 -0
- package/dist/views/Steps/FlowChart/layout.d.ts +8 -0
- package/dist/views/Steps/FlowChart/layout.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/layout.js +59 -0
- package/dist/views/Steps/FlowChart/layout.js.map +1 -0
- package/dist/views/Steps/FlowChart/styled.d.ts +14 -0
- package/dist/views/Steps/FlowChart/styled.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/styled.js +156 -0
- package/dist/views/Steps/FlowChart/styled.js.map +1 -0
- package/dist/views/Steps/FlowChart/types.d.ts +25 -0
- package/dist/views/Steps/FlowChart/types.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/types.js +2 -0
- package/dist/views/Steps/FlowChart/types.js.map +1 -0
- package/dist/views/Steps/StepModal.d.ts +10 -0
- package/dist/views/Steps/StepModal.d.ts.map +1 -0
- package/dist/views/Steps/StepModal.js +139 -0
- package/dist/views/Steps/StepModal.js.map +1 -0
- package/dist/views/Steps/StepsPanel.d.ts +6 -0
- package/dist/views/Steps/StepsPanel.d.ts.map +1 -0
- package/dist/views/Steps/StepsPanel.js +18 -0
- package/dist/views/Steps/StepsPanel.js.map +1 -0
- package/dist/views/Steps/dictionary.d.ts +43 -0
- package/dist/views/Steps/dictionary.d.ts.map +1 -0
- package/dist/views/Steps/dictionary.js +45 -0
- package/dist/views/Steps/dictionary.js.map +1 -0
- package/dist/views/Steps/index.d.ts +5 -0
- package/dist/views/Steps/index.d.ts.map +1 -0
- package/dist/views/Steps/index.js +30 -0
- package/dist/views/Steps/index.js.map +1 -0
- package/dist/views/Steps/utils.d.ts +7 -0
- package/dist/views/Steps/utils.d.ts.map +1 -0
- package/dist/views/Steps/utils.js +32 -0
- package/dist/views/Steps/utils.js.map +1 -0
- package/dist/views/Tools.d.ts +2 -0
- package/dist/views/Tools.d.ts.map +1 -0
- package/dist/views/Tools.js +53 -0
- package/dist/views/Tools.js.map +1 -0
- package/dist/views/Workspaces/WorkspacesTab.d.ts +20 -0
- package/dist/views/Workspaces/WorkspacesTab.d.ts.map +1 -0
- package/dist/views/Workspaces/WorkspacesTab.js +61 -0
- package/dist/views/Workspaces/WorkspacesTab.js.map +1 -0
- package/dist/views/Workspaces/index.d.ts +5 -0
- package/dist/views/Workspaces/index.d.ts.map +1 -0
- package/dist/views/Workspaces/index.js +69 -0
- package/dist/views/Workspaces/index.js.map +1 -0
- package/package.dev.json +3 -0
- package/package.json +20 -13
- package/package.stg.json +4 -0
- package/scripts/package-override.js +105 -0
- package/src/AbortedError.ts +7 -0
- package/src/StackspotAIWidget.tsx +96 -27
- package/src/app-metadata.json +171 -0
- package/src/assets/placeholder.png +0 -0
- package/src/chat-interceptors/CustomInputs.ts +83 -0
- package/src/chat-interceptors/quick-command-questions.ts +25 -0
- package/src/chat-interceptors/quick-commands.ts +503 -7
- package/src/chat-interceptors/send-message.ts +256 -28
- package/src/components/AdaptiveTextArea.tsx +36 -11
- package/src/components/AgentCard/AgentCardCreate.tsx +42 -0
- package/src/components/AgentCard/dictionary.ts +25 -0
- package/src/components/AgentCard/index.tsx +82 -0
- package/src/components/AnimatedOpacity.tsx +55 -0
- package/src/components/AutoFocus.tsx +42 -0
- package/src/components/ButtonFavorite.tsx +78 -0
- package/src/components/Code.tsx +94 -59
- package/src/components/ComponentNavigator.tsx +99 -0
- package/src/components/Fading.tsx +66 -0
- package/src/components/FadingOverflow.tsx +39 -12
- package/src/components/FileDescription.tsx +118 -0
- package/src/components/HistoryList.tsx +19 -2
- package/src/components/ListResource.tsx +60 -0
- package/src/components/Markdown.tsx +2 -1
- package/src/components/Modal.tsx +85 -0
- package/src/components/QuickStartButton.tsx +15 -47
- package/src/components/RightPanelContentList.tsx +15 -0
- package/src/components/RightPanelForm.tsx +64 -22
- package/src/components/RightPanelTabs.tsx +7 -32
- package/src/components/Selector/index.tsx +312 -0
- package/src/components/Selector/styled.ts +158 -0
- package/src/components/StackedBadge.tsx +77 -0
- package/src/components/TabManager.tsx +36 -36
- package/src/components/ToolBadge.tsx +67 -0
- package/src/components/WorkspaceTabNavigator.tsx +172 -0
- package/src/components/form/DescribedCheckboxGroup.tsx +135 -33
- package/src/components/form/DescribedRadioGroup.tsx +136 -32
- package/src/components/form/dictionary.ts +18 -0
- package/src/components/form/styled.ts +1 -2
- package/src/components/form/types.ts +45 -1
- package/src/context/AIWidgetProvider.tsx +19 -0
- package/src/context/hooks.ts +86 -16
- package/src/features.ts +90 -16
- package/src/hooks/midnight-update-view.ts +36 -0
- package/src/images.d.ts +5 -0
- package/src/index.ts +16 -0
- package/src/layout.css +95 -28
- package/src/regex.ts +2 -0
- package/src/right-panel/DefaultPanel.tsx +7 -7
- package/src/right-panel/RightPanel.tsx +3 -0
- package/src/right-panel/RightPanelProvider.tsx +15 -0
- package/src/right-panel/constants.ts +1 -0
- package/src/right-panel/hooks.tsx +8 -1
- package/src/state/ChatEntry.ts +194 -27
- package/src/state/ChatState.ts +172 -17
- package/src/state/ChatTabsController.ts +78 -8
- package/src/state/ObservableState.ts +15 -1
- package/src/state/WidgetState.ts +86 -3
- package/src/state/constants.ts +13 -0
- package/src/state/types.ts +12 -1
- package/src/types.ts +21 -4
- package/src/utils/chat.ts +17 -15
- package/src/utils/check-is-trial.ts +6 -0
- package/src/utils/copy-to-clipboard.ts +29 -0
- package/src/utils/date.ts +28 -4
- package/src/utils/download.ts +5 -0
- package/src/utils/error.ts +56 -0
- package/src/utils/knowledge-source.ts +22 -8
- package/src/utils/planning-tool.ts +41 -0
- package/src/utils/programming-languages.ts +12 -0
- package/src/utils/string.ts +10 -0
- package/src/utils/tools.ts +32 -0
- package/src/utils/update-tool-step.tsx +27 -0
- package/src/utils/upload/FileUpload.ts +63 -0
- package/src/utils/upload/UploadManager.ts +156 -0
- package/src/utils/upload/context.tsx +44 -0
- package/src/utils/upload/errors.ts +34 -0
- package/src/utils/upload/types.ts +7 -0
- package/src/utils/upload/use-paste-upload.tsx +30 -0
- package/src/utils/upload/utils.ts +12 -0
- package/src/utils/url.ts +8 -0
- package/src/views/Agents/AgentDescription.tsx +107 -0
- package/src/views/Agents/AgentsPanel.tsx +57 -0
- package/src/views/Agents/AgentsTab.tsx +126 -0
- package/src/views/Agents/dictionary.ts +45 -0
- package/src/views/Agents/index.tsx +26 -0
- package/src/views/Agents/styled.ts +69 -0
- package/src/views/Agents/useAgentFavorites.ts +63 -0
- package/src/views/Chat/AgentInfo.tsx +13 -8
- package/src/views/Chat/ButtonExecutionDetail.tsx +46 -0
- package/src/views/Chat/ChatMessage.tsx +472 -56
- package/src/views/Chat/ChatMessages.tsx +18 -4
- package/src/views/Chat/StepsList.tsx +394 -0
- package/src/views/Chat/chat-scroll.ts +1 -1
- package/src/views/Chat/events.ts +71 -0
- package/src/views/Chat/index.tsx +17 -3
- package/src/views/Chat/styled.ts +189 -32
- package/src/views/ChatHistory/ChatHistoryPanel.tsx +8 -5
- package/src/views/ChatHistory/HistoryItem.tsx +23 -44
- package/src/views/ChatHistory/index.tsx +6 -4
- package/src/views/ChatHistory/styled.ts +3 -5
- package/src/views/ChatHistory/utils.ts +144 -11
- package/src/views/ChatTabSelection.tsx +47 -20
- package/src/views/Editor.tsx +31 -22
- package/src/views/Home/BuiltInAgent.tsx +67 -0
- package/src/views/Home/CustomAgent.tsx +36 -0
- package/src/views/Home/index.tsx +48 -0
- package/src/views/Home/styled.ts +74 -0
- package/src/views/Home/types.ts +16 -0
- package/src/views/KSDocument.tsx +11 -8
- package/src/views/KnowledgeSources.tsx +169 -62
- package/src/views/MessageInput/AgentSelector.tsx +92 -0
- package/src/views/MessageInput/ButtonAgent.tsx +73 -0
- package/src/views/MessageInput/ButtonBar.tsx +57 -0
- package/src/views/MessageInput/ContextBar.tsx +117 -0
- package/src/views/MessageInput/ModelSwitcher/index.tsx +69 -0
- package/src/views/MessageInput/ModelSwitcher/utils.tsx +143 -0
- package/src/views/MessageInput/QuickCommandSelector.tsx +137 -0
- package/src/views/MessageInput/SelectContent.tsx +99 -0
- package/src/views/MessageInput/UploadBar.tsx +107 -0
- package/src/views/MessageInput/UploadDragNDrop.tsx +79 -0
- package/src/views/MessageInput/chat-entry-history.ts +97 -0
- package/src/views/MessageInput/dictionary.ts +52 -10
- package/src/views/MessageInput/index.tsx +158 -51
- package/src/views/MessageInput/styled.ts +226 -85
- package/src/views/MinimizedHeader.tsx +11 -10
- package/src/views/Resources.tsx +108 -0
- package/src/views/Stacks.tsx +152 -39
- package/src/views/Steps/FlowChart/HandleGroup.tsx +14 -0
- package/src/views/Steps/FlowChart/NodeDynamic.tsx +97 -0
- package/src/views/Steps/FlowChart/NodeStep.tsx +49 -0
- package/src/views/Steps/FlowChart/hooks.ts +41 -0
- package/src/views/Steps/FlowChart/index.tsx +111 -0
- package/src/views/Steps/FlowChart/layout.ts +73 -0
- package/src/views/Steps/FlowChart/styled.ts +157 -0
- package/src/views/Steps/FlowChart/types.ts +28 -0
- package/src/views/Steps/StepModal.tsx +233 -0
- package/src/views/Steps/StepsPanel.tsx +31 -0
- package/src/views/Steps/dictionary.ts +48 -0
- package/src/views/Steps/index.tsx +36 -0
- package/src/views/Steps/utils.tsx +34 -0
- package/src/views/Tools.tsx +77 -0
- package/src/views/Workspaces/WorkspacesTab.tsx +116 -0
- package/src/views/Workspaces/index.tsx +78 -0
- package/tsconfig.json +8 -3
- package/dist/components/Accordion.d.ts +0 -10
- package/dist/components/Accordion.d.ts.map +0 -1
- package/dist/components/Accordion.js +0 -46
- package/dist/components/Accordion.js.map +0 -1
- package/dist/components/Editor.d.ts +0 -9
- package/dist/components/Editor.d.ts.map +0 -1
- package/dist/components/Editor.js +0 -2
- package/dist/components/Editor.js.map +0 -1
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts +0 -30
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/ErrorBoundary.js +0 -38
- package/dist/components/FallbackBoundary/ErrorBoundary.js.map +0 -1
- package/dist/components/FallbackBoundary/Loading.d.ts +0 -2
- package/dist/components/FallbackBoundary/Loading.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/Loading.js +0 -12
- package/dist/components/FallbackBoundary/Loading.js.map +0 -1
- package/dist/components/FallbackBoundary/index.d.ts +0 -6
- package/dist/components/FallbackBoundary/index.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/index.js +0 -9
- package/dist/components/FallbackBoundary/index.js.map +0 -1
- package/dist/components/IconInput.d.ts +0 -7
- package/dist/components/IconInput.d.ts.map +0 -1
- package/dist/components/IconInput.js +0 -58
- package/dist/components/IconInput.js.map +0 -1
- package/dist/components/OverlayMenu.d.ts +0 -10
- package/dist/components/OverlayMenu.d.ts.map +0 -1
- package/dist/components/OverlayMenu.js +0 -58
- package/dist/components/OverlayMenu.js.map +0 -1
- package/dist/components/ProgressBar.d.ts +0 -11
- package/dist/components/ProgressBar.d.ts.map +0 -1
- package/dist/components/ProgressBar.js +0 -126
- package/dist/components/ProgressBar.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -12
- package/dist/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.js +0 -17
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/Tooltip/TooltipAPI.d.ts +0 -13
- package/dist/components/Tooltip/TooltipAPI.d.ts.map +0 -1
- package/dist/components/Tooltip/TooltipAPI.js +0 -90
- package/dist/components/Tooltip/TooltipAPI.js.map +0 -1
- package/dist/components/Tooltip/context.d.ts +0 -5
- package/dist/components/Tooltip/context.d.ts.map +0 -1
- package/dist/components/Tooltip/context.js +0 -18
- package/dist/components/Tooltip/context.js.map +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -3
- package/dist/components/Tooltip/index.d.ts.map +0 -1
- package/dist/components/Tooltip/index.js +0 -3
- package/dist/components/Tooltip/index.js.map +0 -1
- package/dist/components/Tooltip/style.d.ts +0 -4
- package/dist/components/Tooltip/style.d.ts.map +0 -1
- package/dist/components/Tooltip/style.js +0 -22
- package/dist/components/Tooltip/style.js.map +0 -1
- package/dist/components/Tooltip/types.d.ts +0 -14
- package/dist/components/Tooltip/types.d.ts.map +0 -1
- package/dist/views/Agents.d.ts +0 -2
- package/dist/views/Agents.d.ts.map +0 -1
- package/dist/views/Agents.js +0 -143
- package/dist/views/Agents.js.map +0 -1
- package/dist/views/Home.d.ts +0 -6
- package/dist/views/Home.d.ts.map +0 -1
- package/dist/views/Home.js +0 -68
- package/dist/views/Home.js.map +0 -1
- package/dist/views/MessageInput/ButtonGroup.d.ts +0 -12
- package/dist/views/MessageInput/ButtonGroup.d.ts.map +0 -1
- package/dist/views/MessageInput/ButtonGroup.js +0 -24
- package/dist/views/MessageInput/ButtonGroup.js.map +0 -1
- package/dist/views/MessageInput/InfoBar.d.ts +0 -2
- package/dist/views/MessageInput/InfoBar.d.ts.map +0 -1
- package/dist/views/MessageInput/InfoBar.js +0 -35
- package/dist/views/MessageInput/InfoBar.js.map +0 -1
- package/dist/views/Workspaces.d.ts +0 -2
- package/dist/views/Workspaces.d.ts.map +0 -1
- package/dist/views/Workspaces.js +0 -62
- package/dist/views/Workspaces.js.map +0 -1
- package/src/components/Accordion.tsx +0 -64
- package/src/components/Editor.tsx +0 -12
- package/src/components/FallbackBoundary/ErrorBoundary.tsx +0 -48
- package/src/components/FallbackBoundary/Loading.tsx +0 -14
- package/src/components/FallbackBoundary/index.tsx +0 -15
- package/src/components/IconInput.tsx +0 -70
- package/src/components/OverlayMenu.tsx +0 -77
- package/src/components/ProgressBar.tsx +0 -153
- package/src/components/Tooltip/Tooltip.tsx +0 -36
- package/src/components/Tooltip/TooltipAPI.ts +0 -84
- package/src/components/Tooltip/context.tsx +0 -24
- package/src/components/Tooltip/index.ts +0 -2
- package/src/components/Tooltip/style.tsx +0 -24
- package/src/components/Tooltip/types.ts +0 -15
- package/src/views/Agents.tsx +0 -200
- package/src/views/Home.tsx +0 -109
- package/src/views/MessageInput/ButtonGroup.tsx +0 -91
- package/src/views/MessageInput/InfoBar.tsx +0 -82
- package/src/views/Workspaces.tsx +0 -92
- /package/dist/{components/Tooltip → utils/upload}/types.js +0 -0
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { listToClass, theme, WithStyle } from '@stack-spot/portal-theme'
|
|
2
|
-
import { styled } from 'styled-components'
|
|
3
|
-
|
|
4
|
-
interface Props extends WithStyle {
|
|
5
|
-
visible?: boolean,
|
|
6
|
-
shimmer?: boolean,
|
|
7
|
-
foregroundColor?: string | string[],
|
|
8
|
-
backgroundColor?: string | string[],
|
|
9
|
-
shimmerColor?: string | string[],
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function gradientFromColorArray(colors: string[]) {
|
|
13
|
-
if (colors.length === 1) return colors[0]
|
|
14
|
-
const step = 100 / (colors.length - 1)
|
|
15
|
-
const partials: string[] = []
|
|
16
|
-
let current = 0
|
|
17
|
-
for (const color of colors) {
|
|
18
|
-
partials.push(`${color} ${Math.ceil(current)}%`)
|
|
19
|
-
current += step
|
|
20
|
-
}
|
|
21
|
-
return `linear-gradient(to right, ${partials.join(', ')})`
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const SHIMMER_PADDING = '10px'
|
|
25
|
-
|
|
26
|
-
const Styled = styled.div<{ $bg: string[], $fg: string[], $shimmer: string[] }>`
|
|
27
|
-
margin: 7px 0;
|
|
28
|
-
opacity: 0;
|
|
29
|
-
transition: opacity 0.5s;
|
|
30
|
-
|
|
31
|
-
&.visible {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.shimmer {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
height: 10px;
|
|
40
|
-
position: relative;
|
|
41
|
-
padding: 0 ${SHIMMER_PADDING};
|
|
42
|
-
margin: 3px 0;
|
|
43
|
-
|
|
44
|
-
.progress-glow {
|
|
45
|
-
filter: blur(2px);
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 0;
|
|
48
|
-
left: ${SHIMMER_PADDING};
|
|
49
|
-
bottom: 0;
|
|
50
|
-
right: ${SHIMMER_PADDING};
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
|
|
56
|
-
&::before {
|
|
57
|
-
content: '';
|
|
58
|
-
height: 3px;
|
|
59
|
-
display: block;
|
|
60
|
-
width: 33%;
|
|
61
|
-
display: block;
|
|
62
|
-
animation: slide 3s infinite forwards;
|
|
63
|
-
background: ${({ $fg }) => gradientFromColorArray($fg)};
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.colors {
|
|
68
|
-
position: absolute;
|
|
69
|
-
top: 0;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
left: 0;
|
|
72
|
-
right: 0;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
filter: blur(10px);
|
|
75
|
-
|
|
76
|
-
${({ $shimmer }) => `
|
|
77
|
-
&:before {
|
|
78
|
-
content: '';
|
|
79
|
-
position: absolute;
|
|
80
|
-
top: 0;
|
|
81
|
-
bottom: 0;
|
|
82
|
-
width: ${$shimmer.length * 100}%;
|
|
83
|
-
background: ${gradientFromColorArray($shimmer)};
|
|
84
|
-
${$shimmer.length > 2 ? `animation: shimmer-slide ${$shimmer.length}s ease-in infinite alternate;` : ''}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@keyframes shimmer-slide {
|
|
88
|
-
from {
|
|
89
|
-
left: 0;
|
|
90
|
-
}
|
|
91
|
-
to {
|
|
92
|
-
left: -${($shimmer.length - 1) * 100}%;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
`}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.progress-bar {
|
|
100
|
-
height: 2px;
|
|
101
|
-
width: 100%;
|
|
102
|
-
background: ${({ $bg }) => gradientFromColorArray($bg)};
|
|
103
|
-
position: relative;
|
|
104
|
-
overflow-x: clip;
|
|
105
|
-
|
|
106
|
-
&:before {
|
|
107
|
-
content: '';
|
|
108
|
-
display: block;
|
|
109
|
-
width: 33%;
|
|
110
|
-
height: 100%;
|
|
111
|
-
background: ${({ $fg }) => gradientFromColorArray($fg)};
|
|
112
|
-
animation: slide 3s infinite forwards;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@keyframes slide {
|
|
116
|
-
from {
|
|
117
|
-
margin-left: -33%;
|
|
118
|
-
}
|
|
119
|
-
to {
|
|
120
|
-
margin-left: 100%;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
export const ProgressBar = ({
|
|
127
|
-
visible = true,
|
|
128
|
-
shimmer,
|
|
129
|
-
backgroundColor = shimmer ? 'rgba(255, 255, 255, 0.4)' : theme.color.light[500],
|
|
130
|
-
foregroundColor = shimmer ? ['#FFF0', '#FFF', '#FFF0'] : theme.color.primary[500],
|
|
131
|
-
shimmerColor = ['#ff6633', '#d668cd', '#ff6633', '#FFF8', '#299cf4'],
|
|
132
|
-
className,
|
|
133
|
-
style,
|
|
134
|
-
}: Props) => {
|
|
135
|
-
const $bg = Array.isArray(backgroundColor) ? backgroundColor : [backgroundColor]
|
|
136
|
-
const $fg = Array.isArray(foregroundColor) ? foregroundColor : [...$bg, foregroundColor, ...$bg]
|
|
137
|
-
const $shimmer = Array.isArray(shimmerColor) ? shimmerColor : [shimmerColor]
|
|
138
|
-
const progress = <div className="progress-bar"></div>
|
|
139
|
-
const result = shimmer
|
|
140
|
-
? (
|
|
141
|
-
<div className="shimmer">
|
|
142
|
-
<div className="colors"></div>
|
|
143
|
-
<div className="progress-glow"></div>
|
|
144
|
-
{progress}
|
|
145
|
-
</div>
|
|
146
|
-
)
|
|
147
|
-
: progress
|
|
148
|
-
return (
|
|
149
|
-
<Styled className={listToClass([className, visible && 'visible'])} style={style} $fg={$fg} $bg={$bg} $shimmer={$shimmer}>
|
|
150
|
-
{result}
|
|
151
|
-
</Styled>
|
|
152
|
-
)
|
|
153
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Text } from '@citric/core'
|
|
2
|
-
import { WithStyle } from '@stack-spot/portal-theme'
|
|
3
|
-
import { WithChildren } from '../../types'
|
|
4
|
-
import { useTooltip } from './context'
|
|
5
|
-
import { DefaultTooltip } from './style'
|
|
6
|
-
import { TooltipPosition } from './types'
|
|
7
|
-
|
|
8
|
-
interface Props extends WithChildren, WithStyle {
|
|
9
|
-
content: React.ReactNode,
|
|
10
|
-
position?: TooltipPosition,
|
|
11
|
-
triggeredBy?: 'click' | 'hover',
|
|
12
|
-
custom?: boolean,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const Tooltip = ({ content, custom, position, triggeredBy = 'hover', children, className, style }: Props) => {
|
|
16
|
-
const api = useTooltip()
|
|
17
|
-
|
|
18
|
-
function show(e: React.MouseEvent<HTMLDivElement, MouseEvent>, hideOnClickOutside?: boolean) {
|
|
19
|
-
api.show({
|
|
20
|
-
content: custom ? content : <DefaultTooltip><Text appearance="microtext1">{content}</Text></DefaultTooltip>,
|
|
21
|
-
anchor: e.target as HTMLElement,
|
|
22
|
-
position,
|
|
23
|
-
hideOnClickOutside,
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
return (
|
|
27
|
-
<div
|
|
28
|
-
{...(triggeredBy === 'hover' ? { onMouseEnter: show, onMouseLeave: () => api.hide() } : { onClick: (e) => show(e, true) })}
|
|
29
|
-
className={className}
|
|
30
|
-
style={style}
|
|
31
|
-
tabIndex={triggeredBy === 'click' ? 0 : undefined}
|
|
32
|
-
>
|
|
33
|
-
{children}
|
|
34
|
-
</div>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { animationTimeMS } from './style'
|
|
2
|
-
import { ShowOptions } from './types'
|
|
3
|
-
|
|
4
|
-
const MARGIN_TO_CORNERS_PX = 10
|
|
5
|
-
|
|
6
|
-
function isRelative(element: HTMLElement) {
|
|
7
|
-
return ['relative', 'absolute', 'fixed'].includes(element.computedStyleMap().get('position')?.toString() ?? '')
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export class TooltipAPI {
|
|
11
|
-
private tooltipRef: React.RefObject<HTMLDivElement>
|
|
12
|
-
private setContent: React.Dispatch<React.SetStateAction<React.ReactNode>>
|
|
13
|
-
private hideTimeoutId: number | undefined
|
|
14
|
-
private clickListener: ((e: MouseEvent) => void) | undefined
|
|
15
|
-
private relativeTo: HTMLElement | undefined
|
|
16
|
-
|
|
17
|
-
constructor(tooltipRef: React.RefObject<HTMLDivElement>, setContent: React.Dispatch<React.SetStateAction<React.ReactNode>>) {
|
|
18
|
-
this.tooltipRef = tooltipRef
|
|
19
|
-
this.setContent = setContent
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
private computeRelativeTo() {
|
|
23
|
-
if (this.relativeTo) return
|
|
24
|
-
this.relativeTo = this.tooltipRef.current?.parentElement as HTMLElement
|
|
25
|
-
while (this.relativeTo && this.relativeTo !== document.body && !isRelative(this.relativeTo)) {
|
|
26
|
-
this.relativeTo = this.relativeTo.parentElement as HTMLElement
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
show({ content, anchor, position = 'bottom', hideOnClickOutside }: ShowOptions): void {
|
|
31
|
-
window.clearTimeout(this.hideTimeoutId)
|
|
32
|
-
this.hideTimeoutId = undefined
|
|
33
|
-
if (this.clickListener) document.removeEventListener('click', this.clickListener)
|
|
34
|
-
this.setContent(content)
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
if (!this.tooltipRef.current) return
|
|
37
|
-
const anchorRect = anchor.getClientRects()[0]
|
|
38
|
-
this.tooltipRef.current.classList.add('visible')
|
|
39
|
-
const tooltipWidth = this.tooltipRef.current.clientWidth
|
|
40
|
-
const tooltipHeight = this.tooltipRef.current.clientHeight
|
|
41
|
-
let top = 0
|
|
42
|
-
let left = 0
|
|
43
|
-
if (position === 'left' || position === 'right') {
|
|
44
|
-
top = anchorRect.top + anchorRect.height / 2 - tooltipHeight / 2
|
|
45
|
-
if (position === 'left') left = anchorRect.left - tooltipWidth
|
|
46
|
-
else left = anchorRect.left + anchorRect.width
|
|
47
|
-
} else {
|
|
48
|
-
left = anchorRect.left + anchorRect.width / 2 - tooltipWidth / 2
|
|
49
|
-
if (position === 'top') top = anchorRect.top - tooltipHeight
|
|
50
|
-
else top = anchorRect.top + anchorRect.height
|
|
51
|
-
}
|
|
52
|
-
// takes the parent the tooltip is positioned relative to into consideration
|
|
53
|
-
this.computeRelativeTo()
|
|
54
|
-
const relativeRect = this.relativeTo?.getClientRects()[0] ?? { top: 0, left: 0 }
|
|
55
|
-
top -= relativeRect.top
|
|
56
|
-
left -= relativeRect.left
|
|
57
|
-
// adjusts positions in order to avoid overflowing the window and leaving a margin to the corners
|
|
58
|
-
if (top <= 0) top += MARGIN_TO_CORNERS_PX
|
|
59
|
-
else if (top + tooltipHeight >= document.body.clientHeight - MARGIN_TO_CORNERS_PX) {
|
|
60
|
-
top = document.body.clientHeight - MARGIN_TO_CORNERS_PX + tooltipHeight
|
|
61
|
-
}
|
|
62
|
-
if (left <= 0) left += MARGIN_TO_CORNERS_PX
|
|
63
|
-
else if (left + tooltipWidth >= document.body.clientWidth - MARGIN_TO_CORNERS_PX) {
|
|
64
|
-
left = document.body.clientWidth - MARGIN_TO_CORNERS_PX - tooltipWidth
|
|
65
|
-
}
|
|
66
|
-
this.tooltipRef.current.style.top = `${top}px`
|
|
67
|
-
this.tooltipRef.current.style.left = `${left}px`
|
|
68
|
-
if (hideOnClickOutside) {
|
|
69
|
-
this.clickListener = (e: MouseEvent) => {
|
|
70
|
-
if (this.tooltipRef.current?.contains(e.target as HTMLElement)) return
|
|
71
|
-
this.hide()
|
|
72
|
-
}
|
|
73
|
-
document.addEventListener('click', this.clickListener)
|
|
74
|
-
}
|
|
75
|
-
}, 10)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
hide(): void {
|
|
79
|
-
if (!this.tooltipRef.current) return
|
|
80
|
-
this.tooltipRef.current.classList.remove('visible')
|
|
81
|
-
this.hideTimeoutId = window.setTimeout(() => this.setContent(undefined), animationTimeMS)
|
|
82
|
-
if (this.clickListener) document.removeEventListener('click', this.clickListener)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, useMemo, useRef, useState } from 'react'
|
|
2
|
-
import { WithChildren } from '../../types'
|
|
3
|
-
import { TooltipBox } from './style'
|
|
4
|
-
import { TooltipAPI } from './TooltipAPI'
|
|
5
|
-
|
|
6
|
-
const Context = createContext<TooltipAPI | undefined>(undefined)
|
|
7
|
-
|
|
8
|
-
export const TooltipProvider = ({ children }: Required<WithChildren>) => {
|
|
9
|
-
const ref = useRef<HTMLDivElement>(null)
|
|
10
|
-
const [content, setContent] = useState<React.ReactNode>()
|
|
11
|
-
const api = useMemo(() => new TooltipAPI(ref, setContent), [])
|
|
12
|
-
return (
|
|
13
|
-
<Context.Provider value={api}>
|
|
14
|
-
{children}
|
|
15
|
-
<TooltipBox ref={ref}>{content}</TooltipBox>
|
|
16
|
-
</Context.Provider>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function useTooltip() {
|
|
21
|
-
const api = useContext(Context)
|
|
22
|
-
if (!api) throw new Error('In order to use tooltips, you must wrap your content in a <TooltipProvider>.')
|
|
23
|
-
return api
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { theme } from '@stack-spot/portal-theme'
|
|
2
|
-
import { styled } from 'styled-components'
|
|
3
|
-
|
|
4
|
-
export const animationTimeMS = 300
|
|
5
|
-
|
|
6
|
-
export const TooltipBox = styled.div`
|
|
7
|
-
position: absolute;
|
|
8
|
-
opacity: 0;
|
|
9
|
-
transition: opacity ${animationTimeMS/ 1000}s;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
|
|
13
|
-
&.visible {
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
export const DefaultTooltip = styled.div`
|
|
19
|
-
padding: 4px 8px;
|
|
20
|
-
background-color: ${theme.color.inverse[500]};
|
|
21
|
-
color: ${theme.color.inverse.contrastText};
|
|
22
|
-
border-radius: 6px;
|
|
23
|
-
margin: 6px;
|
|
24
|
-
`
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type TooltipPosition = 'left' | 'right' | 'top' | 'bottom'
|
|
2
|
-
|
|
3
|
-
export interface BoxPosition {
|
|
4
|
-
x1: number,
|
|
5
|
-
x2: number,
|
|
6
|
-
y1: number,
|
|
7
|
-
y2: number,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ShowOptions {
|
|
11
|
-
content: React.ReactNode,
|
|
12
|
-
anchor: HTMLElement,
|
|
13
|
-
position?: TooltipPosition,
|
|
14
|
-
hideOnClickOutside?: boolean,
|
|
15
|
-
}
|
package/src/views/Agents.tsx
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { Button, Text } from '@citric/core'
|
|
2
|
-
import { Search } from '@citric/icons'
|
|
3
|
-
import { Badge } from '@citric/ui'
|
|
4
|
-
import { Placeholder } from '@stack-spot/portal-components/Placeholder'
|
|
5
|
-
import { MiniLogo } from '@stack-spot/portal-components/svg'
|
|
6
|
-
import { agentClient } from '@stack-spot/portal-network'
|
|
7
|
-
import { AgentResponse, VisibilityLevel } from '@stack-spot/portal-network/api/agent'
|
|
8
|
-
import { theme } from '@stack-spot/portal-theme'
|
|
9
|
-
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
10
|
-
import { useEffect, useMemo, useState } from 'react'
|
|
11
|
-
import { styled } from 'styled-components'
|
|
12
|
-
import { DescribedRadioGroup } from '../components/form/DescribedRadioGroup'
|
|
13
|
-
import { IconInput } from '../components/IconInput'
|
|
14
|
-
import { RightPanelTabs } from '../components/RightPanelTabs'
|
|
15
|
-
import { useCurrentChat, useWidget, useWidgetState } from '../context/hooks'
|
|
16
|
-
import { useRightPanel } from '../right-panel/hooks'
|
|
17
|
-
|
|
18
|
-
const AgentLabel = styled.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: 6px;
|
|
23
|
-
|
|
24
|
-
img, svg {
|
|
25
|
-
width: 20px;
|
|
26
|
-
height: 20px;
|
|
27
|
-
border-radius: 50%;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
}
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
const AgentDescription = styled.div`
|
|
33
|
-
color: ${theme.color.light[700]};
|
|
34
|
-
line-height: 18px;
|
|
35
|
-
|
|
36
|
-
section {
|
|
37
|
-
border-bottom: 1px solid ${theme.color.light[600]};
|
|
38
|
-
padding-bottom: 10px;
|
|
39
|
-
margin-bottom: 10px;
|
|
40
|
-
|
|
41
|
-
&:last-child {
|
|
42
|
-
padding-bottom: 0;
|
|
43
|
-
margin-bottom: 0;
|
|
44
|
-
border-bottom: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.title {
|
|
48
|
-
display: block;
|
|
49
|
-
margin-bottom: 6px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
ul {
|
|
54
|
-
padding: 0;
|
|
55
|
-
margin: 0;
|
|
56
|
-
list-style: none;
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: row;
|
|
59
|
-
flex-wrap: wrap;
|
|
60
|
-
white-space: nowrap;
|
|
61
|
-
gap: 6px;
|
|
62
|
-
|
|
63
|
-
li {
|
|
64
|
-
margin: 3px 0;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
`
|
|
68
|
-
|
|
69
|
-
export const Agents = () => {
|
|
70
|
-
const t = useTranslate(dictionary)
|
|
71
|
-
const panel = useWidgetState('panel')
|
|
72
|
-
const { open } = useRightPanel()
|
|
73
|
-
const widget = useWidget()
|
|
74
|
-
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (panel === 'agent') open(
|
|
77
|
-
<AgentsPanel />,
|
|
78
|
-
{ title: t.title, description: t.description, onClose: () => widget.set('panel', undefined) },
|
|
79
|
-
)
|
|
80
|
-
}, [panel, t])
|
|
81
|
-
|
|
82
|
-
return null
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const AgentsPanel = () => {
|
|
86
|
-
const t = useTranslate(dictionary)
|
|
87
|
-
const chat = useCurrentChat()
|
|
88
|
-
|
|
89
|
-
return <RightPanelTabs key={chat.id} tabs={[
|
|
90
|
-
{ title: t.builtin, content: <AgentsTab key="builtin" visibility="BUILT-IN" /> },
|
|
91
|
-
{ title: t.personal, content: <AgentsTab key="personal" visibility="PERSONAL" /> },
|
|
92
|
-
{ title: t.shared, content: <AgentsTab key="shared" visibility="SHARED" /> },
|
|
93
|
-
{ title: t.account, content: <AgentsTab key="account" visibility="ACCOUNT" /> },
|
|
94
|
-
]} />
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const AgentsTab = ({ visibility }: { visibility: VisibilityLevel | 'BUILT-IN' }) => {
|
|
98
|
-
const t = useTranslate(dictionary)
|
|
99
|
-
const { close } = useRightPanel()
|
|
100
|
-
const chat = useCurrentChat()
|
|
101
|
-
const [filter, setFilter] = useState('')
|
|
102
|
-
const defaultAgent = useMemo(() => ({
|
|
103
|
-
name: 'Stackspot AI',
|
|
104
|
-
description: t.defaultAgentDescription,
|
|
105
|
-
llm_config: { model_slug: 'gpt4o' },
|
|
106
|
-
} as AgentResponse), [])
|
|
107
|
-
const agents = visibility === 'BUILT-IN' ? agentClient.publicAgents.useQuery({}) : agentClient.agents.useQuery({ visibility })
|
|
108
|
-
const [value, setValue] = useState<AgentResponse | undefined>(agents.find(a => a.id === chat.get('agent')?.id) ?? defaultAgent)
|
|
109
|
-
const filtered = useMemo(
|
|
110
|
-
() => {
|
|
111
|
-
const ags = visibility === 'BUILT-IN' ? [defaultAgent as AgentResponse, ...agents] : agents
|
|
112
|
-
return filter ? ags.filter(a => a === value || a.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : ags
|
|
113
|
-
},
|
|
114
|
-
[agents, filter, value],
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
function submit() {
|
|
118
|
-
if (value) {
|
|
119
|
-
chat.set('agent', value.id ? { id: value.id, label: value.name, image: value.avatar, builtIn: visibility === 'BUILT-IN' } : undefined)
|
|
120
|
-
}
|
|
121
|
-
close()
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return (
|
|
125
|
-
<>
|
|
126
|
-
<div className="content">
|
|
127
|
-
<IconInput icon={<Search />} value={filter} onChange={setFilter} className="search" />
|
|
128
|
-
{!!filtered.length && <DescribedRadioGroup
|
|
129
|
-
options={filtered}
|
|
130
|
-
keygen={a => a.id}
|
|
131
|
-
value={value}
|
|
132
|
-
onChange={setValue}
|
|
133
|
-
renderLabel={({ name, avatar, id }) => (
|
|
134
|
-
<AgentLabel>
|
|
135
|
-
{id ? (avatar && <img src={avatar} />) : <MiniLogo />}
|
|
136
|
-
<Text>{name}</Text>
|
|
137
|
-
</AgentLabel>
|
|
138
|
-
)}
|
|
139
|
-
renderDescription={({ description, llm_config: llmc, knowledge_sources_config: ksc }) => (
|
|
140
|
-
<AgentDescription>
|
|
141
|
-
{description && <section>
|
|
142
|
-
<Text appearance="microtext1" className="title">Description</Text>
|
|
143
|
-
<Text>{description}</Text>
|
|
144
|
-
</section>}
|
|
145
|
-
{!!ksc?.knowledge_sources?.length && <section>
|
|
146
|
-
<Text appearance="microtext1" className="title">Knowledge sources</Text>
|
|
147
|
-
<ul>
|
|
148
|
-
{ksc.knowledge_sources.map((ks, index) => <li key={index}><Badge palette="teal" appearance="square">{ks}</Badge></li>)}
|
|
149
|
-
</ul>
|
|
150
|
-
</section>}
|
|
151
|
-
{llmc?.model_slug && <section>
|
|
152
|
-
<Text appearance="microtext1" className="title">LLM</Text>
|
|
153
|
-
<Badge palette="orange" appearance="square">{llmc.model_slug}</Badge>
|
|
154
|
-
</section>}
|
|
155
|
-
</AgentDescription>
|
|
156
|
-
)}
|
|
157
|
-
optionClassName={a => (a === value && filter && !a.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
158
|
-
? 'filtered-out'
|
|
159
|
-
: ''
|
|
160
|
-
}
|
|
161
|
-
className="option-list"
|
|
162
|
-
/>}
|
|
163
|
-
{!!agents.length && !filtered.length && <Placeholder title={t.noSearchResults} description={t.noSearchResultsDescription} />}
|
|
164
|
-
{!agents.length && <Placeholder title={t.noData} description={t.noDataDescription} />}
|
|
165
|
-
</div>
|
|
166
|
-
<Button onClick={submit} disabled={!value}>{t.apply}</Button>
|
|
167
|
-
</>
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const dictionary = {
|
|
172
|
-
en: {
|
|
173
|
-
title: 'Agents',
|
|
174
|
-
description: 'By selecting an Agent, it will be consulted to generate the answers.',
|
|
175
|
-
personal: 'Personal',
|
|
176
|
-
builtin: 'Built-in',
|
|
177
|
-
shared: 'Shared',
|
|
178
|
-
account: 'Account',
|
|
179
|
-
apply: 'Apply',
|
|
180
|
-
noSearchResults: "Your search didn't yield results.",
|
|
181
|
-
noSearchResultsDescription: 'Please, try another search term.',
|
|
182
|
-
noData: 'There are no agents in this category yet.',
|
|
183
|
-
noDataDescription: 'Use the tabs above to try other categories or use the AI portal to create new agents.',
|
|
184
|
-
defaultAgentDescription: 'The StackSpot CodeGen is an advanced artificial intelligence agent designed to optimize and accelerate software development. Integrated directly into your integrated development environment, StackSpot CodeGen offers real-time code suggestions, helping developers write high-quality code more efficiently. With robust features such as creating Stacks AI, customized knowledge sources, and quick commands, StackSpot CodeGen contextualizes your development needs to provide the best answers and code suggestions.',
|
|
185
|
-
},
|
|
186
|
-
pt: {
|
|
187
|
-
title: 'Agentes',
|
|
188
|
-
description: 'Ao selecionar um Agente, ele será consultado para gerar as respostas.',
|
|
189
|
-
personal: 'Pessoal',
|
|
190
|
-
builtin: 'Embutido',
|
|
191
|
-
shared: 'Compartilhado',
|
|
192
|
-
account: 'Conta',
|
|
193
|
-
apply: 'Aplicar',
|
|
194
|
-
noSearchResults: 'Sua busca não produziu resultados.',
|
|
195
|
-
noSearchResultsDescription: 'Por favor, tente outra busca.',
|
|
196
|
-
noData: 'Ainda não há agentes nesta categoria.',
|
|
197
|
-
noDataDescription: 'Use as abas acima para tentar outras categorias ou use o Portal AI para criar novos agentes.',
|
|
198
|
-
defaultAgentDescription: 'O StackSpot CodeGen é um agente de inteligência artificial avançado projetado para otimizar e acelerar o desenvolvimento de software. Integrado diretamente ao seu ambiente de desenvolvimento, o StackSpot CodeGen oferece sugestões de código em tempo real, ajudando os desenvolvedores a escreverem código de alta qualidade de forma mais eficiente. Com recursos robustos, como a criação de Stacks AI, Knowledge Sources personalizadas e comandos rápidos, o StackSpot CodeGen contextualiza suas necessidades de desenvolvimento para fornecer as melhores respostas e sugestões de código.',
|
|
199
|
-
},
|
|
200
|
-
} satisfies Dictionary
|
package/src/views/Home.tsx
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { FaceSmile, KnowledgeSource, QuickCommand } from '@citric/icons'
|
|
2
|
-
import { MiniLogo } from '@stack-spot/portal-components/svg'
|
|
3
|
-
import { theme } from '@stack-spot/portal-theme'
|
|
4
|
-
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
-
import { styled } from 'styled-components'
|
|
6
|
-
import { QuickStartButton } from '../components/QuickStartButton'
|
|
7
|
-
import { useCurrentChat } from '../context/hooks'
|
|
8
|
-
import { ChatEntry } from '../state/ChatEntry'
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
username: string,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const HomeBox = styled.div`
|
|
15
|
-
margin: auto;
|
|
16
|
-
|
|
17
|
-
.title, .subtitle {
|
|
18
|
-
font-family: 'San Francisco';
|
|
19
|
-
font-size: 26px;
|
|
20
|
-
font-weight: 600;
|
|
21
|
-
margin: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.title {
|
|
25
|
-
display: inline-block;
|
|
26
|
-
background: linear-gradient(72.81deg, #FF9900 0.96%, #FF6633 100%);
|
|
27
|
-
background-clip: text;
|
|
28
|
-
margin-bottom: 10px;
|
|
29
|
-
color: transparent;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.subtitle {
|
|
33
|
-
color: #A0A0A0;
|
|
34
|
-
margin-bottom: 20px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.shortcuts {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: row;
|
|
40
|
-
gap: 15px;
|
|
41
|
-
li {
|
|
42
|
-
flex: 1;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
`
|
|
46
|
-
|
|
47
|
-
export const Home = ({ username }: Props) => {
|
|
48
|
-
const t = useTranslate(dictionary)
|
|
49
|
-
const chat = useCurrentChat()
|
|
50
|
-
|
|
51
|
-
function send(message: string) {
|
|
52
|
-
chat.pushMessage(ChatEntry.createUserEntry(message))
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<HomeBox className="home-page">
|
|
57
|
-
<h2 className="title">{t.hello}, {username}</h2>
|
|
58
|
-
<h3 className="subtitle">{t.subtitle}</h3>
|
|
59
|
-
<div className="shortcuts">
|
|
60
|
-
<QuickStartButton
|
|
61
|
-
label={t['question.meta']}
|
|
62
|
-
onClick={() => send(t['question.meta'])}
|
|
63
|
-
icon={<MiniLogo />}
|
|
64
|
-
background={theme.color.orange[50]}
|
|
65
|
-
/>
|
|
66
|
-
<QuickStartButton
|
|
67
|
-
label={t['question.ks']}
|
|
68
|
-
onClick={() => send(t['question.ks'])}
|
|
69
|
-
icon={<KnowledgeSource />}
|
|
70
|
-
background={theme.color.cyan[50]}
|
|
71
|
-
color={theme.color.cyan[600]}
|
|
72
|
-
/>
|
|
73
|
-
<QuickStartButton
|
|
74
|
-
label={t['question.agents']}
|
|
75
|
-
onClick={() => send(t['question.agents'])}
|
|
76
|
-
icon={<FaceSmile />}
|
|
77
|
-
background={theme.color.pink[50]}
|
|
78
|
-
color={theme.color.pink[600]}
|
|
79
|
-
/>
|
|
80
|
-
<QuickStartButton
|
|
81
|
-
label={t['question.qc']}
|
|
82
|
-
onClick={() => send(t['question.qc'])}
|
|
83
|
-
icon={<QuickCommand />}
|
|
84
|
-
background={theme.color.purple[50]}
|
|
85
|
-
color={theme.color.purple[600]}
|
|
86
|
-
/>
|
|
87
|
-
</div>
|
|
88
|
-
</HomeBox>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const dictionary = {
|
|
93
|
-
en: {
|
|
94
|
-
hello: 'Hello',
|
|
95
|
-
subtitle: "Let's innovate and streamline your coding journey together. Want to lead the change? Just ask!",
|
|
96
|
-
'question.meta': 'What is StackSpot AI?',
|
|
97
|
-
'question.ks': 'What are Knowledge Sources?',
|
|
98
|
-
'question.agents': 'How do Agents work?',
|
|
99
|
-
'question.qc': 'What is a Quick Command?',
|
|
100
|
-
},
|
|
101
|
-
pt: {
|
|
102
|
-
hello: 'Olá',
|
|
103
|
-
subtitle: 'Vamos inovar e simplificar sua jornada de programação juntos. Quer liderar a mudança? É só perguntar!',
|
|
104
|
-
'question.meta': 'O que é a StackSpot AI?',
|
|
105
|
-
'question.ks': 'O que são Knowledge Sources?',
|
|
106
|
-
'question.agents': 'Como funcionam os agentes?',
|
|
107
|
-
'question.qc': 'O que é um Quick Command?',
|
|
108
|
-
},
|
|
109
|
-
} satisfies Dictionary
|