@stack-spot/ai-chat-widget 1.36.1-betacitric.1 → 1.36.1
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 +36 -0
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +7 -6
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +17 -13
- package/dist/chat-interceptors/quick-commands.d.ts.map +1 -1
- package/dist/chat-interceptors/quick-commands.js +9 -3
- package/dist/chat-interceptors/quick-commands.js.map +1 -1
- package/dist/components/Accordion.d.ts +20 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion.js +51 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/AdaptiveTextArea.d.ts +1 -1
- package/dist/components/AdaptiveTextArea.d.ts.map +1 -1
- package/dist/components/AdaptiveTextArea.js +1 -1
- package/dist/components/AdaptiveTextArea.js.map +1 -1
- package/dist/components/AgentCard/AgentCardCreate.d.ts.map +1 -1
- package/dist/components/AgentCard/AgentCardCreate.js +3 -3
- package/dist/components/AgentCard/AgentCardCreate.js.map +1 -1
- package/dist/components/AgentCard/index.d.ts.map +1 -1
- package/dist/components/AgentCard/index.js +6 -5
- package/dist/components/AgentCard/index.js.map +1 -1
- package/dist/components/ButtonFavorite.d.ts +7 -8
- package/dist/components/ButtonFavorite.d.ts.map +1 -1
- package/dist/components/ButtonFavorite.js +14 -5
- package/dist/components/ButtonFavorite.js.map +1 -1
- package/dist/components/Code.d.ts.map +1 -1
- package/dist/components/Code.js +9 -11
- package/dist/components/Code.js.map +1 -1
- package/dist/components/ComponentNavigator.d.ts.map +1 -1
- package/dist/components/ComponentNavigator.js +4 -2
- package/dist/components/ComponentNavigator.js.map +1 -1
- package/dist/components/FadingOverflow.d.ts.map +1 -1
- package/dist/components/FadingOverflow.js +4 -3
- package/dist/components/FadingOverflow.js.map +1 -1
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts +33 -0
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/FallbackBoundary/ErrorBoundary.js +52 -0
- package/dist/components/FallbackBoundary/ErrorBoundary.js.map +1 -0
- package/dist/components/FallbackBoundary/Loading.d.ts +2 -0
- package/dist/components/FallbackBoundary/Loading.d.ts.map +1 -0
- package/dist/components/FallbackBoundary/Loading.js +12 -0
- package/dist/components/FallbackBoundary/Loading.js.map +1 -0
- package/dist/components/FallbackBoundary/index.d.ts +17 -0
- package/dist/components/FallbackBoundary/index.d.ts.map +1 -0
- package/dist/components/FallbackBoundary/index.js +9 -0
- package/dist/components/FallbackBoundary/index.js.map +1 -0
- package/dist/components/FileDescription.d.ts.map +1 -1
- package/dist/components/FileDescription.js +4 -3
- package/dist/components/FileDescription.js.map +1 -1
- package/dist/components/HistoryList.js +1 -1
- package/dist/components/HistoryList.js.map +1 -1
- package/dist/components/IconInput.d.ts +10 -0
- package/dist/components/IconInput.d.ts.map +1 -0
- package/dist/components/IconInput.js +61 -0
- package/dist/components/IconInput.js.map +1 -0
- package/dist/components/ListResource.js +3 -3
- package/dist/components/ListResource.js.map +1 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/Markdown.js.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +4 -2
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/OverlayMenu.d.ts +21 -0
- package/dist/components/OverlayMenu.d.ts.map +1 -0
- package/dist/components/OverlayMenu.js +79 -0
- package/dist/components/OverlayMenu.js.map +1 -0
- package/dist/components/ProgressBar.d.ts +37 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +131 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/QuickStartButton.d.ts +3 -2
- package/dist/components/QuickStartButton.d.ts.map +1 -1
- package/dist/components/QuickStartButton.js +3 -4
- package/dist/components/QuickStartButton.js.map +1 -1
- package/dist/components/RightPanelForm.d.ts.map +1 -1
- package/dist/components/RightPanelForm.js +13 -20
- package/dist/components/RightPanelForm.js.map +1 -1
- package/dist/components/RightPanelTabs.d.ts +4 -1
- package/dist/components/RightPanelTabs.d.ts.map +1 -1
- package/dist/components/RightPanelTabs.js +16 -4
- package/dist/components/RightPanelTabs.js.map +1 -1
- package/dist/components/Selector/index.d.ts.map +1 -1
- package/dist/components/Selector/index.js +8 -5
- package/dist/components/Selector/index.js.map +1 -1
- package/dist/components/Selector/styled.d.ts.map +1 -1
- package/dist/components/Selector/styled.js +5 -8
- package/dist/components/Selector/styled.js.map +1 -1
- package/dist/components/StackedBadge.js +5 -5
- package/dist/components/StackedBadge.js.map +1 -1
- package/dist/components/TabManager.d.ts.map +1 -1
- package/dist/components/TabManager.js +30 -5
- package/dist/components/TabManager.js.map +1 -1
- package/dist/components/ToolBadge.d.ts +8 -3
- package/dist/components/ToolBadge.d.ts.map +1 -1
- package/dist/components/ToolBadge.js +99 -21
- package/dist/components/ToolBadge.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +37 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +30 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/TooltipAPI.d.ts +29 -0
- package/dist/components/Tooltip/TooltipAPI.d.ts.map +1 -0
- package/dist/components/Tooltip/TooltipAPI.js +107 -0
- package/dist/components/Tooltip/TooltipAPI.js.map +1 -0
- package/dist/components/Tooltip/context.d.ts +5 -0
- package/dist/components/Tooltip/context.d.ts.map +1 -0
- package/dist/components/Tooltip/context.js +18 -0
- package/dist/components/Tooltip/context.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +3 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Tooltip/style.d.ts +4 -0
- package/dist/components/Tooltip/style.d.ts.map +1 -0
- package/dist/components/Tooltip/style.js +22 -0
- package/dist/components/Tooltip/style.js.map +1 -0
- package/dist/components/Tooltip/types.d.ts +27 -0
- package/dist/components/Tooltip/types.d.ts.map +1 -0
- package/dist/components/Tooltip/types.js +2 -0
- package/dist/components/Tooltip/types.js.map +1 -0
- package/dist/components/WorkspaceTabNavigator.d.ts.map +1 -1
- package/dist/components/WorkspaceTabNavigator.js +9 -7
- package/dist/components/WorkspaceTabNavigator.js.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.d.ts +2 -24
- package/dist/components/form/DescribedCheckboxGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.js +29 -46
- package/dist/components/form/DescribedCheckboxGroup.js.map +1 -1
- package/dist/components/form/DescribedRadioGroup.d.ts +4 -24
- package/dist/components/form/DescribedRadioGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedRadioGroup.js +18 -39
- package/dist/components/form/DescribedRadioGroup.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/layout.css +26 -0
- package/dist/right-panel/DefaultPanel.d.ts.map +1 -1
- package/dist/right-panel/DefaultPanel.js +4 -2
- package/dist/right-panel/DefaultPanel.js.map +1 -1
- package/dist/state/ChatEntry.d.ts +4 -3
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/state/constants.js +2 -2
- package/dist/state/constants.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/tools.d.ts +2 -1
- package/dist/utils/tools.d.ts.map +1 -1
- package/dist/utils/tools.js +12 -1
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/upload/FileUpload.d.ts.map +1 -1
- package/dist/utils/upload/FileUpload.js +1 -2
- package/dist/utils/upload/FileUpload.js.map +1 -1
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.js +6 -5
- package/dist/views/Agents/AgentDescription.js.map +1 -1
- package/dist/views/Agents/AgentsPanel.d.ts.map +1 -1
- package/dist/views/Agents/AgentsPanel.js +7 -7
- package/dist/views/Agents/AgentsPanel.js.map +1 -1
- package/dist/views/Agents/AgentsTab.d.ts.map +1 -1
- package/dist/views/Agents/AgentsTab.js +28 -29
- package/dist/views/Agents/AgentsTab.js.map +1 -1
- package/dist/views/Agents/dictionary.d.ts +1 -1
- package/dist/views/Chat/AgentInfo.d.ts.map +1 -1
- package/dist/views/Chat/AgentInfo.js +5 -3
- package/dist/views/Chat/AgentInfo.js.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +36 -28
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/StepsList.d.ts.map +1 -1
- package/dist/views/Chat/StepsList.js +10 -10
- package/dist/views/Chat/StepsList.js.map +1 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +2 -8
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.d.ts.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.js +14 -7
- package/dist/views/ChatHistory/HistoryItem.js.map +1 -1
- package/dist/views/ChatHistory/index.js +1 -1
- 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 +5 -3
- package/dist/views/ChatHistory/styled.js.map +1 -1
- package/dist/views/ChatTabSelection.d.ts.map +1 -1
- package/dist/views/ChatTabSelection.js +3 -2
- package/dist/views/ChatTabSelection.js.map +1 -1
- package/dist/views/Editor.d.ts.map +1 -1
- package/dist/views/Editor.js +12 -6
- package/dist/views/Editor.js.map +1 -1
- package/dist/views/Home/BuiltInAgent.d.ts.map +1 -1
- package/dist/views/Home/BuiltInAgent.js +3 -2
- package/dist/views/Home/BuiltInAgent.js.map +1 -1
- package/dist/views/Home/CustomAgent.js +3 -3
- package/dist/views/Home/CustomAgent.js.map +1 -1
- package/dist/views/Home/index.js +1 -1
- package/dist/views/Home/index.js.map +1 -1
- package/dist/views/Home/styled.d.ts.map +1 -1
- package/dist/views/Home/styled.js +22 -21
- package/dist/views/Home/styled.js.map +1 -1
- package/dist/views/KSDocument.d.ts.map +1 -1
- package/dist/views/KSDocument.js +4 -3
- package/dist/views/KSDocument.js.map +1 -1
- package/dist/views/KnowledgeSources.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.js +36 -14
- package/dist/views/KnowledgeSources.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/AgentSelector.js +5 -7
- package/dist/views/MessageInput/AgentSelector.js.map +1 -1
- package/dist/views/MessageInput/ButtonAgent.d.ts.map +1 -1
- package/dist/views/MessageInput/ButtonAgent.js +5 -4
- package/dist/views/MessageInput/ButtonAgent.js.map +1 -1
- package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -1
- package/dist/views/MessageInput/ButtonBar.js +4 -2
- package/dist/views/MessageInput/ButtonBar.js.map +1 -1
- package/dist/views/MessageInput/ContextBar.d.ts.map +1 -1
- package/dist/views/MessageInput/ContextBar.js +6 -4
- package/dist/views/MessageInput/ContextBar.js.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.js +2 -2
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
- package/dist/views/MessageInput/SelectContent.d.ts.map +1 -1
- package/dist/views/MessageInput/SelectContent.js +35 -30
- package/dist/views/MessageInput/SelectContent.js.map +1 -1
- package/dist/views/MessageInput/UploadBar.d.ts.map +1 -1
- package/dist/views/MessageInput/UploadBar.js +24 -2
- package/dist/views/MessageInput/UploadBar.js.map +1 -1
- package/dist/views/MessageInput/UploadDragNDrop.d.ts.map +1 -1
- package/dist/views/MessageInput/UploadDragNDrop.js +3 -2
- package/dist/views/MessageInput/UploadDragNDrop.js.map +1 -1
- 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 +4 -0
- package/dist/views/MessageInput/dictionary.js.map +1 -1
- package/dist/views/MessageInput/index.d.ts.map +1 -1
- package/dist/views/MessageInput/index.js +4 -3
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/MessageInput/styled.d.ts +3 -1
- package/dist/views/MessageInput/styled.d.ts.map +1 -1
- package/dist/views/MessageInput/styled.js +27 -11
- package/dist/views/MessageInput/styled.js.map +1 -1
- package/dist/views/MinimizedHeader.d.ts.map +1 -1
- package/dist/views/MinimizedHeader.js +4 -2
- package/dist/views/MinimizedHeader.js.map +1 -1
- package/dist/views/Stacks.d.ts.map +1 -1
- package/dist/views/Stacks.js +28 -23
- package/dist/views/Stacks.js.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.d.ts.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.js +3 -3
- package/dist/views/Steps/FlowChart/NodeStep.js.map +1 -1
- package/dist/views/Steps/StepModal.d.ts.map +1 -1
- package/dist/views/Steps/StepModal.js +6 -4
- package/dist/views/Steps/StepModal.js.map +1 -1
- package/dist/views/Steps/dictionary.d.ts +1 -1
- package/dist/views/Steps/index.d.ts.map +1 -1
- package/dist/views/Steps/index.js +4 -3
- package/dist/views/Steps/index.js.map +1 -1
- package/dist/views/Steps/utils.d.ts +1 -2
- package/dist/views/Steps/utils.d.ts.map +1 -1
- package/dist/views/Steps/utils.js +8 -8
- package/dist/views/Steps/utils.js.map +1 -1
- package/dist/views/Tools.js +4 -2
- package/dist/views/Tools.js.map +1 -1
- package/dist/views/Workspaces/WorkspacesTab.d.ts.map +1 -1
- package/dist/views/Workspaces/WorkspacesTab.js +10 -7
- package/dist/views/Workspaces/WorkspacesTab.js.map +1 -1
- package/dist/views/Workspaces/index.js +2 -4
- package/dist/views/Workspaces/index.js.map +1 -1
- package/package.json +13 -12
- package/src/StackspotAIWidget.tsx +33 -30
- package/src/app-metadata.json +17 -13
- package/src/chat-interceptors/quick-commands.ts +11 -5
- package/src/components/Accordion.tsx +75 -0
- package/src/components/AdaptiveTextArea.tsx +1 -1
- package/src/components/AgentCard/AgentCardCreate.tsx +5 -3
- package/src/components/AgentCard/index.tsx +7 -7
- package/src/components/ButtonFavorite.tsx +47 -20
- package/src/components/Code.tsx +36 -31
- package/src/components/ComponentNavigator.tsx +8 -4
- package/src/components/FadingOverflow.tsx +7 -6
- package/src/components/FallbackBoundary/ErrorBoundary.tsx +71 -0
- package/src/components/FallbackBoundary/Loading.tsx +14 -0
- package/src/components/FallbackBoundary/index.tsx +26 -0
- package/src/components/FileDescription.tsx +10 -14
- package/src/components/HistoryList.tsx +1 -1
- package/src/components/IconInput.tsx +73 -0
- package/src/components/ListResource.tsx +5 -5
- package/src/components/Markdown.tsx +1 -1
- package/src/components/Modal.tsx +4 -2
- package/src/components/OverlayMenu.tsx +133 -0
- package/src/components/ProgressBar.tsx +183 -0
- package/src/components/QuickStartButton.tsx +4 -5
- package/src/components/RightPanelForm.tsx +13 -20
- package/src/components/RightPanelTabs.tsx +32 -4
- package/src/components/Selector/index.tsx +13 -17
- package/src/components/Selector/styled.ts +5 -8
- package/src/components/StackedBadge.tsx +5 -5
- package/src/components/TabManager.tsx +36 -8
- package/src/components/ToolBadge.tsx +129 -39
- package/src/components/Tooltip/Tooltip.tsx +78 -0
- package/src/components/Tooltip/TooltipAPI.ts +101 -0
- package/src/components/Tooltip/context.tsx +24 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Tooltip/style.tsx +24 -0
- package/src/components/Tooltip/types.ts +28 -0
- package/src/components/WorkspaceTabNavigator.tsx +25 -22
- package/src/components/form/DescribedCheckboxGroup.tsx +65 -90
- package/src/components/form/DescribedRadioGroup.tsx +46 -79
- package/src/index.ts +2 -1
- package/src/layout.css +26 -0
- package/src/right-panel/DefaultPanel.tsx +7 -3
- package/src/state/ChatEntry.ts +4 -3
- package/src/state/constants.ts +2 -2
- package/src/types.ts +3 -4
- package/src/utils/tools.ts +23 -2
- package/src/utils/upload/FileUpload.ts +1 -2
- package/src/views/Agents/AgentDescription.tsx +7 -6
- package/src/views/Agents/AgentsPanel.tsx +12 -11
- package/src/views/Agents/AgentsTab.tsx +56 -37
- package/src/views/Chat/AgentInfo.tsx +6 -7
- package/src/views/Chat/ChatMessage.tsx +118 -109
- package/src/views/Chat/StepsList.tsx +11 -10
- package/src/views/Chat/styled.ts +2 -8
- package/src/views/ChatHistory/HistoryItem.tsx +19 -12
- package/src/views/ChatHistory/index.tsx +1 -1
- package/src/views/ChatHistory/styled.ts +5 -3
- package/src/views/ChatTabSelection.tsx +3 -2
- package/src/views/Editor.tsx +14 -9
- package/src/views/Home/BuiltInAgent.tsx +8 -7
- package/src/views/Home/CustomAgent.tsx +3 -3
- package/src/views/Home/index.tsx +1 -1
- package/src/views/Home/styled.ts +22 -21
- package/src/views/KSDocument.tsx +8 -7
- package/src/views/KnowledgeSources.tsx +66 -24
- package/src/views/MessageInput/AgentSelector.tsx +8 -10
- package/src/views/MessageInput/ButtonAgent.tsx +12 -24
- package/src/views/MessageInput/ButtonBar.tsx +21 -25
- package/src/views/MessageInput/ContextBar.tsx +14 -12
- package/src/views/MessageInput/QuickCommandSelector.tsx +2 -2
- package/src/views/MessageInput/SelectContent.tsx +68 -39
- package/src/views/MessageInput/UploadBar.tsx +34 -2
- package/src/views/MessageInput/UploadDragNDrop.tsx +5 -2
- package/src/views/MessageInput/dictionary.ts +4 -0
- package/src/views/MessageInput/index.tsx +7 -5
- package/src/views/MessageInput/styled.ts +28 -12
- package/src/views/MinimizedHeader.tsx +7 -4
- package/src/views/Stacks.tsx +54 -31
- package/src/views/Steps/FlowChart/NodeStep.tsx +4 -6
- package/src/views/Steps/StepModal.tsx +18 -14
- package/src/views/Steps/index.tsx +5 -4
- package/src/views/Steps/utils.tsx +9 -9
- package/src/views/Tools.tsx +19 -12
- package/src/views/Workspaces/WorkspacesTab.tsx +21 -17
- package/src/views/Workspaces/index.tsx +2 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flex } from '@citric/core'
|
|
2
|
+
import { ArrowUp, Code, Stop } from '@citric/icons'
|
|
3
|
+
import { IconButton } from '@citric/ui'
|
|
2
4
|
import { useCurrentChat, useCurrentChatState, useWidget } from '../../context/hooks'
|
|
3
5
|
import { useMessageInputDictionary } from './dictionary'
|
|
4
6
|
import { SelectContent } from './SelectContent'
|
|
@@ -23,33 +25,27 @@ export const ButtonBar = ({ onSend, isLoading }: SelectionBarProps) => {
|
|
|
23
25
|
|
|
24
26
|
return (
|
|
25
27
|
<SelectionBarWrapper className="button-group">
|
|
26
|
-
<
|
|
28
|
+
<Flex sx={{ gap: '4px' }}>
|
|
27
29
|
<SelectContent />
|
|
28
30
|
{features.editor && (
|
|
29
|
-
<IconButton
|
|
31
|
+
<IconButton color="light" appearance="square" aria-label={t.code} title={t.code} onClick={() => widget.set('panel', 'editor')}>
|
|
32
|
+
<Code />
|
|
33
|
+
</IconButton>
|
|
30
34
|
)}
|
|
31
|
-
</
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
appearance="square"
|
|
46
|
-
colorScheme="inverse"
|
|
47
|
-
aria-label={t.send}
|
|
48
|
-
onClick={onSend}
|
|
49
|
-
className="send"
|
|
50
|
-
title={t.send}
|
|
51
|
-
/>
|
|
52
|
-
)}
|
|
35
|
+
</Flex>
|
|
36
|
+
<Flex>
|
|
37
|
+
{isLoading ? (
|
|
38
|
+
<IconButton appearance="square" color="inverse" aria-label={t.cancel}
|
|
39
|
+
onClick={() => chat.abort()} className="send" title={t.cancel}>
|
|
40
|
+
<Stop />
|
|
41
|
+
</IconButton>
|
|
42
|
+
) : (
|
|
43
|
+
<IconButton appearance="square" color="inverse" aria-label={t.send}
|
|
44
|
+
onClick={onSend} className="send" title={t.send}>
|
|
45
|
+
<ArrowUp />
|
|
46
|
+
</IconButton>
|
|
47
|
+
)}
|
|
48
|
+
</Flex>
|
|
53
49
|
</SelectionBarWrapper>
|
|
54
50
|
)
|
|
55
51
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Text } from '@citric/core'
|
|
2
|
+
import { TimesMini } from '@citric/icons'
|
|
3
|
+
import { Badge, IconButton } from '@citric/ui'
|
|
1
4
|
import { loader } from '@monaco-editor/react'
|
|
2
|
-
import { Icon } from '@stack-spot/citric-icons'
|
|
3
|
-
import { Badge, Button, IconButton, Text } from '@stack-spot/citric-react'
|
|
4
5
|
import { ColorPaletteName, listToClass } from '@stack-spot/portal-theme'
|
|
5
6
|
import { useCallback, useMemo } from 'react'
|
|
6
7
|
import { FadingOverflow } from '../../components/FadingOverflow'
|
|
@@ -15,11 +16,14 @@ interface ContextBadgeProps {
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const ContextBadge = ({ label, color, dismiss, onDismiss }: ContextBadgeProps) => (
|
|
18
|
-
<Badge appearance="square"
|
|
19
|
+
<Badge appearance="square" palette={color} className="context-badge"
|
|
20
|
+
afterElement={
|
|
21
|
+
onDismiss &&
|
|
22
|
+
<IconButton appearance="square" colorIcon={`${color}.800`} onClick={onDismiss} title={dismiss} aria-label={dismiss}>
|
|
23
|
+
<TimesMini />
|
|
24
|
+
</IconButton>
|
|
25
|
+
}>
|
|
19
26
|
<Text nowrapEllipsis>{label}</Text>
|
|
20
|
-
{onDismiss && <Button appearance="none" onClick={onDismiss} title={dismiss} arial-label={dismiss} style={{ padding: '2px 0 2px 2px' }}>
|
|
21
|
-
<Icon icon="TimesMini" size="sm" />
|
|
22
|
-
</Button>}
|
|
23
27
|
</Badge>
|
|
24
28
|
)
|
|
25
29
|
|
|
@@ -70,12 +74,10 @@ export const ContextBar = () => {
|
|
|
70
74
|
<div className="content">
|
|
71
75
|
{shouldRenderRemoveAllButton && (
|
|
72
76
|
<IconButton
|
|
73
|
-
|
|
74
|
-
aria-label={t.removeConfig}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
style={{ marginLeft: '8px' }}
|
|
78
|
-
/>
|
|
77
|
+
appearance="square" color="light"
|
|
78
|
+
aria-label={t.removeConfig} title={t.removeConfig} onClick={removeAll}>
|
|
79
|
+
<TimesMini />
|
|
80
|
+
</IconButton>
|
|
79
81
|
)}
|
|
80
82
|
<FadingOverflow className="list-overflow" scroll="arrows" enableHorizontalScrollWithVerticalWheel>
|
|
81
83
|
<ul>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuickCommand } from '@citric/icons'
|
|
2
2
|
import { aiClient, workspaceAiClient } from '@stack-spot/portal-network'
|
|
3
3
|
import { QuickCommandResponse } from '@stack-spot/portal-network/api/ai'
|
|
4
4
|
import { useCallback } from 'react'
|
|
@@ -113,7 +113,7 @@ export const QuickCommandSelector = ({ inputRef, isTrial }:
|
|
|
113
113
|
selectorConfig={{
|
|
114
114
|
resourceName: 'Quick Command',
|
|
115
115
|
shortcut: '/',
|
|
116
|
-
icon: <
|
|
116
|
+
icon: <QuickCommand />,
|
|
117
117
|
searchProp: 'slug',
|
|
118
118
|
urlBuilder: (qc) => `/quick-command/${qc?.slug}`,
|
|
119
119
|
regex: quickCommandRegex,
|
|
@@ -1,93 +1,122 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconButton
|
|
3
|
-
import {
|
|
1
|
+
import { Agent, DocumentUpload, KnowledgeSource, Plus, QuickCommand, Spaces, Stack } from '@citric/icons'
|
|
2
|
+
import { IconButton } from '@citric/ui'
|
|
3
|
+
import { SelectionList } from '@stack-spot/portal-components/SelectionList'
|
|
4
|
+
import { useMemo, useState } from 'react'
|
|
4
5
|
import { useCurrentChat, useCurrentChatState, useWidget } from '../../context/hooks'
|
|
5
6
|
import { useUploadManager } from '../../utils/upload/context'
|
|
6
7
|
import { useMessageInputDictionary } from './dictionary'
|
|
7
8
|
|
|
9
|
+
type ChatFeatures = 'workspace' | 'knowledgeSource' | 'stack'
|
|
10
|
+
type ChatPanel = 'ks' | 'workspace' | 'stack'
|
|
11
|
+
|
|
8
12
|
export const SelectContent = () => {
|
|
9
13
|
const widget = useWidget()
|
|
14
|
+
const [visibleMenu, setVisibleMenu] = useState(false)
|
|
10
15
|
const features = useCurrentChatState('features')
|
|
11
16
|
const t = useMessageInputDictionary()
|
|
12
17
|
const uploadManager = useUploadManager()
|
|
13
18
|
const hasFeatureButtons = features.workspace || features.knowledgeSource || features.stack || features.upload
|
|
14
19
|
const chat = useCurrentChat()
|
|
15
20
|
|
|
16
|
-
const itemConfigs =
|
|
21
|
+
const itemConfigs = [
|
|
17
22
|
{
|
|
23
|
+
role: 'button',
|
|
18
24
|
key: 'agent',
|
|
19
|
-
section: 0,
|
|
20
25
|
label: t.chatAgent,
|
|
21
|
-
icon: <
|
|
26
|
+
icon: <Agent />,
|
|
22
27
|
onClick: (event?: React.MouseEvent) => {
|
|
23
28
|
event?.stopPropagation()
|
|
24
29
|
chat.set('nextMessage', '@')
|
|
25
30
|
},
|
|
26
31
|
},
|
|
27
32
|
{
|
|
33
|
+
role: 'button',
|
|
28
34
|
key: 'quickCommands',
|
|
29
|
-
section: 0,
|
|
30
35
|
label: 'Quick Commands',
|
|
31
|
-
icon: <
|
|
36
|
+
icon: <QuickCommand />,
|
|
32
37
|
onClick: (event?: React.MouseEvent) => {
|
|
33
38
|
event?.stopPropagation()
|
|
34
39
|
chat.set('nextMessage', '/')
|
|
35
40
|
},
|
|
36
41
|
},
|
|
37
42
|
{
|
|
43
|
+
role: 'button',
|
|
38
44
|
key: 'knowledgeSource',
|
|
39
|
-
section: 0,
|
|
40
45
|
label: 'Knowledge Sources',
|
|
41
|
-
icon: <
|
|
42
|
-
|
|
46
|
+
icon: <KnowledgeSource />,
|
|
47
|
+
panel: 'ks',
|
|
43
48
|
},
|
|
44
49
|
{
|
|
50
|
+
role: 'button',
|
|
45
51
|
key: 'stack',
|
|
46
|
-
section: 0,
|
|
47
52
|
label: 'Stacks AI',
|
|
48
|
-
icon: <
|
|
49
|
-
|
|
53
|
+
icon: <Stack />,
|
|
54
|
+
panel: 'stack',
|
|
50
55
|
},
|
|
51
56
|
{
|
|
57
|
+
role: 'button',
|
|
52
58
|
key: 'workspace',
|
|
53
|
-
section: 0,
|
|
54
59
|
label: 'Spots',
|
|
55
|
-
icon: <
|
|
56
|
-
|
|
60
|
+
icon: <Spaces />,
|
|
61
|
+
panel: 'workspace',
|
|
57
62
|
},
|
|
58
63
|
{
|
|
64
|
+
role: 'button',
|
|
59
65
|
key: 'upload',
|
|
60
|
-
section: 1,
|
|
61
66
|
label: t.upload,
|
|
62
67
|
onClick: () => uploadManager.open(),
|
|
63
68
|
className: 'upload-item',
|
|
64
|
-
icon: <
|
|
69
|
+
icon: <DocumentUpload />,
|
|
65
70
|
},
|
|
66
|
-
]
|
|
71
|
+
]
|
|
67
72
|
|
|
68
|
-
const listItems = useMemo(() =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
const listItems = useMemo(() =>
|
|
74
|
+
itemConfigs.filter(chatFeatures => features[chatFeatures.key as ChatFeatures])
|
|
75
|
+
.map(chatFeatures => ({
|
|
76
|
+
label: chatFeatures.label,
|
|
77
|
+
icon: chatFeatures.icon,
|
|
78
|
+
className: chatFeatures.className,
|
|
79
|
+
onClick: chatFeatures.panel ? (() => {
|
|
80
|
+
widget.set('panel', chatFeatures.panel as ChatPanel)
|
|
81
|
+
setVisibleMenu(false)
|
|
82
|
+
}) : chatFeatures.onClick,
|
|
83
|
+
role: chatFeatures.role,
|
|
84
|
+
})), [features, widget])
|
|
76
85
|
|
|
77
86
|
if (!hasFeatureButtons) return null
|
|
78
87
|
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
<IconButton
|
|
82
|
-
|
|
88
|
+
return listItems.length > 1 ? (
|
|
89
|
+
<>
|
|
90
|
+
<IconButton
|
|
91
|
+
id="button-content-select"
|
|
92
|
+
color="light"
|
|
93
|
+
appearance="square"
|
|
94
|
+
title={t.chatViewMenu}
|
|
95
|
+
data-test-hint="button-options"
|
|
96
|
+
aria-label={t.chatViewMenu}
|
|
97
|
+
aria-controls="chatMessageMenu"
|
|
98
|
+
aria-expanded={visibleMenu}
|
|
99
|
+
onClick={() => setVisibleMenu(state => !state)}>
|
|
100
|
+
<Plus />
|
|
101
|
+
</IconButton>
|
|
102
|
+
<SelectionList
|
|
103
|
+
className="message-menu"
|
|
104
|
+
id="chatMessageMenu"
|
|
105
|
+
visible={visibleMenu}
|
|
106
|
+
onHide={() => setVisibleMenu(false)}
|
|
107
|
+
items={listItems}
|
|
108
|
+
aria-label={t.chatViewMenu}
|
|
109
|
+
/>
|
|
110
|
+
</>
|
|
83
111
|
) : (
|
|
84
|
-
<
|
|
112
|
+
<IconButton
|
|
113
|
+
color="light"
|
|
85
114
|
appearance="square"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
</
|
|
115
|
+
role="button"
|
|
116
|
+
title={listItems[0].label}
|
|
117
|
+
aria-label={listItems[0].label}
|
|
118
|
+
onClick={listItems[0].onClick}>
|
|
119
|
+
{listItems[0].icon}
|
|
120
|
+
</IconButton>
|
|
92
121
|
)
|
|
93
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { listToClass } from '@stack-spot/portal-theme'
|
|
2
2
|
import { interpolate } from '@stack-spot/portal-translate'
|
|
3
|
-
import { useMemo } from 'react'
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
4
4
|
import { FadingOverflow } from '../../components/FadingOverflow'
|
|
5
5
|
import { FileDescription } from '../../components/FileDescription'
|
|
6
6
|
import { useCurrentChat } from '../../context/hooks'
|
|
@@ -22,6 +22,7 @@ const UploadItem = ({ upload }: UploadedFileProps) => {
|
|
|
22
22
|
const uploadManager = useUploadManager()
|
|
23
23
|
const icon = upload.file.type.toLowerCase().startsWith('image/') ? createImageFromFile(upload.file) : undefined
|
|
24
24
|
const status = useUploadStatus(upload)
|
|
25
|
+
|
|
25
26
|
return <FileDescription
|
|
26
27
|
fileName={upload.file.name}
|
|
27
28
|
icon={icon}
|
|
@@ -37,6 +38,29 @@ export const UploadBar = () => {
|
|
|
37
38
|
const t = useMessageInputDictionary()
|
|
38
39
|
const chat = useCurrentChat()
|
|
39
40
|
const visible = !!uploads.length
|
|
41
|
+
const [ariaMessage, setAriaMessage] = useState('')
|
|
42
|
+
const prevUploadsRef = useRef<FileUpload[]>([])
|
|
43
|
+
const announcedUploadsRef = useRef(new Set())
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
const prevUploads = prevUploadsRef.current
|
|
47
|
+
const newUploads = uploads.filter(
|
|
48
|
+
up => !prevUploads.some(prev => prev.id === up.id),
|
|
49
|
+
)
|
|
50
|
+
newUploads.forEach((up) => {
|
|
51
|
+
if (!announcedUploadsRef.current.has(up.id)) {
|
|
52
|
+
setAriaMessage('')
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
setAriaMessage(`${t.uploadSuccessStatus}: ${up.file.name}`)
|
|
55
|
+
setTimeout(() => setAriaMessage(''), 2500)
|
|
56
|
+
}, 100)
|
|
57
|
+
announcedUploadsRef.current.add(up.id)
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
if (uploads.some(up => up.status === 'error')) {
|
|
61
|
+
setTimeout(() => setAriaMessage(''), 2000)
|
|
62
|
+
}
|
|
63
|
+
}, [uploads])
|
|
40
64
|
|
|
41
65
|
useUploadErrorEffect((errors) => {
|
|
42
66
|
const sizeErrors = errors.filter(e => e instanceof FileIsTooLarge)
|
|
@@ -53,11 +77,19 @@ export const UploadBar = () => {
|
|
|
53
77
|
lines.push(`${interpolate(t.uploadItemLimitError, maxItems)}\n- ${maxItemsErrorsNames.join('\n- ')}`)
|
|
54
78
|
}
|
|
55
79
|
if (!lines.length) return
|
|
80
|
+
setAriaMessage(lines.join(' '))
|
|
81
|
+
setTimeout(() => setAriaMessage(''), 2000)
|
|
56
82
|
chat.pushMessage(new ChatEntry({ agentType: 'system', type: 'md', content: lines.join('\n\n') }))
|
|
57
83
|
})
|
|
58
|
-
|
|
84
|
+
|
|
59
85
|
return (
|
|
60
86
|
<div className={listToClass(['info-bar', 'upload-bar', visible && 'visible'])}>
|
|
87
|
+
<div className="aria-live"
|
|
88
|
+
aria-live="polite"
|
|
89
|
+
aria-atomic="true"
|
|
90
|
+
>
|
|
91
|
+
{ariaMessage}
|
|
92
|
+
</div>
|
|
61
93
|
<div className="space"></div>
|
|
62
94
|
<div className="content">
|
|
63
95
|
<FadingOverflow className="list-overflow" scroll="arrows" enableHorizontalScrollWithVerticalWheel>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconBox } from '@citric/core'
|
|
2
|
+
import { Document } from '@citric/icons'
|
|
2
3
|
import { DragEvent, useCallback, useEffect, useState } from 'react'
|
|
3
4
|
import { useCurrentChat } from '../../context/hooks'
|
|
4
5
|
import { useMessageInputDictionary } from './dictionary'
|
|
@@ -71,7 +72,9 @@ export const UploadDragNDrop = ({ isDragging, onDrop, onDragLeave }: UploadDragN
|
|
|
71
72
|
e.stopPropagation()
|
|
72
73
|
}}
|
|
73
74
|
>
|
|
74
|
-
<
|
|
75
|
+
<IconBox size="lg" aria-hidden={true}>
|
|
76
|
+
<Document />
|
|
77
|
+
</IconBox>
|
|
75
78
|
<h2 id="upload-drag-drop-title">{t.uploadDragDropTitle}</h2>
|
|
76
79
|
<p id="upload-drag-drop-description">{t.uploadDragDropDescription}</p>
|
|
77
80
|
</div>
|
|
@@ -33,6 +33,8 @@ const dictionary = {
|
|
|
33
33
|
cantSendBecauseOfEmptyContent: 'You can\'t send empty messages. Please write some text or upload a file.',
|
|
34
34
|
cantSendBecausePromptMaxLength: 'You can\'t send messages longer than $0 characters. Please, shorten your message.',
|
|
35
35
|
chatAgent: 'Agents',
|
|
36
|
+
uploadSuccessStatus: 'File sent successfully',
|
|
37
|
+
chatViewMenu: 'Chat options menu',
|
|
36
38
|
},
|
|
37
39
|
pt: {
|
|
38
40
|
stack: 'Selecionar stack',
|
|
@@ -66,6 +68,8 @@ const dictionary = {
|
|
|
66
68
|
cantSendBecauseOfEmptyContent: 'Não é possível enviar mensagens vazias. Por favor, escreva algum texto ou envie um arquivo.',
|
|
67
69
|
cantSendBecausePromptMaxLength: 'Você não pode enviar mensagens com mais de $0 caracteres. Por favor, reduza sua mensagem.',
|
|
68
70
|
chatAgent: 'Agentes',
|
|
71
|
+
uploadSuccessStatus: 'Arquivo anexado com sucesso',
|
|
72
|
+
chatViewMenu: 'Menu de opções do chat',
|
|
69
73
|
},
|
|
70
74
|
} satisfies Dictionary
|
|
71
75
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listToClass, theme } from '@stack-spot/portal-theme'
|
|
2
2
|
import { interpolate } from '@stack-spot/portal-translate'
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
4
4
|
import { AdaptiveTextArea } from '../../components/AdaptiveTextArea'
|
|
5
|
+
import { ProgressBar } from '../../components/ProgressBar'
|
|
5
6
|
import { useCurrentChat, useCurrentChatState, useWidgetState } from '../../context/hooks'
|
|
6
7
|
import { quickCommandRegex } from '../../regex'
|
|
7
8
|
import { ChatEntry } from '../../state/ChatEntry'
|
|
@@ -136,11 +137,11 @@ export const MessageInput = ({ chatWindowRef }: { chatWindowRef?: React.RefObjec
|
|
|
136
137
|
|
|
137
138
|
return (
|
|
138
139
|
<UploadProvider value={chat.uploadManager}>
|
|
139
|
-
<MessageInputBox aria-busy={isLoading} className="message-input">
|
|
140
|
+
<MessageInputBox aria-busy={isLoading} className="message-input" $inputFocused={focused}>
|
|
140
141
|
<div className="wrapper-action">
|
|
141
142
|
<QuickCommandSelector inputRef={textAreaRef} isTrial={isTrial} />
|
|
142
143
|
<AgentSelector inputRef={textAreaRef} isTrial={isTrial} />
|
|
143
|
-
<div className=
|
|
144
|
+
<div className={listToClass(['action-box', focused && 'focused', isLoading && 'disabled'])}>
|
|
144
145
|
<ButtonAgent />
|
|
145
146
|
<AdaptiveTextArea
|
|
146
147
|
maxHeight={() => isMinimized
|
|
@@ -153,7 +154,7 @@ export const MessageInput = ({ chatWindowRef }: { chatWindowRef?: React.RefObjec
|
|
|
153
154
|
? interpolate(t.placeholder, agentLabel)
|
|
154
155
|
: t.typing
|
|
155
156
|
}
|
|
156
|
-
onChange={
|
|
157
|
+
onChange={e => chat.set('nextMessage', e.target.value)}
|
|
157
158
|
value={value}
|
|
158
159
|
onFocus={() => setFocused(true)}
|
|
159
160
|
onBlur={() => setFocused(false)}
|
|
@@ -164,7 +165,8 @@ export const MessageInput = ({ chatWindowRef }: { chatWindowRef?: React.RefObjec
|
|
|
164
165
|
/>
|
|
165
166
|
</div>
|
|
166
167
|
</div>
|
|
167
|
-
<ProgressBar
|
|
168
|
+
<ProgressBar visible={true} animate={isLoading}
|
|
169
|
+
backgroundColor={isLoading || !focused ? theme.color.light[500] : theme.color.primary[500]} />
|
|
168
170
|
<ContextBar />
|
|
169
171
|
{chat.get('features').upload && <UploadBar />}
|
|
170
172
|
<ButtonBar onSend={onSend} isLoading={isLoading} />
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IconButton } from '@citric/ui'
|
|
1
2
|
import { theme } from '@stack-spot/portal-theme'
|
|
2
3
|
import { styled } from 'styled-components'
|
|
3
4
|
|
|
@@ -50,7 +51,7 @@ export const SelectionBarWrapper = styled.div`
|
|
|
50
51
|
}
|
|
51
52
|
`
|
|
52
53
|
|
|
53
|
-
export const MessageInputBox = styled.div
|
|
54
|
+
export const MessageInputBox = styled.div<{$inputFocused?: boolean}>`
|
|
54
55
|
display: flex;
|
|
55
56
|
flex-direction: column;
|
|
56
57
|
|
|
@@ -64,6 +65,18 @@ export const MessageInputBox = styled.div`
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
> .aria-live {
|
|
69
|
+
position: absolute;
|
|
70
|
+
width: 1px;
|
|
71
|
+
height: 1px;
|
|
72
|
+
margin: -1px;
|
|
73
|
+
padding: 0;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
clip: rect(0 0 0 0);
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
border: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
67
80
|
> .space {
|
|
68
81
|
height: 0;
|
|
69
82
|
transition: height 0.4s;
|
|
@@ -114,7 +127,7 @@ export const MessageInputBox = styled.div`
|
|
|
114
127
|
line-height: 0.75rem;
|
|
115
128
|
white-space: nowrap;
|
|
116
129
|
|
|
117
|
-
|
|
130
|
+
${IconButton} {
|
|
118
131
|
padding: 4px 0;
|
|
119
132
|
background: none;
|
|
120
133
|
border: none;
|
|
@@ -125,7 +138,7 @@ export const MessageInputBox = styled.div`
|
|
|
125
138
|
width: auto;
|
|
126
139
|
height: 12px;
|
|
127
140
|
}
|
|
128
|
-
}
|
|
141
|
+
}
|
|
129
142
|
}
|
|
130
143
|
}
|
|
131
144
|
|
|
@@ -162,13 +175,16 @@ export const MessageInputBox = styled.div`
|
|
|
162
175
|
background-color: ${theme.color.light[300]};
|
|
163
176
|
padding: 10px 8px;
|
|
164
177
|
transition: border-color 0.3s, background-color 0.3s;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
178
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
179
|
+
&.focused {
|
|
180
|
+
border: 2px solid ${theme.color.light[300]};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
&.disabled {
|
|
185
|
+
background-color: ${theme.color.light[300]};
|
|
186
|
+
}
|
|
187
|
+
}
|
|
172
188
|
}
|
|
173
189
|
|
|
174
190
|
.button-group {
|
|
@@ -223,10 +239,10 @@ export const MessageInputBox = styled.div`
|
|
|
223
239
|
}
|
|
224
240
|
}
|
|
225
241
|
|
|
226
|
-
|
|
242
|
+
${IconButton} {
|
|
227
243
|
width: 24px;
|
|
228
244
|
height: 24px;
|
|
229
|
-
}
|
|
245
|
+
}
|
|
230
246
|
|
|
231
247
|
.group-agent {
|
|
232
248
|
display: flex;
|
|
@@ -286,7 +302,7 @@ export const MessageInputBox = styled.div`
|
|
|
286
302
|
transition: height 0.3s;
|
|
287
303
|
background-color: transparent;
|
|
288
304
|
&:focus {
|
|
289
|
-
box-shadow: none
|
|
305
|
+
box-shadow: none;
|
|
290
306
|
}
|
|
291
307
|
}
|
|
292
308
|
`
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Text } from '@citric/core'
|
|
2
|
+
import { ChevronDown, Times } from '@citric/icons'
|
|
3
|
+
import { IconButton } from '@citric/ui'
|
|
2
4
|
import { listToClass } from '@stack-spot/portal-theme'
|
|
3
5
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
4
6
|
import { useCallback, useRef, useState } from 'react'
|
|
@@ -67,13 +69,14 @@ export const MinimizedHeader = ({ onClose, onCollapse, onExpand }: MinimizedActi
|
|
|
67
69
|
<FadingOverflow className="title"><Text title={label}>{label}</Text></FadingOverflow>
|
|
68
70
|
{showButtons && <div className="button-group">
|
|
69
71
|
{(onExpand || onCollapse) && <IconButton
|
|
70
|
-
icon="ChevronDown"
|
|
71
72
|
title={collapsed ? t.expand : t.collapse}
|
|
72
73
|
aria-label={collapsed ? t.expand : t.collapse}
|
|
73
74
|
className={listToClass(['collapse', collapsed && 'collapsed'])}
|
|
74
75
|
onClick={toggleCollapsed}
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
>
|
|
77
|
+
<ChevronDown />
|
|
78
|
+
</IconButton>}
|
|
79
|
+
{onClose && <IconButton title={t.close} aria-label={t.close} onClick={onClose}><Times /></IconButton>}
|
|
77
80
|
</div>}
|
|
78
81
|
</Header>
|
|
79
82
|
)
|