@stack-spot/ai-chat-widget 1.5.2 → 1.7.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/app-metadata.json +7 -7
  3. package/dist/chat-interceptors/send-message.d.ts.map +1 -1
  4. package/dist/chat-interceptors/send-message.js +16 -8
  5. package/dist/chat-interceptors/send-message.js.map +1 -1
  6. package/dist/components/AdaptiveTextArea.d.ts.map +1 -1
  7. package/dist/components/AdaptiveTextArea.js +7 -1
  8. package/dist/components/AdaptiveTextArea.js.map +1 -1
  9. package/dist/components/Selector/index.d.ts +20 -0
  10. package/dist/components/Selector/index.d.ts.map +1 -0
  11. package/dist/components/Selector/index.js +134 -0
  12. package/dist/components/Selector/index.js.map +1 -0
  13. package/dist/components/Selector/styled.d.ts +2 -0
  14. package/dist/components/Selector/styled.d.ts.map +1 -0
  15. package/dist/components/Selector/styled.js +144 -0
  16. package/dist/components/Selector/styled.js.map +1 -0
  17. package/dist/regex.d.ts +1 -0
  18. package/dist/regex.d.ts.map +1 -1
  19. package/dist/regex.js +1 -0
  20. package/dist/regex.js.map +1 -1
  21. package/dist/views/Agents/AgentsTab.js +4 -4
  22. package/dist/views/Agents/AgentsTab.js.map +1 -1
  23. package/dist/views/Chat/AgentInfo.js +1 -1
  24. package/dist/views/Home/CustomAgent.js +3 -3
  25. package/dist/views/Home/CustomAgent.js.map +1 -1
  26. package/dist/views/Home/styled.js +1 -1
  27. package/dist/views/MessageInput/AgentSelector.d.ts +4 -0
  28. package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -0
  29. package/dist/views/MessageInput/AgentSelector.js +31 -0
  30. package/dist/views/MessageInput/AgentSelector.js.map +1 -0
  31. package/dist/views/MessageInput/ButtonAgent.d.ts +2 -0
  32. package/dist/views/MessageInput/ButtonAgent.d.ts.map +1 -0
  33. package/dist/views/MessageInput/ButtonAgent.js +17 -0
  34. package/dist/views/MessageInput/ButtonAgent.js.map +1 -0
  35. package/dist/views/MessageInput/ButtonGroup.d.ts +1 -1
  36. package/dist/views/MessageInput/ButtonGroup.d.ts.map +1 -1
  37. package/dist/views/MessageInput/ButtonGroup.js +4 -6
  38. package/dist/views/MessageInput/ButtonGroup.js.map +1 -1
  39. package/dist/views/MessageInput/QuickCommandSelector.d.ts +2 -11
  40. package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -1
  41. package/dist/views/MessageInput/QuickCommandSelector.js +17 -130
  42. package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
  43. package/dist/views/MessageInput/dictionary.d.ts +1 -1
  44. package/dist/views/MessageInput/dictionary.d.ts.map +1 -1
  45. package/dist/views/MessageInput/dictionary.js +4 -2
  46. package/dist/views/MessageInput/dictionary.js.map +1 -1
  47. package/dist/views/MessageInput/index.d.ts.map +1 -1
  48. package/dist/views/MessageInput/index.js +4 -1
  49. package/dist/views/MessageInput/index.js.map +1 -1
  50. package/dist/views/MessageInput/styled.d.ts.map +1 -1
  51. package/dist/views/MessageInput/styled.js +51 -144
  52. package/dist/views/MessageInput/styled.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/app-metadata.json +7 -7
  55. package/src/chat-interceptors/send-message.ts +14 -7
  56. package/src/components/AdaptiveTextArea.tsx +8 -1
  57. package/src/components/Selector/index.tsx +245 -0
  58. package/src/components/Selector/styled.ts +145 -0
  59. package/src/regex.ts +1 -0
  60. package/src/views/Agents/AgentsTab.tsx +4 -4
  61. package/src/views/Chat/AgentInfo.tsx +1 -1
  62. package/src/views/Home/CustomAgent.tsx +3 -3
  63. package/src/views/Home/styled.ts +1 -1
  64. package/src/views/MessageInput/AgentSelector.tsx +35 -0
  65. package/src/views/MessageInput/ButtonAgent.tsx +36 -0
  66. package/src/views/MessageInput/ButtonGroup.tsx +3 -10
  67. package/src/views/MessageInput/QuickCommandSelector.tsx +21 -205
  68. package/src/views/MessageInput/dictionary.ts +4 -2
  69. package/src/views/MessageInput/index.tsx +8 -3
  70. package/src/views/MessageInput/styled.ts +51 -144
@@ -88,12 +88,12 @@ export const MessageInputBox = styled.div`
88
88
  display: flex;
89
89
  position: relative;
90
90
  flex-direction: row;
91
- gap: 4px;
91
+ gap: 8px;
92
92
  align-items: end;
93
93
  border-radius: 4px;
94
94
  border: 1px solid ${theme.color.light[500]};
95
95
  background-color: ${theme.color.light[300]};
96
- padding: 8px 10px;
96
+ padding: 10px 8px;
97
97
  transition: border-color 0.3s, background-color 0.3s;
98
98
 
99
99
  &.focused {
@@ -150,12 +150,16 @@ export const MessageInputBox = styled.div`
150
150
  svg {
151
151
  transform: rotate(180deg);
152
152
  }
153
- }
154
-
155
- &.agent img {
156
- width: 80%;
157
- height: 80%;
158
- border-radius: 50%;
153
+ }
154
+
155
+ &.agent {
156
+ border-radius: 50%;
157
+ opacity: 1;
158
+ img {
159
+ width: 100%;
160
+ height: 100%;
161
+ border-radius: 50%;
162
+ }
159
163
  }
160
164
  }
161
165
 
@@ -191,6 +195,45 @@ export const MessageInputBox = styled.div`
191
195
  width: 24px;
192
196
  height: 24px;
193
197
  }
198
+
199
+ .group-agent {
200
+ display: flex;
201
+ margin-left: 0.5rem;
202
+ margin-right: 0.5rem;
203
+
204
+ button {
205
+ margin-right: -0.5rem;
206
+ margin-left: -0.5rem;
207
+ border-radius: 50%;
208
+ background-color: ${theme.color.light[300]};
209
+ border: 1px solid ${theme.color.light[600]};
210
+ display: flex;
211
+
212
+ &.agent-selected:hover:before {
213
+ content: '';
214
+ width: 22px;
215
+ height: 22px;
216
+ position: absolute;
217
+ background-color: ${theme.color.light[300]};
218
+ border-radius: 100%;
219
+ opacity: 0.4;
220
+ }
221
+
222
+ .icon-remove {
223
+ display: none;
224
+ fill: ${theme.color.light.contrastText};
225
+ position: absolute;
226
+ }
227
+
228
+ &:hover .icon-remove {
229
+ display: flex;
230
+ }
231
+
232
+ .image {
233
+ margin: 1px;
234
+ }
235
+ }
236
+ }
194
237
  }
195
238
 
196
239
  textarea {
@@ -206,140 +249,4 @@ export const MessageInputBox = styled.div`
206
249
  box-shadow: none;
207
250
  }
208
251
  }
209
-
210
- .quick-command-selector {
211
- position: absolute;
212
- border-radius: 4px;
213
- border: 1px solid ${theme.color.light[600]};
214
- background-color: ${theme.color.light[500]};
215
- box-shadow: 0px 2px 16px 0px #0000005C;
216
- display: flex;
217
- flex-direction: column;
218
- width: 480px;
219
- bottom: 55px;
220
-
221
- .loading, .error {
222
- padding-bottom: 26px;
223
- p {
224
- width: 200px;
225
- text-align: center;
226
- line-height: 20px;
227
- }
228
- }
229
-
230
- .empty {
231
- padding-bottom: 26px;
232
- width: 200px;
233
- text-align: center;
234
- line-height: 20px;
235
- margin: auto;
236
- }
237
-
238
- header {
239
- display: flex;
240
- flex-direction: row;
241
- gap: 8px;
242
- align-items: center;
243
- padding: 8px;
244
- font-family: 'San Francisco';
245
- font-weight: 500;
246
- font-size: 11px;
247
- }
248
-
249
- .body {
250
- display: flex;
251
- flex-direction: row;
252
- align-items: center;
253
- }
254
-
255
- ul {
256
- margin: 0;
257
- padding: 0;
258
- list-style: none;
259
- }
260
-
261
- ul.tabs {
262
- display: flex;
263
- flex-direction: column;
264
-
265
- li {
266
- display: flex;
267
- flex-direction: column;
268
- }
269
-
270
- button {
271
- box-sizing: border-box;
272
- color: ${theme.color.light[700]};
273
- text-align: left;
274
- padding: 10px;
275
- font-weight: 600;
276
- font-size: 12px;
277
- transition: background-color 0.3s;
278
- border-top-right-radius: 4px;
279
- border-bottom-right-radius: 4px;
280
- background-color: transparent;
281
- border: none;
282
- cursor: pointer;
283
- outline: none;
284
-
285
- &:hover, &.active, &:focus {
286
- background-color: ${theme.color.light[600]};
287
- }
288
-
289
- &.active {
290
- border-left: 1px solid ${theme.color.light.contrastText};
291
- color: ${theme.color.light.contrastText};
292
- }
293
- }
294
- }
295
-
296
- ul.command-list {
297
- align-self: stretch;
298
- display: flex;
299
- flex-direction: column;
300
- gap: 2px;
301
- overflow-y: auto;
302
- flex: 1;
303
- max-height: 170px;
304
-
305
- li {
306
- display: flex;
307
- flex-direction: row;
308
- align-items: center;
309
- gap: 8px;
310
- padding: 8px;
311
- border-radius: 4px;
312
-
313
- &:hover, &.focus {
314
- background-color: ${theme.color.light[600]};
315
- }
316
-
317
- button.qc {
318
- flex: 1;
319
- border: none;
320
- text-align: left;
321
- background-color: transparent;
322
- text-align: left;
323
- outline: none;
324
- overflow: hidden;
325
- cursor: pointer;
326
-
327
- .qc-title {
328
- font-size: 11px;
329
- margin: 0 0 4px 0;
330
- color: ${theme.color.light.contrastText};
331
- text-transform: uppercase;
332
- text-overflow: ellipsis;
333
- overflow: hidden;
334
- }
335
-
336
- .qc-description {
337
- color: ${theme.color.light[700]};
338
- font-size: 12px;
339
- margin: 0;
340
- }
341
- }
342
- }
343
- }
344
- }
345
252
  `