@stack-spot/ai-chat-widget 1.14.0-beta.7 → 1.14.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 +15 -0
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/app-metadata.json +19 -19
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js +3 -1
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/ButtonFavorite.d.ts +47 -0
- package/dist/components/ButtonFavorite.d.ts.map +1 -0
- package/dist/components/ButtonFavorite.js +25 -0
- package/dist/components/ButtonFavorite.js.map +1 -0
- package/dist/components/Code.d.ts.map +1 -1
- package/dist/components/FadingOverflow.d.ts.map +1 -1
- package/dist/components/FallbackBoundary/index.d.ts.map +1 -1
- package/dist/components/IconInput.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/ProgressBar.d.ts.map +1 -1
- package/dist/components/QuickStartButton.d.ts.map +1 -1
- package/dist/components/RightPanelForm.d.ts.map +1 -1
- package/dist/components/RightPanelTabs.d.ts.map +1 -1
- package/dist/components/Selector/index.d.ts +9 -1
- package/dist/components/Selector/index.d.ts.map +1 -1
- package/dist/components/Selector/index.js +19 -13
- package/dist/components/Selector/index.js.map +1 -1
- package/dist/components/StackedBadge.d.ts.map +1 -1
- package/dist/components/ToolBadge.d.ts.map +1 -1
- package/dist/components/Tooltip/context.d.ts.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.d.ts +1 -1
- package/dist/components/form/DescribedCheckboxGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.js +5 -5
- package/dist/components/form/DescribedCheckboxGroup.js.map +1 -1
- package/dist/components/form/DescribedRadioGroup.d.ts +1 -1
- package/dist/components/form/DescribedRadioGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedRadioGroup.js +4 -4
- package/dist/components/form/DescribedRadioGroup.js.map +1 -1
- package/dist/components/form/dictionary.d.ts +19 -0
- package/dist/components/form/dictionary.d.ts.map +1 -0
- package/dist/components/form/dictionary.js +19 -0
- package/dist/components/form/dictionary.js.map +1 -0
- package/dist/components/form/styled.d.ts.map +1 -1
- package/dist/components/form/styled.js +1 -2
- package/dist/components/form/styled.js.map +1 -1
- package/dist/components/form/types.d.ts +8 -0
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/right-panel/DefaultPanel.d.ts.map +1 -1
- package/dist/right-panel/RightPanelProvider.d.ts.map +1 -1
- package/dist/utils/agent.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
- package/dist/views/Agents/AgentsPanel.d.ts.map +1 -1
- package/dist/views/Agents/AgentsPanel.js +2 -0
- package/dist/views/Agents/AgentsPanel.js.map +1 -1
- package/dist/views/Agents/AgentsTab.d.ts.map +1 -1
- package/dist/views/Agents/AgentsTab.js +7 -2
- package/dist/views/Agents/AgentsTab.js.map +1 -1
- package/dist/views/Agents/dictionary.d.ts +1 -1
- package/dist/views/Agents/dictionary.d.ts.map +1 -1
- package/dist/views/Agents/dictionary.js +2 -0
- package/dist/views/Agents/dictionary.js.map +1 -1
- package/dist/views/Agents/useAgentFavorites.d.ts +8 -0
- package/dist/views/Agents/useAgentFavorites.d.ts.map +1 -0
- package/dist/views/Agents/useAgentFavorites.js +31 -0
- package/dist/views/Agents/useAgentFavorites.js.map +1 -0
- package/dist/views/Chat/AgentInfo.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +2 -2
- package/dist/views/Chat/ChatMessages.d.ts.map +1 -1
- package/dist/views/Chat/StepsList.d.ts.map +1 -1
- package/dist/views/Chat/index.d.ts.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.d.ts.map +1 -1
- package/dist/views/ChatHistory/utils.d.ts.map +1 -1
- package/dist/views/ChatHistory/utils.js +3 -2
- package/dist/views/ChatHistory/utils.js.map +1 -1
- package/dist/views/Home/BuiltInAgent.d.ts.map +1 -1
- package/dist/views/Home/index.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.js +35 -4
- package/dist/views/KnowledgeSources.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/AgentSelector.js +6 -4
- package/dist/views/MessageInput/AgentSelector.js.map +1 -1
- package/dist/views/MessageInput/ButtonGroup.d.ts.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.js +25 -2
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
- package/dist/views/MessageInput/dictionary.d.ts +1 -1
- package/dist/views/MinimizedHeader.d.ts.map +1 -1
- package/dist/views/Stacks.d.ts.map +1 -1
- package/dist/views/Stacks.js +33 -3
- package/dist/views/Stacks.js.map +1 -1
- package/dist/views/Steps/FlowChart/HandleGroup.d.ts.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.d.ts.map +1 -1
- package/dist/views/Steps/FlowChart/index.d.ts.map +1 -1
- package/dist/views/Steps/StepModal.d.ts.map +1 -1
- package/dist/views/Steps/StepsPanel.d.ts.map +1 -1
- package/dist/views/Workspaces.d.ts.map +1 -1
- package/dist/views/Workspaces.js +42 -5
- package/dist/views/Workspaces.js.map +1 -1
- package/package.json +3 -3
- package/src/app-metadata.json +19 -19
- package/src/components/Accordion.tsx +3 -2
- package/src/components/ButtonFavorite.tsx +100 -0
- package/src/components/Selector/index.tsx +45 -16
- package/src/components/form/DescribedCheckboxGroup.tsx +27 -11
- package/src/components/form/DescribedRadioGroup.tsx +16 -1
- package/src/components/form/dictionary.ts +18 -0
- package/src/components/form/styled.ts +1 -2
- package/src/components/form/types.ts +11 -1
- package/src/views/Agents/AgentsPanel.tsx +2 -0
- package/src/views/Agents/AgentsTab.tsx +12 -2
- package/src/views/Agents/dictionary.ts +2 -0
- package/src/views/Agents/useAgentFavorites.ts +32 -0
- package/src/views/Chat/ChatMessage.tsx +2 -2
- package/src/views/ChatHistory/utils.ts +3 -2
- package/src/views/KnowledgeSources.tsx +45 -8
- package/src/views/MessageInput/AgentSelector.tsx +8 -3
- package/src/views/MessageInput/QuickCommandSelector.tsx +25 -1
- package/src/views/Stacks.tsx +39 -4
- package/src/views/Workspaces.tsx +49 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescribedRadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/form/DescribedRadioGroup.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,
|
|
1
|
+
{"version":3,"file":"DescribedRadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/form/DescribedRadioGroup.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,EACE,MAAM,EACN,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,2CA2BzB"}
|
|
@@ -8,14 +8,14 @@ import { RadioCheckBox } from './styled.js';
|
|
|
8
8
|
* Renders a radio button group where each option has a label and a description.
|
|
9
9
|
* The description in placed under the label and radio button as an accordion.
|
|
10
10
|
*/
|
|
11
|
-
export function DescribedRadioGroup({ keygen, onChange, options, renderDescription, renderLabel, optionClassName, optionStyle, value, className, style }) {
|
|
11
|
+
export function DescribedRadioGroup({ keygen, onChange, options, renderDescription, renderLabel, renderBeforeElement, renderAfterElement, optionClassName, optionStyle, value, className, style }) {
|
|
12
12
|
const items = useMemo(() => options.map((option) => {
|
|
13
13
|
const label = renderLabel(option);
|
|
14
14
|
const description = renderDescription(option);
|
|
15
15
|
const header = (_jsxs("label", { children: [_jsx(Radio, { checked: option === value, onChange: () => onChange(option) }), typeof label === 'string' ? _jsx(Text, { children: label }) : label] }));
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
return (_jsxs("li", { className: listToClass(['radio-group-item', optionClassName?.(option)]), style: optionStyle?.(option), children: [renderBeforeElement?.(option), _jsx(Accordion, { header: header, children: typeof description === 'string'
|
|
17
|
+
? _jsx(Text, { appearance: "microtext1", colorScheme: "light.700", children: description })
|
|
18
|
+
: description }), renderAfterElement?.(option)] }, keygen(option)));
|
|
19
19
|
}), [options, value]);
|
|
20
20
|
return _jsx(RadioCheckBox, { style: style, className: className, children: items });
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescribedRadioGroup.js","sourceRoot":"","sources":["../../../src/components/form/DescribedRadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,
|
|
1
|
+
{"version":3,"file":"DescribedRadioGroup.js","sourceRoot":"","sources":["../../../src/components/form/DescribedRadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cA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IACH,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IAErB,OAAO,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,YAAG,KAAK,GAAiB,CAAA;AACnF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const dictionaryFavorites: {
|
|
2
|
+
en: {
|
|
3
|
+
add: string;
|
|
4
|
+
remove: string;
|
|
5
|
+
become: string;
|
|
6
|
+
favorite: string;
|
|
7
|
+
couldNotActFavorite: string;
|
|
8
|
+
actionFavoriteSuccessfully: string;
|
|
9
|
+
};
|
|
10
|
+
pt: {
|
|
11
|
+
add: string;
|
|
12
|
+
remove: string;
|
|
13
|
+
become: string;
|
|
14
|
+
favorite: string;
|
|
15
|
+
couldNotActFavorite: string;
|
|
16
|
+
actionFavoriteSuccessfully: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/components/form/dictionary.ts"],"names":[],"mappings":"AAAA,eAAQ,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAiBhC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const dictionaryFavorites = {
|
|
2
|
+
en: {
|
|
3
|
+
add: 'Add',
|
|
4
|
+
remove: 'Remove',
|
|
5
|
+
become: 'Become',
|
|
6
|
+
favorite: 'Favorite',
|
|
7
|
+
couldNotActFavorite: 'Could not $0 favorite',
|
|
8
|
+
actionFavoriteSuccessfully: '$0 from favorites successfully',
|
|
9
|
+
},
|
|
10
|
+
pt: {
|
|
11
|
+
add: 'Adicionar',
|
|
12
|
+
remove: 'Remover',
|
|
13
|
+
become: 'Tornar',
|
|
14
|
+
favorite: 'Favorito',
|
|
15
|
+
couldNotActFavorite: 'Não foi possível $0 o favorito',
|
|
16
|
+
actionFavoriteSuccessfully: '$0 dos favoritos com sucesso',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=dictionary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../../src/components/form/dictionary.ts"],"names":[],"mappings":"AAAA,MAAM,CAAE,MAAM,mBAAmB,GAAG;IAClC,EAAE,EAAE;QACF,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,UAAU;QACpB,mBAAmB,EAAE,uBAAuB;QAC5C,0BAA0B,EAAE,gCAAgC;KAC7D;IACD,EAAE,EAAE;QACF,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,UAAU;QACpB,mBAAmB,EAAE,gCAAgC;QACrD,0BAA0B,EAAE,8BAA8B;KAC3D;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/form/styled.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/form/styled.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,4OAqCzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/form/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/form/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;sBAsBhB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;0BAMlB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;;;;;4BAKtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;CAIjD,CAAA"}
|
|
@@ -12,6 +12,14 @@ interface RadioCheckProps<T> extends WithStyle {
|
|
|
12
12
|
* A function that renders an option as a description. This can either return a string or a React Element.
|
|
13
13
|
*/
|
|
14
14
|
renderDescription: (option: T) => React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* A function that renders a element before the content
|
|
17
|
+
*/
|
|
18
|
+
renderBeforeElement?: (option: T) => React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* A function that renders a element after the content
|
|
21
|
+
*/
|
|
22
|
+
renderAfterElement?: (option: T) => React.ReactNode;
|
|
15
23
|
/**
|
|
16
24
|
* A function that gives a custom className to the rendered option.
|
|
17
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/form/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,UAAU,eAAe,CAAC,CAAC,CAAE,SAAQ,SAAS;IAC5C;;OAEG;IACH,OAAO,EAAE,CAAC,EAAE,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5C;;OAEG;IACH,iBAAiB,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAClD;;OAEG;IACH,eA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E,CAAC,GAAG,SAAS,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACvD;;;;OAIG;IACH,KAAK,EAAE,CAAC,EAAE,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultPanel.d.ts","sourceRoot":"","sources":["../../src/right-panel/DefaultPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,UAAU,KAAM,SAAQ,YAAY;IAClC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA+BD;;GAEG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"DefaultPanel.d.ts","sourceRoot":"","sources":["../../src/right-panel/DefaultPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,UAAU,KAAM,SAAQ,YAAY;IAClC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA+BD;;GAEG;AACH,eAAO,MAAM,YAAY,8CAA+C,KAAK,4CAiB5E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightPanelProvider.d.ts","sourceRoot":"","sources":["../../src/right-panel/RightPanelProvider.tsx"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC7C;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,iBAAiB,uCAAuE,CAAA;AAErG,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"RightPanelProvider.d.ts","sourceRoot":"","sources":["../../src/right-panel/RightPanelProvider.tsx"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC7C;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,iBAAiB,uCAAuE,CAAA;AAErG,eAAO,MAAM,kBAAkB,oCACI,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,YAAY,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAM5G,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/utils/agent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/utils/agent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,eAAgB,MAAM,kCAAmC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentDescription.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentDescription.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AAMtE,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,eAAe,GAAG,UAAU,CAAC;CAC1C;AAED,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AgentDescription.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentDescription.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AAMtE,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,eAAe,GAAG,UAAU,CAAC;CAC1C;AAED,eAAO,MAAM,gBAAgB,wEAAyE,KAAK,4CAiD1G,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsPanel.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentsPanel.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,WAAW,+
|
|
1
|
+
{"version":3,"file":"AgentsPanel.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentsPanel.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,WAAW,+CAkBvB,CAAA"}
|
|
@@ -13,9 +13,11 @@ export const AgentsPanel = () => {
|
|
|
13
13
|
const chat = useCurrentChat();
|
|
14
14
|
const isTrial = checkIsTrial();
|
|
15
15
|
const tabs = useMemo(() => isTrial ? [
|
|
16
|
+
{ title: t.favorites, content: _jsx(AgentsTab, { visibility: "FAVORITE" }, "favorite") },
|
|
16
17
|
{ title: t.builtin, content: _jsx(AgentsTab, { visibility: "BUILT-IN" }, "builtin") },
|
|
17
18
|
{ title: t.personal, content: _jsx(AgentsTab, { visibility: "PERSONAL" }, "personal") },
|
|
18
19
|
] : [
|
|
20
|
+
{ title: t.favorites, content: _jsx(AgentsTab, { visibility: "FAVORITE" }, "favorite") },
|
|
19
21
|
{ title: t.builtin, content: _jsx(AgentsTab, { visibility: "BUILT-IN" }, "builtin") },
|
|
20
22
|
{ title: t.personal, content: _jsx(AgentsTab, { visibility: "PERSONAL" }, "personal") },
|
|
21
23
|
{ title: t.shared, content: _jsx(AgentsTab, { visibility: "SHARED" }, "shared") },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsPanel.js","sourceRoot":"","sources":["../../../src/views/Agents/AgentsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,GAAG,mBAAmB,EAAE,CAAA;I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AAC,SAAS,IAAgB,UAAU,EAAC,UAAU,IAAhC,UAAU,CAAyB,EAAE;QAClF,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAC,SAAS,IAAc,UAAU,EAAC,QAAQ,IAA5B,QAAQ,CAAuB,EAAE;QAC5E,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,KAAC,SAAS,IAAe,UAAU,EAAC,SAAS,IAA9B,SAAS,CAAwB,EAAE;KAChF,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;IAEhB,OAAO,KAAC,cAAc,IAAe,IAAI,EAAE,IAAI,IAAnB,IAAI,CAAC,EAAE,CAAgB,CAAA;AACrD,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsTab.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentsTab.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAiB,eAAe,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"AgentsTab.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/AgentsTab.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAiB,eAAe,EAAE,MAAM,sCAAsC,CAAA;AAarF,eAAO,MAAM,SAAS,mBAAoB;IAAE,UAAU,EAAE,eAAe,GAAG,UAAU,CAAA;CAAE,4CAkErF,CAAA"}
|
|
@@ -5,6 +5,7 @@ import { Placeholder } from '@stack-spot/portal-components/Placeholder';
|
|
|
5
5
|
import { MiniLogo } from '@stack-spot/portal-components/svg';
|
|
6
6
|
import { agentClient } from '@stack-spot/portal-network';
|
|
7
7
|
import { useMemo, useState } from 'react';
|
|
8
|
+
import { ButtonFavorite } from '../../components/ButtonFavorite.js';
|
|
8
9
|
import { DescribedRadioGroup } from '../../components/form/DescribedRadioGroup.js';
|
|
9
10
|
import { IconInput } from '../../components/IconInput.js';
|
|
10
11
|
import { useCurrentChat } from '../../context/hooks.js';
|
|
@@ -13,23 +14,27 @@ import { isAgentDefault } from '../../utils/agent.js';
|
|
|
13
14
|
import { AgentDescription } from './AgentDescription.js';
|
|
14
15
|
import { useAgentsDictionary } from './dictionary.js';
|
|
15
16
|
import { AgentLabel } from './styled.js';
|
|
17
|
+
import { useAgentFavorites } from './useAgentFavorites.js';
|
|
16
18
|
export const AgentsTab = ({ visibility }) => {
|
|
17
19
|
const t = useAgentsDictionary();
|
|
18
20
|
const { close } = useRightPanel();
|
|
19
21
|
const chat = useCurrentChat();
|
|
20
22
|
const [filter, setFilter] = useState('');
|
|
23
|
+
const { listFavorites, onAddFavorite, onRemoveFavorite, pendingAddFav, pendingRemoveFav } = useAgentFavorites();
|
|
21
24
|
const agentsBuiltIn = agentClient.publicAgents.useQuery({});
|
|
22
25
|
const agentDefault = agentsBuiltIn.find((agent) => isAgentDefault(agent.slug));
|
|
23
26
|
const agents = visibility === 'BUILT-IN' ? agentsBuiltIn : agentClient.agents.useQuery({ visibility });
|
|
24
27
|
const [value, setValue] = useState(chat.get('agent') ? agents.find(a => a.id === chat.get('agent')?.id) : agentDefault);
|
|
25
|
-
const filtered = useMemo(
|
|
28
|
+
const filtered = useMemo(
|
|
29
|
+
// Recreate the list so that the favorites list is taken into account
|
|
30
|
+
() => filter ? agents.filter(a => a === value || a.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : [...agents], [agents, filter, value, listFavorites]);
|
|
26
31
|
function submit() {
|
|
27
32
|
if (value) {
|
|
28
33
|
chat.set('agent', { id: value.id, label: value.name, image: value.avatar, builtIn: visibility === 'BUILT-IN', slug: value.slug });
|
|
29
34
|
}
|
|
30
35
|
close();
|
|
31
36
|
}
|
|
32
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "content", children: [_jsx(IconInput, { icon: _jsx(Search, {}), value: filter, onChange: setFilter, className: "search" }), !!filtered.length && _jsx(DescribedRadioGroup, { options: filtered, keygen: a => a.id, value: value, onChange: setValue, renderLabel: ({ name, avatar, id }) => (_jsxs(AgentLabel, { children: [id ? (avatar ? _jsx("img", { src: avatar }) : _jsx(IconBox, { size: "xs", children: _jsx(Agent, {}) })) : _jsx(MiniLogo, {}), _jsx(Text, { children: name })] })), renderDescription: a => _jsx(AgentDescription, { agentId: a.id, visibility: visibility, description: a.description, llm: a.llm_config?.model_slug, numberOfKnowledgeSources: a.knowledge_sources_config?.knowledge_sources?.length ?? 0 }), optionClassName: a => (a === value && filter && !a.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
37
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "content", children: [_jsx(IconInput, { icon: _jsx(Search, {}), value: filter, onChange: setFilter, className: "search" }), !!filtered.length && _jsx(DescribedRadioGroup, { options: filtered, renderAfterElement: ({ id }) => (_jsx(ButtonFavorite, { favorite: { idOrSlug: id, listFavorites, onAddFavorite, onRemoveFavorite, pendingAddFav, pendingRemoveFav } })), keygen: a => a.id, value: value, onChange: setValue, renderLabel: ({ name, avatar, id }) => (_jsxs(AgentLabel, { children: [id ? (avatar ? _jsx("img", { src: avatar }) : _jsx(IconBox, { size: "xs", children: _jsx(Agent, {}) })) : _jsx(MiniLogo, {}), _jsx(Text, { children: name })] })), renderDescription: a => _jsx(AgentDescription, { agentId: a.id, visibility: visibility, description: a.description, llm: a.llm_config?.model_slug, numberOfKnowledgeSources: a.knowledge_sources_config?.knowledge_sources?.length ?? 0 }), optionClassName: a => (a === value && filter && !a.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
33
38
|
? 'filtered-out'
|
|
34
39
|
: '', className: "option-list" }), !!agents.length && !filtered.length &&
|
|
35
40
|
_jsx(Placeholder, { title: t.noSearchResults, description: t.noSearchResultsDescription, className: "no-data-placeholder" }), !agents.length && _jsx(Placeholder, { title: t.noData, description: t.noDataDescription })] }), !!filtered.length && _jsx(Button, { onClick: submit, disabled: !value, children: t.apply })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsTab.js","sourceRoot":"","sources":["../../../src/views/Agents/AgentsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"AgentsTab.js","sourceRoot":"","sources":["../../../src/views/Agents/AgentsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,OAAO,EAA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,iBAAiB,EAAE,CAAC,CAAC;4BAC/G,CAAC,CAAC,cAAc;4BAChB,CAAC,CAAC,EAAE,EAEN,SAAS,EAAC,aAAa,GACvB,EACD,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM;wBAClC,KAAC,WAAW,IAAC,KAAK,EAAE,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,0BAA0B,EAAE,SAAS,EAAC,qBAAqB,GAAG,EACrH,CAAC,MAAM,CAAC,MAAM,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,iBAAiB,GAAI,IACjF,EACL,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,KAAC,MAAM,IAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,YAAG,CAAC,CAAC,KAAK,GAAU,IAClF,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useAgentsDictionary: () => Record<"title" | "tools" | "description" | "subtitle" | "personal" | "builtin" | "shared" | "account" | "apply" | "noSearchResults" | "noSearchResultsDescription" | "noData" | "noDataDescription" | "defaultAgentDescription", string>;
|
|
1
|
+
export declare const useAgentsDictionary: () => Record<"title" | "tools" | "description" | "subtitle" | "personal" | "builtin" | "shared" | "account" | "apply" | "noSearchResults" | "noSearchResultsDescription" | "noData" | "noDataDescription" | "defaultAgentDescription" | "favorites", string>;
|
|
2
2
|
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/dictionary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/dictionary.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,mBAAmB,8PAAiC,CAAA"}
|
|
@@ -14,6 +14,7 @@ const dictionary = {
|
|
|
14
14
|
noDataDescription: 'Use the tabs above to try other categories or use the AI portal to create new agents.',
|
|
15
15
|
defaultAgentDescription: 'The StackSpot CodeGen is an advanced artificial intelligence agent designed to optimize and accelerate software development. Integrated directly into your integrated development environment, StackSpot CodeGen offers real-time code suggestions, helping developers write high-quality code more efficiently. With robust features such as creating Stacks AI, customized knowledge sources, and quick commands, StackSpot CodeGen contextualizes your development needs to provide the best answers and code suggestions.',
|
|
16
16
|
description: 'Description',
|
|
17
|
+
favorites: 'Favorites',
|
|
17
18
|
tools: 'Tools',
|
|
18
19
|
},
|
|
19
20
|
pt: {
|
|
@@ -30,6 +31,7 @@ const dictionary = {
|
|
|
30
31
|
noDataDescription: 'Use as abas acima para tentar outras categorias ou use o Portal AI para criar novos agentes.',
|
|
31
32
|
defaultAgentDescription: 'O StackSpot CodeGen é um agente de inteligência artificial avançado projetado para otimizar e acelerar o desenvolvimento de software. Integrado diretamente ao seu ambiente de desenvolvimento, o StackSpot CodeGen oferece sugestões de código em tempo real, ajudando os desenvolvedores a escreverem código de alta qualidade de forma mais eficiente. Com recursos robustos, como a criação de Stacks AI, Knowledge Sources personalizadas e comandos rápidos, o StackSpot CodeGen contextualiza suas necessidades de desenvolvimento para fornecer as melhores respostas e sugestões de código.',
|
|
32
33
|
description: 'Descrição',
|
|
34
|
+
favorites: 'Favoritos',
|
|
33
35
|
tools: 'Ferramentas',
|
|
34
36
|
},
|
|
35
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../../src/views/Agents/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEvE,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,sEAAsE;QAChF,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,UAAU;QACnB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,EAAE,+fAA+f;QACxhB,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,WAAW;QACtB,KAAK,EAAE,OAAO;KACf;IACD,EAAE,EAAE;QACF,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,uEAAuE;QACjF,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,oCAAoC;QACrD,0BAA0B,EAAE,+BAA+B;QAC3D,MAAM,EAAE,uCAAuC;QAC/C,iBAAiB,EAAE,8FAA8F;QACjH,uBAAuB,EAAE,skBAAskB;QAC/lB,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,WAAW;QACtB,KAAK,EAAE,aAAa;KACrB;CACmB,CAAA;AAEtB,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function useAgentFavorites(): {
|
|
2
|
+
listFavorites: import("@stack-spot/portal-network/api/agent").AgentResponse[];
|
|
3
|
+
onAddFavorite: (idOrSlug?: string) => Promise<void>;
|
|
4
|
+
onRemoveFavorite: (idOrSlug?: string) => Promise<void>;
|
|
5
|
+
pendingAddFav: boolean;
|
|
6
|
+
pendingRemoveFav: boolean;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useAgentFavorites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentFavorites.d.ts","sourceRoot":"","sources":["../../../src/views/Agents/useAgentFavorites.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB;;+BAeS,MAAM;kCAVH,MAAM;;;EAuBlD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable filenames/match-regex */
|
|
2
|
+
import { agentClient } from '@stack-spot/portal-network';
|
|
3
|
+
export function useAgentFavorites() {
|
|
4
|
+
const listFavorites = agentClient.agents.useQuery({ visibility: 'FAVORITE' });
|
|
5
|
+
const [addFavorite, pendingAddFav] = agentClient.addFavoriteAgent.useMutation();
|
|
6
|
+
const [removeFavorite, pendingRemoveFav] = agentClient.removeFavoriteAgent.useMutation();
|
|
7
|
+
const onRemoveFavorite = async (idOrSlug) => {
|
|
8
|
+
try {
|
|
9
|
+
await removeFavorite({ agentId: idOrSlug || '' });
|
|
10
|
+
await agentClient.agents.invalidate();
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
// eslint-disable-next-line no-console
|
|
14
|
+
console.error(error);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const onAddFavorite = async (idOrSlug) => {
|
|
18
|
+
try {
|
|
19
|
+
await addFavorite({ agentId: idOrSlug || '' });
|
|
20
|
+
await agentClient.agents.invalidate();
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
// eslint-disable-next-line no-console
|
|
24
|
+
console.error(error);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
listFavorites, onAddFavorite, onRemoveFavorite, pendingAddFav, pendingRemoveFav,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=useAgentFavorites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentFavorites.js","sourceRoot":"","sources":["../../../src/views/Agents/useAgentFavorites.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,MAAM,UAAU,iBAAiB;IAC/B,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAA;IAC/E,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,WAAW,CAAC,mBAAmB,CAAC,WAAW,EAAE,CAAA;IAExF,MAAM,gBAAgB,GAAG,KAAK,EAAE,QAAiB,EAAE,EAAE;QACnD,IAAI,CAAC;YACH,MAAM,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAA;YACjD,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;IACH,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,KAAK,EAAE,QAAiB,EAAE,EAAE;QAChD,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAA;YAC9C,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;IACH,CAAC,CAAA;IAED,OAAO;QACL,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB;KAChF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentInfo.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/AgentInfo.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"AgentInfo.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/AgentInfo.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,cAAe,KAAK,4CAQzC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/ChatMessage.tsx"],"names":[],"mappings":"AAUA,OAAO,qCAAqC,CAAA;AAI5C,OAAO,EAAE,SAAS,EAAqC,MAAM,uBAAuB,CAAA;AAQpF,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAmHD;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/ChatMessage.tsx"],"names":[],"mappings":"AAUA,OAAO,qCAAqC,CAAA;AAI5C,OAAO,EAAE,SAAS,EAAqC,MAAM,uBAAuB,CAAA;AAQpF,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAmHD;;GAEG;AACH,eAAO,MAAM,WAAW,kCAAmC,KAAK,yDA8K/D,CAAA"}
|
|
@@ -88,8 +88,8 @@ export const ChatMessage = ({ message, username, isLast }) => {
|
|
|
88
88
|
const chat = useCurrentChat();
|
|
89
89
|
const agentId = entry.agent?.id ?? '';
|
|
90
90
|
const [agentById] = agentClient.agent.useStatefulQuery({ agentId }, { enabled: !!agentId && !entry?.agent?.builtIn });
|
|
91
|
-
const [
|
|
92
|
-
const agent = agentById ??
|
|
91
|
+
const [agentBuiltInById] = agentClient.publicAgent.useStatefulQuery({ agentId }, { enabled: !!agentId && entry?.agent?.builtIn });
|
|
92
|
+
const agent = agentById ?? agentBuiltInById;
|
|
93
93
|
useChatScrollToBottomEffect(ref, [entry]);
|
|
94
94
|
const detailKS = useCallback(({ name, slug, documentScore, documentId }) => {
|
|
95
95
|
widget.set('currentKSInPanel', { name, slug, score: documentScore, documentId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessages.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/ChatMessages.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"ChatMessages.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/ChatMessages.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,yBAA0B,KAAK,4CAQvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsList.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/StepsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAgB,MAAM,4BAA4B,CAAA;AAOnE,UAAU,KAAK;IACb,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AA+BD,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"StepsList.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/StepsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAgB,MAAM,4BAA4B,CAAA;AAOnE,UAAU,KAAK;IACb,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AA+BD,eAAO,MAAM,SAAS,iCAAkC,KAAK,4CAqC5D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/index.tsx"],"names":[],"mappings":"AAGA,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/index.tsx"],"names":[],"mappings":"AAGA,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,iBAAkB,KAAK,4CAGvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HistoryItem.d.ts","sourceRoot":"","sources":["../../../src/views/ChatHistory/HistoryItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAexE;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"HistoryItem.d.ts","sourceRoot":"","sources":["../../../src/views/ChatHistory/HistoryItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAexE;;GAEG;AACH,eAAO,MAAM,WAAW,aAAc;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,mDAiInE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/views/ChatHistory/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAU/F;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/views/ChatHistory/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAU/F;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CAWvG;AAGD;;;GAGG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAUhE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { agentClient, aiClient,
|
|
1
|
+
import { agentClient, aiClient, workspaceClient } from '@stack-spot/portal-network';
|
|
2
2
|
/**
|
|
3
3
|
* Finds a stack by its id.
|
|
4
4
|
* @param id the id of the stack.
|
|
@@ -26,7 +26,8 @@ export async function findWorkspace(id) {
|
|
|
26
26
|
if (!id)
|
|
27
27
|
return;
|
|
28
28
|
try {
|
|
29
|
-
const ws = await workspaceAiClient.workspaceAi.query({ id })
|
|
29
|
+
// const ws = await workspaceAiClient.workspaceAi.query({ id })
|
|
30
|
+
const ws = await workspaceClient.workspace.query({ workspaceId: id });
|
|
30
31
|
return { id, label: ws.name };
|
|
31
32
|
}
|
|
32
33
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/views/ChatHistory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/views/ChatHistory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAInF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,EAAiB;IAC/C,IAAI,CAAC,EAAE;QAAE,OAAM;IACf,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAChD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,EAAE,CAAA;IACjE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IAC1B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAAiB;IACnD,IAAI,CAAC,EAAE;QAAE,OAAM;IACf,IAAI,CAAC;QACH,+DAA+D;QAC/D,MAAM,EAAE,GAAG,MAAM,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAA;QACrE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IAC/B,CAAC;IAAC,OAAO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["../../../src/views/Home/BuiltInAgent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;GAEG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"BuiltInAgent.d.ts","sourceRoot":"","sources":["../../../src/views/Home/BuiltInAgent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;GAEG;AACH,eAAO,MAAM,YAAY,iBAAkB,SAAS,4CA2CnD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Home/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Home/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,IAAI,UAAW,SAAS,4CAQpC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KnowledgeSources.d.ts","sourceRoot":"","sources":["../../src/views/KnowledgeSources.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KnowledgeSources.d.ts","sourceRoot":"","sources":["../../src/views/KnowledgeSources.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,YAc5B,CAAA"}
|
|
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Button } from '@citric/core';
|
|
3
3
|
import { Search } from '@citric/icons';
|
|
4
4
|
import { Placeholder } from '@stack-spot/portal-components/Placeholder';
|
|
5
|
-
import { aiClient } from '@stack-spot/portal-network';
|
|
5
|
+
import { aiClient, dataIntegrationClient } from '@stack-spot/portal-network';
|
|
6
6
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
7
7
|
import { difference, uniqBy } from 'lodash';
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import { ButtonFavorite } from '../components/ButtonFavorite.js';
|
|
9
10
|
import { DescribedCheckboxGroup } from '../components/form/DescribedCheckboxGroup.js';
|
|
10
11
|
import { IconInput } from '../components/IconInput.js';
|
|
11
12
|
import { RightPanelTabs } from '../components/RightPanelTabs.js';
|
|
@@ -40,8 +41,10 @@ const KnowledgeSourcesPanel = () => {
|
|
|
40
41
|
allKS.current = chat.get('knowledgeSources') ?? [];
|
|
41
42
|
}, [chat]);
|
|
42
43
|
const tabs = isTrial ? [
|
|
44
|
+
{ title: t.favorites, content: _jsx(KnowledgeSourcesTab, { visibility: "favorite", allKS: allKS, onSubmit: onSubmit }, "favorite") },
|
|
43
45
|
{ title: t.personal, content: _jsx(KnowledgeSourcesTab, { visibility: "personal", allKS: allKS, onSubmit: onSubmit }, "personal") },
|
|
44
46
|
] : [
|
|
47
|
+
{ title: t.favorites, content: _jsx(KnowledgeSourcesTab, { visibility: "favorite", allKS: allKS, onSubmit: onSubmit }, "favorite") },
|
|
45
48
|
{ title: t.personal, content: _jsx(KnowledgeSourcesTab, { visibility: "personal", allKS: allKS, onSubmit: onSubmit }, "personal") },
|
|
46
49
|
{ title: t.shared, content: _jsx(KnowledgeSourcesTab, { visibility: "shared", allKS: allKS, onSubmit: onSubmit }, "shared") },
|
|
47
50
|
{ title: t.account, content: _jsx(KnowledgeSourcesTab, { visibility: "account", allKS: allKS, onSubmit: onSubmit }, "account") },
|
|
@@ -54,13 +57,39 @@ const KnowledgeSourcesTab = ({ visibility, allKS, onSubmit }) => {
|
|
|
54
57
|
const knowledgeSources = aiClient.knowledgeSources.useQuery({
|
|
55
58
|
visibility, order: 'a-to-z', types: ['snippet', 'api', 'event', 'custom'],
|
|
56
59
|
});
|
|
60
|
+
const listFavorites = dataIntegrationClient.knowledgeSources.useQuery({ visibility: 'favorite' });
|
|
61
|
+
const [addFavorite, pendingAddFav] = dataIntegrationClient.addFavoriteKnowledgeSource.useMutation();
|
|
62
|
+
const [removeFavorite, pendingRemoveFav] = dataIntegrationClient.removeFavoriteKnowledgeSource.useMutation();
|
|
63
|
+
const onRemoveFavorite = async (idOrSlug) => {
|
|
64
|
+
try {
|
|
65
|
+
await removeFavorite({ slug: idOrSlug });
|
|
66
|
+
await aiClient.knowledgeSources.invalidate();
|
|
67
|
+
await dataIntegrationClient.knowledgeSources.invalidate();
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// eslint-disable-next-line no-console
|
|
71
|
+
console.error(error);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const onAddFavorite = async (idOrSlug) => {
|
|
75
|
+
try {
|
|
76
|
+
await addFavorite({ slug: idOrSlug });
|
|
77
|
+
await aiClient.knowledgeSources.invalidate();
|
|
78
|
+
await dataIntegrationClient.knowledgeSources.invalidate();
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
// eslint-disable-next-line no-console
|
|
82
|
+
console.error(error);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
57
85
|
const [value, setValue] = useState((() => {
|
|
58
86
|
const currentlySelected = allKS.current?.map(ks => ks.id);
|
|
59
87
|
return knowledgeSources.filter(ks => currentlySelected?.includes(ks.slug));
|
|
60
88
|
})());
|
|
61
89
|
const filtered = useMemo(() => filter
|
|
90
|
+
// Recreate the list so that the favorites list is taken into account
|
|
62
91
|
? knowledgeSources.filter(ks => value.includes(ks) || ks.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
63
|
-
: knowledgeSources, [knowledgeSources, filter, value]);
|
|
92
|
+
: [...knowledgeSources], [knowledgeSources, filter, value, listFavorites]);
|
|
64
93
|
const onChange = useCallback((newValue) => {
|
|
65
94
|
setValue((current) => {
|
|
66
95
|
const added = difference(newValue, current);
|
|
@@ -70,14 +99,15 @@ const KnowledgeSourcesTab = ({ visibility, allKS, onSubmit }) => {
|
|
|
70
99
|
return newValue;
|
|
71
100
|
});
|
|
72
101
|
}, []);
|
|
73
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "content", children: [_jsx(IconInput, { icon: _jsx(Search, {}), value: filter, onChange: setFilter, className: "search" }), !!filtered.length && _jsx(DescribedCheckboxGroup, { options: filtered, keygen: ks => ks.id, value: value, onChange: onChange, renderLabel: ks => ks.name, renderDescription: ks => ks.description, optionClassName: ks => (filter && !ks.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()) && value.includes(ks))
|
|
102
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "content", children: [_jsx(IconInput, { icon: _jsx(Search, {}), value: filter, onChange: setFilter, className: "search" }), !!filtered.length && _jsx(DescribedCheckboxGroup, { options: filtered, renderAfterElement: ({ slug }) => (_jsx(ButtonFavorite, { favorite: { idOrSlug: slug, listFavorites, onAddFavorite, onRemoveFavorite, pendingAddFav, pendingRemoveFav } })), keygen: ks => ks.id, value: value, onChange: onChange, renderLabel: ks => ks.name, renderDescription: ks => ks.description, optionClassName: ks => (filter && !ks.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()) && value.includes(ks))
|
|
74
103
|
? 'filtered-out'
|
|
75
|
-
: '', className: "option-list" }), !!
|
|
104
|
+
: '', className: "option-list" }), !!filtered.length && !filtered.length && (_jsx(Placeholder, { title: t.noSearchResults, description: t.noSearchResultsDescription })), !filtered.length && _jsx(Placeholder, { title: t.noData, description: t.noDataDescription, className: "no-data-placeholder" })] }), !!filtered.length && _jsx(Button, { onClick: onSubmit, children: t.apply })] }));
|
|
76
105
|
};
|
|
77
106
|
const dictionary = {
|
|
78
107
|
en: {
|
|
79
108
|
title: 'Knowledge Sources',
|
|
80
109
|
description: 'By selecting one or more knowledge sources, they will be consulted to generate the responses.',
|
|
110
|
+
favorites: 'Favorites',
|
|
81
111
|
personal: 'Personal',
|
|
82
112
|
shared: 'Shared',
|
|
83
113
|
account: 'Account',
|
|
@@ -90,6 +120,7 @@ const dictionary = {
|
|
|
90
120
|
pt: {
|
|
91
121
|
title: 'Knowledge Sources',
|
|
92
122
|
description: 'Ao selecionar um ou mais knowledge sources, eles serão consultados para gerar as respostas.',
|
|
123
|
+
favorites: 'Favoritos',
|
|
93
124
|
personal: 'Pessoal',
|
|
94
125
|
shared: 'Compartilhado',
|
|
95
126
|
account: 'Conta',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KnowledgeSources.js","sourceRoot":"","sources":["../../src/views/KnowledgeSources.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"KnowledgeSources.js","sourceRoot":"","sources":["../../src/views/KnowledgeSources.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAE5E,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAA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CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,+FAA+F;QAC5G,SAAS,EAAE,WAAW;QACtB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,mCAAmC;QACpD,0BAA0B,EAAE,kCAAkC;QAC9D,MAAM,EAAE,sDAAsD;QAC9D,iBAAiB,EAAE,kGAAkG;KACtH;IACD,EAAE,EAAE;QACF,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,6FAA6F;QAC1G,SAAS,EAAE,WAAW;QACtB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,oCAAoC;QACrD,0BAA0B,EAAE,+BAA+B;QAC3D,MAAM,EAAE,iDAAiD;QACzD,iBAAiB,EAAE,wGAAwG;KAC5H;CACmB,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":"AAWA,eAAO,MAAM,aAAa,0BAA2B;IAAE,OAAO,EAAE,OAAO,CAAC;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAC;CAAE,4CAuDrE,CAAA"}
|