@stack-spot/ai-chat-widget 1.7.0-beta.1 → 1.7.0-beta.2
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/dist/app-metadata.json +2 -2
- package/dist/components/Selector/index.d.ts +5 -1
- package/dist/components/Selector/index.d.ts.map +1 -1
- package/dist/components/Selector/index.js +11 -8
- 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 +6 -2
- package/dist/components/Selector/styled.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/AgentSelector.js +23 -2
- package/dist/views/MessageInput/AgentSelector.js.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.js +3 -1
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
- package/dist/views/MessageInput/index.d.ts.map +1 -1
- package/dist/views/MessageInput/index.js +1 -1
- package/dist/views/MessageInput/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app-metadata.json +2 -2
- package/src/components/Selector/index.tsx +23 -15
- package/src/components/Selector/styled.ts +6 -2
- package/src/views/MessageInput/AgentSelector.tsx +28 -3
- package/src/views/MessageInput/QuickCommandSelector.tsx +4 -1
- package/src/views/MessageInput/index.tsx +4 -3
- package/src/views/MessageInput/mini-logo.svg +28 -0
package/dist/app-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/ai-chat-widget",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
4
|
-
"date": "Tue Jan 21 2025
|
|
3
|
+
"version": "1.7.0-beta.2",
|
|
4
|
+
"date": "Tue Jan 21 2025 15:18:54 GMT-0300 (Brasilia Standard Time)",
|
|
5
5
|
"dependencies": [
|
|
6
6
|
{
|
|
7
7
|
"name": "@stack-spot/app-metadata",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { VisibilityLevelEnum } from '@stack-spot/portal-network/api/ai';
|
|
1
2
|
import React from 'react';
|
|
3
|
+
type SectionVisibility = VisibilityLevelEnum | 'builtIn';
|
|
2
4
|
type SelectorShortcut = '/' | '@';
|
|
3
5
|
interface SelectorConfig<T> {
|
|
4
6
|
resourceName: string;
|
|
@@ -7,9 +9,11 @@ interface SelectorConfig<T> {
|
|
|
7
9
|
regex: RegExp;
|
|
8
10
|
url: string;
|
|
9
11
|
imageProp?: keyof T;
|
|
10
|
-
|
|
12
|
+
titleProp: keyof T;
|
|
11
13
|
isEnabled: boolean;
|
|
14
|
+
sections: SectionVisibility[];
|
|
12
15
|
onSelect: (item: T) => void;
|
|
16
|
+
data: () => T[];
|
|
13
17
|
}
|
|
14
18
|
interface SelectorProps<T> {
|
|
15
19
|
selectorConfig: SelectorConfig<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAEvE,OAAO,KAA4D,MAAM,OAAO,CAAA;AAOhF,KAAK,iBAAiB,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAExD,KAAK,gBAAgB,GAAG,GAAG,GAAG,GAAG,CAAA;AA2BjC,UAAU,cAAc,CAAC,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;CACjB;AAED,UAAU,aAAa,CAAC,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAC;CACnE;AAuGD,eAAO,MAAM,QAAQ,GAAI,CAAC,gCAAkC,aAAa,CAAC,CAAC,CAAC,4CA+D3E,CAAA"}
|
|
@@ -10,14 +10,14 @@ import { getUrlToStackSpotAI } from '../../utils/url.js';
|
|
|
10
10
|
import { Fading } from '../Fading.js';
|
|
11
11
|
import { FallbackBoundary } from '../FallbackBoundary/index.js';
|
|
12
12
|
import { SelectorBox } from './styled.js';
|
|
13
|
-
const sections = [undefined, 'personal', 'workspace', 'account', 'shared'];
|
|
14
13
|
const ListItem = ({ item, selectorConfig, onSelect }) => {
|
|
15
14
|
const t = useTranslate(dictionary);
|
|
16
|
-
const { shortcut, url } = selectorConfig;
|
|
17
|
-
const hasImage = !!
|
|
15
|
+
const { shortcut, url, titleProp, imageProp } = selectorConfig;
|
|
16
|
+
const hasImage = !!imageProp;
|
|
18
17
|
const image = item[selectorConfig.imageProp];
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
const title = item[selectorConfig.titleProp];
|
|
19
|
+
const linkTitle = t.open.replace('%s', item[titleProp]);
|
|
20
|
+
return (_jsxs("li", { children: [!!hasImage && (image ? _jsx(Image, { width: "32", height: "32", radius: "full", src: image }) : _jsx(IconBox, { size: "md", children: _jsx(Agent, {}) })), _jsxs("button", { className: "selector", onClick: () => onSelect(item), onKeyDown: (e) => e.key === 'Enter' && e.preventDefault(), onFocus: (e) => e.target.closest('li')?.classList.add('focus'), onBlur: (e) => e.target.closest('li')?.classList.remove('focus'), children: [_jsxs("p", { className: "selector-title", children: [!hasImage ? shortcut : '', title] }), _jsx("p", { className: "selector-description", children: item.description })] }), _jsx(IconButton, { as: "a", title: linkTitle, "aria-label": linkTitle, href: `${getUrlToStackSpotAI()}${url}${item.slug}`, target: "_blank", children: _jsx(ExternalLink, {}) })] }));
|
|
21
21
|
};
|
|
22
22
|
const List = ({ selectorConfig, filter, visibility, onSelect }) => {
|
|
23
23
|
const t = useTranslate(dictionary);
|
|
@@ -26,7 +26,8 @@ const List = ({ selectorConfig, filter, visibility, onSelect }) => {
|
|
|
26
26
|
if (!filter && !visibility)
|
|
27
27
|
return items;
|
|
28
28
|
const lowerFilter = filter?.toLowerCase() ?? '';
|
|
29
|
-
return items.filter(item => item.
|
|
29
|
+
return items.filter(item => item[selectorConfig.titleProp].toLocaleLowerCase().startsWith(lowerFilter) &&
|
|
30
|
+
(!visibility || item?.visibility_level?.toLowerCase() === visibility.toLowerCase()));
|
|
30
31
|
}, [filter, items, visibility]);
|
|
31
32
|
if (!items.length)
|
|
32
33
|
return _jsx(Text, { className: "empty", colorScheme: "light.700", children: t.noData.replace('%', selectorConfig.resourceName) });
|
|
@@ -38,7 +39,7 @@ const SelectorContent = ({ filter, onClose, selectorConfig }) => {
|
|
|
38
39
|
const t = useTranslate(dictionary);
|
|
39
40
|
const ref = useRef(null);
|
|
40
41
|
const [visibility, setVisibility] = useState();
|
|
41
|
-
const { resourceName, icon, onSelect } = selectorConfig;
|
|
42
|
+
const { resourceName, icon, onSelect, sections } = selectorConfig;
|
|
42
43
|
const onSelectItem = useCallback((slug) => {
|
|
43
44
|
onSelect(slug);
|
|
44
45
|
onClose();
|
|
@@ -54,7 +55,7 @@ const SelectorContent = ({ filter, onClose, selectorConfig }) => {
|
|
|
54
55
|
function createSectionItem(action) {
|
|
55
56
|
return (_jsx("li", { children: _jsx("button", { className: visibility === action ? 'active' : '', onFocus: () => setVisibility(action), children: t[action || 'all'] }) }, action ?? 'all'));
|
|
56
57
|
}
|
|
57
|
-
return (_jsxs("div", { ref: ref, children: [_jsxs("header", { children: [_jsx(IconBox, { children: icon }), _jsxs(Text, { as: "h3", className: "uppercase", children: [" ", resourceName, " "] })] }), _jsxs("div", { className: "body", children: [
|
|
58
|
+
return (_jsxs("div", { ref: ref, children: [_jsxs("header", { children: [_jsx(IconBox, { children: icon }), _jsxs(Text, { as: "h3", className: "uppercase", children: [" ", resourceName, " "] })] }), _jsxs("div", { className: "body", children: [_jsxs("ul", { className: "tabs", children: [createSectionItem(), sections.map(createSectionItem)] }), _jsx(FallbackBoundary, { message: t.error.replace('%s', selectorConfig.resourceName), mini: true, children: _jsx(List, { filter: filter, visibility: visibility, selectorConfig: selectorConfig, onSelect: onSelectItem }) })] })] }));
|
|
58
59
|
};
|
|
59
60
|
export const Selector = ({ inputRef, selectorConfig }) => {
|
|
60
61
|
const { shortcut, regex, isEnabled } = selectorConfig;
|
|
@@ -113,6 +114,7 @@ const dictionary = {
|
|
|
113
114
|
personal: 'Personal',
|
|
114
115
|
account: 'Account',
|
|
115
116
|
shared: 'Shared',
|
|
117
|
+
builtIn: 'Built-In',
|
|
116
118
|
workspace: 'Workspace',
|
|
117
119
|
error: 'Could not load the %ss.',
|
|
118
120
|
noData: 'You don\'t have any %s yet.',
|
|
@@ -125,6 +127,7 @@ const dictionary = {
|
|
|
125
127
|
account: 'Conta',
|
|
126
128
|
shared: 'Compartilhado',
|
|
127
129
|
workspace: 'Workspace',
|
|
130
|
+
builtIn: 'Embutido',
|
|
128
131
|
error: 'Não foi possível carregar os %ss.',
|
|
129
132
|
noData: 'Você ainda não possui %ss.',
|
|
130
133
|
noResults: 'Não há %ss para mostrar aqui.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Selector/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE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AC,SAAS,CAAC,IAAI,CAAC,EAC9B,QAAQ,EAAE,QAAQ,GAClB,GACK,GACG,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,GAAG,EAAE,KAAK;QACV,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,WAAW;QACtB,KAAK,EAAE,yBAAyB;QAChC,MAAM,EAAE,6BAA6B;QACrC,SAAS,EAAE,gCAAgC;QAC3C,IAAI,EAAE,qCAAqC;KAC5C;IACD,EAAE,EAAE;QACF,GAAG,EAAE,OAAO;QACZ,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,WAAW;QACtB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE,mCAAmC;QAC1C,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,+BAA+B;QAC1C,IAAI,EAAE,iDAAiD;KACxD;CACmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,wOAgJvB,CAAA"}
|
|
@@ -10,7 +10,8 @@ export const SelectorBox = styled.div `
|
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 480px;
|
|
13
|
-
bottom:
|
|
13
|
+
bottom: 54px;
|
|
14
|
+
left: 0;
|
|
14
15
|
|
|
15
16
|
.loading, .error {
|
|
16
17
|
padding-bottom: 26px;
|
|
@@ -113,7 +114,10 @@ export const SelectorBox = styled.div `
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
button.selector {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
116
119
|
flex: 1;
|
|
120
|
+
gap: 4px;
|
|
117
121
|
border: none;
|
|
118
122
|
text-align: left;
|
|
119
123
|
background-color: transparent;
|
|
@@ -124,11 +128,11 @@ export const SelectorBox = styled.div `
|
|
|
124
128
|
|
|
125
129
|
.selector-title {
|
|
126
130
|
font-size: 11px;
|
|
127
|
-
margin: 0 0 4px 0;
|
|
128
131
|
color: ${theme.color.light.contrastText};
|
|
129
132
|
text-transform: uppercase;
|
|
130
133
|
text-overflow: ellipsis;
|
|
131
134
|
overflow: hidden;
|
|
135
|
+
margin: 0;
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
.selector-description {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;wBAIb,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;wBACtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;wBAIb,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;wBACtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAoCpB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B/B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;8BAeT,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;mCAIjB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;mBAC9C,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;8BAuBnB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;qBAkB/B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;;;;;;qBAQ9B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;CAQ1C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSelector.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/AgentSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentSelector.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/AgentSelector.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAA;CAAE,4CA+ChH,CAAA"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Agent } from '@citric/icons';
|
|
3
3
|
import { agentClient } from '@stack-spot/portal-network';
|
|
4
|
-
import {
|
|
4
|
+
import { uniqBy } from 'lodash';
|
|
5
|
+
import { useCallback, useMemo } from 'react';
|
|
5
6
|
import { Selector } from '../../components/Selector/index.js';
|
|
6
7
|
import { useCurrentChat, useCurrentChatState } from '../../context/hooks.js';
|
|
7
8
|
import { agentRegex } from '../../regex.js';
|
|
9
|
+
import { useAgentsDictionary } from '../Agents/dictionary.js';
|
|
10
|
+
const imgMiniLogoUrl = new URL('./mini-logo.svg', import.meta.url).href;
|
|
8
11
|
export const AgentSelector = ({ inputRef }) => {
|
|
12
|
+
const t = useAgentsDictionary();
|
|
9
13
|
const chat = useCurrentChat();
|
|
10
14
|
const onSelectItem = useCallback((agent) => {
|
|
11
15
|
const newValue = `@${agent.slug}`;
|
|
@@ -16,16 +20,33 @@ export const AgentSelector = ({ inputRef }) => {
|
|
|
16
20
|
inputRef.current.value = newValue;
|
|
17
21
|
inputRef.current.focus();
|
|
18
22
|
}, []);
|
|
23
|
+
const defaultAgent = useMemo(() => [{
|
|
24
|
+
id: '',
|
|
25
|
+
name: 'StackSpot AI',
|
|
26
|
+
slug: 'StackSpot AI',
|
|
27
|
+
avatar: imgMiniLogoUrl,
|
|
28
|
+
description: t.defaultAgentDescription,
|
|
29
|
+
visibility_level: 'builtIn',
|
|
30
|
+
}], []);
|
|
31
|
+
const getAgents = () => {
|
|
32
|
+
const agents = agentClient.agents.useQuery({ visibility: undefined });
|
|
33
|
+
const publicAgents = agentClient.publicAgents.useQuery({ visibility: undefined });
|
|
34
|
+
const accountAgents = agentClient.agents.useQuery({ visibility: 'ACCOUNT' });
|
|
35
|
+
const buildIns = [...defaultAgent, ...publicAgents.map((agent) => ({ ...agent, visibility_level: 'builtIn' }))];
|
|
36
|
+
return uniqBy([...agents, ...buildIns, ...accountAgents], 'id');
|
|
37
|
+
};
|
|
19
38
|
return _jsx(Selector, { inputRef: inputRef, selectorConfig: {
|
|
20
39
|
resourceName: 'Agent',
|
|
21
40
|
shortcut: '@',
|
|
22
41
|
icon: _jsx(Agent, {}),
|
|
23
42
|
imageProp: 'avatar',
|
|
43
|
+
titleProp: 'name',
|
|
24
44
|
regex: agentRegex,
|
|
25
45
|
url: '/agent/',
|
|
26
|
-
|
|
46
|
+
sections: ['personal', 'account', 'shared', 'builtIn'],
|
|
27
47
|
isEnabled: useCurrentChatState('features').agent,
|
|
28
48
|
onSelect: onSelectItem,
|
|
49
|
+
data: getAgents,
|
|
29
50
|
} });
|
|
30
51
|
};
|
|
31
52
|
//# sourceMappingURL=AgentSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSelector.js","sourceRoot":"","sources":["../../../src/views/MessageInput/AgentSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"AgentSelector.js","sourceRoot":"","sources":["../../../src/views/MessageInput/AgentSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEvE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAyE,EAAE,EAAE;IACnH,MAAM,CAAC,GAAG,mBAAmB,EAAE,CAAA;IAC/B,MAAM,IAAI,GAAG,cAAc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AY,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAA;QAE/G,OAAO,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,aAAa,CAAC,EAAE,IAAI,CAAC,CAAA;IACjE,CAAC,CAAA;IAED,OAAO,KAAC,QAAQ,IACd,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE;YACd,YAAY,EAAE,OAAO;YACrB,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,KAAC,KAAK,KAAG;YACf,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,MAAM;YACjB,KAAK,EAAE,UAAU;YACjB,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACtD,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,KAAK;YAChD,QAAQ,EAAE,YAAY;YACtB,IAAI,EAAE,SAAS;SAChB,GACD,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickCommandSelector.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/QuickCommandSelector.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"QuickCommandSelector.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/QuickCommandSelector.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAA;CAAE,4CA4BvH,CAAA"}
|
|
@@ -19,11 +19,13 @@ export const QuickCommandSelector = ({ inputRef }) => {
|
|
|
19
19
|
resourceName: 'Quick Command',
|
|
20
20
|
shortcut: '/',
|
|
21
21
|
icon: _jsx(QuickCommand, {}),
|
|
22
|
+
titleProp: 'slug',
|
|
22
23
|
url: '/quick-command/',
|
|
23
24
|
regex: quickCommandRegex,
|
|
24
|
-
|
|
25
|
+
sections: ['personal', 'workspace', 'account', 'shared'],
|
|
25
26
|
isEnabled: useCurrentChatState('features').quickCommands,
|
|
26
27
|
onSelect: onSelectItem,
|
|
28
|
+
data: () => aiClient.quickCommands.useQuery({ order: 'a-to-z' }),
|
|
27
29
|
} });
|
|
28
30
|
};
|
|
29
31
|
//# sourceMappingURL=QuickCommandSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickCommandSelector.js","sourceRoot":"","sources":["../../../src/views/MessageInput/QuickCommandSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,QAAQ,EAAyE,EAAE,EAAE;IAC1H,MAAM,IAAI,GAAG,cAAc,EAAE,CAAA;IAE7B,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,EAA4B,EAAE,EAAE;QAChE,MAAM,QAAQ,GAAG,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;QAC9B,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;QAEjC,IAAI,CAAC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AQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,KAAC,QAAQ,IACd,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE;YACd,YAAY,EAAE,eAAe;YAC7B,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,KAAC,YAAY,KAAG;YACtB,SAAS,EAAE,MAAM;YACjB,GAAG,EAAE,iBAAiB;YACtB,KAAK,EAAE,iBAAiB;YACxB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;YACxD,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,aAAa;YACxD,QAAQ,EAAE,YAAY;YACtB,IAAI,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;SAEjE,GACD,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,eAAO,MAAM,YAAY,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,eAAO,MAAM,YAAY,+CAqExB,CAAA"}
|
|
@@ -50,7 +50,7 @@ export const MessageInput = () => {
|
|
|
50
50
|
if (!isLoading)
|
|
51
51
|
textAreaRef.current?.focus();
|
|
52
52
|
}, [isLoading]);
|
|
53
|
-
return (_jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", children: [_jsx(ProgressBar, { visible: isLoading, shimmer: true }), _jsx(InfoBar, {}),
|
|
53
|
+
return (_jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", children: [_jsx(ProgressBar, { visible: isLoading, shimmer: true }), _jsx(InfoBar, {}), _jsxs("div", { className: listToClass(['action-box', focused && 'focused', isLoading && 'disabled']), children: [_jsx(QuickCommandSelector, { inputRef: textAreaRef }), _jsx(AgentSelector, { inputRef: textAreaRef }), _jsx(ButtonAgent, {}), _jsx(AdaptiveTextArea, { ref: textAreaRef, disabled: isLoading, placeholder: t.placeholder.replace('%s', agentLabel), onChange: e => chat.set('nextMessage', e.target.value), value: value, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onKeyDown: onKeyDown, onIncreaseSize: () => setExpanded(false), onResetSize: () => !expansionLocked.current && setExpanded(true), maxHeight: isMinimized ? MIN_INPUT_HEIGHT : MAX_INPUT_HEIGHT }), _jsx(ButtonGroup, { onSend: onSend, onCancel: () => chat.abort(), expanded: expanded, isLoading: isLoading, setExpanded: (value) => {
|
|
54
54
|
setExpanded(value);
|
|
55
55
|
expansionLocked.current = expanded;
|
|
56
56
|
} })] })] }));
|
|
@@ -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;AACtD,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,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe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,CAAC,KAAK,CAAC,CAAA;4BAClB,eAAe,CAAC,OAAO,GAAG,QAAQ,CAAA;wBACpC,CAAC,GACD,IACE,IACU,CACnB,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
package/src/app-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/ai-chat-widget",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
4
|
-
"date": "Tue Jan 21 2025
|
|
3
|
+
"version": "1.7.0-beta.2",
|
|
4
|
+
"date": "Tue Jan 21 2025 15:18:54 GMT-0300 (Brasilia Standard Time)",
|
|
5
5
|
"dependencies": [
|
|
6
6
|
{
|
|
7
7
|
"name": "@stack-spot/app-metadata",
|
|
@@ -11,7 +11,7 @@ import { Fading } from '../Fading'
|
|
|
11
11
|
import { FallbackBoundary } from '../FallbackBoundary'
|
|
12
12
|
import { SelectorBox } from './styled'
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
type SectionVisibility = VisibilityLevelEnum | 'builtIn'
|
|
15
15
|
|
|
16
16
|
type SelectorShortcut = '/' | '@'
|
|
17
17
|
|
|
@@ -19,12 +19,12 @@ interface Item {
|
|
|
19
19
|
id: string,
|
|
20
20
|
slug: string,
|
|
21
21
|
description: string,
|
|
22
|
-
visibility_level:
|
|
22
|
+
visibility_level: SectionVisibility,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface ListProps<T> {
|
|
26
26
|
filter?: string,
|
|
27
|
-
visibility?:
|
|
27
|
+
visibility?: SectionVisibility,
|
|
28
28
|
selectorConfig: SelectorConfig<T>,
|
|
29
29
|
onSelect: (item: T) => void,
|
|
30
30
|
}
|
|
@@ -47,9 +47,11 @@ interface SelectorConfig<T> {
|
|
|
47
47
|
regex: RegExp,
|
|
48
48
|
url: string,
|
|
49
49
|
imageProp?: keyof T,
|
|
50
|
-
|
|
50
|
+
titleProp: keyof T,
|
|
51
51
|
isEnabled: boolean,
|
|
52
|
+
sections: SectionVisibility[],
|
|
52
53
|
onSelect: (item: T) => void,
|
|
54
|
+
data: () => T[],
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
interface SelectorProps<T> {
|
|
@@ -59,11 +61,12 @@ interface SelectorProps<T> {
|
|
|
59
61
|
|
|
60
62
|
const ListItem = <T extends Item>({ item, selectorConfig, onSelect }: ListItemProps<T>) => {
|
|
61
63
|
const t = useTranslate(dictionary)
|
|
62
|
-
const { shortcut, url } = selectorConfig
|
|
63
|
-
const hasImage = !!
|
|
64
|
+
const { shortcut, url, titleProp, imageProp } = selectorConfig
|
|
65
|
+
const hasImage = !!imageProp
|
|
64
66
|
const image = item[selectorConfig.imageProp!] as string
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
+
const title = item[selectorConfig.titleProp] as string
|
|
68
|
+
const linkTitle = t.open.replace('%s', item[titleProp] as string)
|
|
69
|
+
|
|
67
70
|
return (
|
|
68
71
|
<li>
|
|
69
72
|
{!!hasImage && (image ? <Image width="32" height="32" radius="full" src={image} /> : <IconBox size="md"><Agent /></IconBox>)}
|
|
@@ -74,7 +77,7 @@ const ListItem = <T extends Item>({ item, selectorConfig, onSelect }: ListItemPr
|
|
|
74
77
|
onFocus={(e) => e.target.closest('li')?.classList.add('focus')}
|
|
75
78
|
onBlur={(e) => e.target.closest('li')?.classList.remove('focus')}
|
|
76
79
|
>
|
|
77
|
-
<p className="selector-title">{!hasImage ? shortcut : ''}{
|
|
80
|
+
<p className="selector-title">{!hasImage ? shortcut : ''}{title}</p>
|
|
78
81
|
<p className="selector-description">{item.description}</p>
|
|
79
82
|
</button>
|
|
80
83
|
<IconButton as="a" title={linkTitle} aria-label={linkTitle} href={`${getUrlToStackSpotAI()}${url}${item.slug}`} target="_blank">
|
|
@@ -92,7 +95,8 @@ const List = <T extends Item>({ selectorConfig, filter, visibility, onSelect }:
|
|
|
92
95
|
const lowerFilter = filter?.toLowerCase() ?? ''
|
|
93
96
|
|
|
94
97
|
return items.filter(item =>
|
|
95
|
-
item.
|
|
98
|
+
(item[selectorConfig.titleProp] as string).toLocaleLowerCase().startsWith(lowerFilter) &&
|
|
99
|
+
(!visibility || item?.visibility_level?.toLowerCase() === visibility.toLowerCase()),
|
|
96
100
|
)
|
|
97
101
|
}, [filter, items, visibility])
|
|
98
102
|
|
|
@@ -112,8 +116,8 @@ const List = <T extends Item>({ selectorConfig, filter, visibility, onSelect }:
|
|
|
112
116
|
const SelectorContent = ({ filter, onClose, selectorConfig }: ContentProps<any>) => {
|
|
113
117
|
const t = useTranslate(dictionary)
|
|
114
118
|
const ref = useRef<HTMLDivElement>(null)
|
|
115
|
-
const [visibility, setVisibility] = useState<
|
|
116
|
-
const { resourceName, icon, onSelect } = selectorConfig
|
|
119
|
+
const [visibility, setVisibility] = useState<SectionVisibility | undefined>()
|
|
120
|
+
const { resourceName, icon, onSelect, sections } = selectorConfig
|
|
117
121
|
const onSelectItem = useCallback((slug: string) => {
|
|
118
122
|
onSelect(slug)
|
|
119
123
|
onClose()
|
|
@@ -128,7 +132,7 @@ const SelectorContent = ({ filter, onClose, selectorConfig }: ContentProps<any>)
|
|
|
128
132
|
ref,
|
|
129
133
|
}, [])
|
|
130
134
|
|
|
131
|
-
function createSectionItem(action
|
|
135
|
+
function createSectionItem(action?: SectionVisibility) {
|
|
132
136
|
return (
|
|
133
137
|
<li key={action ?? 'all'}>
|
|
134
138
|
<button className={visibility === action ? 'active' : ''} onFocus={() => setVisibility(action)}>
|
|
@@ -145,7 +149,9 @@ const SelectorContent = ({ filter, onClose, selectorConfig }: ContentProps<any>)
|
|
|
145
149
|
<Text as="h3" className="uppercase"> {resourceName} </Text>
|
|
146
150
|
</header>
|
|
147
151
|
<div className="body">
|
|
148
|
-
<ul className="tabs">
|
|
152
|
+
<ul className="tabs">
|
|
153
|
+
{createSectionItem()}
|
|
154
|
+
{sections.map(createSectionItem)}</ul>
|
|
149
155
|
<FallbackBoundary message={t.error.replace('%s', selectorConfig.resourceName)} mini>
|
|
150
156
|
<List filter={filter} visibility={visibility} selectorConfig={selectorConfig} onSelect={onSelectItem} />
|
|
151
157
|
</FallbackBoundary>
|
|
@@ -154,7 +160,7 @@ const SelectorContent = ({ filter, onClose, selectorConfig }: ContentProps<any>)
|
|
|
154
160
|
)
|
|
155
161
|
}
|
|
156
162
|
|
|
157
|
-
export const Selector = <T
|
|
163
|
+
export const Selector = <T, >({ inputRef, selectorConfig }: SelectorProps<T>) => {
|
|
158
164
|
const { shortcut, regex, isEnabled } = selectorConfig
|
|
159
165
|
const [isClosed, setClosed] = useState(false)
|
|
160
166
|
const selectorRef = useRef<HTMLDivElement>(null)
|
|
@@ -225,6 +231,7 @@ const dictionary = {
|
|
|
225
231
|
personal: 'Personal',
|
|
226
232
|
account: 'Account',
|
|
227
233
|
shared: 'Shared',
|
|
234
|
+
builtIn: 'Built-In',
|
|
228
235
|
workspace: 'Workspace',
|
|
229
236
|
error: 'Could not load the %ss.',
|
|
230
237
|
noData: 'You don\'t have any %s yet.',
|
|
@@ -237,6 +244,7 @@ const dictionary = {
|
|
|
237
244
|
account: 'Conta',
|
|
238
245
|
shared: 'Compartilhado',
|
|
239
246
|
workspace: 'Workspace',
|
|
247
|
+
builtIn: 'Embutido',
|
|
240
248
|
error: 'Não foi possível carregar os %ss.',
|
|
241
249
|
noData: 'Você ainda não possui %ss.',
|
|
242
250
|
noResults: 'Não há %ss para mostrar aqui.',
|
|
@@ -12,7 +12,8 @@ export const SelectorBox = styled.div`
|
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
width: 480px;
|
|
15
|
-
bottom:
|
|
15
|
+
bottom: 54px;
|
|
16
|
+
left: 0;
|
|
16
17
|
|
|
17
18
|
.loading, .error {
|
|
18
19
|
padding-bottom: 26px;
|
|
@@ -115,7 +116,10 @@ export const SelectorBox = styled.div`
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
button.selector {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
118
121
|
flex: 1;
|
|
122
|
+
gap: 4px;
|
|
119
123
|
border: none;
|
|
120
124
|
text-align: left;
|
|
121
125
|
background-color: transparent;
|
|
@@ -126,11 +130,11 @@ export const SelectorBox = styled.div`
|
|
|
126
130
|
|
|
127
131
|
.selector-title {
|
|
128
132
|
font-size: 11px;
|
|
129
|
-
margin: 0 0 4px 0;
|
|
130
133
|
color: ${theme.color.light.contrastText};
|
|
131
134
|
text-transform: uppercase;
|
|
132
135
|
text-overflow: ellipsis;
|
|
133
136
|
overflow: hidden;
|
|
137
|
+
margin: 0;
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
.selector-description {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Agent } from '@citric/icons'
|
|
2
2
|
import { agentClient } from '@stack-spot/portal-network'
|
|
3
3
|
import { AgentResponse } from '@stack-spot/portal-network/api/agent'
|
|
4
|
-
import {
|
|
4
|
+
import { uniqBy } from 'lodash'
|
|
5
|
+
import { useCallback, useMemo } from 'react'
|
|
5
6
|
import { Selector } from '../../components/Selector'
|
|
6
7
|
import { useCurrentChat, useCurrentChatState } from '../../context/hooks'
|
|
7
8
|
import { agentRegex } from '../../regex'
|
|
9
|
+
import { useAgentsDictionary } from '../Agents/dictionary'
|
|
10
|
+
|
|
11
|
+
const imgMiniLogoUrl = new URL('./mini-logo.svg', import.meta.url).href
|
|
8
12
|
|
|
9
13
|
export const AgentSelector = ({ inputRef }: { inputRef: React.RefObject<HTMLTextAreaElement | HTMLInputElement> }) => {
|
|
14
|
+
const t = useAgentsDictionary()
|
|
10
15
|
const chat = useCurrentChat()
|
|
11
16
|
const onSelectItem = useCallback((agent: AgentResponse) => {
|
|
12
17
|
const newValue = `@${agent.slug}`
|
|
@@ -18,18 +23,38 @@ export const AgentSelector = ({ inputRef }: { inputRef: React.RefObject<HTMLText
|
|
|
18
23
|
inputRef.current.focus()
|
|
19
24
|
}, [])
|
|
20
25
|
|
|
26
|
+
const defaultAgent = useMemo(() => ([{
|
|
27
|
+
id: '',
|
|
28
|
+
name: 'StackSpot AI',
|
|
29
|
+
slug: 'StackSpot AI',
|
|
30
|
+
avatar: imgMiniLogoUrl,
|
|
31
|
+
description: t.defaultAgentDescription,
|
|
32
|
+
visibility_level: 'builtIn',
|
|
33
|
+
}] as AgentResponse[]), [])
|
|
34
|
+
|
|
35
|
+
const getAgents = () => {
|
|
36
|
+
const agents = agentClient.agents.useQuery({ visibility: undefined })
|
|
37
|
+
const publicAgents = agentClient.publicAgents.useQuery({ visibility: undefined })
|
|
38
|
+
const accountAgents = agentClient.agents.useQuery({ visibility: 'ACCOUNT' })
|
|
39
|
+
const buildIns = [...defaultAgent, ...publicAgents.map((agent) => ({ ...agent, visibility_level: 'builtIn' }))]
|
|
40
|
+
|
|
41
|
+
return uniqBy([...agents, ...buildIns, ...accountAgents], 'id')
|
|
42
|
+
}
|
|
43
|
+
|
|
21
44
|
return <Selector
|
|
22
45
|
inputRef={inputRef}
|
|
23
46
|
selectorConfig={{
|
|
24
47
|
resourceName: 'Agent',
|
|
25
48
|
shortcut: '@',
|
|
26
|
-
icon: <Agent />,
|
|
49
|
+
icon: <Agent />,
|
|
27
50
|
imageProp: 'avatar',
|
|
51
|
+
titleProp: 'name',
|
|
28
52
|
regex: agentRegex,
|
|
29
53
|
url: '/agent/',
|
|
30
|
-
|
|
54
|
+
sections: ['personal', 'account', 'shared', 'builtIn'],
|
|
31
55
|
isEnabled: useCurrentChatState('features').agent,
|
|
32
56
|
onSelect: onSelectItem,
|
|
57
|
+
data: getAgents,
|
|
33
58
|
}}
|
|
34
59
|
/>
|
|
35
60
|
}
|
|
@@ -24,11 +24,14 @@ export const QuickCommandSelector = ({ inputRef }: { inputRef: React.RefObject<H
|
|
|
24
24
|
resourceName: 'Quick Command',
|
|
25
25
|
shortcut: '/',
|
|
26
26
|
icon: <QuickCommand />,
|
|
27
|
+
titleProp: 'slug',
|
|
27
28
|
url: '/quick-command/',
|
|
28
29
|
regex: quickCommandRegex,
|
|
29
|
-
|
|
30
|
+
sections: ['personal', 'workspace', 'account', 'shared'],
|
|
30
31
|
isEnabled: useCurrentChatState('features').quickCommands,
|
|
31
32
|
onSelect: onSelectItem,
|
|
33
|
+
data: () => aiClient.quickCommands.useQuery({ order: 'a-to-z' }),
|
|
34
|
+
|
|
32
35
|
}}
|
|
33
36
|
/>
|
|
34
37
|
}
|
|
@@ -29,7 +29,7 @@ export const MessageInput = () => {
|
|
|
29
29
|
const isMinimized = useWidgetState('isMinimized')
|
|
30
30
|
const textAreaRef = useRef<HTMLTextAreaElement>(null)
|
|
31
31
|
const agentLabel = useCurrentChatState('agent')?.label ?? 'Stackspot AI'
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
const onSend = useCallback(async () => {
|
|
34
34
|
const message = chat.get('nextMessage')
|
|
35
35
|
if (!message) return
|
|
@@ -56,9 +56,10 @@ export const MessageInput = () => {
|
|
|
56
56
|
<MessageInputBox aria-busy={isLoading} className="message-input">
|
|
57
57
|
<ProgressBar visible={isLoading} shimmer />
|
|
58
58
|
<InfoBar />
|
|
59
|
-
|
|
60
|
-
<AgentSelector inputRef={textAreaRef} />
|
|
59
|
+
|
|
61
60
|
<div className={listToClass(['action-box', focused && 'focused', isLoading && 'disabled'])}>
|
|
61
|
+
<QuickCommandSelector inputRef={textAreaRef} />
|
|
62
|
+
<AgentSelector inputRef={textAreaRef} />
|
|
62
63
|
<ButtonAgent />
|
|
63
64
|
<AdaptiveTextArea
|
|
64
65
|
ref={textAreaRef}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="41" viewBox="0 0 36 41" fill="none" role="img">
|
|
2
|
+
<g clipPath="url(#clip0_5004_106963-1)">
|
|
3
|
+
<path d="M22.9149 34.1381C22.7235 34.1381 22.5404 34.1756 22.3739 34.238C22.2324 34.2921 22.0826 34.3254 21.9286 34.3379C21.8995 34.3379 21.8704 34.3379 21.8454 34.3379C20.7509 34.3379 19.7979 33.7219 19.3151 32.8189L19.3068 32.8064C19.2402 32.6815 19.1986 32.5483 19.1736 32.411C19.0405 31.6494 18.3829 31.0751 17.5839 31.0751C17.3966 31.0751 17.2177 31.1084 17.0512 31.1708C16.9014 31.2249 16.7474 31.2624 16.5934 31.2749C16.5643 31.2749 16.5351 31.2749 16.5102 31.2749C15.3865 31.2749 14.4294 30.6506 13.9591 29.7143C13.905 29.6019 13.8675 29.4812 13.8467 29.3605C13.7177 28.5948 13.056 28.008 12.2528 28.008C12.0697 28.008 11.8907 28.0413 11.7284 28.0995C11.5953 28.1453 11.4621 28.1786 11.3206 28.1869C11.2748 28.1869 11.229 28.1911 11.1916 28.1911C9.9972 28.1911 8.96927 27.3296 8.53646 26.2934L8.4782 26.1311C8.41161 25.898 8.29925 25.6858 8.14527 25.511C8.02458 25.3737 7.91222 25.228 7.81234 25.074C7.72078 24.9325 7.6209 24.7702 7.57096 24.662C7.40033 24.2875 7.263 23.8796 7.263 23.5009C7.263 23.0432 7.3712 22.6103 7.56264 22.2275C7.57512 22.2025 7.59177 22.1734 7.60842 22.1442C7.71662 21.9486 7.85811 21.778 8.02042 21.624C8.35751 21.3119 8.56143 20.8583 8.54062 20.3589C8.50317 19.5224 7.82066 18.8441 6.98417 18.8108C6.05612 18.7733 5.29454 19.5141 5.29454 20.4338C5.29454 20.9041 5.4943 21.3286 5.81475 21.624C5.9937 21.7905 6.156 21.9819 6.27253 22.1983C6.29334 22.24 6.31414 22.2774 6.33079 22.3065C6.49726 22.6686 6.59297 23.0723 6.59297 23.5009C6.59297 23.9296 6.56384 24.6912 5.96457 25.253C5.56505 25.6275 5.2446 26.1103 5.2987 26.7137C5.36113 27.4087 5.87301 27.983 6.55136 28.1453C6.88429 28.2244 7.19225 28.1911 7.47108 28.0871C7.61674 28.033 7.76656 27.9997 7.92054 27.9913C7.94967 27.9913 7.97464 27.9913 7.99545 27.9913C9.08164 27.9913 10.0388 28.5698 10.5257 29.4562C10.5882 29.5686 10.6256 29.6893 10.6381 29.8141C10.7296 30.6257 11.4163 31.2541 12.2487 31.2541C12.4442 31.2541 12.6274 31.2166 12.798 31.1542C12.9353 31.1043 13.0768 31.0668 13.2225 31.0585C13.2641 31.0585 13.2974 31.0543 13.3265 31.0543C14.3669 31.0543 15.2825 31.6161 15.786 32.4526C15.786 32.4568 15.7944 32.4651 15.7985 32.4734C15.8901 32.6316 15.9567 32.8064 15.99 32.9853C16.1231 33.7469 16.7848 34.3212 17.5797 34.3212C17.7795 34.3212 17.9668 34.2838 18.1415 34.2172C18.3038 34.1547 18.4745 34.1256 18.6493 34.1214C18.6576 34.1214 18.6659 34.1214 18.6742 34.1214C19.7063 34.1214 20.5927 34.6541 21.0921 35.4657C21.0963 35.474 21.1005 35.4781 21.1046 35.4865C21.2128 35.6696 21.2877 35.8693 21.3294 36.0774C21.4792 36.8473 22.1659 37.4216 22.9857 37.3842C23.8222 37.3467 24.5005 36.6642 24.538 35.8277C24.5754 34.8997 23.8347 34.1381 22.9149 34.1381ZM6.92174 15.9226C7.8165 15.9226 8.54479 15.1943 8.54479 14.2995C8.54479 13.4048 7.8165 12.6765 6.92174 12.6765C6.02699 12.6765 5.2987 13.4048 5.2987 14.2995C5.2987 15.1943 6.02699 15.9226 6.92174 15.9226ZM6.92174 9.79247C7.8165 9.79247 8.54479 9.06418 8.54479 8.16943C8.54479 7.27467 7.8165 6.54639 6.92174 6.54639C6.02699 6.54639 5.2987 7.27467 5.2987 8.16943C5.2987 9.06418 6.02699 9.79247 6.92174 9.79247Z" fill="#FF9800"></path>
|
|
4
|
+
<path d="M28.4624 30.6838C28.1461 30.6505 27.8423 30.6921 27.5676 30.792C27.4345 30.8419 27.2971 30.8835 27.1598 30.9168C27.0225 30.9501 26.8643 30.9793 26.7478 30.9793C26.032 30.9793 25.4119 30.5714 25.1081 29.9721C25.0623 29.8848 25.0166 29.7308 24.9791 29.6018C24.95 29.5019 24.925 29.3978 24.9084 29.2938C24.746 28.3366 23.9179 27.6083 22.9149 27.6083C22.6403 27.6083 22.3781 27.6666 22.1409 27.7623C22.0992 27.779 22.0618 27.7956 22.0202 27.8123C21.8287 27.8788 21.629 27.9163 21.4126 27.9163C20.6593 27.9163 20.0143 27.4627 19.7271 26.8176C19.648 26.6387 19.5773 26.2391 19.5773 26.2391C19.4233 25.2778 18.591 24.5412 17.5839 24.5412C17.3383 24.5412 17.1053 24.587 16.8889 24.666C16.8889 24.666 16.3728 24.8408 16.0898 24.8408C15.3116 24.8408 14.6457 24.3539 14.3794 23.6714C14.3128 23.5008 14.2421 23.1179 14.2421 23.1179C14.1547 22.656 13.9091 22.2523 13.5637 21.961C13.468 21.8777 13.3723 21.7904 13.289 21.6946C13.1933 21.5864 13.081 21.4533 13.0227 21.3534C12.8645 21.0829 12.7772 20.7707 12.7772 20.4378C12.7772 20.0466 12.8978 19.6846 13.1059 19.3849C13.1517 19.3225 13.2266 19.2351 13.2974 19.1602C13.3806 19.0728 13.468 18.9937 13.5595 18.9188C14.0007 18.5484 14.2837 17.9949 14.2837 17.3707C14.2837 16.7464 14.0007 16.1929 13.5595 15.8226C13.4597 15.7393 13.3681 15.6561 13.2765 15.5604C13.2433 15.5229 13.21 15.4896 13.185 15.4605C12.9311 15.1442 12.7772 14.7405 12.7772 14.3035C12.7772 13.9748 12.8645 13.6627 13.0185 13.3963C13.081 13.2839 13.21 13.1341 13.314 13.0218C13.3889 12.9385 13.4721 12.8595 13.5595 12.7887C14.034 12.3934 14.3211 11.7816 14.2795 11.1074C14.2129 10.0795 13.3681 9.25963 12.3402 9.21802C11.1874 9.17224 10.2344 10.0961 10.2344 11.2406C10.2344 11.8607 10.5174 12.4183 10.9585 12.7887C11.0459 12.8636 11.1333 12.9427 11.2124 13.0259C11.2998 13.1175 11.3996 13.234 11.4537 13.3214C11.6327 13.6044 11.7409 13.9456 11.7409 14.3077C11.7409 14.7447 11.5869 15.1484 11.3289 15.4646C11.3039 15.4938 11.2748 15.5271 11.2415 15.5645C11.1541 15.6561 11.0584 15.7435 10.9585 15.8267C10.5174 16.1971 10.2344 16.7506 10.2344 17.3748C10.2344 17.9991 10.5174 18.5568 10.9627 18.9271C11.0542 19.002 11.1375 19.0811 11.2207 19.1644C11.279 19.2268 11.3372 19.2934 11.3747 19.3433C11.6036 19.6513 11.7409 20.03 11.7409 20.442C11.7409 20.8248 11.6244 21.1786 11.4246 21.4741C11.3788 21.5448 11.2914 21.6405 11.2207 21.7196C11.1416 21.807 11.0542 21.8861 10.9627 21.961C10.4882 22.3563 10.2011 22.9639 10.2427 23.6423C10.3093 24.6619 11.1416 25.4817 12.1612 25.5317C12.465 25.5483 12.7563 25.4942 13.0227 25.386C13.1975 25.3153 13.3764 25.2612 13.5637 25.2404C13.6386 25.232 13.7135 25.2237 13.7676 25.2237C14.4044 25.2237 14.9662 25.5483 15.2991 26.0436C15.3282 26.0893 15.3615 26.1518 15.3948 26.2225C15.4947 26.4347 15.5613 26.6636 15.5987 26.8967C15.7486 27.8622 16.5851 28.603 17.5963 28.603C17.8544 28.603 18.0957 28.553 18.3205 28.4656C18.4786 28.4032 18.6409 28.3574 18.8074 28.3325C18.9114 28.3158 19.0196 28.3075 19.0945 28.3075C19.7562 28.3075 20.3389 28.6571 20.6635 29.1856C20.7093 29.2563 20.755 29.3687 20.7966 29.4727C20.8632 29.6392 20.9048 29.814 20.934 29.993C21.0963 30.946 21.9245 31.6701 22.9274 31.6701C23.1813 31.6701 23.4268 31.6202 23.6515 31.5369C23.8388 31.4662 24.0344 31.4162 24.2342 31.3871C24.3049 31.3746 24.3757 31.3705 24.4298 31.3705C25.1664 31.3705 25.7989 31.8033 26.0944 32.4275C26.1277 32.4983 26.161 32.6065 26.1901 32.7063C26.2234 32.8187 26.2442 32.9352 26.265 33.0518C26.4232 34.0089 27.2555 34.7414 28.2626 34.7414C29.4279 34.7414 30.3643 33.7551 30.281 32.5732C30.2144 31.5993 29.4445 30.8086 28.479 30.7046M12.2528 7.12471C13.3681 7.12471 14.2753 6.21747 14.2753 5.10215C14.2753 3.98683 13.3681 3.07959 12.2528 3.07959C11.1375 3.07959 10.2302 3.98683 10.2302 5.10215C10.2302 6.21747 11.1375 7.12471 12.2528 7.12471Z" fill="#FF9800"></path>
|
|
5
|
+
<path d="M1.59067 24.72C2.25653 24.72 2.79754 24.1706 2.79754 23.4964C2.79754 22.8222 2.25653 22.2729 1.59067 22.2729C0.924803 22.2729 0.383789 22.8222 0.383789 23.4964C0.383789 24.1706 0.924803 24.72 1.59067 24.72ZM1.59067 18.5898C2.25653 18.5898 2.79754 18.0405 2.79754 17.3663C2.79754 16.6921 2.25653 16.1428 1.59067 16.1428C0.924803 16.1428 0.383789 16.6921 0.383789 17.3663C0.383789 18.0405 0.924803 18.5898 1.59067 18.5898ZM1.59067 12.4597C2.25653 12.4597 2.79754 11.9104 2.79754 11.2362C2.79754 10.562 2.25653 10.0127 1.59067 10.0127C0.924803 10.0127 0.383789 10.562 0.383789 11.2362C0.383789 11.9104 0.924803 12.4597 1.59067 12.4597ZM17.5839 37.6044C17.5381 37.6044 17.1635 37.6294 17.0262 37.6294C15.4947 37.6294 14.1713 36.7846 13.5055 35.5444C13.4555 35.4528 13.3432 35.2448 13.3432 35.2448C13.1517 34.8286 12.7356 34.5373 12.2528 34.5373C12.2112 34.5373 11.8408 34.5747 11.691 34.5747C10.2136 34.5747 8.92765 33.784 8.24098 32.6146C8.15774 32.4731 8.00376 32.161 8.00376 32.161C7.80817 31.7531 7.40032 31.4701 6.92174 31.4701C6.88844 31.4701 6.50141 31.5034 6.33911 31.5034C4.79097 31.5034 3.45508 30.6378 2.79754 29.3768C2.76425 29.3144 2.73512 29.252 2.71015 29.1854C2.53536 28.7276 2.10255 28.403 1.59067 28.403C0.924803 28.403 0.383789 28.9523 0.383789 29.6265C0.383789 30.3007 0.924803 30.8501 1.59067 30.8501C1.64477 30.8501 2.02764 30.8209 2.16081 30.8209C3.56745 30.8209 4.80346 31.5367 5.50678 32.6146C5.6233 32.7935 5.8189 33.1847 5.8189 33.1847C6.00617 33.6134 6.4265 33.913 6.92174 33.913C6.96751 33.913 7.34622 33.8922 7.48356 33.8922C8.98175 33.8922 10.2802 34.6996 10.9585 35.894C11.0251 36.0105 11.1625 36.2685 11.1625 36.2685C11.3539 36.6889 11.7701 36.9802 12.257 36.9802C12.2986 36.9802 12.6731 36.9552 12.8146 36.9552C14.2754 36.9552 15.553 37.7251 16.2438 38.8737C16.3354 39.0235 16.5018 39.3565 16.5018 39.3565C16.6974 39.7643 17.1053 40.0515 17.5839 40.0515C18.2497 40.0515 18.7908 39.5021 18.7908 38.8279C18.7908 38.1538 18.2497 37.6044 17.5839 37.6044Z" fill="#FF9800"></path>
|
|
6
|
+
<path d="M17.5838 4.04512C18.6992 4.04512 19.6064 3.13788 19.6064 2.02256C19.6064 0.907239 18.6992 0 17.5838 0C16.4685 0 15.5613 0.907239 15.5613 2.02256C15.5613 3.13788 16.4685 4.04512 17.5838 4.04512Z" fill="#FF6633"></path>
|
|
7
|
+
<path d="M17.5838 10.1794C18.6992 10.1794 19.6064 9.27216 19.6064 8.15684C19.6064 7.04152 18.6992 6.13428 17.5838 6.13428C16.4685 6.13428 15.5613 7.04152 15.5613 8.15684C15.5613 9.27216 16.4685 10.1794 17.5838 10.1794Z" fill="#FF6633"></path>
|
|
8
|
+
<path d="M17.5838 16.3093C18.6992 16.3093 19.6064 15.402 19.6064 14.2867C19.6064 13.1714 18.6992 12.2642 17.5838 12.2642C16.4685 12.2642 15.5613 13.1714 15.5613 14.2867C15.5613 15.402 16.4685 16.3093 17.5838 16.3093Z" fill="#FF6633"></path>
|
|
9
|
+
<path d="M17.5838 22.4397C18.6992 22.4397 19.6064 21.5324 19.6064 20.4171C19.6064 19.3018 18.6992 18.3945 17.5838 18.3945C16.4685 18.3945 15.5613 19.3018 15.5613 20.4171C15.5613 21.5324 16.4685 22.4397 17.5838 22.4397Z" fill="#FF6633"></path>
|
|
10
|
+
<path d="M22.9149 7.11202C24.0302 7.11202 24.9375 6.20478 24.9375 5.08945C24.9375 3.97413 24.0302 3.06689 22.9149 3.06689C21.7996 3.06689 20.8923 3.97413 20.8923 5.08945C20.8923 6.20478 21.7996 7.11202 22.9149 7.11202Z" fill="#FF6633"></path>
|
|
11
|
+
<path d="M22.9149 13.2424C24.0302 13.2424 24.9375 12.3351 24.9375 11.2198C24.9375 10.1045 24.0302 9.19727 22.9149 9.19727C21.7996 9.19727 20.8923 10.1045 20.8923 11.2198C20.8923 12.3351 21.7996 13.2424 22.9149 13.2424Z" fill="#FF6633"></path>
|
|
12
|
+
<path d="M22.9149 19.3767C24.0302 19.3767 24.9375 18.4694 24.9375 17.3541C24.9375 16.2388 24.0302 15.3315 22.9149 15.3315C21.7996 15.3315 20.8923 16.2388 20.8923 17.3541C20.8923 18.4694 21.7996 19.3767 22.9149 19.3767Z" fill="#FF6633"></path>
|
|
13
|
+
<path d="M22.9149 25.5065C24.0302 25.5065 24.9375 24.5993 24.9375 23.484C24.9375 22.3687 24.0302 21.4614 22.9149 21.4614C21.7996 21.4614 20.8923 22.3687 20.8923 23.484C20.8923 24.5993 21.7996 25.5065 22.9149 25.5065Z" fill="#FF6633"></path>
|
|
14
|
+
<path d="M28.2501 10.1794C29.3654 10.1794 30.2727 9.27216 30.2727 8.15684C30.2727 7.04152 29.3654 6.13428 28.2501 6.13428C27.1348 6.13428 26.2275 7.04152 26.2275 8.15684C26.2275 9.27216 27.1348 10.1794 28.2501 10.1794Z" fill="#FF6633"></path>
|
|
15
|
+
<path d="M28.2501 16.3093C29.3654 16.3093 30.2727 15.402 30.2727 14.2867C30.2727 13.1714 29.3654 12.2642 28.2501 12.2642C27.1348 12.2642 26.2275 13.1714 26.2275 14.2867C26.2275 15.402 27.1348 16.3093 28.2501 16.3093Z" fill="#FF6633"></path>
|
|
16
|
+
<path d="M28.2501 22.4397C29.3654 22.4397 30.2727 21.5324 30.2727 20.4171C30.2727 19.3018 29.3654 18.3945 28.2501 18.3945C27.1348 18.3945 26.2275 19.3018 26.2275 20.4171C26.2275 21.5324 27.1348 22.4397 28.2501 22.4397Z" fill="#FF6633"></path>
|
|
17
|
+
<path d="M28.2501 28.5739C29.3654 28.5739 30.2727 27.6667 30.2727 26.5514C30.2727 25.436 29.3654 24.5288 28.2501 24.5288C27.1348 24.5288 26.2275 25.436 26.2275 26.5514C26.2275 27.6667 27.1348 28.5739 28.2501 28.5739Z" fill="#FF6633"></path>
|
|
18
|
+
<path d="M33.5812 13.2424C34.6965 13.2424 35.6037 12.3351 35.6037 11.2198C35.6037 10.1045 34.6965 9.19727 33.5812 9.19727C32.4658 9.19727 31.5586 10.1045 31.5586 11.2198C31.5586 12.3351 32.4658 13.2424 33.5812 13.2424Z" fill="#FF6633"></path>
|
|
19
|
+
<path d="M33.5812 19.3767C34.6965 19.3767 35.6037 18.4694 35.6037 17.3541C35.6037 16.2388 34.6965 15.3315 33.5812 15.3315C32.4658 15.3315 31.5586 16.2388 31.5586 17.3541C31.5586 18.4694 32.4658 19.3767 33.5812 19.3767Z" fill="#FF6633"></path>
|
|
20
|
+
<path d="M33.5812 25.5065C34.6965 25.5065 35.6037 24.5993 35.6037 23.484C35.6037 22.3687 34.6965 21.4614 33.5812 21.4614C32.4658 21.4614 31.5586 22.3687 31.5586 23.484C31.5586 24.5993 32.4658 25.5065 33.5812 25.5065Z" fill="#FF6633"></path>
|
|
21
|
+
<path d="M33.5812 31.6369C34.6965 31.6369 35.6037 30.7297 35.6037 29.6144C35.6037 28.499 34.6965 27.5918 33.5812 27.5918C32.4658 27.5918 31.5586 28.499 31.5586 29.6144C31.5586 30.7297 32.4658 31.6369 33.5812 31.6369Z" fill="#FF6633"></path>
|
|
22
|
+
</g>
|
|
23
|
+
<defs>
|
|
24
|
+
<clipPath id="clip0_5004_106963-1">
|
|
25
|
+
<rect width="193.92" height="40.0517" fill="white" transform="translate(0.383789)"></rect>
|
|
26
|
+
</clipPath>
|
|
27
|
+
</defs>
|
|
28
|
+
</svg>
|