aov-agent 1.0.1 → 1.0.6

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 (34) hide show
  1. package/README.md +313 -250
  2. package/dist/agent-ui/components/Assistant/AgentButton/AgentButton.js +5 -5
  3. package/dist/agent-ui/components/Assistant/AgentButton/AgentButton.scss +40 -40
  4. package/dist/agent-ui/components/Assistant/Assistant.js +29 -34
  5. package/dist/agent-ui/components/Assistant/Assistant.scss +3 -3
  6. package/dist/agent-ui/components/Assistant/AssistantWidget/AssistantWidget.js +42 -36
  7. package/dist/agent-ui/components/Assistant/AssistantWidget/AssistantWidget.scss +205 -211
  8. package/dist/agent-ui/components/Assistant/AssistantWidget/components/ListChat.js +8 -8
  9. package/dist/agent-ui/components/Assistant/Markdown/MarkdownText.js +21 -21
  10. package/dist/agent-ui/components/Assistant/Markdown/MarkdownText.scss +222 -222
  11. package/dist/agent-ui/components/Assistant/Markdown/MathRenderer.js +29 -23
  12. package/dist/agent-ui/components/Assistant/Suggestions/Suggestions.scss +22 -22
  13. package/dist/agent-ui/components/Assistant/ThreadProvider.js +20 -21
  14. package/dist/agent-ui/components/Assistant/ToolResult/CardTool.js +58 -1
  15. package/dist/agent-ui/components/Assistant/ToolResult/CardTool.scss +12 -0
  16. package/dist/agent-ui/components/Assistant/ToolResult/ToolResult.js +31 -7
  17. package/dist/agent-ui/components/CopyToClipboard/CopyToClipboard.js +43 -0
  18. package/dist/agent-ui/components/CopyToClipboard/index.js +2 -0
  19. package/dist/agent-ui/components/ResizableModal/ResizableModal.js +20 -20
  20. package/dist/agent-ui/components/ResizableModal/ResizableModal.scss +117 -117
  21. package/dist/agent-ui/const/appName.js +6 -0
  22. package/dist/agent-ui/const/option.js +9 -0
  23. package/dist/agent-ui/const/toolName.js +6 -0
  24. package/dist/agent-ui/contexts/AgentContext.js +26 -11
  25. package/dist/agent-ui/contexts/SuggestionsContext.js +11 -11
  26. package/dist/agent-ui/contexts/ThreadContext.js +3 -3
  27. package/dist/agent-ui/helpers/copyToClipboard.js +33 -0
  28. package/dist/agent-ui/helpers/formatQuery.js +15 -0
  29. package/dist/agent-ui/hooks/useFetchApi.js +14 -14
  30. package/dist/agent-ui/hooks/useStreamApi.js +5 -5
  31. package/dist/agent-ui/resources/assistant-avatar.svg +51 -0
  32. package/dist/agent-ui/services/errorService.js +11 -11
  33. package/dist/agent-ui/utils/api.js +14 -14
  34. package/package.json +24 -6
@@ -7,13 +7,10 @@ import ThreadProvider from "./ThreadProvider.js";
7
7
  import AssistantWidget from "./AssistantWidget/AssistantWidget.js";
8
8
  import ResizableModal from "../ResizableModal/ResizableModal.js";
9
9
  import "./Assistant.scss";
10
- var AssistantCore = function AssistantCore(_ref) {
11
- var shop = _ref.shop,
12
- apiUrl = _ref.apiUrl;
10
+ var AssistantCore = function AssistantCore() {
13
11
  var _useContext = useContext(AgentContext),
14
12
  openAgent = _useContext.openAgent,
15
13
  setOpenAgent = _useContext.setOpenAgent;
16
- if (!(shop !== null && shop !== void 0 && shop.showAgentChat)) return null;
17
14
  return /*#__PURE__*/React.createElement("div", {
18
15
  className: "aov-assistant-core"
19
16
  }, /*#__PURE__*/React.createElement(AgentButton, {
@@ -26,48 +23,46 @@ var AssistantCore = function AssistantCore(_ref) {
26
23
  return setOpenAgent(false);
27
24
  },
28
25
  accessibilityLabel: "Mavi"
29
- }, /*#__PURE__*/React.createElement(SuggestionsProvider, null, /*#__PURE__*/React.createElement(ThreadProvider, {
30
- shop: shop,
31
- apiUrl: apiUrl
32
- }, /*#__PURE__*/React.createElement(AssistantWidget, {
33
- shop: shop,
26
+ }, /*#__PURE__*/React.createElement(SuggestionsProvider, null, /*#__PURE__*/React.createElement(ThreadProvider, null, /*#__PURE__*/React.createElement(AssistantWidget, {
34
27
  onClose: function onClose() {
35
28
  return setOpenAgent(false);
36
29
  }
37
30
  })))));
38
31
  };
39
- AssistantCore.propTypes = {
40
- shop: PropTypes.shape({
41
- showAgentChat: PropTypes.bool,
42
- id: PropTypes.string
43
- }),
44
- apiUrl: PropTypes.string
45
- };
46
32
 
47
- /**
48
- * Assistant - Main AI assistant component with chat interface
49
- *
50
- * @param {Object} shop - Shop data object
51
- * @param {boolean} shop.showAgentChat - Whether to show the agent chat
52
- * @param {string} shop.id - Shop identifier
53
- * @param {string} apiUrl - API endpoint URL for chat
54
- * @returns {React.ReactElement} Assistant component
33
+ /**
34
+ * Assistant - Main AI assistant component with chat interface
35
+ *
36
+ * @param {Object} shop - Shop data object
37
+ * @param {boolean} shop.showAgentChat - Whether to show the agent chat
38
+ * @param {string} shop.id - Shop identifier
39
+ * @param {string} apiUrl - API endpoint URL for chat
40
+ * @param {string} appName - Application name
41
+ * @param {Object} customToolRenderers - Custom renderers for tools
42
+ * @returns {React.ReactElement} Assistant component
55
43
  */
56
- export var Assistant = function Assistant(_ref2) {
57
- var shop = _ref2.shop,
58
- apiUrl = _ref2.apiUrl;
59
- return /*#__PURE__*/React.createElement(AgentProvider, null, /*#__PURE__*/React.createElement(AssistantCore, {
60
- shop: shop || {
61
- showAgentChat: true
62
- },
63
- apiUrl: apiUrl
64
- }));
44
+ export var Assistant = function Assistant(_ref) {
45
+ var shop = _ref.shop,
46
+ apiUrl = _ref.apiUrl,
47
+ appName = _ref.appName,
48
+ customToolRenderers = _ref.customToolRenderers;
49
+ if (!shop.showAgentChat) return null;
50
+ return /*#__PURE__*/React.createElement(AgentProvider, {
51
+ contextValue: {
52
+ appName: appName,
53
+ shop: shop,
54
+ apiUrl: apiUrl,
55
+ customToolRenderers: customToolRenderers
56
+ }
57
+ }, /*#__PURE__*/React.createElement(AssistantCore, null));
65
58
  };
66
59
  Assistant.propTypes = {
67
60
  shop: PropTypes.shape({
68
61
  showAgentChat: PropTypes.bool,
69
62
  id: PropTypes.string
70
63
  }),
71
- apiUrl: PropTypes.string
64
+ apiUrl: PropTypes.string,
65
+ appName: PropTypes.string,
66
+ customToolRenderers: PropTypes.object
72
67
  };
73
68
  export default Assistant;
@@ -1,3 +1,3 @@
1
- .aov-assistant-core {
2
- position: relative;
3
- }
1
+ .aov-assistant-core {
2
+ position: relative;
3
+ }
@@ -1,14 +1,17 @@
1
+ var _excluded = ["shop"];
1
2
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
4
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
5
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
6
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
7
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
8
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
9
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
10
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
7
11
  import React, { useCallback, useState, useContext, useMemo } from "react";
8
12
  import PropTypes from "prop-types";
9
- import { Box, Button, InlineStack, Popover, Spinner } from "@shopify/polaris";
13
+ import { Box, Button, InlineStack, Popover, Spinner, Text } from "@shopify/polaris";
10
14
  import { ComposeIcon, XIcon } from "@shopify/polaris-icons";
11
- import { connect } from "react-redux";
12
15
  import { ThreadContext } from "../../../contexts/ThreadContext.js";
13
16
  import { Composer, Thread, ThreadWelcome } from "@assistant-ui/react-ui";
14
17
  import { MarkdownText } from "../Markdown/MarkdownText.js";
@@ -19,6 +22,9 @@ import "@assistant-ui/react-markdown/styles/dot.css";
19
22
  import ToolResult from "../ToolResult/ToolResult.js";
20
23
  import ListChat from "./components/ListChat.js";
21
24
  import "./AssistantWidget.scss";
25
+ import Avatar from "../../../resources/assistant-avatar.svg";
26
+ import { welcomeSuggestions } from "../../../const/option";
27
+ import { AgentContext } from "../../../contexts/AgentContext.js";
22
28
  var AssistantText = /*#__PURE__*/React.memo(function AssistantText(props) {
23
29
  try {
24
30
  return /*#__PURE__*/React.createElement("div", {
@@ -31,27 +37,33 @@ var AssistantText = /*#__PURE__*/React.memo(function AssistantText(props) {
31
37
  }, props.children);
32
38
  }
33
39
  });
34
- var AssistantTool = /*#__PURE__*/React.memo(function AssistantTool(props) {
40
+ var AssistantTool = /*#__PURE__*/React.memo(function AssistantTool(_ref) {
41
+ var shop = _ref.shop,
42
+ props = _objectWithoutProperties(_ref, _excluded);
35
43
  try {
36
- return /*#__PURE__*/React.createElement(ToolResult, props);
44
+ return /*#__PURE__*/React.createElement(ToolResult, _extends({}, props, {
45
+ shop: shop
46
+ }));
37
47
  } catch (err) {
38
48
  console.error("Error rendering tool result:", err);
39
49
  return null;
40
50
  }
41
51
  });
42
- var AssistantWidget = function AssistantWidget(_ref) {
43
- var shop = _ref.shop,
44
- onClose = _ref.onClose;
45
- var _useContext = useContext(ThreadContext),
46
- threads = _useContext.threads,
47
- loadingThreads = _useContext.loadingThreads,
48
- getThread = _useContext.getThread,
49
- loadingMessages = _useContext.loadingMessages,
50
- thread = _useContext.thread,
51
- _setThread = _useContext.setThread,
52
- resetThread = _useContext.resetThread,
53
- updateThread = _useContext.updateThread,
54
- deleteThread = _useContext.deleteThread;
52
+ var AssistantWidget = function AssistantWidget(_ref2) {
53
+ var onClose = _ref2.onClose;
54
+ var _useContext = useContext(AgentContext),
55
+ appName = _useContext.appName,
56
+ shop = _useContext.shop;
57
+ var _useContext2 = useContext(ThreadContext),
58
+ threads = _useContext2.threads,
59
+ loadingThreads = _useContext2.loadingThreads,
60
+ getThread = _useContext2.getThread,
61
+ loadingMessages = _useContext2.loadingMessages,
62
+ thread = _useContext2.thread,
63
+ _setThread = _useContext2.setThread,
64
+ resetThread = _useContext2.resetThread,
65
+ updateThread = _useContext2.updateThread,
66
+ deleteThread = _useContext2.deleteThread;
55
67
  var _useThreadAutoScrollF = useThreadAutoScrollFix(),
56
68
  autoScroll = _useThreadAutoScrollF.autoScroll,
57
69
  handleScroll = _useThreadAutoScrollF.handleScroll;
@@ -73,19 +85,24 @@ var AssistantWidget = function AssistantWidget(_ref) {
73
85
  }, /*#__PURE__*/React.createElement(Box, {
74
86
  width: "fit-content",
75
87
  minWidth: "60px"
76
- }, thread && "title" in thread ? thread.title : "New chat")));
88
+ }, /*#__PURE__*/React.createElement(Text, {
89
+ truncate: true
90
+ }, thread && "title" in thread ? thread.title : "New chat"))));
77
91
  var assistantComponents = useMemo(function () {
78
92
  return {
79
93
  Text: AssistantText,
80
- ToolFallback: AssistantTool
94
+ ToolFallback: function ToolFallback(props) {
95
+ return /*#__PURE__*/React.createElement(AssistantTool, _extends({
96
+ shop: shop
97
+ }, props));
98
+ }
81
99
  };
82
- }, []);
83
- var welcomeSuggestions = ["How do I create my first Buy X Get Y campaign?", "How do I set a spending threshold for free gifts?", "How do I customize the Pop-up for my campaign?", "How do I check campaign performance and reports?"];
100
+ }, [shop]);
84
101
  return /*#__PURE__*/React.createElement("div", {
85
102
  className: "AOV-Sidekick__Container"
86
103
  }, /*#__PURE__*/React.createElement(Box, {
87
104
  paddingBlockStart: "300",
88
- paddingBlockEnd: "050",
105
+ paddingBlockEnd: "200",
89
106
  paddingInlineStart: "200",
90
107
  paddingInlineEnd: "300"
91
108
  }, /*#__PURE__*/React.createElement(InlineStack, {
@@ -136,8 +153,7 @@ var AssistantWidget = function AssistantWidget(_ref) {
136
153
  message: "Hi! I'm Mavi, AOV Free Gift Assistant. I'm here to help you."
137
154
  },
138
155
  assistantAvatar: {
139
- src: "",
140
- // TODO: Add avatar path
156
+ src: Avatar,
141
157
  alt: "Mavi"
142
158
  },
143
159
  assistantMessage: {
@@ -159,7 +175,7 @@ var AssistantWidget = function AssistantWidget(_ref) {
159
175
  size: "large"
160
176
  }), /*#__PURE__*/React.createElement(ThreadWelcome.Message, null)), /*#__PURE__*/React.createElement("div", {
161
177
  className: "aui-thread-welcome-suggestion-container"
162
- }, welcomeSuggestions.map(function (prompt, index) {
178
+ }, welcomeSuggestions(appName).map(function (prompt, index) {
163
179
  return /*#__PURE__*/React.createElement(ThreadWelcome.Suggestion, {
164
180
  key: index,
165
181
  suggestion: {
@@ -172,16 +188,6 @@ var AssistantWidget = function AssistantWidget(_ref) {
172
188
  }), /*#__PURE__*/React.createElement(Composer.Action, null)))));
173
189
  };
174
190
  AssistantWidget.propTypes = {
175
- shop: PropTypes.shape({
176
- id: PropTypes.string,
177
- showAgentChat: PropTypes.bool
178
- }),
179
191
  onClose: PropTypes.func.isRequired
180
192
  };
181
- var mapStateToProps = function mapStateToProps(state) {
182
- var _state$shop;
183
- return {
184
- shop: (_state$shop = state.shop) === null || _state$shop === void 0 ? void 0 : _state$shop.activeShop
185
- };
186
- };
187
- export default connect(mapStateToProps)(AssistantWidget);
193
+ export default AssistantWidget;
@@ -1,211 +1,205 @@
1
- .AOV-Sidekick__Container {
2
- position: relative;
3
- background-color: #fff;
4
- height: 100%;
5
- padding-bottom: 5px;
6
-
7
- .Polaris-Spinner--sizeSmall {
8
- height: 20px;
9
- }
10
- }
11
-
12
- .AOV-Sidekick__Loading {
13
- display: flex;
14
- justify-content: center;
15
- align-items: center;
16
- height: 100%;
17
- }
18
-
19
- .assistant-markdown-text {
20
- // Container for markdown content rendering
21
- }
22
-
23
- .aui-thread-root {
24
- height: 100%;
25
- font-family: Arial, Helvetica, sans-serif;
26
- display: flex;
27
- flex-direction: column;
28
- padding-bottom: 20px;
29
- button {
30
- cursor: pointer;
31
- }
32
- .aui-thread-message-content {
33
- font-size: 14px;
34
- }
35
- .aui-avatar-root img {
36
- width: 32px;
37
- height: 32px;
38
- max-width: 32px;
39
- max-height: 32px;
40
- border-radius: 16px;
41
- }
42
- .aui-thread-viewport {
43
- flex: 1;
44
- overflow-y: auto;
45
- scrollbar-width: thin;
46
- padding: 1rem 0;
47
- display: flex;
48
- flex-direction: column;
49
- gap: 6px;
50
- .aui-thread-welcome-root {
51
- text-align: center;
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- gap: 8rem;
56
- justify-content: center;
57
- height: 100%;
58
- padding: 1rem;
59
- .aui-thread-welcome-center {
60
- display: flex;
61
- flex-direction: column;
62
- align-items: center;
63
- gap: 8px;
64
- }
65
- .aui-thread-welcome-message {
66
- font-weight: 500;
67
- }
68
- }
69
- .aui-thread-welcome-suggestion-container {
70
- display: grid;
71
- grid-template-columns: 1fr 1fr;
72
- gap: 0.75rem;
73
- width: 100%;
74
- max-width: 500px;
75
- margin: 0 auto;
76
- .aui-thread-welcome-suggestion {
77
- font-family: Arial, Helvetica, sans-serif !important;
78
- background-color: transparent;
79
- border: 1px solid #e0e0e0;
80
- border-radius: 10px;
81
- padding: 6px 12px;
82
- font-size: 12px;
83
- cursor: pointer;
84
- font-weight: 500;
85
- }
86
- }
87
- .aui-user-message-root {
88
- padding: 1px 12px;
89
- display: flex;
90
- justify-content: flex-end;
91
- margin-left: 2rem;
92
- .aui-user-message-content {
93
- width: fit-content;
94
- padding: 4px 12px;
95
- background-color: rgb(241, 241, 241);
96
- border-radius: 10px;
97
- p {
98
- word-break: break-word;
99
- }
100
- }
101
- }
102
- .aui-assistant-message-root {
103
- display: flex;
104
- flex-wrap: wrap;
105
- gap: 6px;
106
- padding: 1px 12px;
107
- margin-right: 6px;
108
- .aui-assistant-message-content {
109
- width: calc(100% - 40px);
110
- max-width: 100%;
111
- }
112
- .aui-assistant-action-bar-root {
113
- height: 20px;
114
- left: 0px;
115
- &[data-floating='true'] {
116
- display: none;
117
- }
118
- }
119
- .aui-branch-picker-root {
120
- display: flex;
121
- align-items: center;
122
- }
123
- }
124
- img {
125
- display: block;
126
- width: 100%;
127
- height: auto;
128
- object-fit: contain;
129
- }
130
- }
131
- .aui-thread-viewport-footer {
132
- height: fit-content;
133
- min-height: 85px;
134
- display: flex;
135
- flex-direction: column;
136
- justify-content: end;
137
- width: 100%;
138
- padding: 12px;
139
- background-color: #fff;
140
- gap: 8px;
141
- .aui-composer-root {
142
- display: flex;
143
- align-items: center;
144
- gap: 8px;
145
- padding: 4px 8px;
146
- border: 1px solid #e0e0e0;
147
- border-radius: 16px;
148
- background-color: #ffffff;
149
- .aui-composer-input {
150
- width: 100%;
151
- font-family: Arial, Helvetica, sans-serif;
152
- resize: none;
153
- border: none;
154
- outline: none;
155
- background-color: transparent;
156
- font-size: 12px;
157
- padding-left: 6px;
158
- scrollbar-width: none;
159
- max-height: 200px;
160
- }
161
- }
162
- }
163
- .aui-button {
164
- border: none;
165
- height: 24px;
166
- background-color: transparent;
167
- svg {
168
- width: 16px;
169
- height: 16px;
170
- }
171
- span {
172
- display: none;
173
- }
174
- }
175
- }
176
-
177
- .Polaris-Scrollable {
178
- scrollbar-width: thin;
179
- li {
180
- .AOV-Sidekick__ChatItem {
181
- width: 100%;
182
- display: flex;
183
- align-items: center;
184
- flex-wrap: nowrap;
185
- position: relative;
186
- gap: 4px;
187
- > span {
188
- width: 100%;
189
- }
190
- .AOV-Sidekick__ChatAction {
191
- display: none;
192
- position: absolute;
193
- right: 0;
194
- }
195
- > div:first-child {
196
- width: calc(100% - 50px);
197
- }
198
- }
199
- &:hover {
200
- .AOV-Sidekick__ChatItem {
201
- > span {
202
- width: calc(100% - 60px);
203
- }
204
- .AOV-Sidekick__ChatAction {
205
- display: flex;
206
- }
207
- }
208
- }
209
- }
210
- }
211
-
1
+ .AOV-Sidekick__Container {
2
+ position: relative;
3
+ background-color: #fff;
4
+ height: 100%;
5
+ padding-bottom: 5px;
6
+
7
+ .Polaris-Spinner--sizeSmall {
8
+ height: 20px;
9
+ }
10
+ }
11
+
12
+ .AOV-Sidekick__Loading {
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+ height: 100%;
17
+ }
18
+
19
+ .aui-thread-root {
20
+ height: 100%;
21
+ font-family: Arial, Helvetica, sans-serif;
22
+ display: flex;
23
+ flex-direction: column;
24
+ padding-bottom: 20px;
25
+ button {
26
+ cursor: pointer;
27
+ }
28
+ .aui-thread-message-content {
29
+ font-size: 14px;
30
+ }
31
+ .aui-avatar-root img {
32
+ width: 32px;
33
+ height: 32px;
34
+ max-width: 32px;
35
+ max-height: 32px;
36
+ border-radius: 16px;
37
+ }
38
+ .aui-thread-viewport {
39
+ flex: 1;
40
+ overflow-y: auto;
41
+ scrollbar-width: thin;
42
+ padding: 1rem 0;
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: 6px;
46
+ .aui-thread-welcome-root {
47
+ text-align: center;
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ gap: 8rem;
52
+ justify-content: center;
53
+ height: 100%;
54
+ padding: 1rem;
55
+ .aui-thread-welcome-center {
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ gap: 8px;
60
+ }
61
+ .aui-thread-welcome-message {
62
+ font-weight: 500;
63
+ }
64
+ }
65
+ .aui-thread-welcome-suggestion-container {
66
+ display: grid;
67
+ grid-template-columns: 1fr 1fr;
68
+ gap: 0.75rem;
69
+ width: 100%;
70
+ max-width: 500px;
71
+ margin: 0 auto;
72
+ .aui-thread-welcome-suggestion {
73
+ font-family: Arial, Helvetica, sans-serif !important;
74
+ background-color: transparent;
75
+ border: 1px solid #e0e0e0;
76
+ border-radius: 10px;
77
+ padding: 6px 12px;
78
+ font-size: 12px;
79
+ cursor: pointer;
80
+ font-weight: 500;
81
+ }
82
+ }
83
+ .aui-user-message-root {
84
+ padding: 1px 12px;
85
+ display: flex;
86
+ justify-content: flex-end;
87
+ margin-left: 2rem;
88
+ .aui-user-message-content {
89
+ width: fit-content;
90
+ padding: 4px 12px;
91
+ background-color: rgb(241, 241, 241);
92
+ border-radius: 10px;
93
+ p {
94
+ word-break: break-word;
95
+ }
96
+ }
97
+ }
98
+ .aui-assistant-message-root {
99
+ display: flex;
100
+ flex-wrap: wrap;
101
+ gap: 6px;
102
+ padding: 1px 12px;
103
+ margin-right: 6px;
104
+ .aui-assistant-message-content {
105
+ width: calc(100% - 40px);
106
+ max-width: 100%;
107
+ }
108
+ .aui-assistant-action-bar-root {
109
+ height: 20px;
110
+ left: 0px;
111
+ &[data-floating="true"] {
112
+ display: none;
113
+ }
114
+ }
115
+ .aui-branch-picker-root {
116
+ display: flex;
117
+ align-items: center;
118
+ }
119
+ }
120
+ img {
121
+ display: block;
122
+ width: 100%;
123
+ height: auto;
124
+ object-fit: contain;
125
+ }
126
+ }
127
+ .aui-thread-viewport-footer {
128
+ height: fit-content;
129
+ min-height: 85px;
130
+ display: flex;
131
+ flex-direction: column;
132
+ justify-content: end;
133
+ width: 100%;
134
+ padding: 12px;
135
+ background-color: #fff;
136
+ gap: 8px;
137
+ margin-bottom: 6px;
138
+ .aui-composer-root {
139
+ display: flex;
140
+ align-items: center;
141
+ gap: 8px;
142
+ padding: 4px 8px;
143
+ border: 1px solid #e0e0e0;
144
+ border-radius: 16px;
145
+ background-color: #ffffff;
146
+ .aui-composer-input {
147
+ width: 100%;
148
+ font-family: Arial, Helvetica, sans-serif;
149
+ resize: none;
150
+ border: none;
151
+ outline: none;
152
+ background-color: transparent;
153
+ font-size: 12px;
154
+ padding-left: 6px;
155
+ scrollbar-width: none;
156
+ max-height: 200px;
157
+ }
158
+ }
159
+ }
160
+ .aui-button {
161
+ border: none;
162
+ height: 24px;
163
+ background-color: transparent;
164
+ svg {
165
+ width: 16px;
166
+ height: 16px;
167
+ }
168
+ span {
169
+ display: none;
170
+ }
171
+ }
172
+ }
173
+
174
+ .Polaris-Scrollable {
175
+ scrollbar-width: thin;
176
+ li {
177
+ .AOV-Sidekick__ChatItem {
178
+ width: 100%;
179
+ display: flex;
180
+ align-items: center;
181
+ flex-wrap: nowrap;
182
+ position: relative;
183
+ gap: 4px;
184
+ > span {
185
+ width: 100%;
186
+ }
187
+ .AOV-Sidekick__ChatAction {
188
+ display: none;
189
+ position: absolute;
190
+ right: 0;
191
+ }
192
+ > div:first-child {
193
+ width: calc(100% - 50px);
194
+ }
195
+ &:hover {
196
+ > span {
197
+ width: calc(100% - 60px);
198
+ }
199
+ .AOV-Sidekick__ChatAction {
200
+ display: flex;
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }