@stack-spot/ai-chat-widget 1.16.0 → 1.16.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.16.2](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.16.1...ai-chat-widget@v1.16.2) (2025-04-25)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * avatar default agent ([#124](https://github.com/stack-spot/portal-ai-chat-widget/issues/124)) ([195c15a](https://github.com/stack-spot/portal-ai-chat-widget/commit/195c15a4e8ef474f57b151917af053f84b42c148))
9
+
10
+ ## [1.16.1](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.16.0...ai-chat-widget@v1.16.1) (2025-04-25)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * agent list styling in Home page ([#123](https://github.com/stack-spot/portal-ai-chat-widget/issues/123)) ([af8b2e5](https://github.com/stack-spot/portal-ai-chat-widget/commit/af8b2e54a5b7a2505447b382ca2615d1d242e931))
16
+ * Revert "Change to space" ([#120](https://github.com/stack-spot/portal-ai-chat-widget/issues/120)) ([7229a0e](https://github.com/stack-spot/portal-ai-chat-widget/commit/7229a0eea605c62f09cd97706809b549b4066dc5))
17
+
3
18
  ## [1.16.0](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.15.0...ai-chat-widget@v1.16.0) (2025-04-24)
4
19
 
5
20
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.16.0",
4
- "date": "Thu Apr 24 2025 18:23:19 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "1.16.2",
4
+ "date": "Fri Apr 25 2025 18:48:25 GMT+0000 (Coordinated Universal Time)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  {
111
111
  "name": "@stack-spot/portal-components",
112
- "version": "2.16.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(@citric/ui@6.7.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-theme@1.1.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-translate@1.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
112
+ "version": "2.22.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(@citric/ui@6.7.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-theme@1.1.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-translate@1.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
113
113
  },
114
114
  {
115
115
  "name": "@stack-spot/portal-network",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentCard/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,eAAO,MAAM,SAAS,cAAe;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,4CA4B3D,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentCard/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA4ChD,eAAO,MAAM,SAAS,cAAe;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,4CA8B3D,CAAA"}
@@ -1,16 +1,56 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Image, Text } from '@citric/core';
2
+ import { Image, Text } from '@citric/core';
3
3
  import { Card } from '@citric/ui';
4
+ import { listToClass, theme } from '@stack-spot/portal-theme';
4
5
  import { useTranslate } from '@stack-spot/portal-translate';
6
+ import { styled } from 'styled-components';
5
7
  import placeholder from '../../assets/placeholder.png';
6
- import { useCurrentChat } from '../../context/hooks.js';
8
+ import { useCurrentChat, useCurrentChatState } from '../../context/hooks.js';
7
9
  import { dictionary } from './dictionary.js';
10
+ const StyledCard = styled(Card) `
11
+ cursor: pointer;
12
+ border-radius: 8px;
13
+ transition: background-color 0.3s;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 12px;
17
+
18
+ &:hover {
19
+ background-color: ${theme.color.light[500]};
20
+ }
21
+
22
+ &.active {
23
+ background-color: ${theme.color.light[600]};
24
+ }
25
+
26
+ img {
27
+ width: 125px;
28
+ height: 130px;
29
+ border-radius: 8px;
30
+ }
31
+
32
+ h6 {
33
+ max-width: 125px;
34
+ white-space: nowrap;
35
+ overflow: hidden;
36
+ text-overflow: ellipsis;
37
+ }
38
+
39
+ .agent-type {
40
+ display: flex;
41
+ gap: 4px;
42
+ }
43
+
44
+ .text-box {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: 2px;
48
+ }
49
+ `;
8
50
  export const AgentCard = ({ agent }) => {
9
51
  const t = useTranslate(dictionary);
10
52
  const chat = useCurrentChat();
11
- const onSelectAgent = () => {
12
- chat.set('agent', agent);
13
- };
14
- return _jsxs(Card, { onClick: onSelectAgent, sx: { cursor: 'pointer' }, children: [_jsx(Box, { mb: 4, children: _jsx(Image, { width: 125, height: 130, sx: { borderRadius: '8px' }, src: agent.image ? agent.image : placeholder }) }), agent.visibility_level && _jsxs(Box, { children: [_jsx(Text, { appearance: "microtext1", colorScheme: "light.700", children: t[agent.visibility_level.toLowerCase()] }), "\u00A0", _jsx(Text, { appearance: "microtext1", children: t.agent })] }), _jsx(Text, { appearance: "h6", children: agent.label })] });
53
+ const currentAgent = useCurrentChatState('agent');
54
+ return (_jsxs(StyledCard, { onClick: () => chat.set('agent', agent), role: "button", tabIndex: 0, className: listToClass(['agent-card', currentAgent?.id === agent.id && 'active']), children: [_jsx(Image, { src: agent.image ? agent.image : placeholder }), _jsxs("div", { className: "text-box", children: [agent.visibility_level && (_jsxs("div", { className: "agent-type", children: [_jsx(Text, { appearance: "microtext1", colorScheme: "light.700", children: t[agent.visibility_level.toLowerCase()] }), _jsx(Text, { appearance: "microtext1", children: t.agent })] })), _jsx(Text, { appearance: "h6", children: agent.label })] })] }));
15
55
  };
16
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AgentCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AA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AC,aAEjF,KAAC,KAAK,IAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,GAAI,EACvD,eAAK,SAAS,EAAC,UAAU,aACtB,KAAK,CAAC,gBAAgB,IAAI,CACzB,eAAK,SAAS,EAAC,YAAY,aACzB,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,WAAW,YAClD,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,WAAW,EAAoB,CAAC,GACrD,EACP,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,YAC1B,CAAC,CAAC,KAAK,GACH,IACH,CACP,EACD,KAAC,IAAI,IAAC,UAAU,EAAC,IAAI,YAClB,KAAK,CAAC,KAAK,GACP,IACH,IACK,CACd,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Home/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,IAAI,gCAAiC,SAAS,4CAa1D,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Home/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAqBnC;;;;GAIG;AACH,eAAO,MAAM,IAAI,gCAAiC,SAAS,4CAgB1D,CAAA"}
@@ -1,10 +1,29 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Flex } from '@citric/core';
2
+ import { FadingOverflow } from '@stack-spot/portal-components/FadingOverflow';
3
+ import { styled } from 'styled-components';
3
4
  import { AgentCard } from '../../components/AgentCard/index.js';
4
5
  import { FallbackBoundary } from '../../components/FallbackBoundary/index.js';
5
6
  import { useCurrentChatState } from '../../context/hooks.js';
6
7
  import { BuiltInAgent } from './BuiltInAgent.js';
7
8
  import { CustomAgent } from './CustomAgent.js';
9
+ const AgentList = styled.ul `
10
+ list-style: none;
11
+ margin: 0;
12
+ padding: 0;
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 14px;
16
+
17
+ li {
18
+ flex-shrink: 0;
19
+ &:first-child {
20
+ margin-left: auto;
21
+ }
22
+ &:last-child {
23
+ margin-right: auto;
24
+ }
25
+ }
26
+ `;
8
27
  /**
9
28
  * Renders the default home page for the chat. This shows up when no message has been sent yet.
10
29
  *
@@ -13,6 +32,6 @@ import { CustomAgent } from './CustomAgent.js';
13
32
  export const Home = ({ initialAgents, ...props }) => {
14
33
  const agent = useCurrentChatState('agent');
15
34
  const isAgentEnabled = useCurrentChatState('features').agent;
16
- return (_jsxs(FallbackBoundary, { children: [agent && !agent.builtIn ? _jsx(CustomAgent, {}) : _jsx(BuiltInAgent, { ...props }), !!initialAgents && isAgentEnabled && _jsx(Flex, { sx: { gap: '8px' }, alignItems: "center", justifyContent: "center", children: initialAgents.map((agent) => _jsx(AgentCard, { agent: agent }, agent.id)) })] }));
35
+ return (_jsxs(FallbackBoundary, { children: [agent && !agent.builtIn ? _jsx(CustomAgent, {}) : _jsx(BuiltInAgent, { ...props }), !!initialAgents && isAgentEnabled && (_jsx(FadingOverflow, { enableHorizontalScrollWithVerticalWheel: true, sides: ['left', 'right'], scroll: "arrows", children: _jsx(AgentList, { className: "agent-list", children: initialAgents.map((agent) => _jsx("li", { children: _jsx(AgentCard, { agent: agent }) }, agent.id)) }) }))] }));
17
36
  };
18
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/Home/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OA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M,gBAAgB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;CAiB1B,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAC1C,MAAM,cAAc,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC,KAAK,CAAA;IAE5D,OAAO,CACL,MAAC,gBAAgB,eACd,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC,CAAC,CAAC,KAAC,YAAY,OAAK,KAAK,GAAI,EACvE,CAAC,CAAC,aAAa,IAAI,cAAc,IAAI,CACpC,KAAC,cAAc,IAAC,uCAAuC,QAAC,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAC,QAAQ,YAC/F,KAAC,SAAS,IAAC,SAAS,EAAC,YAAY,YAC9B,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAmB,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,GAAI,IAArC,KAAK,CAAC,EAAE,CAAkC,CAAC,GACxE,GACG,CAClB,IACgB,CACpB,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { styled } from 'styled-components';
2
2
  export const HomeBox = styled.div `
3
- margin: auto;
3
+ margin: auto 0;
4
4
 
5
5
  .title, .subtitle {
6
6
  font-family: 'San Francisco';
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAgent.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonAgent.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,+CAkDvB,CAAA"}
1
+ {"version":3,"file":"ButtonAgent.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonAgent.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,+CAmDvB,CAAA"}
@@ -31,7 +31,7 @@ export const ButtonAgent = () => {
31
31
  setAgentDefault();
32
32
  }
33
33
  }, [agentDefault, agent]);
34
- return (_jsx("div", { className: "button-group", children: features.agent && (_jsxs("div", { className: "group-agent", children: [_jsx(IconButton, { "aria-label": t.agent, title: t.agent, className: "agent", onClick: () => widget.set('panel', 'agent'), children: _jsx(MiniLogo, {}) }), agent?.id && !isAgentDefault(agent?.slug) &&
34
+ return (_jsx("div", { className: "button-group", children: features.agent && (_jsxs("div", { className: "group-agent", children: [_jsx(IconButton, { "aria-label": t.agent, title: t.agent, className: "agent", onClick: () => widget.set('panel', 'agent'), children: agentDefault?.avatar ? _jsx("img", { src: agentDefault.avatar, className: "image" }) : _jsx(MiniLogo, {}) }), agent?.id && !isAgentDefault(agent?.slug) &&
35
35
  _jsx(Tooltip, { text: t.remove, children: _jsxs(IconButton, { "aria-label": t.remove, className: "agent agent-selected", onClick: setAgentDefault, children: [agent?.image ? _jsx("img", { src: agent.image, className: "image" }) : _jsx(IconBox, { className: "image", size: "xs", children: _jsx(Agent, {}) }), _jsx(Flex, { className: "icon-remove", alignContent: "center", justifyContent: "center", children: _jsx(TimesMini, {}) })] }) })] })) }));
36
36
  };
37
37
  //# sourceMappingURL=ButtonAgent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAgent.js","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonAgent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CA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;AACH,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { ChevronRight, Circle, Code, KnowledgeSource, Send, Stack, Times } from '@citric/icons';
2
+ import { ChevronRight, Code, KnowledgeSource, Send, Stack, Times, Workspace } from '@citric/icons';
3
3
  import { IconButton } from '@citric/ui';
4
4
  import { listToClass } from '@stack-spot/portal-theme';
5
5
  import { useEffect, useRef } from 'react';
@@ -29,6 +29,6 @@ export const ButtonGroup = ({ onSend, onCancel, expanded, setExpanded, isLoading
29
29
  },
30
30
  // don't use the whole features object here, it would make every chat tab change rerun this effect.
31
31
  [features.workspace, features.knowledgeSource, features.stack, features.editor]);
32
- return (_jsxs("div", { className: "button-group", children: [hasFeatureButtons && _jsxs(_Fragment, { children: [_jsxs("div", { ref: featureButtons, className: listToClass(['feature-buttons', expanded && 'expanded']), style: { width: expanded ? featureButtonsWidth.current : 0 }, children: [features.workspace && (_jsx(IconButton, { "aria-label": t.space, title: t.space, onClick: () => widget.set('panel', 'workspace'), children: _jsx(Circle, {}) })), features.knowledgeSource && (_jsx(IconButton, { "aria-label": t.knowledgeSource, title: t.knowledgeSource, onClick: () => widget.set('panel', 'ks'), children: _jsx(KnowledgeSource, {}) })), features.stack && (_jsx(IconButton, { "aria-label": t.stack, title: t.stack, onClick: () => widget.set('panel', 'stack'), children: _jsx(Stack, {}) })), features.editor && (_jsx(IconButton, { "aria-label": t.code, title: t.code, onClick: () => widget.set('panel', 'editor'), children: _jsx(Code, {}) }))] }), _jsx(IconButton, { title: expanded ? t.collapse : t.expand, className: listToClass(['expand', !expanded && 'collapsed']), "aria-label": expanded ? t.collapse : t.expand, onClick: () => setExpanded(v => !v), children: _jsx(ChevronRight, {}) })] }), isLoading ? (_jsx(IconButton, { "aria-label": t.cancel, onClick: onCancel, className: "send", title: t.cancel, children: _jsx(Times, {}) })) : (_jsx(IconButton, { "aria-label": t.send, onClick: onSend, className: "send", title: t.send, children: _jsx(Send, {}) }))] }));
32
+ return (_jsxs("div", { className: "button-group", children: [hasFeatureButtons && _jsxs(_Fragment, { children: [_jsxs("div", { ref: featureButtons, className: listToClass(['feature-buttons', expanded && 'expanded']), style: { width: expanded ? featureButtonsWidth.current : 0 }, children: [features.workspace && (_jsx(IconButton, { "aria-label": t.workspace, title: t.workspace, onClick: () => widget.set('panel', 'workspace'), children: _jsx(Workspace, {}) })), features.knowledgeSource && (_jsx(IconButton, { "aria-label": t.knowledgeSource, title: t.knowledgeSource, onClick: () => widget.set('panel', 'ks'), children: _jsx(KnowledgeSource, {}) })), features.stack && (_jsx(IconButton, { "aria-label": t.stack, title: t.stack, onClick: () => widget.set('panel', 'stack'), children: _jsx(Stack, {}) })), features.editor && (_jsx(IconButton, { "aria-label": t.code, title: t.code, onClick: () => widget.set('panel', 'editor'), children: _jsx(Code, {}) }))] }), _jsx(IconButton, { title: expanded ? t.collapse : t.expand, className: listToClass(['expand', !expanded && 'collapsed']), "aria-label": expanded ? t.collapse : t.expand, onClick: () => setExpanded(v => !v), children: _jsx(ChevronRight, {}) })] }), isLoading ? (_jsx(IconButton, { "aria-label": t.cancel, onClick: onCancel, className: "send", title: t.cancel, children: _jsx(Times, {}) })) : (_jsx(IconButton, { "aria-label": t.send, onClick: onSend, className: "send", title: t.send, children: _jsx(Send, {}) }))] }));
33
33
  };
34
34
  //# sourceMappingURL=ButtonGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.js","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,SAAS,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,KAAC,UAAU,IACT,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EACvC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,gBAChD,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAEnC,KAAC,YAAY,KAAG,GACL,IACZ,EACF,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,UAAU,kBAAa,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,CAAC,CAAC,MAAM,YACnF,KAAC,KAAK,KAAG,GACE,CACd,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,kBAAa,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,YAC7E,KAAC,IAAI,KAAG,GACG,CACd,IACG,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useMessageInputDictionary: () => Record<"code" | "placeholder" | "selected" | "send" | "cancel" | "stack" | "workspace" | "knowledgeSource" | "agent" | "remove" | "space" | "collapse" | "expand" | "removeConfig" | "removeStack" | "removeWorkspace" | "removeKS" | "removeSelection", string>;
1
+ export declare const useMessageInputDictionary: () => Record<"code" | "placeholder" | "selected" | "send" | "cancel" | "stack" | "workspace" | "knowledgeSource" | "agent" | "remove" | "collapse" | "expand" | "removeConfig" | "removeStack" | "removeWorkspace" | "removeKS" | "removeSelection", string>;
2
2
  //# sourceMappingURL=dictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AA6CA,eAAO,MAAM,yBAAyB,wQAAiC,CAAA"}
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AA2CA,eAAO,MAAM,yBAAyB,8PAAiC,CAAA"}
@@ -4,7 +4,6 @@ const dictionary = {
4
4
  stack: 'Select stack',
5
5
  code: 'Open code editor',
6
6
  workspace: 'Select workspace',
7
- space: 'Select space',
8
7
  knowledgeSource: 'Select knowledge sources',
9
8
  agent: 'Select agent',
10
9
  collapse: 'Hide buttons',
@@ -24,7 +23,6 @@ const dictionary = {
24
23
  stack: 'Selecionar stack',
25
24
  code: 'Abrir editor de código',
26
25
  workspace: 'Selecionar workspace',
27
- space: 'Select Space',
28
26
  knowledgeSource: 'Selecionar knowledge sources',
29
27
  agent: 'Selecionar agente',
30
28
  collapse: 'Esconder botões',
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEvE,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EAAE,cAAc;QACrB,eAAe,EAAE,0BAA0B;QAC3C,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,8BAA8B;QAC5C,WAAW,EAAE,8BAA8B;QAC3C,eAAe,EAAE,kCAAkC;QACnD,QAAQ,EAAE,kCAAkC;QAC5C,QAAQ,EAAE,UAAU;QACpB,eAAe,EAAE,+BAA+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D,MAAM,EAAE,QAAQ;KACjB;IACD,EAAE,EAAE;QACF,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,wBAAwB;QAC9B,SAAS,EAAE,sBAAsB;QACjC,eAAe,EAAE,8BAA8B;QAC/C,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,iBAAiB;QAC3B,MAAM,EAAE,gBAAgB;QACxB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,kBAAkB;QAC/B,MAAM,EAAE,UAAU;QAClB,YAAY,EAAE,gCAAgC;QAC9C,WAAW,EAAE,6BAA6B;QAC1C,eAAe,EAAE,iCAAiC;QAClD,QAAQ,EAAE,qCAAqC;QAC/C,QAAQ,EAAE,aAAa;QACvB,eAAe,EAAE,4BAA4B;QAC7C,MAAM,EAAE,SAAS;KAClB;CACmB,CAAA;AAEtB,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Workspaces.d.ts","sourceRoot":"","sources":["../../src/views/Workspaces.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,eAAO,MAAM,UAAU,YActB,CAAA"}
1
+ {"version":3,"file":"Workspaces.d.ts","sourceRoot":"","sources":["../../src/views/Workspaces.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,UAAU,YActB,CAAA"}
@@ -2,10 +2,9 @@ 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 { workspaceAiClient } from '@stack-spot/portal-network';
5
+ import { workspaceClient } from '@stack-spot/portal-network';
6
6
  import { useTranslate } from '@stack-spot/portal-translate';
7
7
  import { useEffect, useMemo, useState } from 'react';
8
- import { ButtonFavorite } from '../components/ButtonFavorite.js';
9
8
  import { DescribedRadioGroup } from '../components/form/DescribedRadioGroup.js';
10
9
  import { IconInput } from '../components/IconInput.js';
11
10
  import { RightPanelTabs } from '../components/RightPanelTabs.js';
@@ -30,83 +29,73 @@ const WorkspacesPanel = () => {
30
29
  const t = useTranslate(dictionary);
31
30
  const chat = useCurrentChat();
32
31
  return _jsx(RightPanelTabs, { tabs: [
33
- { title: t.favorites, content: _jsx(WorkspaceSourcesTab, { visibility: "favorite" }, "favorite") },
34
- { title: t.all, content: _jsx(WorkspaceSourcesTab, { visibility: "all" }, "all") },
32
+ // { title: t.favorites, content: <WorkspaceSourcesTab key="favorite" visibility="favorite" /> },
33
+ { title: t.all, content: _jsx(WorkspaceSourcesTab, {}, "all") },
35
34
  ] }, chat.id);
36
35
  };
37
- const WorkspaceSourcesTab = ({ visibility }) => {
36
+ const WorkspaceSourcesTab = () => {
38
37
  const t = useTranslate(dictionary);
39
38
  const { close } = useRightPanel();
40
39
  const chat = useCurrentChat();
41
40
  const [filter, setFilter] = useState('');
42
- const workspaces = workspaceAiClient.workspacesAi.useQuery({ visibility });
41
+ // const workspaces = workspaceAiClient.workspacesAi.useQuery({ visibility })
42
+ // const [value, setValue] = useState<WorkspaceResponse | undefined>(workspaces.find(w => w.id === chat.get('workspace')?.id))
43
+ const workspaces = workspaceClient.workspaces.useQuery({ aclOnly: false });
43
44
  const [value, setValue] = useState(workspaces.find(w => w.id === chat.get('workspace')?.id));
44
- const listFavorites = workspaceAiClient.workspacesAi.useQuery({ visibility: 'favorite' });
45
- const [addFavorite, pendingAddFav] = workspaceAiClient.addFavoriteWorkspaceAi.useMutation();
46
- const [removeFavorite, pendingRemoveFav] = workspaceAiClient.removeFavoriteWorkspaceAi.useMutation();
47
- // eslint-disable-next-line no-async-promise-executor
48
- const onAddFavorite = async (idOrSlug) => new Promise(async (resolve, reject) => {
49
- try {
50
- await addFavorite({ workspaceId: idOrSlug });
51
- await workspaceAiClient.workspacesAi.invalidate();
52
- if (!pendingAddFav) {
53
- resolve(true);
54
- }
55
- }
56
- catch (error) {
57
- // eslint-disable-next-line no-console
58
- console.error(error);
59
- reject(error);
60
- }
61
- });
62
- // eslint-disable-next-line no-async-promise-executor
63
- const onRemoveFavorite = (idOrSlug) => new Promise(async (resolve, reject) => {
64
- try {
65
- await removeFavorite({ workspaceId: idOrSlug });
66
- await workspaceAiClient.workspacesAi.invalidate();
67
- if (!pendingRemoveFav) {
68
- resolve(true);
69
- }
70
- }
71
- catch (error) {
72
- // eslint-disable-next-line no-console
73
- console.error(error);
74
- reject(error);
75
- }
76
- });
45
+ // const listFavorites = workspaceAiClient.workspacesAi.useQuery({ visibility: 'favorite' })
46
+ // const [addFavorite, pendingAddFav] = workspaceAiClient.addFavoriteWorkspaceAi.useMutation()
47
+ // const [removeFavorite, pendingRemoveFav] = workspaceAiClient.removeFavoriteWorkspaceAi.useMutation()
48
+ // const onAddFavorite = async(idOrSlug: string) => {
49
+ // try {
50
+ // await addFavorite({ workspaceId: idOrSlug })
51
+ // await workspaceAiClient.workspacesAi.invalidate()
52
+ // } catch (error) {
53
+ // // eslint-disable-next-line no-console
54
+ // console.error(error)
55
+ // }
56
+ // }
57
+ // const onRemoveFavorite = async(idOrSlug: string) => {
58
+ // try {
59
+ // await removeFavorite({ workspaceId: idOrSlug })
60
+ // await workspaceAiClient.workspacesAi.invalidate()
61
+ // } catch (error) {
62
+ // // eslint-disable-next-line no-console
63
+ // console.error(error)
64
+ // }
65
+ // }
77
66
  const filtered = useMemo(
78
67
  // Recreate the list so that the favorites list is taken into account
79
- () => filter ? workspaces.filter(w => w === value || w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : [...workspaces], [workspaces, filter, value, listFavorites]);
68
+ () => filter ? workspaces.filter(w => w === value || w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : workspaces, [workspaces, filter, value]);
80
69
  function submit() {
81
70
  if (value)
82
71
  chat.set('workspace', { id: value.id, label: value.name });
83
72
  close();
84
73
  }
85
- 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: w => w.id, value: value, onChange: setValue, renderLabel: w => w.name, renderDescription: w => w.description, renderAfterElement: ({ id }) => _jsx(ButtonFavorite, { favorite: { idOrSlug: id, listFavorites, onAddFavorite, onRemoveFavorite } }), optionClassName: w => (w === value && filter && !w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
74
+ 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: w => w.id, value: value, onChange: setValue, renderLabel: w => w.name, renderDescription: w => w.description, optionClassName: w => (w === value && filter && !w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
86
75
  ? 'filtered-out'
87
76
  : '', className: "option-list" }), !!workspaces.length && !filtered.length &&
88
77
  _jsx(Placeholder, { title: t.noSearchResults, description: t.noSearchResultsDescription, className: "no-data-placeholder" }), !workspaces.length && _jsx(Placeholder, { title: t.noData, description: t.noDataDescription })] }), !!filtered.length && _jsx(Button, { onClick: submit, disabled: !value, children: t.apply })] }));
89
78
  };
90
79
  const dictionary = {
91
80
  en: {
92
- title: 'Spaces',
93
- description: 'By selecting a space, its Knowledge Sources (KSs), Agents, Quick Commands and Stacks Ai will be consulted to generate the answers.',
81
+ title: 'Workspaces',
82
+ description: 'By selecting a workspace, its Knowledge Sources (KSs) will be consulted to generate the answers.',
94
83
  apply: 'Apply',
95
84
  noSearchResults: "Your search didn't yield results.",
96
85
  noSearchResultsDescription: 'Please, try another search term.',
97
- noData: 'There are no spaces yet.',
98
- noDataDescription: 'Use the AI portal to create new spaces.',
86
+ noData: 'There are no workspaces yet.',
87
+ noDataDescription: 'Use the AI portal to create new workspaces.',
99
88
  all: 'All',
100
89
  favorites: 'Favorites',
101
90
  },
102
91
  pt: {
103
- title: 'Spaces',
104
- description: 'Ao selecionar um space, seus Knowledge Sources (KSs), Agentes, Quick Commands e Stacks Ai serão consultados para gerar as respostas.',
92
+ title: 'Workspaces',
93
+ description: 'Ao selecionar um workspace, seus Knowledge Sources (KSs) serão consultados para gerar as respostas.',
105
94
  apply: 'Aplicar',
106
95
  noSearchResults: 'Sua busca não produziu resultados',
107
96
  noSearchResultsDescription: 'Por favor, tente outra busca.',
108
- noData: 'Ainda não há spaces.',
109
- noDataDescription: 'Use o Portal AI para criar novos spaces.',
97
+ noData: 'Ainda não há workspace.',
98
+ noDataDescription: 'Use o Portal AI para criar novos workspaces.',
110
99
  all: 'Todos',
111
100
  favorites: 'Favoritos',
112
101
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Workspaces.js","sourceRoot":"","sources":["../../src/views/Workspaces.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,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD;;GAEG;AACH,MAAM,CAAC,MA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,CAAC,CAAC,0BAA0B,EAAE,SAAS,EAAC,qBAAqB,GAAG,EACrH,CAAC,UAAU,CAAC,MAAM,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,iBAAiB,GAAI,IACrF,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;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,kGAAkG;QAC/G,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,mCAAmC;QACpD,0BAA0B,EAAE,kCAAkC;QAC9D,MAAM,EAAE,8BAA8B;QACtC,iBAAiB,EAAE,6CAA6C;QAChE,GAAG,EAAE,KAAK;QACV,SAAS,EAAE,WAAW;KACvB;IACD,EAAE,EAAE;QACF,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,qGAAqG;QAClH,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,mCAAmC;QACpD,0BAA0B,EAAE,+BAA+B;QAC3D,MAAM,EAAE,yBAAyB;QACjC,iBAAiB,EAAE,8CAA8C;QACjE,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,WAAW;KACvB;CACmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@citric/core": "^6.4.0",
14
- "@stack-spot/portal-components": "^2.16.0",
14
+ "@stack-spot/portal-components": "^2.22.0",
15
15
  "@citric/icons": "^5.9.0",
16
16
  "@stack-spot/portal-network": "^0.115.0",
17
17
  "@citric/ui": "^6.7.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.16.0",
4
- "date": "Thu Apr 24 2025 18:23:19 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "1.16.2",
4
+ "date": "Fri Apr 25 2025 18:48:25 GMT+0000 (Coordinated Universal Time)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  {
111
111
  "name": "@stack-spot/portal-components",
112
- "version": "2.16.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(@citric/ui@6.7.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-theme@1.1.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-translate@1.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
112
+ "version": "2.22.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(@citric/ui@6.7.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@citric/icons@5.9.0(react@18.2.0))(lodash@4.17.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-theme@1.1.0(@citric/core@6.4.0(lodash@4.17.21)(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(styled-components@6.1.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)))(@stack-spot/portal-translate@1.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
113
113
  },
114
114
  {
115
115
  "name": "@stack-spot/portal-network",
@@ -1,37 +1,82 @@
1
- import { Box, Image, Text } from '@citric/core'
1
+ import { Image, Text } from '@citric/core'
2
2
  import { Card } from '@citric/ui'
3
+ import { listToClass, theme } from '@stack-spot/portal-theme'
3
4
  import { useTranslate } from '@stack-spot/portal-translate'
5
+ import { styled } from 'styled-components'
4
6
  import placeholder from '../../assets/placeholder.png'
5
- import { useCurrentChat } from '../../context/hooks'
7
+ import { useCurrentChat, useCurrentChatState } from '../../context/hooks'
6
8
  import { LabeledAgent } from '../../state/types'
7
9
  import { dictionary } from './dictionary'
8
10
 
11
+ const StyledCard = styled(Card)`
12
+ cursor: pointer;
13
+ border-radius: 8px;
14
+ transition: background-color 0.3s;
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 12px;
18
+
19
+ &:hover {
20
+ background-color: ${theme.color.light[500]};
21
+ }
22
+
23
+ &.active {
24
+ background-color: ${theme.color.light[600]};
25
+ }
26
+
27
+ img {
28
+ width: 125px;
29
+ height: 130px;
30
+ border-radius: 8px;
31
+ }
32
+
33
+ h6 {
34
+ max-width: 125px;
35
+ white-space: nowrap;
36
+ overflow: hidden;
37
+ text-overflow: ellipsis;
38
+ }
39
+
40
+ .agent-type {
41
+ display: flex;
42
+ gap: 4px;
43
+ }
44
+
45
+ .text-box {
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: 2px;
49
+ }
50
+ `
51
+
9
52
  export const AgentCard = ({ agent }: { agent: LabeledAgent }) => {
10
53
  const t = useTranslate(dictionary)
11
54
  const chat = useCurrentChat()
55
+ const currentAgent = useCurrentChatState('agent')
12
56
 
13
- const onSelectAgent = () => {
14
- chat.set(
15
- 'agent',
16
- agent,
17
- )
18
- }
19
-
20
- return <Card onClick={onSelectAgent} sx={{ cursor: 'pointer' }}>
21
- <Box mb={4}>
22
- <Image width={125} height={130} sx={{ borderRadius: '8px' }} src={agent.image ? agent.image : placeholder} />
23
- </Box>
24
- {agent.visibility_level && <Box>
25
- <Text appearance="microtext1" colorScheme="light.700">
26
- {t[agent.visibility_level.toLowerCase() as keyof typeof t]}
27
- </Text>
28
- &nbsp;
29
- <Text appearance="microtext1">
30
- {t.agent}
31
- </Text>
32
- </Box>}
33
- <Text appearance="h6">
34
- {agent.label}
35
- </Text>
36
- </Card>
57
+ return (
58
+ <StyledCard
59
+ onClick={() => chat.set('agent', agent)}
60
+ role="button"
61
+ tabIndex={0}
62
+ className={listToClass(['agent-card', currentAgent?.id === agent.id && 'active'])}
63
+ >
64
+ <Image src={agent.image ? agent.image : placeholder} />
65
+ <div className="text-box">
66
+ {agent.visibility_level && (
67
+ <div className="agent-type">
68
+ <Text appearance="microtext1" colorScheme="light.700">
69
+ {t[agent.visibility_level.toLowerCase() as keyof typeof t]}
70
+ </Text>
71
+ <Text appearance="microtext1">
72
+ {t.agent}
73
+ </Text>
74
+ </div>
75
+ )}
76
+ <Text appearance="h6">
77
+ {agent.label}
78
+ </Text>
79
+ </div>
80
+ </StyledCard>
81
+ )
37
82
  }
@@ -1,4 +1,5 @@
1
- import { Flex } from '@citric/core'
1
+ import { FadingOverflow } from '@stack-spot/portal-components/FadingOverflow'
2
+ import { styled } from 'styled-components'
2
3
  import { AgentCard } from '../../components/AgentCard'
3
4
  import { FallbackBoundary } from '../../components/FallbackBoundary'
4
5
  import { useCurrentChatState } from '../../context/hooks'
@@ -6,6 +7,25 @@ import { BuiltInAgent } from './BuiltInAgent'
6
7
  import { CustomAgent } from './CustomAgent'
7
8
  import { HomeProps } from './types'
8
9
 
10
+ const AgentList = styled.ul`
11
+ list-style: none;
12
+ margin: 0;
13
+ padding: 0;
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 14px;
17
+
18
+ li {
19
+ flex-shrink: 0;
20
+ &:first-child {
21
+ margin-left: auto;
22
+ }
23
+ &:last-child {
24
+ margin-right: auto;
25
+ }
26
+ }
27
+ `
28
+
9
29
  /**
10
30
  * Renders the default home page for the chat. This shows up when no message has been sent yet.
11
31
  *
@@ -18,10 +38,13 @@ export const Home = ({ initialAgents, ...props }: HomeProps) => {
18
38
  return (
19
39
  <FallbackBoundary>
20
40
  {agent && !agent.builtIn ? <CustomAgent /> : <BuiltInAgent {...props} />}
21
- {!!initialAgents && isAgentEnabled && <Flex sx={{ gap: '8px' }} alignItems="center" justifyContent="center">
22
- {initialAgents.map((agent) => <AgentCard key={agent.id} agent={agent} />)}
23
- </Flex>
24
- }
41
+ {!!initialAgents && isAgentEnabled && (
42
+ <FadingOverflow enableHorizontalScrollWithVerticalWheel sides={['left', 'right']} scroll="arrows">
43
+ <AgentList className="agent-list">
44
+ {initialAgents.map((agent) => <li key={agent.id}><AgentCard agent={agent} /></li>)}
45
+ </AgentList>
46
+ </FadingOverflow>
47
+ )}
25
48
  </FallbackBoundary>
26
49
  )
27
50
  }
@@ -1,7 +1,7 @@
1
1
  import { styled } from 'styled-components'
2
2
 
3
3
  export const HomeBox = styled.div`
4
- margin: auto;
4
+ margin: auto 0;
5
5
 
6
6
  .title, .subtitle {
7
7
  font-family: 'San Francisco';
@@ -42,7 +42,8 @@ export const ButtonAgent = () => {
42
42
  {features.agent && (
43
43
  <div className="group-agent">
44
44
  <IconButton aria-label={t.agent} title={t.agent} className="agent" onClick={() => widget.set('panel', 'agent')}>
45
- <MiniLogo />
45
+ {agentDefault?.avatar ? <img src={agentDefault.avatar} className="image" /> : <MiniLogo />}
46
+
46
47
  </IconButton>
47
48
  {agent?.id && !isAgentDefault(agent?.slug) &&
48
49
  <Tooltip text={t.remove} >
@@ -1,4 +1,4 @@
1
- import { ChevronRight, Circle, Code, KnowledgeSource, Send, Stack, Times } from '@citric/icons'
1
+ import { ChevronRight, Code, KnowledgeSource, Send, Stack, Times, Workspace } from '@citric/icons'
2
2
  import { IconButton } from '@citric/ui'
3
3
  import { listToClass } from '@stack-spot/portal-theme'
4
4
  import { useEffect, useRef } from 'react'
@@ -62,8 +62,8 @@ export const ButtonGroup = ({ onSend, onCancel, expanded, setExpanded, isLoading
62
62
  style={{ width: expanded ? featureButtonsWidth.current : 0 }}
63
63
  >
64
64
  {features.workspace && (
65
- <IconButton aria-label={t.space} title={t.space} onClick={() => widget.set('panel', 'workspace')}>
66
- <Circle />
65
+ <IconButton aria-label={t.workspace} title={t.workspace} onClick={() => widget.set('panel', 'workspace')}>
66
+ <Workspace />
67
67
  </IconButton>
68
68
  )}
69
69
  {features.knowledgeSource && (
@@ -5,7 +5,6 @@ const dictionary = {
5
5
  stack: 'Select stack',
6
6
  code: 'Open code editor',
7
7
  workspace: 'Select workspace',
8
- space: 'Select space',
9
8
  knowledgeSource: 'Select knowledge sources',
10
9
  agent: 'Select agent',
11
10
  collapse: 'Hide buttons',
@@ -25,7 +24,6 @@ const dictionary = {
25
24
  stack: 'Selecionar stack',
26
25
  code: 'Abrir editor de código',
27
26
  workspace: 'Selecionar workspace',
28
- space: 'Select Space',
29
27
  knowledgeSource: 'Selecionar knowledge sources',
30
28
  agent: 'Selecionar agente',
31
29
  collapse: 'Esconder botões',
@@ -1,11 +1,10 @@
1
1
  import { Button } from '@citric/core'
2
2
  import { Search } from '@citric/icons'
3
3
  import { Placeholder } from '@stack-spot/portal-components/Placeholder'
4
- import { workspaceAiClient } from '@stack-spot/portal-network'
5
- import { WorkspaceResponse, WorkspaceVisibilityLevelEnum } from '@stack-spot/portal-network/api/workspace-ai'
4
+ import { workspaceClient } from '@stack-spot/portal-network'
5
+ import { WorkspaceReadResponse } from '@stack-spot/portal-network/api/workspace'
6
6
  import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
7
7
  import { useEffect, useMemo, useState } from 'react'
8
- import { ButtonFavorite } from '../components/ButtonFavorite'
9
8
  import { DescribedRadioGroup } from '../components/form/DescribedRadioGroup'
10
9
  import { IconInput } from '../components/IconInput'
11
10
  import { RightPanelTabs } from '../components/RightPanelTabs'
@@ -36,58 +35,50 @@ const WorkspacesPanel = () => {
36
35
  const chat = useCurrentChat()
37
36
 
38
37
  return <RightPanelTabs key={chat.id} tabs={[
39
- { title: t.favorites, content: <WorkspaceSourcesTab key="favorite" visibility="favorite" /> },
40
- { title: t.all, content: <WorkspaceSourcesTab key="all" visibility="all" /> },
38
+ // { title: t.favorites, content: <WorkspaceSourcesTab key="favorite" visibility="favorite" /> },
39
+ { title: t.all, content: <WorkspaceSourcesTab key="all" /> },
41
40
  ]}
42
41
  />
43
42
  }
44
43
 
45
- const WorkspaceSourcesTab = ({ visibility }: {visibility: WorkspaceVisibilityLevelEnum}) => {
44
+ const WorkspaceSourcesTab = () => {
46
45
  const t = useTranslate(dictionary)
47
46
  const { close } = useRightPanel()
48
47
  const chat = useCurrentChat()
49
48
  const [filter, setFilter] = useState('')
50
- const workspaces = workspaceAiClient.workspacesAi.useQuery({ visibility })
51
- const [value, setValue] = useState<WorkspaceResponse | undefined>(workspaces.find(w => w.id === chat.get('workspace')?.id))
52
- const listFavorites = workspaceAiClient.workspacesAi.useQuery({ visibility: 'favorite' })
49
+ // const workspaces = workspaceAiClient.workspacesAi.useQuery({ visibility })
50
+ // const [value, setValue] = useState<WorkspaceResponse | undefined>(workspaces.find(w => w.id === chat.get('workspace')?.id))
51
+ const workspaces = workspaceClient.workspaces.useQuery({ aclOnly: false })
53
52
 
54
- const [addFavorite, pendingAddFav] = workspaceAiClient.addFavoriteWorkspaceAi.useMutation()
55
- const [removeFavorite, pendingRemoveFav] = workspaceAiClient.removeFavoriteWorkspaceAi.useMutation()
53
+ const [value, setValue] = useState<WorkspaceReadResponse | undefined>(workspaces.find(w => w.id === chat.get('workspace')?.id))
54
+ // const listFavorites = workspaceAiClient.workspacesAi.useQuery({ visibility: 'favorite' })
56
55
 
57
- // eslint-disable-next-line no-async-promise-executor
58
- const onAddFavorite = async(idOrSlug: string) => new Promise<boolean>(async (resolve, reject) => {
59
- try {
60
- await addFavorite({ workspaceId: idOrSlug })
61
- await workspaceAiClient.workspacesAi.invalidate()
62
- if (!pendingAddFav) {
63
- resolve(true)
64
- }
65
- } catch (error) {
66
- // eslint-disable-next-line no-console
67
- console.error(error)
68
- reject(error)
69
- }
70
- })
56
+ // const [addFavorite, pendingAddFav] = workspaceAiClient.addFavoriteWorkspaceAi.useMutation()
57
+ // const [removeFavorite, pendingRemoveFav] = workspaceAiClient.removeFavoriteWorkspaceAi.useMutation()
71
58
 
72
- // eslint-disable-next-line no-async-promise-executor
73
- const onRemoveFavorite = (idOrSlug: string) => new Promise<boolean>(async (resolve, reject) => {
74
- try {
75
- await removeFavorite({ workspaceId: idOrSlug })
76
- await workspaceAiClient.workspacesAi.invalidate()
77
- if (!pendingRemoveFav) {
78
- resolve(true)
79
- }
80
- } catch (error) {
81
- // eslint-disable-next-line no-console
82
- console.error(error)
83
- reject(error)
84
- }
85
- })
59
+ // const onAddFavorite = async(idOrSlug: string) => {
60
+ // try {
61
+ // await addFavorite({ workspaceId: idOrSlug })
62
+ // await workspaceAiClient.workspacesAi.invalidate()
63
+ // } catch (error) {
64
+ // // eslint-disable-next-line no-console
65
+ // console.error(error)
66
+ // }
67
+ // }
68
+ // const onRemoveFavorite = async(idOrSlug: string) => {
69
+ // try {
70
+ // await removeFavorite({ workspaceId: idOrSlug })
71
+ // await workspaceAiClient.workspacesAi.invalidate()
72
+ // } catch (error) {
73
+ // // eslint-disable-next-line no-console
74
+ // console.error(error)
75
+ // }
76
+ // }
86
77
 
87
78
  const filtered = useMemo(
88
79
  // Recreate the list so that the favorites list is taken into account
89
- () => filter ? workspaces.filter(w => w === value || w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : [...workspaces],
90
- [workspaces, filter, value, listFavorites],
80
+ () => filter ? workspaces.filter(w => w === value || w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())) : workspaces,
81
+ [workspaces, filter, value],
91
82
  )
92
83
 
93
84
  function submit() {
@@ -105,8 +96,6 @@ const WorkspaceSourcesTab = ({ visibility }: {visibility: WorkspaceVisibilityLev
105
96
  onChange={setValue}
106
97
  renderLabel={w => w.name}
107
98
  renderDescription={w => w.description}
108
- renderAfterElement={({ id }) =>
109
- <ButtonFavorite favorite={{ idOrSlug: id, listFavorites, onAddFavorite, onRemoveFavorite }} />}
110
99
  optionClassName={w => (w === value && filter && !w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
111
100
  ? 'filtered-out'
112
101
  : ''
@@ -124,24 +113,24 @@ const WorkspaceSourcesTab = ({ visibility }: {visibility: WorkspaceVisibilityLev
124
113
 
125
114
  const dictionary = {
126
115
  en: {
127
- title: 'Spaces',
128
- description: 'By selecting a space, its Knowledge Sources (KSs), Agents, Quick Commands and Stacks Ai will be consulted to generate the answers.',
116
+ title: 'Workspaces',
117
+ description: 'By selecting a workspace, its Knowledge Sources (KSs) will be consulted to generate the answers.',
129
118
  apply: 'Apply',
130
119
  noSearchResults: "Your search didn't yield results.",
131
120
  noSearchResultsDescription: 'Please, try another search term.',
132
- noData: 'There are no spaces yet.',
133
- noDataDescription: 'Use the AI portal to create new spaces.',
121
+ noData: 'There are no workspaces yet.',
122
+ noDataDescription: 'Use the AI portal to create new workspaces.',
134
123
  all: 'All',
135
124
  favorites: 'Favorites',
136
125
  },
137
126
  pt: {
138
- title: 'Spaces',
139
- description: 'Ao selecionar um space, seus Knowledge Sources (KSs), Agentes, Quick Commands e Stacks Ai serão consultados para gerar as respostas.',
127
+ title: 'Workspaces',
128
+ description: 'Ao selecionar um workspace, seus Knowledge Sources (KSs) serão consultados para gerar as respostas.',
140
129
  apply: 'Aplicar',
141
130
  noSearchResults: 'Sua busca não produziu resultados',
142
131
  noSearchResultsDescription: 'Por favor, tente outra busca.',
143
- noData: 'Ainda não há spaces.',
144
- noDataDescription: 'Use o Portal AI para criar novos spaces.',
132
+ noData: 'Ainda não há workspace.',
133
+ noDataDescription: 'Use o Portal AI para criar novos workspaces.',
145
134
  all: 'Todos',
146
135
  favorites: 'Favoritos',
147
136
  },