aov-agent 1.0.21 → 1.0.23

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.
@@ -118,6 +118,7 @@
118
118
  padding: 10px;
119
119
  border-radius: 50%;
120
120
  background: linear-gradient(135deg, #d4f0f2 0%, #e8f4f5 100%);
121
+ z-index: 1000;
121
122
 
122
123
  .aov-agent-button__icon {
123
124
  width: 32px;
@@ -10,14 +10,15 @@ import "./Assistant.scss";
10
10
  var AssistantCore = function AssistantCore() {
11
11
  var _useContext = useContext(AgentContext),
12
12
  openAgent = _useContext.openAgent,
13
- setOpenAgent = _useContext.setOpenAgent;
13
+ setOpenAgent = _useContext.setOpenAgent,
14
+ isCompact = _useContext.isCompact;
14
15
  return /*#__PURE__*/React.createElement("div", {
15
16
  className: "aov-assistant-core"
16
17
  }, /*#__PURE__*/React.createElement(AgentButton, {
17
18
  onClick: function onClick() {
18
19
  return setOpenAgent(!openAgent);
19
20
  },
20
- isOpen: openAgent
21
+ isOpen: openAgent || isCompact
21
22
  }), /*#__PURE__*/React.createElement(ResizableModal, {
22
23
  open: openAgent,
23
24
  onClose: function onClose() {
@@ -40,19 +41,22 @@ var AssistantCore = function AssistantCore() {
40
41
  * @param {string} apiUrl - API endpoint URL for chat
41
42
  * @param {string} appName - Application name
42
43
  * @param {Object} customToolRenderers - Custom renderers for tools
44
+ * @param {boolean} isCompact - Whether to show the agent chat in compact mode
43
45
  * @returns {React.ReactElement} Assistant component
44
46
  */
45
47
  export var Assistant = function Assistant(_ref) {
46
48
  var shop = _ref.shop,
47
49
  apiUrl = _ref.apiUrl,
48
50
  appName = _ref.appName,
49
- customToolRenderers = _ref.customToolRenderers;
51
+ customToolRenderers = _ref.customToolRenderers,
52
+ isCompact = _ref.isCompact;
50
53
  return /*#__PURE__*/React.createElement(AgentProvider, {
51
54
  contextValue: {
52
55
  appName: appName,
53
56
  shop: shop,
54
57
  apiUrl: apiUrl,
55
- customToolRenderers: customToolRenderers
58
+ customToolRenderers: customToolRenderers,
59
+ isCompact: isCompact
56
60
  }
57
61
  }, /*#__PURE__*/React.createElement(AssistantCore, null));
58
62
  };
@@ -63,6 +67,7 @@ Assistant.propTypes = {
63
67
  }),
64
68
  apiUrl: PropTypes.string,
65
69
  appName: PropTypes.string,
66
- customToolRenderers: PropTypes.object
70
+ customToolRenderers: PropTypes.object,
71
+ isCompact: PropTypes.bool
67
72
  };
68
73
  export default Assistant;
@@ -11,7 +11,7 @@ import { Popover, Spinner } from "@shopify/polaris";
11
11
  import { Composer, Thread, ThreadWelcome } from "@assistant-ui/react-ui";
12
12
  import "@assistant-ui/react-markdown/styles/dot.css";
13
13
  import { ThreadContext } from "../../../contexts/ThreadContext.js";
14
- import { useThreadViewport } from "../../../hooks/useThreadViewport.js";
14
+ import { useThreadViewport } from "../../../hooks/useThread.js";
15
15
  import Suggestions from "../Suggestions/Suggestions.js";
16
16
 
17
17
  // import Avatar from "@resources/assistant-avatar.svg";
@@ -143,10 +143,10 @@
143
143
  top: 0;
144
144
  left: 0;
145
145
  right: 0;
146
- height: 100%;
147
- background: linear-gradient(90deg, rgba(0, 205, 174, 0.18) 0%, rgba(238, 157, 7, 0.12) 100%);
148
- mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
149
- -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
146
+ bottom: 0;
147
+ background:
148
+ radial-gradient(ellipse 80% 55% at 30% 0%, rgba(0, 205, 174, 0.28) 0%, transparent 60%),
149
+ radial-gradient(ellipse 60% 45% at 80% 0%, rgba(238, 157, 7, 0.2) 0%, transparent 60%);
150
150
  pointer-events: none;
151
151
  }
152
152
 
@@ -495,8 +495,7 @@
495
495
  display: flex;
496
496
  align-items: center;
497
497
  width: 100%;
498
- padding: 10px 16px;
499
- font-size: 14px;
498
+ padding: 10px 12px;
500
499
  cursor: pointer;
501
500
  box-sizing: border-box;
502
501
  position: relative;
@@ -51,15 +51,14 @@ var AllSessions = function AllSessions(_ref) {
51
51
  className: "AOV-Sidekick__AllSessions"
52
52
  }, /*#__PURE__*/React.createElement(Box, {
53
53
  paddingInline: "300",
54
- paddingBlock: "200",
55
- borderBlockEndWidth: "025",
54
+ paddingBlockStart: "200",
56
55
  borderColor: "border"
57
56
  }, /*#__PURE__*/React.createElement(Button, {
58
57
  icon: ArrowLeftIcon,
59
58
  onClick: onBack,
60
59
  variant: "monochromePlain"
61
60
  }, "All sessions")), /*#__PURE__*/React.createElement(Box, {
62
- padding: "300"
61
+ paddingInline: "300"
63
62
  }, /*#__PURE__*/React.createElement(TextField, {
64
63
  value: search,
65
64
  onChange: setSearch,
@@ -79,15 +78,15 @@ var AllSessions = function AllSessions(_ref) {
79
78
  tone: "subdued",
80
79
  alignment: "center"
81
80
  }, "No sessions found")) : filteredSections.map(function (group) {
82
- return /*#__PURE__*/React.createElement(BlockStack, {
83
- key: group.title
84
- }, /*#__PURE__*/React.createElement(Box, {
81
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
85
82
  paddingInline: "300",
86
83
  paddingBlockStart: "200",
87
84
  paddingBlockEnd: "100"
88
85
  }, /*#__PURE__*/React.createElement(Text, {
89
86
  variant: "headingSm"
90
- }, group.title)), group.items.map(function (item) {
87
+ }, group.title)), /*#__PURE__*/React.createElement(BlockStack, {
88
+ key: group.title
89
+ }, group.items.map(function (item) {
91
90
  return /*#__PURE__*/React.createElement("button", {
92
91
  key: item.id,
93
92
  className: "AOV-Sidekick__SessionItem",
@@ -101,7 +100,7 @@ var AllSessions = function AllSessions(_ref) {
101
100
  updateThread: updateThread,
102
101
  deleteThread: deleteThread
103
102
  }));
104
- }));
103
+ })));
105
104
  })));
106
105
  };
107
106
  AllSessions.propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aov-agent",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "AOV AI Agent - Monorepo for AI Assistant Components",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,30 +0,0 @@
1
- import React from "react";
2
- import { useDispatch } from "react-redux";
3
- import { useNavigate } from "react-router-dom";
4
- import { Card, BlockStack, Text, Button } from "@shopify/polaris";
5
- var CampaignRendered = function CampaignRendered(_ref) {
6
- var campaignType = _ref.campaignType,
7
- campaign = _ref.campaign;
8
- var dispatch = useDispatch();
9
- var navigate = useNavigate();
10
- var handleCampaign = function handleCampaign() {
11
- // TODO: Implement campaign handling logic
12
- // This is a placeholder - implement based on your business logic
13
- console.log("Handle campaign", campaignType, campaign);
14
- };
15
- return /*#__PURE__*/React.createElement(Card, {
16
- padding: "400"
17
- }, /*#__PURE__*/React.createElement(BlockStack, {
18
- gap: "200"
19
- }, /*#__PURE__*/React.createElement(Text, {
20
- as: "span",
21
- variant: "bodySm",
22
- fontWeight: "medium",
23
- alignment: "center"
24
- }, "Campaign type: ", campaignType), /*#__PURE__*/React.createElement(Button, {
25
- tone: "success",
26
- variant: "primary",
27
- onClick: handleCampaign
28
- }, "Preview")));
29
- };
30
- export default CampaignRendered;