@stack-spot/ai-chat-widget 0.11.0 → 1.0.0-dev.1768324407795
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/StackspotAIWidget.d.ts +48 -7
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +22 -23
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +175 -0
- package/dist/assets/placeholder.png +0 -0
- package/dist/chat-interceptors/CustomInputs.d.ts +4 -1
- package/dist/chat-interceptors/CustomInputs.d.ts.map +1 -1
- package/dist/chat-interceptors/CustomInputs.js +10 -1
- package/dist/chat-interceptors/CustomInputs.js.map +1 -1
- package/dist/chat-interceptors/quick-command-questions.d.ts +10 -0
- package/dist/chat-interceptors/quick-command-questions.d.ts.map +1 -1
- package/dist/chat-interceptors/quick-command-questions.js +12 -2
- package/dist/chat-interceptors/quick-command-questions.js.map +1 -1
- package/dist/chat-interceptors/quick-commands.d.ts +11 -0
- package/dist/chat-interceptors/quick-commands.d.ts.map +1 -1
- package/dist/chat-interceptors/quick-commands.js +241 -48
- package/dist/chat-interceptors/quick-commands.js.map +1 -1
- package/dist/chat-interceptors/send-message.d.ts +26 -1
- package/dist/chat-interceptors/send-message.d.ts.map +1 -1
- package/dist/chat-interceptors/send-message.js +227 -26
- 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 +182 -8
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js +26 -3
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/state/ChatState.d.ts +116 -14
- package/dist/state/ChatState.d.ts.map +1 -1
- package/dist/state/ChatState.js +49 -8
- 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 +14 -0
- 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 +13 -11
- 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 +16 -0
- 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.map +1 -1
- package/dist/utils/programming-languages.js +10 -0
- package/dist/utils/programming-languages.js.map +1 -1
- package/dist/utils/string.d.ts +5 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +5 -1
- package/dist/utils/string.js.map +1 -1
- 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 +56 -4
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +160 -24
- 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 +152 -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 +23 -16
- 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 +112 -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 +21 -13
- package/package.stg.json +4 -0
- package/src/StackspotAIWidget.tsx +96 -37
- package/src/app-metadata.json +175 -0
- package/src/assets/placeholder.png +0 -0
- package/src/chat-interceptors/CustomInputs.ts +14 -1
- package/src/chat-interceptors/quick-command-questions.ts +12 -2
- package/src/chat-interceptors/quick-commands.ts +286 -52
- package/src/chat-interceptors/send-message.ts +253 -25
- 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 +189 -9
- package/src/state/ChatState.ts +131 -14
- package/src/state/ChatTabsController.ts +78 -8
- package/src/state/ObservableState.ts +14 -0
- 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 +15 -14
- 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 +18 -2
- package/src/utils/planning-tool.ts +41 -0
- package/src/utils/programming-languages.ts +10 -0
- package/src/utils/string.ts +5 -1
- 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 +465 -79
- package/src/views/Chat/ChatMessages.tsx +15 -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 +158 -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 +28 -18
- 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 +154 -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/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/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,14 +1,34 @@
|
|
|
1
1
|
import { aiClient, CancelledError, StackspotAPIError } from '@stack-spot/portal-network';
|
|
2
2
|
import { interpolate, translate } from '@stack-spot/portal-translate';
|
|
3
|
+
import { isNil } from 'lodash';
|
|
3
4
|
import { ulid } from 'ulid';
|
|
4
5
|
import { AbortedError } from '../AbortedError.js';
|
|
6
|
+
import { quickCommandRegex } from '../regex.js';
|
|
5
7
|
import { ChatEntry } from '../state/ChatEntry.js';
|
|
6
8
|
import { buildConversationContext } from '../utils/chat.js';
|
|
7
9
|
import { getSizeOfString } from '../utils/string.js';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
+
import { CustomInputs } from './CustomInputs.js';
|
|
11
|
+
/**
|
|
12
|
+
* While the quick command is running, if it takes more than `progressMessageDelayMS` a progress message is shown.
|
|
13
|
+
* This progress message is shown immediately if one of the steps is of type "LLM".
|
|
14
|
+
*/
|
|
10
15
|
const progressMessageDelayMS = 1000;
|
|
16
|
+
/**
|
|
17
|
+
* This creates a chat interceptor for interpreting and running quick commands. We need a function to create the interceptor because, for
|
|
18
|
+
* quick commands, we need access to the full widget state and the editor, which are not provided to a chat interceptor.
|
|
19
|
+
*
|
|
20
|
+
* The quick command interceptor intercepts all user messages (trimmed) that matches the quick command regex. It fetches the quick command
|
|
21
|
+
* from the backend, runs all of its steps and outputs the final response (in the chat or in the editor).
|
|
22
|
+
*
|
|
23
|
+
* @param widget the full widget state.
|
|
24
|
+
* @param getEditor a function that returns the editor instance (monaco).
|
|
25
|
+
* @returns the quick commands chat interceptor.
|
|
26
|
+
*/
|
|
11
27
|
export function createQuickCommandInterceptor(widget, getEditor) {
|
|
28
|
+
/**
|
|
29
|
+
* This creates a CustomInputs instance in the current chat, which activates the `quickCommandQuestionsInterceptor`. In summary, this asks
|
|
30
|
+
* the first question, wait for all answers to be given and fills the result map in the context passed as parameter.
|
|
31
|
+
*/
|
|
12
32
|
async function computeCustomInputs(ctx) {
|
|
13
33
|
const { chat, qc: { custom_inputs: inputs, name, slug } } = ctx;
|
|
14
34
|
if (!inputs?.length)
|
|
@@ -16,7 +36,7 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
16
36
|
chat.set('isLoading', false);
|
|
17
37
|
const t = translate(dictionary);
|
|
18
38
|
const customInputs = new CustomInputs(inputs, chat.get('agent'));
|
|
19
|
-
|
|
39
|
+
CustomInputs.setCustomInputsForChat(customInputs, chat);
|
|
20
40
|
chat.pushMessage(new ChatEntry({
|
|
21
41
|
agentType: 'bot',
|
|
22
42
|
type: 'text',
|
|
@@ -25,16 +45,79 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
25
45
|
chat.pushMessage(customInputs.ask());
|
|
26
46
|
const inputsValues = await customInputs.getValue();
|
|
27
47
|
chat.set('isLoading', true);
|
|
28
|
-
|
|
29
|
-
ctx.
|
|
48
|
+
CustomInputs.deleteCustomInputsFromChat(chat);
|
|
49
|
+
ctx.customInputs = { ...ctx.customInputs, ...inputsValues };
|
|
50
|
+
ctx.context.upload_ids = chat.getMessages()
|
|
51
|
+
.flatMap(message => (message.getValue().upload || []).map(upload => upload.id));
|
|
30
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Runs an Router step of a quick command.
|
|
55
|
+
*/
|
|
56
|
+
async function runRouterStep(ctx, stepIndex, iteration, progress) {
|
|
57
|
+
const { qc: { slug, steps }, code, resultMap, customInputs } = ctx;
|
|
58
|
+
const step = steps[stepIndex];
|
|
59
|
+
const inputData = Object.keys(customInputs).length > 0 && code ? { ...customInputs, [code]: code } : code ?? customInputs;
|
|
60
|
+
try {
|
|
61
|
+
if (step.slug in iteration) {
|
|
62
|
+
iteration[step.slug] = iteration[step.slug] + 1;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
iteration[step.slug] = 1;
|
|
66
|
+
}
|
|
67
|
+
const { next_step_slug } = await aiClient.calculateNextStep.mutate({
|
|
68
|
+
stepSlug: step.slug,
|
|
69
|
+
slug: slug,
|
|
70
|
+
quickCommandEvaluateStepRouterRequest: {
|
|
71
|
+
executions_count: iteration[step.slug],
|
|
72
|
+
input_data: inputData,
|
|
73
|
+
slugs_executions: resultMap,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
if (next_step_slug === step.slug) {
|
|
77
|
+
return runStepsRecursively(stepIndex, progress, ctx, iteration);
|
|
78
|
+
}
|
|
79
|
+
const nextStepIndex = steps?.findIndex((step) => step.slug === next_step_slug);
|
|
80
|
+
if (isNil(nextStepIndex) || nextStepIndex === -1)
|
|
81
|
+
return;
|
|
82
|
+
return runStepsRecursively(nextStepIndex, progress, ctx, iteration);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// eslint-disable-next-line no-console
|
|
86
|
+
console.error('Error executing QC step', error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Runs a fetch step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
|
|
91
|
+
*/
|
|
31
92
|
async function runFetchStep(ctx, stepIndex) {
|
|
32
|
-
const { qc: { slug, steps }, code, context, resultMap, executionId, signal } = ctx;
|
|
93
|
+
const { qc: { slug, steps }, code, context, resultMap, customInputs, executionId, signal } = ctx;
|
|
33
94
|
const step = steps[stepIndex];
|
|
95
|
+
if (step.is_remote) {
|
|
96
|
+
ctx.isRemote = true;
|
|
97
|
+
const { data } = await aiClient.fetchStepOfQuickCommandRemotely.mutate({
|
|
98
|
+
slug, stepSlug: step.slug,
|
|
99
|
+
quickCommandsExecutionRequest: {
|
|
100
|
+
code_selection: code, context, qc_execution_id: executionId,
|
|
101
|
+
slugs_executions: { ...resultMap, ...customInputs },
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
//data is the return of the request in the QC so we do not have full control over the response
|
|
105
|
+
//We handle the usual format with body, status_code and headers, but we might also handle other formats
|
|
106
|
+
const responseData = data;
|
|
107
|
+
resultMap[step.slug] = {
|
|
108
|
+
status: responseData.status_code || 200,
|
|
109
|
+
data: JSON.stringify(responseData.body) ?? JSON.stringify(responseData),
|
|
110
|
+
headers: responseData.headers ?? {},
|
|
111
|
+
};
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
34
114
|
const { headers, data, method, url } = await aiClient.fetchStepOfQuickCommand.mutate({
|
|
35
115
|
slug,
|
|
36
116
|
stepSlug: step.slug,
|
|
37
|
-
quickCommandsExecutionRequest: {
|
|
117
|
+
quickCommandsExecutionRequest: {
|
|
118
|
+
input_data: code, context, qc_execution_id: executionId,
|
|
119
|
+
slugs_executions: { ...resultMap, ...customInputs },
|
|
120
|
+
},
|
|
38
121
|
}, signal);
|
|
39
122
|
const body = ['get', 'head'].includes(method.toLowerCase()) ? undefined : data;
|
|
40
123
|
const response = await fetch(url, { headers: headers || undefined, body, method, signal });
|
|
@@ -46,64 +129,147 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
46
129
|
headers: Object.fromEntries(response.headers.entries()),
|
|
47
130
|
};
|
|
48
131
|
}
|
|
49
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Runs an LLM step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
|
|
134
|
+
*/
|
|
135
|
+
async function runLLMStep({ qc: { slug, steps }, code, customInputs, context, executionId, resultMap, signal }, stepIndex) {
|
|
50
136
|
const step = steps[stepIndex];
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
137
|
+
let stepContext = context;
|
|
138
|
+
if (!step.use_uploaded_files) {
|
|
139
|
+
const { upload_ids: _upload_ids, ...contextDataProps } = context;
|
|
140
|
+
stepContext = { ...contextDataProps };
|
|
141
|
+
}
|
|
142
|
+
const stream = aiClient.streamLlmStepOfQuickCommand(slug, step.slug, {
|
|
143
|
+
input_data: code,
|
|
144
|
+
context: stepContext,
|
|
145
|
+
qc_execution_id: executionId,
|
|
146
|
+
slugs_executions: { ...resultMap, ...customInputs },
|
|
147
|
+
});
|
|
148
|
+
signal.addEventListener('abort', () => stream.cancel());
|
|
149
|
+
let finalValue;
|
|
150
|
+
try {
|
|
151
|
+
finalValue = await stream.getValue();
|
|
152
|
+
resultMap[step.slug] = finalValue;
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
// eslint-disable-next-line no-console
|
|
156
|
+
console.error('Error executing QC step', error);
|
|
157
|
+
}
|
|
56
158
|
}
|
|
57
159
|
function updateProgressMessageForStep(message, qc, stepIndex) {
|
|
58
160
|
const t = translate(dictionary);
|
|
59
161
|
message.setValue({
|
|
60
162
|
...message.getValue(),
|
|
61
|
-
content: interpolate(t.progress, qc.
|
|
62
|
-
updated: new Date().toISOString(),
|
|
163
|
+
content: interpolate(t.progress, qc.steps?.[stepIndex]?.slug, qc.name || qc.slug),
|
|
63
164
|
});
|
|
64
165
|
}
|
|
65
|
-
function showProgressMessage(ctx, message) {
|
|
66
|
-
const result = {
|
|
67
|
-
removeProgressMessage: () => clearTimeout(timeout),
|
|
68
|
-
};
|
|
69
|
-
const timeout = window.setTimeout(() => {
|
|
70
|
-
const chat = ctx.chat;
|
|
71
|
-
chat.pushMessage(message);
|
|
72
|
-
result.removeProgressMessage = () => chat.popMessage();
|
|
73
|
-
}, progressMessageDelayMS);
|
|
74
|
-
return result;
|
|
75
|
-
}
|
|
76
166
|
function createProgressMessage(agent) {
|
|
77
167
|
return new ChatEntry({
|
|
78
168
|
agentType: 'bot',
|
|
79
169
|
content: '',
|
|
80
170
|
type: 'text',
|
|
81
171
|
agent,
|
|
82
|
-
updated: new Date().toISOString(),
|
|
83
172
|
});
|
|
84
173
|
}
|
|
174
|
+
function showProgressMessage(ctx) {
|
|
175
|
+
const showImmediately = ctx.qc.steps?.some(s => s.type === 'LLM');
|
|
176
|
+
const message = createProgressMessage(ctx.chat.get('agent'));
|
|
177
|
+
const controller = {
|
|
178
|
+
update: (index) => updateProgressMessageForStep(message, ctx.qc, index),
|
|
179
|
+
remove: () => clearTimeout(timeout),
|
|
180
|
+
};
|
|
181
|
+
const timeout = window.setTimeout(() => {
|
|
182
|
+
const chat = ctx.chat;
|
|
183
|
+
chat.pushMessage(message);
|
|
184
|
+
controller.remove = () => chat.popMessage();
|
|
185
|
+
}, showImmediately ? 0 : progressMessageDelayMS);
|
|
186
|
+
return controller;
|
|
187
|
+
}
|
|
188
|
+
async function getScriptStepStatus(scriptExecutionId, interval = 5000, maxAttempts = 500, currentAttempt = 0) {
|
|
189
|
+
if (currentAttempt >= maxAttempts) {
|
|
190
|
+
throw new Error('Max attempts reached in verify script status');
|
|
191
|
+
}
|
|
192
|
+
await aiClient.getStatusScriptStep.invalidate({ scriptExecutionId });
|
|
193
|
+
const response = await aiClient.getStatusScriptStep.query({ scriptExecutionId });
|
|
194
|
+
if (response.status === 'success') {
|
|
195
|
+
return response;
|
|
196
|
+
}
|
|
197
|
+
if (response.status === 'failure') {
|
|
198
|
+
throw response;
|
|
199
|
+
}
|
|
200
|
+
await new Promise(resolve => { setTimeout(resolve, interval); });
|
|
201
|
+
return getScriptStepStatus(scriptExecutionId, interval, maxAttempts, currentAttempt + 1);
|
|
202
|
+
}
|
|
203
|
+
async function runScriptStep({ qc: { slug, steps }, code, context, resultMap, customInputs, signal }, stepIndex) {
|
|
204
|
+
const step = steps[stepIndex];
|
|
205
|
+
let stepContext = context;
|
|
206
|
+
if (!step.use_uploaded_files) {
|
|
207
|
+
const { upload_ids: _upload_ids, ...contextDataProps } = context;
|
|
208
|
+
stepContext = { ...contextDataProps };
|
|
209
|
+
}
|
|
210
|
+
try {
|
|
211
|
+
const { script_execution_id } = await aiClient.startScriptStep.mutate({
|
|
212
|
+
stepSlug: step.slug,
|
|
213
|
+
slug: slug,
|
|
214
|
+
quickCommandStartScriptRequest: {
|
|
215
|
+
input_data: code,
|
|
216
|
+
custom_inputs: customInputs,
|
|
217
|
+
context: stepContext,
|
|
218
|
+
slugs_executions: resultMap,
|
|
219
|
+
},
|
|
220
|
+
}, signal);
|
|
221
|
+
const scriptResult = await getScriptStepStatus(script_execution_id);
|
|
222
|
+
resultMap[step.slug] = scriptResult;
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
throw new Error(`Failed to execute step "${step.slug}" of quick command "${slug}". Error ${error}.`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async function runStepsRecursively(currentIndex, progress, ctx, iteration) {
|
|
229
|
+
const { qc } = ctx;
|
|
230
|
+
if (!qc.steps || currentIndex >= qc.steps?.length)
|
|
231
|
+
return;
|
|
232
|
+
progress.update(currentIndex);
|
|
233
|
+
if (qc.steps[currentIndex].type === 'ROUTER') {
|
|
234
|
+
await runRouterStep(ctx, currentIndex, iteration, progress);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (qc.steps[currentIndex].type === 'SCRIPT') {
|
|
238
|
+
await runScriptStep(ctx, currentIndex);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
await (qc.steps[currentIndex].type === 'FETCH' ? runFetchStep(ctx, currentIndex) : runLLMStep(ctx, currentIndex));
|
|
242
|
+
}
|
|
243
|
+
const currentStep = qc.steps?.[currentIndex];
|
|
244
|
+
let nextIndex = currentIndex + 1;
|
|
245
|
+
let nextStepSlug = currentStep.next_step_slug;
|
|
246
|
+
const stepResult = ctx.resultMap[currentStep.slug];
|
|
247
|
+
if (stepResult && typeof stepResult !== 'string' && 'answer_status' in stepResult && !!stepResult.answer_status?.next_step_slug) {
|
|
248
|
+
nextStepSlug = stepResult.answer_status.next_step_slug;
|
|
249
|
+
}
|
|
250
|
+
if (nextStepSlug) {
|
|
251
|
+
nextIndex = nextStepSlug === 'end' ?
|
|
252
|
+
qc.steps.length : qc.steps?.findIndex((step) => step.slug === nextStepSlug);
|
|
253
|
+
}
|
|
254
|
+
await runStepsRecursively(nextIndex, progress, ctx, iteration);
|
|
255
|
+
}
|
|
85
256
|
async function runSteps(ctx) {
|
|
86
|
-
const
|
|
87
|
-
const progress = createProgressMessage(chat.get('agent'));
|
|
88
|
-
const { removeProgressMessage } = showProgressMessage(ctx, progress);
|
|
257
|
+
const progress = showProgressMessage(ctx);
|
|
89
258
|
try {
|
|
90
|
-
|
|
91
|
-
updateProgressMessageForStep(progress, qc, i);
|
|
92
|
-
await (qc.steps?.[i].type === 'FETCH' ? runFetchStep(ctx, i) : runLLMStep(ctx, i));
|
|
93
|
-
}
|
|
259
|
+
await runStepsRecursively(0, progress, ctx, {});
|
|
94
260
|
}
|
|
95
261
|
finally {
|
|
96
|
-
|
|
262
|
+
progress.remove();
|
|
97
263
|
}
|
|
98
264
|
}
|
|
99
|
-
async function formatResult({ qc, code, executionId, context, resultMap, signal }) {
|
|
265
|
+
async function formatResult({ qc, code, executionId, context, resultMap, customInputs, signal }) {
|
|
100
266
|
const formatted = await aiClient.formatResultOfQuickCommand.mutate({
|
|
101
267
|
slug: qc.slug,
|
|
102
268
|
quickCommandsExecutionRequest: {
|
|
103
269
|
input_data: code,
|
|
104
270
|
context,
|
|
105
271
|
qc_execution_id: executionId,
|
|
106
|
-
slugs_executions: resultMap,
|
|
272
|
+
slugs_executions: { ...resultMap, ...customInputs },
|
|
107
273
|
},
|
|
108
274
|
}, signal);
|
|
109
275
|
return formatted.result;
|
|
@@ -120,6 +286,7 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
120
286
|
ctx.context.conversation_id = ctx.chat.id;
|
|
121
287
|
}
|
|
122
288
|
else {
|
|
289
|
+
// if we're running a command in the editor, we don't need to open a new tab, we just need to run it in a new conversation context.
|
|
123
290
|
ctx.context.conversation_id = ulid();
|
|
124
291
|
}
|
|
125
292
|
}
|
|
@@ -135,15 +302,25 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
135
302
|
catch (error) {
|
|
136
303
|
throw error instanceof StackspotAPIError && error.status === 404 ? new Error(t.notFound) : error;
|
|
137
304
|
}
|
|
138
|
-
if (ctx.qc.use_selected_code && !code) {
|
|
139
|
-
|
|
305
|
+
if (ctx.qc.use_selected_code && (!code && ctx.context.upload_ids?.length === 0)) {
|
|
306
|
+
widget.set('panel', 'editor');
|
|
307
|
+
ctx.chat.pushMessage(new ChatEntry({
|
|
308
|
+
agentType: 'bot',
|
|
309
|
+
type: 'text',
|
|
310
|
+
agent: ctx.chat.get('agent'),
|
|
311
|
+
content: t.requiresSelection,
|
|
312
|
+
}));
|
|
313
|
+
return;
|
|
140
314
|
}
|
|
141
315
|
manageConversationContext(ctx);
|
|
142
316
|
await computeCustomInputs(ctx);
|
|
143
317
|
await runSteps(ctx);
|
|
144
318
|
return formatResult(ctx);
|
|
145
319
|
}
|
|
146
|
-
|
|
320
|
+
/**
|
|
321
|
+
* This registers a quick command event in the backend (analytics).
|
|
322
|
+
*/
|
|
323
|
+
async function registerAnalyticsEvent({ qc, isRemote, executionId, code = '', context }, status, start) {
|
|
147
324
|
const now = new Date().getTime();
|
|
148
325
|
try {
|
|
149
326
|
await aiClient.createEvent.mutate({
|
|
@@ -156,6 +333,8 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
156
333
|
slug: qc.slug,
|
|
157
334
|
qc_execution_id: executionId,
|
|
158
335
|
id: qc.id,
|
|
336
|
+
//@ts-ignore
|
|
337
|
+
is_remote: isRemote,
|
|
159
338
|
},
|
|
160
339
|
code,
|
|
161
340
|
context,
|
|
@@ -170,6 +349,9 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
170
349
|
console.warn('Failed to register event: quick command.');
|
|
171
350
|
}
|
|
172
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Writes the result in the chat or in the editor.
|
|
354
|
+
*/
|
|
173
355
|
function outputResult({ qc, chat, code }, result) {
|
|
174
356
|
if (qc.return_type === 'CHAT') {
|
|
175
357
|
chat.pushMessage(new ChatEntry({
|
|
@@ -177,6 +359,7 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
177
359
|
content: result,
|
|
178
360
|
agent: chat.get('agent'),
|
|
179
361
|
type: 'md',
|
|
362
|
+
updated: new Date().toISOString(),
|
|
180
363
|
}));
|
|
181
364
|
}
|
|
182
365
|
else {
|
|
@@ -190,9 +373,16 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
190
373
|
editor?.trigger('keyboard', 'type', { text: finalCode });
|
|
191
374
|
}
|
|
192
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* The chat interceptor itself.
|
|
378
|
+
* @param entry the chat entry.
|
|
379
|
+
* @param chat the chat state.
|
|
380
|
+
* @param signal a signal that can be canceled by the user.
|
|
381
|
+
* @returns false if, and only if, this entry (trimmed) matches the quick command regex. Undefined otherwise.
|
|
382
|
+
*/
|
|
193
383
|
async function quickCommandInterceptor(entry, chat, signal) {
|
|
194
384
|
const { agentType, content } = entry.getValue();
|
|
195
|
-
if (agentType !== 'user' || !
|
|
385
|
+
if (!chat.get('features')?.quickCommands || agentType !== 'user' || !quickCommandRegex.test(content.trim()))
|
|
196
386
|
return;
|
|
197
387
|
const t = translate(dictionary);
|
|
198
388
|
const slug = content.trim().substring(1);
|
|
@@ -200,17 +390,20 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
200
390
|
qc: { slug },
|
|
201
391
|
chat,
|
|
202
392
|
code: chat.get('codeSelection'),
|
|
203
|
-
context: buildConversationContext(chat) ?? {},
|
|
393
|
+
context: buildConversationContext(chat, entry) ?? {},
|
|
204
394
|
executionId: ulid(),
|
|
205
395
|
resultMap: {},
|
|
396
|
+
customInputs: {},
|
|
206
397
|
signal,
|
|
207
398
|
};
|
|
208
399
|
chat.set('isLoading', true);
|
|
209
400
|
const start = new Date().getTime();
|
|
210
401
|
try {
|
|
211
402
|
const result = await runQuickCommand(ctx);
|
|
212
|
-
|
|
213
|
-
|
|
403
|
+
if (result) {
|
|
404
|
+
outputResult(ctx, result);
|
|
405
|
+
registerAnalyticsEvent(ctx, '200', start);
|
|
406
|
+
}
|
|
214
407
|
}
|
|
215
408
|
catch (error) {
|
|
216
409
|
let message = error.message || `${error}`;
|
|
@@ -235,16 +428,16 @@ export function createQuickCommandInterceptor(widget, getEditor) {
|
|
|
235
428
|
}
|
|
236
429
|
const dictionary = {
|
|
237
430
|
en: {
|
|
238
|
-
requiresSelection: '
|
|
431
|
+
requiresSelection: 'Select the code in the editor next to it for this quick command to interact with it.',
|
|
239
432
|
startQuestioning: 'To execute the Quick Command "$0", I\'ll need you to provide some information. Some may be mandatory, and others optional. Let\'s get started.',
|
|
240
|
-
progress: 'Running
|
|
433
|
+
progress: 'Running step "$0" from Quick Command "$1".',
|
|
241
434
|
aborted: 'The quick command execution aborted by the user.',
|
|
242
435
|
notFound: 'There\'s no quick command with the provided name. If you don\'t wish to run a command, prefix the first "/" with a "\\".',
|
|
243
436
|
},
|
|
244
437
|
pt: {
|
|
245
|
-
requiresSelection: '
|
|
438
|
+
requiresSelection: 'Selecione o código no editor ao lado para que este quick command possa interagir com ele.',
|
|
246
439
|
startQuestioning: 'Para executar o Quick Command "$0", vou precisar que você providencie algumas explicações. Algumas são obrigatórias e outras opcionais. Vamos começar.',
|
|
247
|
-
progress: 'Executando
|
|
440
|
+
progress: 'Executando step "$0" do Quick Command "$1".',
|
|
248
441
|
aborted: 'A execução do quick command foi abortada pelo usuário.',
|
|
249
442
|
notFound: 'Não existe quick command com o nome providenciado. Se você não quiser rodar um comando, prefixe o primeiro "/" com um "\\".',
|
|
250
443
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick-commands.js","sourceRoot":"","sources":["../../src/chat-interceptors/quick-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAoB,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE1G,OAAO,EAAc,WAAW,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAEjF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAI9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAchE,MAAM,YAAY,GAAG,eAAe,CAAA;AACpC,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAEnC,MAAM,UAAU,6BAA6B,CAAC,MAAmB,EAAE,SAA0C;IAC3G,K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gB,EAAE,gJAAgJ;QAClK,QAAQ,EAAE,4CAA4C;QACtD,OAAO,EAAE,kDAAkD;QAC3D,QAAQ,EAAE,0HAA0H;KACrI;IACD,EAAE,EAAE;QACF,iBAAiB,EAAE,2FAA2F;QAC9G,gBAAgB,EAAE,wJAAwJ;QAC1K,QAAQ,EAAE,6CAA6C;QACvD,OAAO,EAAE,wDAAwD;QACjE,QAAQ,EAAE,6HAA6H;KACxI;CACmB,CAAA"}
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatResponseWithPMResources, ChatResponseWithSteps } from '@stack-spot/portal-network';
|
|
2
|
+
import { ChatEntry, KnowledgeSource, TextChatEntry } from '../state/ChatEntry.js';
|
|
2
3
|
import { ChatState } from '../state/ChatState.js';
|
|
4
|
+
import { LabeledWithImage } from '../state/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Transforms a chat response from the backend into a chat entry that can be added to the chat.
|
|
7
|
+
* @param response the original response.
|
|
8
|
+
* @param knowledgeSources the knowledge sources already in format used by the chat.
|
|
9
|
+
* @param agent the current chat agent.
|
|
10
|
+
* @param tools the tools for the current chat agent.
|
|
11
|
+
* @param includeDate whether or not to include the date in the chat entry.
|
|
12
|
+
* @returns the TextChatEntry to build a ChatEntry.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createEntryValueFromChatResponse(response: Partial<ChatResponseWithSteps> & ChatResponseWithPMResources, knowledgeSources: KnowledgeSource[] | undefined, agent: LabeledWithImage | undefined, includeDate?: boolean): TextChatEntry;
|
|
15
|
+
export declare function helperSendMessage(messages: ChatEntry[], value: Partial<ChatResponseWithSteps> & {
|
|
16
|
+
opportunities?: any;
|
|
17
|
+
}, chat: ChatState, botEntry: ChatEntry, knowledgeSources: KnowledgeSource[] | undefined): void;
|
|
18
|
+
/**
|
|
19
|
+
* The chat interceptor that sends the message to the AI agent, interprets the response and adds it to the chat.
|
|
20
|
+
*
|
|
21
|
+
* The message added to the chat is streamed, i.e. it changes over time, until it's completed.
|
|
22
|
+
*
|
|
23
|
+
* @param entry the chat entry.
|
|
24
|
+
* @param chat the chat state.
|
|
25
|
+
* @param signal a signal that can be canceled by the user.
|
|
26
|
+
* @returns undefined
|
|
27
|
+
*/
|
|
3
28
|
export declare function sendMessageInterceptor(entry: ChatEntry, chat: ChatState, signal: AbortSignal): Promise<void>;
|
|
4
29
|
//# sourceMappingURL=send-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/chat-interceptors/send-message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/chat-interceptors/send-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,2BAA2B,EAAE,qBAAqB,EAAoD,MAAM,4BAA4B,CAAA;AAGtK,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMjD;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,2BAA2B,EACtE,gBAAgB,EAAE,eAAe,EAAE,GAAG,SAAS,EAC/C,KAAK,EAAE,gBAAgB,GAAG,SAAS,EACnC,WAAW,UAAQ,GAClB,aAAa,CAiBf;AAsED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,GAAG,CAAA;CAAE,EACtH,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,SAAS,QAmEtF;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,iBA+ElG"}
|