@stack-spot/ai-chat-widget 1.20.2 → 1.21.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 +5 -5
- package/dist/components/ProgressBar.d.ts +5 -1
- package/dist/components/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar.js +8 -8
- package/dist/components/ProgressBar.js.map +1 -1
- package/dist/layout.css +2 -1
- package/dist/views/Chat/ChatMessage.d.ts +2 -2
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +4 -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 +7 -4
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/MessageInput/ButtonBar.d.ts +17 -0
- package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -0
- package/dist/views/MessageInput/ButtonBar.js +16 -0
- package/dist/views/MessageInput/ButtonBar.js.map +1 -0
- package/dist/views/MessageInput/InfoBar.d.ts.map +1 -1
- package/dist/views/MessageInput/InfoBar.js +2 -2
- package/dist/views/MessageInput/InfoBar.js.map +1 -1
- 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 +48 -0
- package/dist/views/MessageInput/SelectContent.js.map +1 -0
- package/dist/views/MessageInput/dictionary.js +2 -2
- 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 -8
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/MessageInput/styled.d.ts +6 -1
- package/dist/views/MessageInput/styled.d.ts.map +1 -1
- package/dist/views/MessageInput/styled.js +55 -45
- package/dist/views/MessageInput/styled.js.map +1 -1
- package/package.json +2 -2
- package/src/app-metadata.json +5 -5
- package/src/components/ProgressBar.tsx +15 -8
- package/src/layout.css +2 -1
- package/src/views/Chat/ChatMessage.tsx +8 -8
- package/src/views/Chat/styled.ts +7 -4
- package/src/views/MessageInput/ButtonBar.tsx +55 -0
- package/src/views/MessageInput/InfoBar.tsx +6 -2
- package/src/views/MessageInput/SelectContent.tsx +74 -0
- package/src/views/MessageInput/dictionary.ts +2 -2
- package/src/views/MessageInput/index.tsx +8 -18
- package/src/views/MessageInput/styled.ts +57 -46
- package/dist/views/MessageInput/ButtonGroup.d.ts +0 -29
- package/dist/views/MessageInput/ButtonGroup.d.ts.map +0 -1
- package/dist/views/MessageInput/ButtonGroup.js +0 -34
- package/dist/views/MessageInput/ButtonGroup.js.map +0 -1
- package/src/views/MessageInput/ButtonGroup.tsx +0 -109
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,YA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,EAChG,KAAC,OAAO,KAAG,EACX,KAAC,SAAS,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,IACrD,CACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare const MAX_INPUT_HEIGHT = 300;
|
|
2
2
|
export declare const MIN_INPUT_HEIGHT = 24;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const SelectionBarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$inputFocused?: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const MessageInputBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
7
|
+
$inputFocused?: boolean;
|
|
8
|
+
}>> & string;
|
|
4
9
|
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,eAAO,MAAM,mBAAmB;oBAA+B,OAAO;YA0CrE,CAAA;AAED,eAAO,MAAM,eAAe;oBAA+B,OAAO;YAuNjE,CAAA"}
|
|
@@ -1,17 +1,58 @@
|
|
|
1
1
|
import { IconButton } from '@citric/ui';
|
|
2
2
|
import { theme } from '@stack-spot/portal-theme';
|
|
3
3
|
import { styled } from 'styled-components';
|
|
4
|
-
const INFO_BAR_HEIGHT =
|
|
4
|
+
const INFO_BAR_HEIGHT = 38;
|
|
5
5
|
const INFO_BAR_DISPLACEMENT = 4;
|
|
6
6
|
export const MAX_INPUT_HEIGHT = 300;
|
|
7
7
|
export const MIN_INPUT_HEIGHT = 24;
|
|
8
|
+
export const SelectionBarWrapper = styled.div `
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
position: relative;
|
|
12
|
+
padding: 8px;
|
|
13
|
+
background-color: ${theme.color.light[500]};
|
|
14
|
+
border-bottom-left-radius: 4px;
|
|
15
|
+
border-bottom-right-radius: 4px;
|
|
16
|
+
border: 2px solid ${({ $inputFocused }) => theme.color.light[$inputFocused ? 600 : 500]};
|
|
17
|
+
border-top: none;
|
|
18
|
+
|
|
19
|
+
.selection-list {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transition: height 0.4s, opacity 0.3s;
|
|
22
|
+
}
|
|
23
|
+
.visible {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.selection-list-content {
|
|
28
|
+
background-color: ${theme.color.light[500]};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ul {
|
|
32
|
+
list-style: none;
|
|
33
|
+
padding: 0;
|
|
34
|
+
margin: 12px;
|
|
35
|
+
min-width: 225px;
|
|
36
|
+
}
|
|
37
|
+
li {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
svg {
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
}
|
|
43
|
+
&:hover {
|
|
44
|
+
background-color: ${theme.color.light[600]}
|
|
45
|
+
}
|
|
46
|
+
a:hover {
|
|
47
|
+
background-color: ${theme.color.light[600]}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
8
51
|
export const MessageInputBox = styled.div `
|
|
9
52
|
display: flex;
|
|
10
53
|
flex-direction: column;
|
|
11
54
|
|
|
12
55
|
> .info-bar {
|
|
13
|
-
margin-top: 8px;
|
|
14
|
-
margin-bottom: -3px;
|
|
15
56
|
position: relative;
|
|
16
57
|
overflow: hidden;
|
|
17
58
|
|
|
@@ -31,14 +72,14 @@ export const MessageInputBox = styled.div `
|
|
|
31
72
|
top: 0;
|
|
32
73
|
left: 0;
|
|
33
74
|
right: 0;
|
|
34
|
-
border-top-left-radius: 10px;
|
|
35
|
-
border-top-right-radius: 10px;
|
|
36
75
|
height: ${INFO_BAR_HEIGHT}px;
|
|
37
|
-
padding:
|
|
76
|
+
padding-top: 8px;
|
|
38
77
|
background-color: ${theme.color.light[500]};
|
|
39
78
|
display: flex;
|
|
40
79
|
flex-direction: row;
|
|
41
|
-
gap:
|
|
80
|
+
gap: 4px;
|
|
81
|
+
border-right: 2px solid ${({ $inputFocused }) => theme.color.light[$inputFocused ? 600 : 500]};
|
|
82
|
+
border-left: 2px solid ${({ $inputFocused }) => theme.color.light[$inputFocused ? 600 : 500]};
|
|
42
83
|
|
|
43
84
|
.list-overflow {
|
|
44
85
|
max-width: calc(100% - 30px); // close button + gap
|
|
@@ -91,16 +132,19 @@ export const MessageInputBox = styled.div `
|
|
|
91
132
|
flex-direction: row;
|
|
92
133
|
gap: 8px;
|
|
93
134
|
align-items: end;
|
|
94
|
-
border-radius: 4px;
|
|
95
|
-
border:
|
|
96
|
-
|
|
135
|
+
border-top-left-radius: 4px;
|
|
136
|
+
border-top-right-radius: 4px;
|
|
137
|
+
border: 2px solid ${theme.color.light[500]};
|
|
138
|
+
|
|
139
|
+
background-color: ${theme.color.light[500]};
|
|
97
140
|
padding: 10px 8px;
|
|
98
141
|
transition: border-color 0.3s, background-color 0.3s;
|
|
99
142
|
|
|
100
143
|
&.focused {
|
|
101
|
-
border
|
|
144
|
+
border: 2px solid ${theme.color.light[600]};
|
|
102
145
|
}
|
|
103
146
|
|
|
147
|
+
|
|
104
148
|
&.disabled {
|
|
105
149
|
background-color: ${theme.color.light[500]};
|
|
106
150
|
}
|
|
@@ -119,43 +163,9 @@ export const MessageInputBox = styled.div `
|
|
|
119
163
|
button {
|
|
120
164
|
border: none;
|
|
121
165
|
border-radius: 2px;
|
|
122
|
-
opacity: 0.6;
|
|
123
166
|
transition: background-color 0.2s, opacity 0.2s;
|
|
124
|
-
background-color: transparent;
|
|
125
167
|
padding: 0;
|
|
126
168
|
|
|
127
|
-
svg {
|
|
128
|
-
fill: ${theme.color.light[700]};
|
|
129
|
-
width: 16px;
|
|
130
|
-
height: 16px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&:hover {
|
|
134
|
-
background-color: ${theme.color.light[500]};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.send {
|
|
138
|
-
background-color: ${theme.color.inverse[500]};
|
|
139
|
-
&:hover {
|
|
140
|
-
opacity: 1;
|
|
141
|
-
}
|
|
142
|
-
svg {
|
|
143
|
-
fill: ${theme.color.inverse.contrastText};
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&.expand {
|
|
148
|
-
svg {
|
|
149
|
-
transition: transform 0.3s;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&.collapsed {
|
|
154
|
-
svg {
|
|
155
|
-
transform: rotate(180deg);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
169
|
&.agent {
|
|
160
170
|
border-radius: 50%;
|
|
161
171
|
opacity: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,eAAe,GAAG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",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@citric/core": "^6.4.0",
|
|
14
14
|
"@stack-spot/portal-components": "^2.22.1",
|
|
15
|
-
"@citric/icons": "^5.
|
|
15
|
+
"@citric/icons": "^5.13.0",
|
|
16
16
|
"@stack-spot/portal-network": "^0.124.0",
|
|
17
17
|
"@citric/ui": "^6.10.2",
|
|
18
18
|
"@stack-spot/portal-theme": "^1.0.0",
|
package/src/app-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/ai-chat-widget",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"date": "Mon May
|
|
3
|
+
"version": "1.21.0",
|
|
4
|
+
"date": "Mon May 19 2025 19:02:34 GMT+0000 (Coordinated Universal Time)",
|
|
5
5
|
"dependencies": [
|
|
6
6
|
{
|
|
7
7
|
"name": "@stack-spot/app-metadata",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "@citric/icons",
|
|
96
|
-
"version": "5.
|
|
96
|
+
"version": "5.13.0(react@18.2.0)"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"name": "@citric/ui",
|
|
100
|
-
"version": "6.10.2(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.
|
|
100
|
+
"version": "6.10.2(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.13.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0))"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"name": "@dagrejs/dagre",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
"name": "@stack-spot/portal-components",
|
|
112
|
-
"version": "2.22.1(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.
|
|
112
|
+
"version": "2.22.1(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.13.0(react@18.2.0))(@citric/ui@6.10.2(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.13.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-theme@1.1.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-translate@1.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "@stack-spot/portal-network",
|
|
@@ -2,6 +2,10 @@ import { listToClass, theme, WithStyle } from '@stack-spot/portal-theme'
|
|
|
2
2
|
import { styled } from 'styled-components'
|
|
3
3
|
|
|
4
4
|
interface Props extends WithStyle {
|
|
5
|
+
/**
|
|
6
|
+
* Apply animation effects to the progress bar.
|
|
7
|
+
*/
|
|
8
|
+
animate?: boolean,
|
|
5
9
|
/**
|
|
6
10
|
* Whether or not the progress bar is visible.
|
|
7
11
|
*/
|
|
@@ -42,8 +46,8 @@ function gradientFromColorArray(colors: string[]) {
|
|
|
42
46
|
// the shimmering effect requires more space
|
|
43
47
|
const SHIMMER_PADDING = '10px'
|
|
44
48
|
|
|
45
|
-
const Styled = styled.div<{ $bg: string[], $fg: string[], $shimmer: string[] }>`
|
|
46
|
-
margin: 7px 0;
|
|
49
|
+
const Styled = styled.div<{ $bg: string[], $fg: string[], $shimmer: string[], $animate?: boolean }>`
|
|
50
|
+
/* margin: ${({ $shimmer }) => $shimmer.length > 0 ? '7px 0' : '0'}; */
|
|
47
51
|
opacity: 0;
|
|
48
52
|
transition: opacity 0.5s;
|
|
49
53
|
|
|
@@ -125,15 +129,15 @@ const Styled = styled.div<{ $bg: string[], $fg: string[], $shimmer: string[] }>`
|
|
|
125
129
|
&:before {
|
|
126
130
|
content: '';
|
|
127
131
|
display: block;
|
|
128
|
-
width:
|
|
132
|
+
width: 100%;
|
|
129
133
|
height: 100%;
|
|
130
|
-
background: ${({ $fg }) => gradientFromColorArray($fg)};
|
|
131
|
-
animation: slide
|
|
134
|
+
background: ${({ $fg, $animate, $bg }) => $animate ? gradientFromColorArray($fg) : $bg};
|
|
135
|
+
animation: ${({ $animate }) => $animate ? 'slide .5s infinite forwards' : 'none'};
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
@keyframes slide {
|
|
135
139
|
from {
|
|
136
|
-
margin-left: -
|
|
140
|
+
margin-left: -100%;
|
|
137
141
|
}
|
|
138
142
|
to {
|
|
139
143
|
margin-left: 100%;
|
|
@@ -147,6 +151,7 @@ const Styled = styled.div<{ $bg: string[], $fg: string[], $shimmer: string[] }>`
|
|
|
147
151
|
* right.
|
|
148
152
|
*/
|
|
149
153
|
export const ProgressBar = ({
|
|
154
|
+
animate,
|
|
150
155
|
visible = true,
|
|
151
156
|
shimmer,
|
|
152
157
|
backgroundColor = shimmer ? 'rgba(255, 255, 255, 0.4)' : theme.color.light[500],
|
|
@@ -161,7 +166,7 @@ export const ProgressBar = ({
|
|
|
161
166
|
const progress = <div className="progress-bar"></div>
|
|
162
167
|
const result = shimmer
|
|
163
168
|
? (
|
|
164
|
-
<div className=
|
|
169
|
+
<div className={listToClass([shimmer && 'shimmer'])}>
|
|
165
170
|
<div className="colors"></div>
|
|
166
171
|
<div className="progress-glow"></div>
|
|
167
172
|
{progress}
|
|
@@ -169,7 +174,9 @@ export const ProgressBar = ({
|
|
|
169
174
|
)
|
|
170
175
|
: progress
|
|
171
176
|
return (
|
|
172
|
-
<Styled
|
|
177
|
+
<Styled
|
|
178
|
+
className={listToClass([className, visible && 'visible'])}
|
|
179
|
+
style={style} $fg={$fg} $bg={$bg} $shimmer={$shimmer} $animate={animate}>
|
|
173
180
|
{result}
|
|
174
181
|
</Styled>
|
|
175
182
|
)
|
package/src/layout.css
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
background-color: var(--light-400);
|
|
32
32
|
border-radius: 4px;
|
|
33
33
|
position: relative;
|
|
34
|
-
overflow: hidden;
|
|
35
34
|
width: 100%;
|
|
36
35
|
height: 100%;
|
|
37
36
|
|
|
@@ -104,11 +103,13 @@
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
.chat-content {
|
|
106
|
+
padding-bottom: 16px;
|
|
107
107
|
display: flex;
|
|
108
108
|
flex-direction: column;
|
|
109
109
|
flex: 1;
|
|
110
110
|
flex-basis: 0;
|
|
111
111
|
overflow: auto;
|
|
112
|
+
padding-right: 12px;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
.chat-right-panel {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box, Button, Checkbox, Flex, IconBox, Input, Label, Radio, Text } from '@citric/core'
|
|
2
2
|
import { Cog, Copy, Dislike, DislikeFill, Like, LikeFill, TimesCircle } from '@citric/icons'
|
|
3
|
-
import {
|
|
3
|
+
import { Badge, IconButton } from '@citric/ui'
|
|
4
4
|
import { agentClient } from '@stack-spot/portal-network'
|
|
5
5
|
import { listToClass } from '@stack-spot/portal-theme'
|
|
6
6
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
@@ -37,7 +37,7 @@ interface Props extends CustomMessage {
|
|
|
37
37
|
/**
|
|
38
38
|
* The name of the user currently logged in (will be used if the agent type of the message is "user").
|
|
39
39
|
*/
|
|
40
|
-
username
|
|
40
|
+
username?: string,
|
|
41
41
|
/**
|
|
42
42
|
* Whether or not this is the last message in the chat. This is important for disabling action buttons in messages that are no longer
|
|
43
43
|
* relevant.
|
|
@@ -169,14 +169,14 @@ const RenderInputsEntry = ({ isLast, entry, value, setValue, labels, setLabels }
|
|
|
169
169
|
/**
|
|
170
170
|
* Renders a message (ChatEntry) in the chat.
|
|
171
171
|
*/
|
|
172
|
-
export const ChatMessage = ({ message,
|
|
172
|
+
export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Props) => {
|
|
173
173
|
const t = useTranslate(dictionary)
|
|
174
174
|
const [liked, setLiked] = useState<boolean | undefined>()
|
|
175
175
|
const [value, setValue] = useState<string[]>(message.getValue()?.initialValue ?? [])
|
|
176
176
|
const [labels, setLabels] = useState<string[]>(message.getValue()?.initialValue ?? [])
|
|
177
177
|
const entry = useChatEntry(message)
|
|
178
178
|
const dateFormatter = useDateFormatter()
|
|
179
|
-
const userInfo = entry.agentType === 'user' ?
|
|
179
|
+
const userInfo = entry.agentType === 'user' ? <></> : <AgentInfo agent={entry.agent} />
|
|
180
180
|
const date = new Date(entry.updated ?? '')
|
|
181
181
|
const shouldShowFooter = entry.updated && !isNaN(date.getTime())
|
|
182
182
|
const ref = useRef<HTMLLIElement>(null)
|
|
@@ -322,22 +322,22 @@ export const ChatMessage = ({ message, username, isLast, beforeMessage, afterMes
|
|
|
322
322
|
{shouldShowFooter && <div className="message-footer">
|
|
323
323
|
{entry.agentType === 'bot' && !entry.error && <div className="message-actions">
|
|
324
324
|
{entry.type === 'md' && (
|
|
325
|
-
<IconButton title={t.copy} aria-label={t.copy} onClick={() => onCopyAll(entry, chat)}>
|
|
325
|
+
<IconButton appearance="square" color="light" title={t.copy} aria-label={t.copy} onClick={() => onCopyAll(entry, chat)}>
|
|
326
326
|
<Copy />
|
|
327
327
|
</IconButton>
|
|
328
328
|
)}
|
|
329
329
|
{entry.messageId && (
|
|
330
330
|
<>
|
|
331
|
-
<IconButton title={t.like} aria-label={t.like} onClick={like}>
|
|
331
|
+
<IconButton appearance="square" color="light" title={t.like} aria-label={t.like} onClick={like}>
|
|
332
332
|
{liked === true ? <LikeFill /> : <Like />}
|
|
333
333
|
</IconButton>
|
|
334
|
-
<IconButton title={t.dislike} aria-label={t.dislike} onClick={dislike}>
|
|
334
|
+
<IconButton appearance="square" color="light" title={t.dislike} aria-label={t.dislike} onClick={dislike}>
|
|
335
335
|
{liked === false ? <DislikeFill /> : <Dislike />}
|
|
336
336
|
</IconButton>
|
|
337
337
|
</>
|
|
338
338
|
)}
|
|
339
339
|
</div>}
|
|
340
|
-
<Text appearance="microtext1" className="chat-date">
|
|
340
|
+
<Text as="label" appearance="microtext1" className="chat-date">
|
|
341
341
|
{dateFormatter.formatForChatMessage(date)}
|
|
342
342
|
</Text>
|
|
343
343
|
</div>}
|
package/src/views/Chat/styled.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const ChatList: IStyledComponentBase<
|
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
justify-content: end;
|
|
13
13
|
gap: 20px;
|
|
14
|
-
margin: 0
|
|
14
|
+
margin: 0;
|
|
15
15
|
padding: 0;
|
|
16
16
|
flex: 1;
|
|
17
17
|
|
|
@@ -65,10 +65,12 @@ export const ChatList: IStyledComponentBase<
|
|
|
65
65
|
.message-actions {
|
|
66
66
|
display: flex;
|
|
67
67
|
flex-direction: row;
|
|
68
|
-
gap:
|
|
68
|
+
gap: 4px;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.chat-date {
|
|
72
|
+
display: inline-block;
|
|
73
|
+
align-content: flex-end;
|
|
72
74
|
opacity: 0.6;
|
|
73
75
|
margin-left: auto;
|
|
74
76
|
}
|
|
@@ -145,9 +147,10 @@ export const ChatList: IStyledComponentBase<
|
|
|
145
147
|
gap: 8px;
|
|
146
148
|
|
|
147
149
|
.message-content {
|
|
148
|
-
padding:
|
|
150
|
+
padding: 16px;
|
|
151
|
+
border-radius: 24px;
|
|
152
|
+
border-top-right-radius: 0;
|
|
149
153
|
background-color: ${theme.color.light[500]};
|
|
150
|
-
border-radius: 4px;
|
|
151
154
|
|
|
152
155
|
.markdown > p:first-child {
|
|
153
156
|
margin-top: 0;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Flex } from '@citric/core'
|
|
2
|
+
import { ArrowUp, Code, Stop } from '@citric/icons'
|
|
3
|
+
import { IconButton } from '@citric/ui'
|
|
4
|
+
import { useCurrentChat, useCurrentChatState, useWidget } from '../../context/hooks'
|
|
5
|
+
import { useMessageInputDictionary } from './dictionary'
|
|
6
|
+
import { SelectContent } from './SelectContent'
|
|
7
|
+
import { SelectionBarWrapper } from './styled'
|
|
8
|
+
|
|
9
|
+
interface SelectionBarProps {
|
|
10
|
+
/**
|
|
11
|
+
* A function to run when the send button is clicked.
|
|
12
|
+
*/
|
|
13
|
+
onSend: () => void,
|
|
14
|
+
/**
|
|
15
|
+
* Whether or not the message is currently being sent. This is used to decide which button to show: send or cancel.
|
|
16
|
+
*/
|
|
17
|
+
isLoading?: boolean,
|
|
18
|
+
/**
|
|
19
|
+
* State to determine whether the input is focused
|
|
20
|
+
*/
|
|
21
|
+
focused?: boolean,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const ButtonBar = ({ onSend, isLoading, focused }: SelectionBarProps) => {
|
|
25
|
+
const t = useMessageInputDictionary()
|
|
26
|
+
const chat = useCurrentChat()
|
|
27
|
+
const widget = useWidget()
|
|
28
|
+
const features = useCurrentChatState('features')
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<SelectionBarWrapper className="button-group" $inputFocused={focused}>
|
|
32
|
+
<Flex sx={{ gap: '4px' }}>
|
|
33
|
+
<SelectContent />
|
|
34
|
+
{features.editor && (
|
|
35
|
+
<IconButton color="light" appearance="square" aria-label={t.code} title={t.code} onClick={() => widget.set('panel', 'editor')}>
|
|
36
|
+
<Code />
|
|
37
|
+
</IconButton>
|
|
38
|
+
)}
|
|
39
|
+
</Flex>
|
|
40
|
+
<Flex>
|
|
41
|
+
{isLoading ? (
|
|
42
|
+
<IconButton appearance="square" color="inverse" aria-label={t.cancel}
|
|
43
|
+
onClick={() => chat.abort()} className="send" title={t.cancel}>
|
|
44
|
+
<Stop />
|
|
45
|
+
</IconButton>
|
|
46
|
+
) : (
|
|
47
|
+
<IconButton appearance="square" color="inverse" aria-label={t.send}
|
|
48
|
+
onClick={onSend} className="send" title={t.send}>
|
|
49
|
+
<ArrowUp />
|
|
50
|
+
</IconButton>
|
|
51
|
+
)}
|
|
52
|
+
</Flex>
|
|
53
|
+
</SelectionBarWrapper>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Text } from '@citric/core'
|
|
2
|
-
import {
|
|
2
|
+
import { TimesMini } from '@citric/icons'
|
|
3
3
|
import { Badge, IconButton } from '@citric/ui'
|
|
4
4
|
import { loader } from '@monaco-editor/react'
|
|
5
5
|
import { ColorPaletteName, listToClass } from '@stack-spot/portal-theme'
|
|
@@ -73,7 +73,11 @@ export const InfoBar = () => {
|
|
|
73
73
|
<div className="space"></div>
|
|
74
74
|
<div className="content">
|
|
75
75
|
{shouldRenderRemoveAllButton && (
|
|
76
|
-
<IconButton
|
|
76
|
+
<IconButton
|
|
77
|
+
appearance="square" color="light"
|
|
78
|
+
aria-label={t.removeConfig} title={t.removeConfig} onClick={removeAll}>
|
|
79
|
+
<TimesMini />
|
|
80
|
+
</IconButton>
|
|
77
81
|
)}
|
|
78
82
|
<FadingOverflow className="list-overflow" scroll="arrows" enableHorizontalScrollWithVerticalWheel>
|
|
79
83
|
<ul>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Clip, KnowledgeSource, 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'
|
|
5
|
+
import { useCurrentChatState, useWidget } from '../../context/hooks'
|
|
6
|
+
|
|
7
|
+
type chatFeatures = 'workspace' | 'knowledgeSource' | 'stack'
|
|
8
|
+
type chatPanel = 'ks' | 'workspace' | 'stack'
|
|
9
|
+
|
|
10
|
+
export const SelectContent = () => {
|
|
11
|
+
const widget = useWidget()
|
|
12
|
+
const [visibleMenu, setVisibleMenu] = useState(false)
|
|
13
|
+
const features = useCurrentChatState('features')
|
|
14
|
+
const hasFeatureButtons = features.workspace || features.knowledgeSource || features.stack
|
|
15
|
+
|
|
16
|
+
const itemConfigs = [
|
|
17
|
+
{
|
|
18
|
+
key: 'knowledgeSource',
|
|
19
|
+
label: 'Knowledge Sources',
|
|
20
|
+
icon: <KnowledgeSource />,
|
|
21
|
+
panel: 'ks',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: 'stack',
|
|
25
|
+
label: 'Stacks AI',
|
|
26
|
+
icon: <Stack />,
|
|
27
|
+
panel: 'stack',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: 'workspace',
|
|
31
|
+
label: 'Spots',
|
|
32
|
+
icon: <Spaces />,
|
|
33
|
+
panel: 'workspace',
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
const listItems = useMemo(() =>
|
|
38
|
+
itemConfigs.filter(chatFeatures => features[chatFeatures.key as chatFeatures])
|
|
39
|
+
.map(chatFeatures => ({
|
|
40
|
+
label: chatFeatures.label,
|
|
41
|
+
icon: chatFeatures.icon,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
widget.set('panel', chatFeatures.panel as chatPanel)
|
|
44
|
+
setVisibleMenu(false)
|
|
45
|
+
},
|
|
46
|
+
})), [features, widget])
|
|
47
|
+
|
|
48
|
+
if (!hasFeatureButtons) return null
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<IconButton
|
|
53
|
+
color="light"
|
|
54
|
+
appearance="square"
|
|
55
|
+
role="button"
|
|
56
|
+
title="title"
|
|
57
|
+
data-test-hint="button-hint"
|
|
58
|
+
aria-label="aria-label"
|
|
59
|
+
onClick={() => setVisibleMenu(state => !state)}>
|
|
60
|
+
<Clip />
|
|
61
|
+
</IconButton>
|
|
62
|
+
<SelectionList
|
|
63
|
+
style={{
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
top: '-140px',
|
|
66
|
+
}}
|
|
67
|
+
id="teste"
|
|
68
|
+
visible={visibleMenu}
|
|
69
|
+
onHide={() => setVisibleMenu(false)}
|
|
70
|
+
items={listItems}
|
|
71
|
+
/>
|
|
72
|
+
</>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -10,7 +10,7 @@ const dictionary = {
|
|
|
10
10
|
collapse: 'Hide buttons',
|
|
11
11
|
expand: 'Show buttons',
|
|
12
12
|
send: 'Send message',
|
|
13
|
-
placeholder: 'Message to $0',
|
|
13
|
+
placeholder: 'Message to $0 or use / or @.',
|
|
14
14
|
cancel: 'Cancel',
|
|
15
15
|
removeConfig: 'Remove all the configuration',
|
|
16
16
|
removeStack: 'Stop using the current stack',
|
|
@@ -29,7 +29,7 @@ const dictionary = {
|
|
|
29
29
|
collapse: 'Esconder botões',
|
|
30
30
|
expand: 'Mostrar botões',
|
|
31
31
|
send: 'Enviar mensagem',
|
|
32
|
-
placeholder: 'Mensagem para $0',
|
|
32
|
+
placeholder: 'Mensagem para $0 ou use / ou @.',
|
|
33
33
|
cancel: 'Cancelar',
|
|
34
34
|
removeConfig: 'Remover todas as configurações',
|
|
35
35
|
removeStack: 'Parar de usar a stack atual',
|