@box/box-ai-agent-selector 0.35.0 → 0.35.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/dist/esm/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
import { BoxAiAgentSelector as t } from "./lib/box-ai-agent-selector.js";
|
2
2
|
import { BoxAiAgentSelectorWithApi as A } from "./lib/box-ai-agent-selector-with-api.js";
|
3
3
|
import { BoxAiAgentSelectorWithApiContainer as p } from "./lib/box-ai-agent-selector-with-api-container.js";
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
4
|
+
import { R as n } from "../chunks/types.js";
|
5
|
+
import { ACTIONS as f } from "./lib/contexts/actions.js";
|
6
|
+
import { AgentsProvider as m, useAgents as S, useAgentsDispatch as c } from "./lib/contexts/context.js";
|
7
7
|
export {
|
8
|
-
|
9
|
-
|
8
|
+
f as ACTIONS,
|
9
|
+
m as AgentsProvider,
|
10
10
|
t as BoxAiAgentSelector,
|
11
11
|
A as BoxAiAgentSelectorWithApi,
|
12
12
|
p as BoxAiAgentSelectorWithApiContainer,
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
n as REQUEST_STATE,
|
14
|
+
S as useAgents,
|
15
|
+
c as useAgentsDispatch
|
16
16
|
};
|
@@ -1,32 +1,35 @@
|
|
1
|
+
import "./box-ai-agent-selector.js";
|
1
2
|
import { BoxAiAgentSelectorWithApi as c } from "./box-ai-agent-selector-with-api.js";
|
2
|
-
import { AgentsProvider as l } from "./contexts/context.js";
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
4
|
-
|
4
|
+
import { AgentsProvider as l } from "./contexts/context.js";
|
5
|
+
import "../../chunks/types.js";
|
6
|
+
import "./contexts/actions.js";
|
7
|
+
function s({
|
5
8
|
fetcher: t,
|
6
|
-
hostAppName:
|
7
|
-
onSelectAgent:
|
8
|
-
recordAction:
|
9
|
-
requestState:
|
10
|
-
disabled:
|
11
|
-
shouldHideAgentSelectorOnLoad:
|
12
|
-
triggerChipClassName:
|
9
|
+
hostAppName: o,
|
10
|
+
onSelectAgent: i,
|
11
|
+
recordAction: e,
|
12
|
+
requestState: m,
|
13
|
+
disabled: n,
|
14
|
+
shouldHideAgentSelectorOnLoad: p = !0,
|
15
|
+
triggerChipClassName: A,
|
13
16
|
contentClassName: f
|
14
17
|
}) {
|
15
18
|
return /* @__PURE__ */ r(l, {
|
16
19
|
children: /* @__PURE__ */ r(c, {
|
17
20
|
contentClassName: f,
|
18
|
-
disabled:
|
21
|
+
disabled: n,
|
19
22
|
fetcher: t,
|
20
|
-
hostAppName:
|
21
|
-
onSelectAgent:
|
22
|
-
recordAction:
|
23
|
-
requestState:
|
24
|
-
shouldHideAgentSelectorOnLoad:
|
25
|
-
triggerChipClassName:
|
23
|
+
hostAppName: o,
|
24
|
+
onSelectAgent: i,
|
25
|
+
recordAction: e,
|
26
|
+
requestState: m,
|
27
|
+
shouldHideAgentSelectorOnLoad: p,
|
28
|
+
triggerChipClassName: A
|
26
29
|
})
|
27
30
|
});
|
28
31
|
}
|
29
32
|
export {
|
30
|
-
|
31
|
-
|
33
|
+
s as BoxAiAgentSelectorWithApiContainer,
|
34
|
+
s as default
|
32
35
|
};
|
@@ -8,10 +8,10 @@ import Mt from "clsx";
|
|
8
8
|
import { useIntl as hi } from "react-intl";
|
9
9
|
import { BoxAiAgent as bi } from "./box-ai-agent.js";
|
10
10
|
import { LOGGER_BASE_CONFIG as an, LOGGER_ACTION_CLICK as cn, LOGGER_TARGET as ln } from "./constants.js";
|
11
|
-
import {
|
12
|
-
import { useAgentsDispatch as Si } from "./contexts/context.js";
|
11
|
+
import { useAgentsDispatch as yi } from "./contexts/context.js";
|
13
12
|
import Qe from "./messages.js";
|
14
13
|
import { R as fn } from "../../chunks/types.js";
|
14
|
+
import { ACTIONS as Si } from "./contexts/actions.js";
|
15
15
|
import '../../styles/box-ai-agent-selector.css';var wi = Object.defineProperty, Ei = Object.defineProperties, xi = Object.getOwnPropertyDescriptors, Wt = Object.getOwnPropertySymbols, Xr = Object.prototype.hasOwnProperty, Jr = Object.prototype.propertyIsEnumerable, dr = (e, t, r) => t in e ? wi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, O = (e, t) => {
|
16
16
|
for (var r in t || (t = {}))
|
17
17
|
Xr.call(t, r) && dr(e, r, t[r]);
|
@@ -4626,7 +4626,7 @@ function Hc({
|
|
4626
4626
|
var D;
|
4627
4627
|
const {
|
4628
4628
|
formatMessage: f
|
4629
|
-
} = hi(), [c, l] = X(!1), p = o === fn.ERROR, [b, g] = X(p), E =
|
4629
|
+
} = hi(), [c, l] = X(!1), p = o === fn.ERROR, [b, g] = X(p), E = yi(), w = o === fn.SUCCESS, P = o === fn.IN_PROGRESS, h = f(Qe.selectAgent), m = f(Qe.defaultAgent);
|
4630
4630
|
let y = "";
|
4631
4631
|
w ? y = (u == null ? void 0 : u.name) || h : p && (y = m);
|
4632
4632
|
const C = Y(null), {
|
@@ -4645,7 +4645,7 @@ function Hc({
|
|
4645
4645
|
}, [c, n]);
|
4646
4646
|
const S = xe((v) => {
|
4647
4647
|
l(!1), E({
|
4648
|
-
type:
|
4648
|
+
type: Si.SET_SELECTED_AGENT,
|
4649
4649
|
id: v.id
|
4650
4650
|
}), n && n({
|
4651
4651
|
...an,
|
@@ -1,38 +1,39 @@
|
|
1
|
-
import
|
1
|
+
import "./actions.js";
|
2
|
+
import { useContext as e, useReducer as p, createContext as r } from "react";
|
2
3
|
import { defaultState as n } from "./constants.js";
|
3
|
-
import { agentsReducer as
|
4
|
+
import { agentsReducer as f } from "./reducer.js";
|
4
5
|
import { jsx as t } from "react/jsx-runtime";
|
5
6
|
const o = /* @__PURE__ */ r(n), s = /* @__PURE__ */ r(() => {
|
6
7
|
});
|
7
|
-
function
|
8
|
+
function h() {
|
8
9
|
return e(o);
|
9
10
|
}
|
10
|
-
function
|
11
|
+
function C() {
|
11
12
|
return e(s);
|
12
13
|
}
|
13
|
-
function
|
14
|
+
function P({
|
14
15
|
children: u,
|
15
|
-
value:
|
16
|
+
value: i
|
16
17
|
}) {
|
17
18
|
const [{
|
18
|
-
agents:
|
19
|
+
agents: c,
|
19
20
|
requestState: a,
|
20
21
|
selectedAgent: d
|
21
|
-
},
|
22
|
+
}, m] = p(f, i || n);
|
22
23
|
return /* @__PURE__ */ t(o.Provider, {
|
23
24
|
value: {
|
24
|
-
agents:
|
25
|
+
agents: c,
|
25
26
|
requestState: a,
|
26
27
|
selectedAgent: d
|
27
28
|
},
|
28
29
|
children: /* @__PURE__ */ t(s.Provider, {
|
29
|
-
value:
|
30
|
+
value: m,
|
30
31
|
children: u
|
31
32
|
})
|
32
33
|
});
|
33
34
|
}
|
34
35
|
export {
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
P as AgentsProvider,
|
37
|
+
h as useAgents,
|
38
|
+
C as useAgentsDispatch
|
38
39
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/box-ai-agent-selector",
|
3
|
-
"version": "0.35.
|
3
|
+
"version": "0.35.2",
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
5
5
|
"peerDependencies": {
|
6
6
|
"@ariakit/react": "^0.4.15",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"devDependencies": {
|
14
14
|
"@ariakit/react": "^0.4.15",
|
15
15
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
16
|
-
"@box/blueprint-web": "^
|
16
|
+
"@box/blueprint-web": "^11.0.0",
|
17
17
|
"@box/blueprint-web-assets": "^4.39.0",
|
18
18
|
"@box/eslint-plugin-blueprint": "^1.0.3",
|
19
19
|
"@box/storybook-utils": "^0.9.0",
|