@stack-spot/ai-chat-widget 1.21.2 → 1.22.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/app-metadata.json +2 -2
- package/dist/components/QuickStartButton.d.ts +1 -7
- package/dist/components/QuickStartButton.d.ts.map +1 -1
- package/dist/components/QuickStartButton.js +4 -44
- package/dist/components/QuickStartButton.js.map +1 -1
- package/dist/components/TabManager.d.ts.map +1 -1
- package/dist/components/TabManager.js +5 -2
- package/dist/components/TabManager.js.map +1 -1
- package/dist/layout.css +0 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +13 -4
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +3 -0
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/ChatTabSelection.d.ts.map +1 -1
- package/dist/views/ChatTabSelection.js +5 -2
- package/dist/views/ChatTabSelection.js.map +1 -1
- package/dist/views/Home/BuiltInAgent.d.ts.map +1 -1
- package/dist/views/Home/BuiltInAgent.js +5 -6
- package/dist/views/Home/BuiltInAgent.js.map +1 -1
- package/dist/views/Home/CustomAgent.d.ts.map +1 -1
- package/dist/views/Home/CustomAgent.js +1 -2
- package/dist/views/Home/CustomAgent.js.map +1 -1
- package/dist/views/Home/index.js +2 -2
- package/dist/views/Home/styled.d.ts.map +1 -1
- package/dist/views/Home/styled.js +17 -6
- package/dist/views/Home/styled.js.map +1 -1
- package/dist/views/MessageInput/ButtonBar.d.ts +1 -5
- package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -1
- package/dist/views/MessageInput/ButtonBar.js +2 -2
- package/dist/views/MessageInput/ButtonBar.js.map +1 -1
- package/dist/views/MessageInput/SelectContent.js +2 -2
- package/dist/views/MessageInput/SelectContent.js.map +1 -1
- package/dist/views/MessageInput/index.js +1 -1
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/MessageInput/styled.d.ts +1 -3
- package/dist/views/MessageInput/styled.d.ts.map +1 -1
- package/dist/views/MessageInput/styled.js +4 -5
- package/dist/views/MessageInput/styled.js.map +1 -1
- package/package.json +1 -1
- package/src/app-metadata.json +2 -2
- package/src/components/QuickStartButton.tsx +9 -57
- package/src/components/TabManager.tsx +28 -12
- package/src/layout.css +0 -1
- package/src/types.ts +2 -1
- package/src/views/Chat/ChatMessage.tsx +89 -14
- package/src/views/Chat/styled.ts +3 -0
- package/src/views/ChatTabSelection.tsx +5 -2
- package/src/views/Home/BuiltInAgent.tsx +7 -15
- package/src/views/Home/CustomAgent.tsx +0 -3
- package/src/views/Home/index.tsx +2 -2
- package/src/views/Home/styled.ts +17 -6
- package/src/views/MessageInput/ButtonBar.tsx +2 -6
- package/src/views/MessageInput/SelectContent.tsx +2 -2
- package/src/views/MessageInput/index.tsx +2 -2
- package/src/views/MessageInput/styled.ts +5 -6
package/src/views/Home/styled.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
1
2
|
import { styled } from 'styled-components'
|
|
2
3
|
|
|
3
4
|
export const HomeBox = styled.div`
|
|
4
5
|
margin: auto 0;
|
|
5
6
|
|
|
6
7
|
.title, .subtitle {
|
|
7
|
-
font-family: 'San Francisco';
|
|
8
|
-
font-size: 26px;
|
|
9
|
-
font-weight: 600;
|
|
10
8
|
margin: 0;
|
|
11
9
|
}
|
|
12
10
|
|
|
@@ -14,22 +12,34 @@ export const HomeBox = styled.div`
|
|
|
14
12
|
display: inline-block;
|
|
15
13
|
background: linear-gradient(72.81deg, #FF9900 0.96%, #FF6633 100%);
|
|
16
14
|
background-clip: text;
|
|
17
|
-
margin-bottom: 10px;
|
|
18
15
|
color: transparent;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
.subtitle {
|
|
22
19
|
color: #A0A0A0;
|
|
23
|
-
margin-bottom:
|
|
20
|
+
margin-bottom: 24px;
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
.shortcuts {
|
|
27
24
|
display: flex;
|
|
28
25
|
flex-direction: row;
|
|
29
|
-
gap: 15px;
|
|
30
26
|
li {
|
|
31
27
|
flex: 1;
|
|
32
28
|
}
|
|
29
|
+
button {
|
|
30
|
+
padding-left: 0;
|
|
31
|
+
border-radius: 50px;
|
|
32
|
+
padding-inline: 16px;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
i {
|
|
35
|
+
width: 16px;
|
|
36
|
+
height: 16px;
|
|
37
|
+
margin-right: 8px;
|
|
38
|
+
}
|
|
39
|
+
&:hover, &:visited, &:active, &:focus {
|
|
40
|
+
background-color: ${theme.color.light[600]}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
|
|
35
45
|
.avatar, .avatar svg {
|
|
@@ -53,6 +63,7 @@ export const HomeBox = styled.div`
|
|
|
53
63
|
p {
|
|
54
64
|
overflow: hidden;
|
|
55
65
|
}
|
|
66
|
+
|
|
56
67
|
}
|
|
57
68
|
}
|
|
58
69
|
}
|
|
@@ -15,20 +15,16 @@ interface SelectionBarProps {
|
|
|
15
15
|
* Whether or not the message is currently being sent. This is used to decide which button to show: send or cancel.
|
|
16
16
|
*/
|
|
17
17
|
isLoading?: boolean,
|
|
18
|
-
/**
|
|
19
|
-
* State to determine whether the input is focused
|
|
20
|
-
*/
|
|
21
|
-
focused?: boolean,
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
export const ButtonBar = ({ onSend, isLoading
|
|
20
|
+
export const ButtonBar = ({ onSend, isLoading }: SelectionBarProps) => {
|
|
25
21
|
const t = useMessageInputDictionary()
|
|
26
22
|
const chat = useCurrentChat()
|
|
27
23
|
const widget = useWidget()
|
|
28
24
|
const features = useCurrentChatState('features')
|
|
29
25
|
|
|
30
26
|
return (
|
|
31
|
-
<SelectionBarWrapper className="button-group"
|
|
27
|
+
<SelectionBarWrapper className="button-group">
|
|
32
28
|
<Flex sx={{ gap: '4px' }}>
|
|
33
29
|
<SelectContent />
|
|
34
30
|
{features.editor && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KnowledgeSource, Plus, Spaces, Stack } from '@citric/icons'
|
|
2
2
|
import { IconButton } from '@citric/ui'
|
|
3
3
|
import { SelectionList } from '@stack-spot/portal-components/SelectionList'
|
|
4
4
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
@@ -59,7 +59,7 @@ export const SelectContent = () => {
|
|
|
59
59
|
data-test-hint="button-options"
|
|
60
60
|
aria-label={visibleMenu ? t.collapse : t.expand}
|
|
61
61
|
onClick={() => setVisibleMenu(state => !state)}>
|
|
62
|
-
<
|
|
62
|
+
<Plus />
|
|
63
63
|
</IconButton>
|
|
64
64
|
<SelectionList
|
|
65
65
|
style={{
|
|
@@ -81,9 +81,9 @@ export const MessageInput = () => {
|
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
<ProgressBar visible={true} animate={isLoading}
|
|
84
|
-
backgroundColor={isLoading || !focused ? theme.color.light[
|
|
84
|
+
backgroundColor={isLoading || !focused ? theme.color.light[500] : theme.color.primary[500]} />
|
|
85
85
|
<InfoBar />
|
|
86
|
-
<ButtonBar
|
|
86
|
+
<ButtonBar onSend={onSend} isLoading={isLoading} />
|
|
87
87
|
</MessageInputBox>
|
|
88
88
|
)
|
|
89
89
|
}
|
|
@@ -7,7 +7,7 @@ const INFO_BAR_DISPLACEMENT = 4
|
|
|
7
7
|
export const MAX_INPUT_HEIGHT = 300
|
|
8
8
|
export const MIN_INPUT_HEIGHT = 24
|
|
9
9
|
|
|
10
|
-
export const SelectionBarWrapper = styled.div
|
|
10
|
+
export const SelectionBarWrapper = styled.div`
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
position: relative;
|
|
@@ -15,7 +15,6 @@ export const SelectionBarWrapper = styled.div<{$inputFocused?: boolean}>`
|
|
|
15
15
|
background-color: ${theme.color.light[500]};
|
|
16
16
|
border-bottom-left-radius: 4px;
|
|
17
17
|
border-bottom-right-radius: 4px;
|
|
18
|
-
border: 2px solid ${({ $inputFocused }) => theme.color.light[$inputFocused ? 600 : 500]};
|
|
19
18
|
border-top: none;
|
|
20
19
|
|
|
21
20
|
.selection-list {
|
|
@@ -137,19 +136,19 @@ export const MessageInputBox = styled.div<{$inputFocused?: boolean}>`
|
|
|
137
136
|
align-items: end;
|
|
138
137
|
border-top-left-radius: 4px;
|
|
139
138
|
border-top-right-radius: 4px;
|
|
140
|
-
border: 2px solid ${theme.color.light[
|
|
139
|
+
border: 2px solid ${theme.color.light[300]};
|
|
141
140
|
|
|
142
|
-
background-color: ${theme.color.light[
|
|
141
|
+
background-color: ${theme.color.light[300]};
|
|
143
142
|
padding: 10px 8px;
|
|
144
143
|
transition: border-color 0.3s, background-color 0.3s;
|
|
145
144
|
|
|
146
145
|
&.focused {
|
|
147
|
-
border: 2px solid ${theme.color.light[
|
|
146
|
+
border: 2px solid ${theme.color.light[300]};
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
|
|
151
150
|
&.disabled {
|
|
152
|
-
background-color: ${theme.color.light[
|
|
151
|
+
background-color: ${theme.color.light[300]};
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
}
|