aov-agent 1.0.22 → 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.
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aov-agent",
3
- "version": "1.0.22",
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;