@stack-spot/ai-chat-widget 1.21.2 → 1.22.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/app-metadata.json +2 -2
  3. package/dist/components/QuickStartButton.d.ts +1 -7
  4. package/dist/components/QuickStartButton.d.ts.map +1 -1
  5. package/dist/components/QuickStartButton.js +4 -44
  6. package/dist/components/QuickStartButton.js.map +1 -1
  7. package/dist/components/TabManager.d.ts.map +1 -1
  8. package/dist/components/TabManager.js +5 -2
  9. package/dist/components/TabManager.js.map +1 -1
  10. package/dist/layout.css +0 -1
  11. package/dist/types.d.ts +2 -1
  12. package/dist/types.d.ts.map +1 -1
  13. package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
  14. package/dist/views/Chat/ChatMessage.js +13 -4
  15. package/dist/views/Chat/ChatMessage.js.map +1 -1
  16. package/dist/views/Chat/styled.d.ts.map +1 -1
  17. package/dist/views/Chat/styled.js +3 -0
  18. package/dist/views/Chat/styled.js.map +1 -1
  19. package/dist/views/ChatTabSelection.d.ts.map +1 -1
  20. package/dist/views/ChatTabSelection.js +5 -2
  21. package/dist/views/ChatTabSelection.js.map +1 -1
  22. package/dist/views/Home/BuiltInAgent.d.ts.map +1 -1
  23. package/dist/views/Home/BuiltInAgent.js +5 -6
  24. package/dist/views/Home/BuiltInAgent.js.map +1 -1
  25. package/dist/views/Home/CustomAgent.d.ts.map +1 -1
  26. package/dist/views/Home/CustomAgent.js +1 -2
  27. package/dist/views/Home/CustomAgent.js.map +1 -1
  28. package/dist/views/Home/index.js +2 -2
  29. package/dist/views/Home/styled.d.ts.map +1 -1
  30. package/dist/views/Home/styled.js +17 -6
  31. package/dist/views/Home/styled.js.map +1 -1
  32. package/dist/views/MessageInput/ButtonBar.d.ts +1 -5
  33. package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -1
  34. package/dist/views/MessageInput/ButtonBar.js +2 -2
  35. package/dist/views/MessageInput/ButtonBar.js.map +1 -1
  36. package/dist/views/MessageInput/SelectContent.js +2 -2
  37. package/dist/views/MessageInput/SelectContent.js.map +1 -1
  38. package/dist/views/MessageInput/index.js +1 -1
  39. package/dist/views/MessageInput/index.js.map +1 -1
  40. package/dist/views/MessageInput/styled.d.ts +1 -3
  41. package/dist/views/MessageInput/styled.d.ts.map +1 -1
  42. package/dist/views/MessageInput/styled.js +4 -5
  43. package/dist/views/MessageInput/styled.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/app-metadata.json +2 -2
  46. package/src/components/QuickStartButton.tsx +9 -57
  47. package/src/components/TabManager.tsx +28 -12
  48. package/src/layout.css +0 -1
  49. package/src/types.ts +2 -1
  50. package/src/views/Chat/ChatMessage.tsx +89 -14
  51. package/src/views/Chat/styled.ts +3 -0
  52. package/src/views/ChatTabSelection.tsx +5 -2
  53. package/src/views/Home/BuiltInAgent.tsx +7 -15
  54. package/src/views/Home/CustomAgent.tsx +0 -3
  55. package/src/views/Home/index.tsx +2 -2
  56. package/src/views/Home/styled.ts +17 -6
  57. package/src/views/MessageInput/ButtonBar.tsx +2 -6
  58. package/src/views/MessageInput/SelectContent.tsx +2 -2
  59. package/src/views/MessageInput/index.tsx +2 -2
  60. package/src/views/MessageInput/styled.ts +5 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBar.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonBar.tsx"],"names":[],"mappings":"AAQA,UAAU,iBAAiB;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,mCAAoC,iBAAiB,4CA+B1E,CAAA"}
1
+ {"version":3,"file":"ButtonBar.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonBar.tsx"],"names":[],"mappings":"AAQA,UAAU,iBAAiB;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,0BAA2B,iBAAiB,4CA+BjE,CAAA"}
@@ -6,11 +6,11 @@ import { useCurrentChat, useCurrentChatState, useWidget } from '../../context/ho
6
6
  import { useMessageInputDictionary } from './dictionary.js';
7
7
  import { SelectContent } from './SelectContent.js';
8
8
  import { SelectionBarWrapper } from './styled.js';
9
- export const ButtonBar = ({ onSend, isLoading, focused }) => {
9
+ export const ButtonBar = ({ onSend, isLoading }) => {
10
10
  const t = useMessageInputDictionary();
11
11
  const chat = useCurrentChat();
12
12
  const widget = useWidget();
13
13
  const features = useCurrentChatState('features');
14
- return (_jsxs(SelectionBarWrapper, { className: "button-group", "$inputFocused": focused, children: [_jsxs(Flex, { sx: { gap: '4px' }, children: [_jsx(SelectContent, {}), features.editor && (_jsx(IconButton, { color: "light", appearance: "square", "aria-label": t.code, title: t.code, onClick: () => widget.set('panel', 'editor'), children: _jsx(Code, {}) }))] }), _jsx(Flex, { children: isLoading ? (_jsx(IconButton, { appearance: "square", color: "inverse", "aria-label": t.cancel, onClick: () => chat.abort(), className: "send", title: t.cancel, children: _jsx(Stop, {}) })) : (_jsx(IconButton, { appearance: "square", color: "inverse", "aria-label": t.send, onClick: onSend, className: "send", title: t.send, children: _jsx(ArrowUp, {}) })) })] }));
14
+ return (_jsxs(SelectionBarWrapper, { className: "button-group", children: [_jsxs(Flex, { sx: { gap: '4px' }, children: [_jsx(SelectContent, {}), features.editor && (_jsx(IconButton, { color: "light", appearance: "square", "aria-label": t.code, title: t.code, onClick: () => widget.set('panel', 'editor'), children: _jsx(Code, {}) }))] }), _jsx(Flex, { children: isLoading ? (_jsx(IconButton, { appearance: "square", color: "inverse", "aria-label": t.cancel, onClick: () => chat.abort(), className: "send", title: t.cancel, children: _jsx(Stop, {}) })) : (_jsx(IconButton, { appearance: "square", color: "inverse", "aria-label": t.send, onClick: onSend, className: "send", title: t.send, children: _jsx(ArrowUp, {}) })) })] }));
15
15
  };
16
16
  //# sourceMappingURL=ButtonBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBar.js","sourceRoot":"","sources":["../../../src/views/MessageInput/ButtonBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAiB9C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAqB,EAAE,EAAE;IAC7E,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IACrC,MAAM,IAAI,GAAG,cAAc,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAEhD,OAAO,CACL,MAAC,mBAAmB,IAAC,SAAS,EAAC,cAAc,mBAAgB,OAAO,aAClE,MAAC,IAAI,IAAC,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,aACtB,KAAC,aAAa,KAAG,EAChB,QAAQ,CAAC,MAAM,IAAI,CAClB,KAAC,UAAU,IAAC,KAAK,EAAC,OAAO,EAAC,UAAU,EAAC,QAAQ,gBAAa,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAA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5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Clip, KnowledgeSource, Spaces, Stack } from '@citric/icons';
2
+ import { KnowledgeSource, Plus, Spaces, Stack } from '@citric/icons';
3
3
  import { IconButton } from '@citric/ui';
4
4
  import { SelectionList } from '@stack-spot/portal-components/SelectionList';
5
5
  import { useTranslate } from '@stack-spot/portal-translate';
@@ -42,7 +42,7 @@ export const SelectContent = () => {
42
42
  })), [features, widget]);
43
43
  if (!hasFeatureButtons)
44
44
  return null;
45
- return (_jsxs(_Fragment, { children: [_jsx(IconButton, { color: "light", appearance: "square", role: "button", title: visibleMenu ? t.collapse : t.expand, "data-test-hint": "button-options", "aria-label": visibleMenu ? t.collapse : t.expand, onClick: () => setVisibleMenu(state => !state), children: _jsx(Clip, {}) }), _jsx(SelectionList, { style: {
45
+ return (_jsxs(_Fragment, { children: [_jsx(IconButton, { color: "light", appearance: "square", role: "button", title: visibleMenu ? t.collapse : t.expand, "data-test-hint": "button-options", "aria-label": visibleMenu ? t.collapse : t.expand, onClick: () => setVisibleMenu(state => !state), children: _jsx(Plus, {}) }), _jsx(SelectionList, { style: {
46
46
  position: 'absolute',
47
47
  top: '-140px',
48
48
  }, id: "menuConfig", visible: visibleMenu, onHide: () => setVisibleMenu(false), items: listItems })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"SelectContent.js","sourceRoot":"","sources":["../../../src/views/MessageInput/SelectContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO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Input = () => {
55
55
  if (!isLoading)
56
56
  textAreaRef.current?.focus();
57
57
  }, [isLoading]);
58
- return (_jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", "$inputFocused": focused, children: [_jsxs("div", { className: "wrapper-action", children: [_jsx(QuickCommandSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsx(AgentSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsxs("div", { className: listToClass(['action-box', focused && 'focused', isLoading && 'disabled']), children: [_jsx(ButtonAgent, {}), _jsx(AdaptiveTextArea, { ref: textAreaRef, placeholder: agentLabel && interpolate(t.placeholder, agentLabel), onChange: e => chat.set('nextMessage', e.target.value), value: value, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onKeyDown: onKeyDown, onKeyUp: handleKeyUp, onIncreaseSize: () => setExpanded(false), onResetSize: () => !expansionLocked.current && setExpanded(true), maxHeight: isMinimized ? MIN_INPUT_HEIGHT : MAX_INPUT_HEIGHT })] })] }), _jsx(ProgressBar, { visible: true, animate: isLoading, backgroundColor: isLoading || !focused ? theme.color.light[600] : theme.color.primary[500] }), _jsx(InfoBar, {}), _jsx(ButtonBar, { focused: focused, onSend: onSend, isLoading: isLoading })] }));
58
+ return (_jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", "$inputFocused": focused, children: [_jsxs("div", { className: "wrapper-action", children: [_jsx(QuickCommandSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsx(AgentSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsxs("div", { className: listToClass(['action-box', focused && 'focused', isLoading && 'disabled']), children: [_jsx(ButtonAgent, {}), _jsx(AdaptiveTextArea, { ref: textAreaRef, placeholder: agentLabel && interpolate(t.placeholder, agentLabel), onChange: e => chat.set('nextMessage', e.target.value), value: value, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onKeyDown: onKeyDown, onKeyUp: handleKeyUp, onIncreaseSize: () => setExpanded(false), onResetSize: () => !expansionLocked.current && setExpanded(true), maxHeight: isMinimized ? MIN_INPUT_HEIGHT : MAX_INPUT_HEIGHT })] })] }), _jsx(ProgressBar, { visible: true, animate: isLoading, backgroundColor: isLoading || !focused ? theme.color.light[500] : theme.color.primary[500] }), _jsx(InfoBar, {}), _jsx(ButtonBar, { onSend: onSend, isLoading: isLoading })] }));
59
59
  };
60
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE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WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,GAC5D,IACE,IACF,EACN,KAAC,WAAW,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAC5C,eAAe,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAI,EAChG,KAAC,OAAO,KAAG,EACX,KAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,IACnC,CACnB,CAAA;AACH,CAAC,CAAA"}
@@ -1,8 +1,6 @@
1
1
  export declare const MAX_INPUT_HEIGHT = 300;
2
2
  export declare const MIN_INPUT_HEIGHT = 24;
3
- export declare const SelectionBarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
- $inputFocused?: boolean;
5
- }>> & string;
3
+ export declare const SelectionBarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
4
  export declare const MessageInputBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
7
5
  $inputFocused?: boolean;
8
6
  }>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,eAAO,MAAM,mBAAmB;oBAA+B,OAAO;YA0CrE,CAAA;AAED,eAAO,MAAM,eAAe;oBAA+B,OAAO;YAuNjE,CAAA"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,eAAO,MAAM,mBAAmB,wOAyC/B,CAAA;AAED,eAAO,MAAM,eAAe;oBAA+B,OAAO;YAuNjE,CAAA"}
@@ -13,7 +13,6 @@ export const SelectionBarWrapper = styled.div `
13
13
  background-color: ${theme.color.light[500]};
14
14
  border-bottom-left-radius: 4px;
15
15
  border-bottom-right-radius: 4px;
16
- border: 2px solid ${({ $inputFocused }) => theme.color.light[$inputFocused ? 600 : 500]};
17
16
  border-top: none;
18
17
 
19
18
  .selection-list {
@@ -134,19 +133,19 @@ export const MessageInputBox = styled.div `
134
133
  align-items: end;
135
134
  border-top-left-radius: 4px;
136
135
  border-top-right-radius: 4px;
137
- border: 2px solid ${theme.color.light[500]};
136
+ border: 2px solid ${theme.color.light[300]};
138
137
 
139
- background-color: ${theme.color.light[500]};
138
+ background-color: ${theme.color.light[300]};
140
139
  padding: 10px 8px;
141
140
  transition: border-color 0.3s, background-color 0.3s;
142
141
 
143
142
  &.focused {
144
- border: 2px solid ${theme.color.light[600]};
143
+ border: 2px solid ${theme.color.light[300]};
145
144
  }
146
145
 
147
146
 
148
147
  &.disabled {
149
- background-color: ${theme.color.light[500]};
148
+ background-color: ${theme.color.light[300]};
150
149
  }
151
150
  }
152
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/views/MessageInput/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,e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K,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;cAoBpC,gBAAgB;;;;;;;;CAQ7B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.21.2",
3
+ "version": "1.22.0-beta.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.21.2",
4
- "date": "Fri May 23 2025 14:48:27 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "1.22.0-beta.0",
4
+ "date": "Mon May 26 2025 19:46:49 GMT-0300 (Horário Padrão de Brasília)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -1,66 +1,18 @@
1
- import { IconBox, Text } from '@citric/core'
2
- import { theme, WithStyle } from '@stack-spot/portal-theme'
3
- import { styled } from 'styled-components'
1
+ import { Button, IconBox, Text } from '@citric/core'
2
+ import { WithStyle } from '@stack-spot/portal-theme'
4
3
  import { ButtonAction } from '../types'
5
- import { FadingOverflow } from './FadingOverflow'
6
4
 
7
- interface Props extends ButtonAction, WithStyle {
8
- background?: string,
9
- /**
10
- * Whether or not the vertical overflow of this button should be managed by the component {@link FadingOverflow}.
11
- * @default false
12
- */
13
- manageOverflow?: boolean,
14
- }
15
-
16
- /**
17
- * A button for quick starting a conversation.
18
- */
19
- const QuickButton = styled.button<{ $color?: string, $bg?: string }>`
20
- display: flex;
21
- flex-direction: column;
22
- padding: 12px;
23
- gap: 12px;
24
- background-color: ${theme.color.light[500]};
25
- border: none;
26
- color: inherit;
27
- flex: 1;
28
- border-radius: 4px;
29
- border: 2px solid;
30
- border-color: ${theme.color.light[500]};
31
- transition: border-color 0.3s;
32
- cursor: pointer;
33
- text-align: left;
34
-
35
- &:hover {
36
- border-color: ${theme.color.light[600]};
37
- }
38
-
39
- i {
40
- border-radius: 2px;
41
- display: flex;
42
- align-items: center;
43
- justify-content: center;
44
- background-color: ${({ $bg }) => $bg || 'transparent'};
45
- ${({ $color }) => $color
46
- ? `
47
- svg {
48
- fill: ${$color};
49
- }`
50
- : ''
51
- };
52
- }
53
- `
5
+ interface Props extends ButtonAction, WithStyle { }
54
6
 
55
- export const QuickStartButton = ({ label, onClick, background, className, color, icon, style, manageOverflow }: Props) => {
7
+ export const QuickStartButton = ({ label, onClick, className, icon, style }: Props) => {
56
8
  const content = <>
57
- {icon && <IconBox aria-hidden>{icon}</IconBox>}
58
- <Text>{label}</Text>
9
+ {icon && <IconBox color="light" aria-hidden>{icon}</IconBox>}
10
+ <Text nowrapEllipsis>{label}</Text>
59
11
  </>
60
12
 
61
13
  return (
62
- <QuickButton className={className} style={style} onClick={onClick} $color={color} $bg={background}>
63
- {manageOverflow ? <FadingOverflow sides={['top', 'bottom']} scroll="wheel">{content}</FadingOverflow> : content}
64
- </QuickButton>
14
+ <Button sx={{ maxWidth: '500px' }} colorScheme="light" size="md" className={className} style={style} onClick={onClick}>
15
+ {content}
16
+ </Button>
65
17
  )
66
18
  }
@@ -1,5 +1,6 @@
1
1
  /* Tabs to select chat and add new chats */
2
2
 
3
+ import { Button, IconBox } from '@citric/core'
3
4
  import { TimesMini } from '@citric/icons'
4
5
  import { IconButton } from '@citric/ui'
5
6
  import { listToClass, theme } from '@stack-spot/portal-theme'
@@ -188,18 +189,33 @@ export function TabManager<T, Key extends React.Key>(
188
189
  </li>
189
190
  )), [tabs, active])
190
191
 
191
- const extras = useMemo(() => buttons.map(({ label, onClick, icon, className, style }) => (
192
- <IconButton
193
- key={label}
194
- aria-label={label}
195
- title={label}
196
- className={listToClass([className, 'extra'])}
197
- style={style}
198
- onClick={onClick}
199
- >
200
- {icon}
201
- </IconButton>
202
- )), [buttons])
192
+ const extras = useMemo(() => buttons.map(({ ariaLabel, label, onClick, icon, className, style }) => (
193
+ <>
194
+ {label ?
195
+ <Button
196
+ sx={{ paddingLeft: 0, marginRight: '4px', fontWeight: '400' }}
197
+ colorScheme="light"
198
+ size="md"
199
+ key={ariaLabel}
200
+ title={label}
201
+ style={style}
202
+ onClick={onClick}>
203
+ <IconBox size="sm" sx={{ width: '32px', height: '16px', paddingInline: '8px' }} >
204
+ {icon}
205
+ </IconBox>
206
+ {label}
207
+ </Button> :
208
+ <IconButton
209
+ key={ariaLabel}
210
+ aria-label={ariaLabel}
211
+ title={label}
212
+ className={listToClass([className, 'extra'])}
213
+ style={style}
214
+ onClick={onClick}
215
+ >
216
+ {icon}
217
+ </IconButton>}
218
+ </>)), [buttons])
203
219
 
204
220
  // when a new tab is added, we should scroll to it if there are more tabs that we can show.
205
221
  useEffect(() => {
package/src/layout.css CHANGED
@@ -52,7 +52,6 @@
52
52
  .home-page {
53
53
  .title {
54
54
  margin-top: 40px;
55
- font-size: 18px;
56
55
  }
57
56
  .subtitle {
58
57
  font-size: 14px;
package/src/types.ts CHANGED
@@ -9,7 +9,8 @@ export type PropsOf<T extends React.FunctionComponent> = T extends React.Functio
9
9
  export interface ButtonAction extends WithStyle {
10
10
  icon?: React.ReactElement,
11
11
  color?: string,
12
- label: string,
12
+ label?: string,
13
+ ariaLabel?: string,
13
14
  onClick: () => any,
14
15
  }
15
16
 
@@ -1,6 +1,6 @@
1
1
  import { Box, Button, Checkbox, Flex, IconBox, Input, Label, Radio, Text } from '@citric/core'
2
- import { Cog, Copy, Dislike, DislikeFill, Like, LikeFill, TimesCircle } from '@citric/icons'
3
- import { Badge, IconButton } from '@citric/ui'
2
+ import { Check, Cog, Copy, Dislike, DislikeFill, Like, LikeFill, TimesCircle } from '@citric/icons'
3
+ import { Badge, IconButton, Tooltip } from '@citric/ui'
4
4
  import { agentClient } from '@stack-spot/portal-network'
5
5
  import { listToClass } from '@stack-spot/portal-theme'
6
6
  import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
@@ -185,7 +185,10 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
185
185
  const chat = useCurrentChat()
186
186
  const agentId = entry.agent?.id ?? ''
187
187
  const [agent] = agentClient.agentById.useStatefulQuery({ agentId, builtIn: !!entry?.agent?.builtIn }, { enabled: !!agentId })
188
+ const [copied, setCopied] = useState(false)
189
+ const [showUserButtonCopy, setShowUserButtonCopy] = useState(false)
188
190
 
191
+
189
192
  useChatScrollToBottomEffect(ref, [entry])
190
193
 
191
194
  const detailKS = useCallback(({ name, slug, documentScore, documentId }: Required<TextChatEntry>['knowledgeSources'][number]) => {
@@ -250,6 +253,12 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
250
253
  )}
251
254
  </>, [entry, isLast, runAction])
252
255
 
256
+ const handleCopy = () => {
257
+ onCopyAll(entry, chat)
258
+ setCopied(true)
259
+ setTimeout(() => setCopied(false), 2000)
260
+ }
261
+
253
262
  const renderContent = () => {
254
263
  if (entry.type === 'md') {
255
264
  return <>
@@ -277,9 +286,13 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
277
286
  widget.set('panel', 'tools')
278
287
  }
279
288
 
289
+
280
290
  return (entry.content || entry.error || !!entry.steps?.length) && (
281
- <li key={entry.messageId} className={entry.agentType} ref={ref}>
282
- <div className="chat-message" ref={chatRef} onKeyDown={handleKeyDown} tabIndex={0}>
291
+ <li key={entry.messageId} className={entry.agentType} ref={ref}
292
+ >
293
+ <div className="chat-message" ref={chatRef} onKeyDown={handleKeyDown} tabIndex={0}
294
+ onMouseEnter={entry.agentType === 'user' ? () => setShowUserButtonCopy(true) : undefined}
295
+ onMouseLeave={entry.agentType === 'user' ? () => setShowUserButtonCopy(false) : undefined}>
283
296
  <div className={`user-info ${entry.agentType}`}>{userInfo}</div>
284
297
  {beforeMessage && createElement(beforeMessage, { message })}
285
298
  {(entry.content || entry.steps) && <div className={listToClass(['message-content', entry.card && 'card', entry.type])}>
@@ -290,13 +303,14 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
290
303
 
291
304
  {!!entry.steps?.length && <StepsList steps={entry.steps} chatId={chat.id} messageId={message.id} />}
292
305
  </div>}
306
+
307
+ {entry.error && (
308
+ <div className="error">
309
+ <IconBox size="xs"><TimesCircle /></IconBox>
310
+ <Text appearance="microtext1">{entry.error}</Text>
311
+ </div>
312
+ )}
293
313
  </div>
294
- {entry.error && (
295
- <div className="error">
296
- <IconBox size="xs"><TimesCircle /></IconBox>
297
- <Text appearance="microtext1">{entry.error}</Text>
298
- </div>
299
- )}
300
314
  {afterMessage && createElement(afterMessage, { message })}
301
315
  {!!entry.tools?.length && <StackedBadge
302
316
  aria-label={t.openToolsPanel}
@@ -319,12 +333,37 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
319
333
  </li>
320
334
  ))}</ul>
321
335
  </div>}
322
- {shouldShowFooter && <div className="message-footer">
336
+
337
+ {shouldShowFooter && <div className="message-footer"
338
+ onMouseEnter={entry.agentType === 'user' ? () => setShowUserButtonCopy(true) : undefined}
339
+ onMouseLeave={entry.agentType === 'user' ? () => setShowUserButtonCopy(false) : undefined}>
340
+
323
341
  {entry.agentType === 'bot' && !entry.error && <div className="message-actions">
342
+
324
343
  {entry.type === 'md' && (
325
- <IconButton appearance="square" color="light" title={t.copy} aria-label={t.copy} onClick={() => onCopyAll(entry, chat)}>
326
- <Copy />
327
- </IconButton>
344
+ copied ? (
345
+ <Tooltip text={t.copied} position={'right'}>
346
+ <IconButton
347
+ appearance="square"
348
+ colorBg="light"
349
+ title={t.copied}
350
+ aria-label={t.copied}
351
+ onClick={handleCopy}
352
+ >
353
+ <Check />
354
+ </IconButton>
355
+ </Tooltip>
356
+ ) : (
357
+ <IconButton
358
+ appearance="square"
359
+ color="light"
360
+ title={t.copy}
361
+ aria-label={t.copy}
362
+ onClick={handleCopy}
363
+ >
364
+ <Copy />
365
+ </IconButton>
366
+ )
328
367
  )}
329
368
  {entry.messageId && (
330
369
  <>
@@ -337,6 +376,40 @@ export const ChatMessage = ({ message, isLast, beforeMessage, afterMessage }: Pr
337
376
  </>
338
377
  )}
339
378
  </div>}
379
+
380
+ {entry.agentType === 'user' && (
381
+ <div className="message-actions">
382
+ {copied ? (
383
+ <Tooltip text={t.copied} position={'left'}>
384
+ <IconButton
385
+ appearance="square"
386
+ colorBg="light"
387
+ title={t.copied}
388
+ aria-label={t.copied}
389
+ size="sm"
390
+ >
391
+ <Check />
392
+ </IconButton>
393
+ </Tooltip>
394
+ ) : (
395
+ showUserButtonCopy && (
396
+ <div className="action-bar">
397
+ <IconButton
398
+ appearance="square"
399
+ color="light"
400
+ title={t.copy}
401
+ aria-label={t.copy}
402
+ onClick={handleCopy}
403
+ size="sm"
404
+ >
405
+ <Copy className="copy-btn"/>
406
+ </IconButton>
407
+ </div>
408
+ )
409
+ )}
410
+ </div>
411
+ )}
412
+
340
413
  <Text as="label" appearance="microtext1" className="chat-date">
341
414
  {dateFormatter.formatForChatMessage(date)}
342
415
  </Text>
@@ -352,6 +425,7 @@ const dictionary = {
352
425
  dislike: 'Dislike',
353
426
  tools: 'Tools',
354
427
  openToolsPanel: 'Open the tools panel to see more details.',
428
+ copied: 'Copied',
355
429
  },
356
430
  pt: {
357
431
  copy: 'Copiar',
@@ -359,5 +433,6 @@ const dictionary = {
359
433
  dislike: 'Não gostei',
360
434
  tools: 'Ferramentas',
361
435
  openToolsPanel: 'Abrir o painel de ferramentas para ver mais detalhes.',
436
+ copied: 'Copiado',
362
437
  },
363
438
  } satisfies Dictionary
@@ -61,11 +61,14 @@ export const ChatList: IStyledComponentBase<
61
61
  .message-footer {
62
62
  display: flex;
63
63
  flex-direction: row;
64
+ align-items: center;
65
+ gap: 8px;
64
66
 
65
67
  .message-actions {
66
68
  display: flex;
67
69
  flex-direction: row;
68
70
  gap: 4px;
71
+ height: 26px;
69
72
  }
70
73
 
71
74
  .chat-date {
@@ -41,13 +41,14 @@ export const ChatTabSelection = () => {
41
41
  () => {
42
42
  const actions: ButtonAction[] = [{
43
43
  icon: <Plus />,
44
- label: t.newChat,
44
+ ariaLabel: t.newChat,
45
45
  onClick: create,
46
46
  }]
47
47
  if (chatHistory) {
48
48
  actions.push({
49
49
  icon: <Clock />,
50
- label: t.openHistory,
50
+ label: t.history,
51
+ ariaLabel: t.openHistory,
51
52
  className: 'test',
52
53
  style: { marginLeft: 'auto' },
53
54
  onClick: () => widget.set('panel', 'history'),
@@ -71,10 +72,12 @@ export const ChatTabSelection = () => {
71
72
 
72
73
  const dictionary = {
73
74
  en: {
75
+ history: 'History',
74
76
  openHistory: 'Open chat history',
75
77
  newChat: 'New chat',
76
78
  },
77
79
  pt: {
80
+ history: 'Histórico',
78
81
  openHistory: 'Abrir histórico da conversa',
79
82
  newChat: 'Novo chat',
80
83
  },
@@ -1,6 +1,5 @@
1
- import { FaceSmile, KnowledgeSource, QuickCommand } from '@citric/icons'
2
- import { MiniLogo } from '@stack-spot/portal-components/svg'
3
- import { theme } from '@stack-spot/portal-theme'
1
+ import { Text } from '@citric/core'
2
+ import { FaceSmile, KnowledgeSource, QuickCommand, StackSpot } from '@citric/icons'
4
3
  import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
5
4
  import { QuickStartButton } from '../../components/QuickStartButton'
6
5
  import { useCurrentChat } from '../../context/hooks'
@@ -21,35 +20,28 @@ export const BuiltInAgent = ({ username }: HomeProps) => {
21
20
 
22
21
  return (
23
22
  <HomeBox className="home-page">
24
- <h2 className="title">{t.hello}, {username}</h2>
25
- <h3 className="subtitle">{t.subtitle}</h3>
23
+ <Text appearance="h2" className="title">{t.hello}, {username}</Text>
24
+ <Text appearance="h3" className="subtitle">{t.subtitle}</Text>
26
25
  <div className="shortcuts">
27
26
  <QuickStartButton
28
27
  label={t['question.meta']}
29
28
  onClick={() => send(t['question.meta'])}
30
- icon={<MiniLogo />}
31
- background={theme.color.orange[50]}
29
+ icon={<StackSpot />}
32
30
  />
33
31
  <QuickStartButton
34
32
  label={t['question.ks']}
35
33
  onClick={() => send(t['question.ks'])}
36
34
  icon={<KnowledgeSource />}
37
- background={theme.color.cyan[50]}
38
- color={theme.color.cyan[600]}
39
35
  />
40
36
  <QuickStartButton
41
37
  label={t['question.agents']}
42
38
  onClick={() => send(t['question.agents'])}
43
39
  icon={<FaceSmile />}
44
- background={theme.color.pink[50]}
45
- color={theme.color.pink[600]}
46
40
  />
47
41
  <QuickStartButton
48
42
  label={t['question.qc']}
49
43
  onClick={() => send(t['question.qc'])}
50
44
  icon={<QuickCommand />}
51
- background={theme.color.purple[50]}
52
- color={theme.color.purple[600]}
53
45
  />
54
46
  </div>
55
47
  </HomeBox>
@@ -59,7 +51,7 @@ export const BuiltInAgent = ({ username }: HomeProps) => {
59
51
  const dictionary = {
60
52
  en: {
61
53
  hello: 'Hello',
62
- subtitle: "Let's innovate and streamline your coding journey together. Want to lead the change? Just ask!",
54
+ subtitle: 'What really matters takes time, let us help you with the rest.',
63
55
  'question.meta': 'What is StackSpot AI?',
64
56
  'question.ks': 'What are Knowledge Sources?',
65
57
  'question.agents': 'How do Agents work?',
@@ -67,7 +59,7 @@ const dictionary = {
67
59
  },
68
60
  pt: {
69
61
  hello: 'Olá',
70
- subtitle: 'Vamos inovar e simplificar sua jornada de programação juntos. Quer liderar a mudança? É perguntar!',
62
+ subtitle: 'O que realmente importa leva tempo, deixe que a gente cuide do resto.',
71
63
  'question.meta': 'O que é a StackSpot AI?',
72
64
  'question.ks': 'O que são Knowledge Sources?',
73
65
  'question.agents': 'Como funcionam os agentes?',
@@ -1,7 +1,6 @@
1
1
  import { IconBox, Text } from '@citric/core'
2
2
  import { Agent } from '@citric/icons'
3
3
  import { agentClient } from '@stack-spot/portal-network'
4
- import { theme } from '@stack-spot/portal-theme'
5
4
  import { useMemo } from 'react'
6
5
  import { QuickStartButton } from '../../components/QuickStartButton'
7
6
  import { useCurrentChat, useCurrentChatState } from '../../context/hooks'
@@ -20,8 +19,6 @@ export const CustomAgent = () => {
20
19
  key={index}
21
20
  label={prompt}
22
21
  onClick={() => send(prompt)}
23
- background={theme.color.light[500]}
24
- manageOverflow
25
22
  />
26
23
  )), [agent?.suggested_prompts])
27
24
 
@@ -18,10 +18,10 @@ const AgentList = styled.ul`
18
18
  li {
19
19
  flex-shrink: 0;
20
20
  &:first-child {
21
- margin-left: auto;
21
+ /* margin-left: auto; */
22
22
  }
23
23
  &:last-child {
24
- margin-right: auto;
24
+ /* margin-right: auto; */
25
25
  }
26
26
  }
27
27
  `