@bikdotai/bik-component-library 0.0.866 → 0.0.867

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 (137) hide show
  1. package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
  2. package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +151 -29
  4. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +2 -0
  6. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +1 -0
  7. package/dist/cjs/components/agent-builder/components/ChannelsSection.js +2 -0
  8. package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +1 -0
  9. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
  10. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
  12. package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/MentionEditor.js +2 -2
  14. package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
  16. package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/components/MentionPicker.js +13 -13
  18. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
  20. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/constants/channels.js +2 -0
  22. package/dist/cjs/components/agent-builder/constants/channels.js.map +1 -0
  23. package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
  24. package/dist/cjs/components/agent-builder/constants/steps.js.map +1 -1
  25. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  26. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  27. package/dist/cjs/components/agent-builder/steps/Step1About.js +1 -1
  28. package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
  29. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
  30. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  31. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  32. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  33. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
  34. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  35. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +2 -2
  36. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  37. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  38. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  39. package/dist/cjs/icons/Social/Channels/ManifestGlass.js +2 -0
  40. package/dist/cjs/icons/Social/Channels/ManifestGlass.js.map +1 -0
  41. package/dist/cjs/icons/Social/Channels/ShipStation.js +2 -0
  42. package/dist/cjs/icons/Social/Channels/ShipStation.js.map +1 -0
  43. package/dist/cjs/icons/Social/Channels/Skio.js +2 -0
  44. package/dist/cjs/icons/Social/Channels/Skio.js.map +1 -0
  45. package/dist/cjs/icons/index.js +1 -1
  46. package/dist/cjs/index.js +1 -1
  47. package/dist/esm/components/agent-builder/AgentBuilder.js +103 -97
  48. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  49. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +76 -0
  50. package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +68 -0
  51. package/dist/esm/components/agent-builder/AgentBuilder.styled.js +224 -59
  52. package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  53. package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +26 -0
  54. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +121 -0
  55. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +1 -0
  56. package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +10 -0
  57. package/dist/esm/components/agent-builder/components/ChannelsSection.js +183 -0
  58. package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +1 -0
  59. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +135 -132
  60. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  61. package/dist/esm/components/agent-builder/components/GoLiveModal.js +12 -12
  62. package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
  63. package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +2 -0
  64. package/dist/esm/components/agent-builder/components/MentionEditor.js +47 -45
  65. package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
  66. package/dist/esm/components/agent-builder/components/MentionField.js +52 -51
  67. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  68. package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +5 -0
  69. package/dist/esm/components/agent-builder/components/MentionPicker.js +134 -132
  70. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  71. package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +2 -0
  72. package/dist/esm/components/agent-builder/components/SelectableListSection.js +48 -46
  73. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  74. package/dist/esm/components/agent-builder/constants/channels.d.ts +56 -0
  75. package/dist/esm/components/agent-builder/constants/channels.js +41 -0
  76. package/dist/esm/components/agent-builder/constants/channels.js.map +1 -0
  77. package/dist/esm/components/agent-builder/constants/steps.d.ts +31 -1
  78. package/dist/esm/components/agent-builder/constants/steps.js +15 -6
  79. package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
  80. package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +13 -1
  81. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +157 -148
  82. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  83. package/dist/esm/components/agent-builder/index.d.ts +5 -2
  84. package/dist/esm/components/agent-builder/steps/Step1About.js +15 -13
  85. package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
  86. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +55 -48
  87. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  88. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +158 -157
  89. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  90. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +11 -0
  91. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +127 -23
  92. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  93. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +10 -3
  94. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +31 -23
  95. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  96. package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +7 -5
  97. package/dist/esm/components/agent-builder/utils/sourceIcons.js +26 -26
  98. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  99. package/dist/esm/icons/Social/Channels/ManifestGlass.d.ts +6 -0
  100. package/dist/esm/icons/Social/Channels/ManifestGlass.js +252 -0
  101. package/dist/esm/icons/Social/Channels/ManifestGlass.js.map +1 -0
  102. package/dist/esm/icons/Social/Channels/ShipStation.d.ts +6 -0
  103. package/dist/esm/icons/Social/Channels/ShipStation.js +31 -0
  104. package/dist/esm/icons/Social/Channels/ShipStation.js.map +1 -0
  105. package/dist/esm/icons/Social/Channels/Skio.d.ts +6 -0
  106. package/dist/{cjs/assets/icons/Skio.svg.js → esm/icons/Social/Channels/Skio.js} +31 -2
  107. package/dist/esm/icons/Social/Channels/Skio.js.map +1 -0
  108. package/dist/esm/icons/Social/Channels/index.d.ts +3 -0
  109. package/dist/esm/icons/index.d.ts +25 -25
  110. package/dist/esm/icons/index.js +330 -324
  111. package/dist/esm/icons/index.js.map +1 -1
  112. package/dist/esm/index.js +671 -663
  113. package/dist/esm/index.js.map +1 -1
  114. package/package.json +1 -1
  115. package/dist/cjs/assets/icons/BigCommerce.svg.js +0 -2
  116. package/dist/cjs/assets/icons/BigCommerce.svg.js.map +0 -1
  117. package/dist/cjs/assets/icons/Gorgias.svg.js +0 -2
  118. package/dist/cjs/assets/icons/Gorgias.svg.js.map +0 -1
  119. package/dist/cjs/assets/icons/ManifestGlass.svg.js +0 -2
  120. package/dist/cjs/assets/icons/ManifestGlass.svg.js.map +0 -1
  121. package/dist/cjs/assets/icons/ShipStation.svg.js +0 -2
  122. package/dist/cjs/assets/icons/ShipStation.svg.js.map +0 -1
  123. package/dist/cjs/assets/icons/Shopify.svg.js +0 -2
  124. package/dist/cjs/assets/icons/Shopify.svg.js.map +0 -1
  125. package/dist/cjs/assets/icons/Skio.svg.js.map +0 -1
  126. package/dist/esm/assets/icons/BigCommerce.svg.js +0 -6
  127. package/dist/esm/assets/icons/BigCommerce.svg.js.map +0 -1
  128. package/dist/esm/assets/icons/Gorgias.svg.js +0 -6
  129. package/dist/esm/assets/icons/Gorgias.svg.js.map +0 -1
  130. package/dist/esm/assets/icons/ManifestGlass.svg.js +0 -6
  131. package/dist/esm/assets/icons/ManifestGlass.svg.js.map +0 -1
  132. package/dist/esm/assets/icons/ShipStation.svg.js +0 -6
  133. package/dist/esm/assets/icons/ShipStation.svg.js.map +0 -1
  134. package/dist/esm/assets/icons/Shopify.svg.js +0 -6
  135. package/dist/esm/assets/icons/Shopify.svg.js.map +0 -1
  136. package/dist/esm/assets/icons/Skio.svg.js +0 -6
  137. package/dist/esm/assets/icons/Skio.svg.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsxs as de, Fragment as Le, jsx as c } from "react/jsx-runtime";
2
- import { useState as i, useRef as y, useMemo as Pe, useCallback as a } from "react";
3
- import ze from "styled-components";
1
+ import { jsxs as de, Fragment as Pe, jsx as c } from "react/jsx-runtime";
2
+ import { useState as i, useRef as T, useMemo as ze, useCallback as a } from "react";
3
+ import He from "styled-components";
4
4
  import { addUnique as me } from "../../../utils/arrayUtils.js";
5
- import { COLORS as X } from "../../../constants/Theme.js";
6
- import { AGENT_CHAR_LIMITS as He } from "../constants/charLimits.js";
7
- import { CONFIG_TOOL_SOURCES as Ue, ToolSource as u } from "../constants/tools.js";
8
- import { buildAgentMentionItems as $e, buildCustomToolMentionItems as Fe, restApiMentionItem as je, configToolMentionItem as We, restApiToolName as qe, configToolName as Ye, toolSourceLabel as Xe } from "../utils/mentionSerialization.js";
9
- import { sourceIcon as Z, SOURCE_ICONS as pe, renderSourceIcon as fe } from "../utils/sourceIcons.js";
5
+ import { COLORS as Z } from "../../../constants/Theme.js";
6
+ import { AGENT_CHAR_LIMITS as Ue } from "../constants/charLimits.js";
7
+ import { CONFIG_TOOL_SOURCES as $e, ToolSource as u } from "../constants/tools.js";
8
+ import { buildAgentMentionItems as Le, buildCustomToolMentionItems as Fe, restApiMentionItem as je, configToolMentionItem as We, restApiToolName as qe, configToolName as Ye, toolSourceLabel as Xe } from "../utils/mentionSerialization.js";
9
+ import { sourceIcon as J, SOURCE_ICONS as pe, renderSourceIcon as fe } from "../utils/sourceIcons.js";
10
10
  import { buildToolActions as Ze } from "../utils/toolActions.js";
11
11
  import { ConfigToolPanel as Je } from "./ConfigToolPanel.js";
12
12
  import { DRAWER_BODY_STYLE as Qe, DRAWER_HEADER_STYLE as Ve, DrawerHeaderText as et } from "./DrawerHeaderText.js";
@@ -16,14 +16,14 @@ import { SelectableListSection as ot } from "./SelectableListSection.js";
16
16
  import { SideModal as nt } from "../../side-modal/SideModal.js";
17
17
  import { Input as st } from "../../input/Input.js";
18
18
  import { Toaster as rt } from "../../toaster/Toaster.js";
19
- const it = 1e3, J = 1002, he = (x, f) => {
20
- const s = x ?? [];
19
+ const it = 1e3, Q = 1002, he = (A, f) => {
20
+ const s = A ?? [];
21
21
  return s.some((d) => d.id === f.id) ? s.map((d) => d.id === f.id ? f : d) : [...s, f];
22
- }, ye = ze.button`
22
+ }, ye = He.button`
23
23
  align-self: flex-start;
24
- border: 1px solid ${X.stroke.primary};
25
- color: ${X.content.primary};
26
- background: ${X.surface.standard};
24
+ border: 1px solid ${Z.stroke.primary};
25
+ color: ${Z.content.primary};
26
+ background: ${Z.surface.standard};
27
27
  border-radius: 8px;
28
28
  padding: 6px 12px;
29
29
  font-size: 13px;
@@ -36,63 +36,63 @@ const it = 1e3, J = 1002, he = (x, f) => {
36
36
  opacity: 0.6;
37
37
  }
38
38
  `, At = ({
39
- onClose: x,
39
+ onClose: A,
40
40
  onSave: f,
41
41
  availableTools: s,
42
42
  onImprove: d,
43
- onImproveToolInstructions: Q,
44
- configToolTemplates: V,
45
- integrationStatus: A,
46
- onConnectIntegration: R,
47
- title: ee = "Create sub-agent",
43
+ onImproveToolInstructions: V,
44
+ configToolTemplates: ee,
45
+ integrationStatus: R,
46
+ onConnectIntegration: _,
47
+ title: te = "Create sub-agent",
48
48
  initial: g,
49
49
  existingNames: Te = [],
50
- appLabel: te = "Manifest",
51
- charLimits: T = He,
52
- variablesData: _
50
+ appLabel: h = "Manifest",
51
+ charLimits: b = Ue,
52
+ variablesData: w
53
53
  }) => {
54
- const [K, be] = i(g?.name ?? ""), [b, w] = i(g?.instructions ?? ""), [C, k] = i(g?.guardrail ?? ""), [N, E] = i(g?.tools ?? []), [p, D] = i(
54
+ const [N, be] = i(g?.name ?? ""), [C, k] = i(g?.instructions ?? ""), [I, E] = i(g?.guardrail ?? ""), [D, M] = i(g?.tools ?? []), [p, B] = i(
55
55
  g?.configTools ?? []
56
- ), [m, B] = i(
56
+ ), [m, G] = i(
57
57
  g?.restApiTools ?? []
58
- ), [l, h] = i(null), M = y(0), [oe, ne] = i(!1), [Ce, G] = i(0), [Ie, L] = i(0), [I, se] = i(null), P = Pe(
58
+ ), [l, y] = i(null), O = T(0), [oe, ne] = i(!1), [Ce, P] = i(0), [Ie, z] = i(0), [S, se] = i(null), H = ze(
59
59
  () => [
60
- ...$e(s, [], te),
60
+ ...Le(s, [], h),
61
61
  ...Fe(p, m)
62
62
  ],
63
- [s, te, p, m]
64
- ), O = y({}), z = y("instructions"), Se = a((e) => {
65
- O.current.instructions = e ?? void 0;
63
+ [s, h, p, m]
64
+ ), K = T({}), U = T("instructions"), Se = a((e) => {
65
+ K.current.instructions = e ?? void 0;
66
66
  }, []), ve = a((e) => {
67
- O.current.guardrail = e ?? void 0;
67
+ K.current.guardrail = e ?? void 0;
68
68
  }, []), xe = a(() => {
69
- z.current = "instructions";
69
+ U.current = "instructions";
70
70
  }, []), Ae = a(() => {
71
- z.current = "guardrail";
72
- }, []), re = y(/* @__PURE__ */ new Set());
71
+ U.current = "guardrail";
72
+ }, []), re = T(/* @__PURE__ */ new Set());
73
73
  re.current = new Set(
74
74
  [...p, ...m].map((e) => e.id)
75
75
  );
76
76
  const ie = a(
77
77
  (e, t) => {
78
- e === "tool" && !re.current.has(t) && E((o) => me(o, t));
78
+ e === "tool" && !re.current.has(t) && M((o) => me(o, t));
79
79
  },
80
80
  []
81
- ), S = a(
81
+ ), v = a(
82
82
  (e, t, o) => {
83
- (O.current[z.current] ?? O.current.instructions)?.("tool", e, t, o);
83
+ (K.current[U.current] ?? K.current.instructions)?.("tool", e, t, o);
84
84
  },
85
85
  []
86
- ), H = a((e) => {
87
- M.current += 1, h({
88
- key: M.current,
86
+ ), $ = a((e) => {
87
+ O.current += 1, y({
88
+ key: O.current,
89
89
  kind: "restapi",
90
90
  initialRest: e
91
91
  });
92
- }, []), U = a(
92
+ }, []), L = a(
93
93
  (e, t) => {
94
- M.current += 1, h({
95
- key: M.current,
94
+ O.current += 1, y({
95
+ key: O.current,
96
96
  kind: "config",
97
97
  toolKey: e,
98
98
  initialConfig: t
@@ -101,52 +101,52 @@ const it = 1e3, J = 1002, he = (x, f) => {
101
101
  []
102
102
  ), Re = a(
103
103
  (e) => {
104
- const t = Ue[e];
105
- t ? U(t) : H();
104
+ const t = $e[e];
105
+ t ? L(t) : $();
106
106
  },
107
- [U, H]
107
+ [L, $]
108
108
  ), _e = a(
109
109
  (e) => {
110
110
  const t = !m.some((o) => o.id === e.id);
111
- B((o) => he(o, e)), t && S(
111
+ G((o) => he(o, e)), t && v(
112
112
  e.id,
113
113
  je(e).label,
114
114
  u.RestApi
115
- ), h(null);
115
+ ), y(null);
116
116
  },
117
- [m, S]
117
+ [m, v]
118
118
  ), we = a(
119
119
  (e) => {
120
120
  const t = !p.some((o) => o.id === e.id);
121
- if (D((o) => he(o, e)), t) {
121
+ if (B((o) => he(o, e)), t) {
122
122
  const o = e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover;
123
- S(e.id, We(e).label, o);
123
+ v(e.id, We(e).label, o);
124
124
  }
125
- h(null);
125
+ y(null);
126
126
  },
127
- [p, S]
128
- ), [$, F] = i(
127
+ [p, v]
128
+ ), [F, j] = i(
129
129
  null
130
- ), j = y(null), le = y(0), ke = (e) => {
130
+ ), W = T(null), le = T(0), ke = (e) => {
131
131
  const t = s.find((n) => n.tool_id === e)?.display_name ?? m.find((n) => n.id === e)?.name ?? "Tool", o = `{{tool:${e}}}`, r = (n) => n.split(o).join("");
132
- j.current = {
133
- instructions: b,
134
- guardrail: C,
135
- tools: N,
132
+ W.current = {
133
+ instructions: C,
134
+ guardrail: I,
135
+ tools: D,
136
136
  configTools: p,
137
137
  restApiTools: m
138
- }, w((n) => r(n)), k((n) => r(n)), E((n) => n.filter((v) => v !== e)), D((n) => n.filter((v) => v.id !== e)), B((n) => n.filter((v) => v.id !== e)), G((n) => n + 1), L((n) => n + 1), le.current += 1, F({ id: le.current, message: `Tool "${t}" removed` });
138
+ }, k((n) => r(n)), E((n) => r(n)), M((n) => n.filter((x) => x !== e)), B((n) => n.filter((x) => x.id !== e)), G((n) => n.filter((x) => x.id !== e)), P((n) => n + 1), z((n) => n + 1), le.current += 1, j({ id: le.current, message: `Tool "${t}" removed` });
139
139
  }, Ee = () => {
140
- const e = j.current;
141
- e && (w(e.instructions), k(e.guardrail), E(e.tools), D(e.configTools), B(e.restApiTools), G((t) => t + 1), L((t) => t + 1), j.current = null), F(null);
142
- }, W = K.trim(), q = W.length > 0 && Te.some(
143
- (e) => e.trim().toLowerCase() === W.toLowerCase()
144
- ), ae = W.length > 0 && !q && (b.trim().length > 0 || C.trim().length > 0), Me = N.map((e) => {
140
+ const e = W.current;
141
+ e && (k(e.instructions), E(e.guardrail), M(e.tools), B(e.configTools), G(e.restApiTools), P((t) => t + 1), z((t) => t + 1), W.current = null), j(null);
142
+ }, q = N.trim(), Y = q.length > 0 && Te.some(
143
+ (e) => e.trim().toLowerCase() === q.toLowerCase()
144
+ ), ae = q.length > 0 && !Y && (C.trim().length > 0 || I.trim().length > 0), Me = D.map((e) => {
145
145
  const t = s.find((o) => o.tool_id === e);
146
146
  return t ? {
147
147
  id: e,
148
148
  label: t.display_name,
149
- icon: Z(t.source ?? u.Manifest),
149
+ icon: J(t.source ?? u.Manifest),
150
150
  // Shield flags a tool that needs customer verification, same as
151
151
  // the main builder's Step 3 tool rows.
152
152
  authRequired: t.auth_required
@@ -155,25 +155,25 @@ const it = 1e3, J = 1002, he = (x, f) => {
155
155
  id: e.id,
156
156
  label: qe(e),
157
157
  icon: pe[u.RestApi],
158
- onConfigure: () => H(e)
158
+ onConfigure: () => $(e)
159
159
  })), Ke = p.map((e) => ({
160
160
  id: e.id,
161
161
  label: Ye(e),
162
162
  icon: pe[e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover],
163
- onConfigure: () => U(e.tool_key, e)
163
+ onConfigure: () => L(e.tool_key, e)
164
164
  })), Ne = [
165
165
  ...Me,
166
166
  ...Oe,
167
167
  ...Ke
168
- ], Y = Ze(
169
- V,
168
+ ], X = Ze(
169
+ ee,
170
170
  Re,
171
- A,
172
- R
173
- ), ce = l?.kind === "config" && l.toolKey ? V?.[l.toolKey] : void 0, De = s.map((e) => ({
171
+ R,
172
+ _
173
+ ), ce = l?.kind === "config" && l.toolKey ? ee?.[l.toolKey] : void 0, De = s.map((e) => ({
174
174
  label: e.display_name,
175
175
  value: e.tool_id,
176
- leadingIcon: fe(Z(e.source ?? u.Manifest)) ?? void 0
176
+ leadingIcon: fe(J(e.source ?? u.Manifest)) ?? void 0
177
177
  })), Be = (() => {
178
178
  const e = [], t = /* @__PURE__ */ new Map();
179
179
  return s.forEach((o) => {
@@ -181,25 +181,25 @@ const it = 1e3, J = 1002, he = (x, f) => {
181
181
  t.has(r) || (t.set(r, []), e.push(r)), t.get(r)?.push({
182
182
  label: o.display_name,
183
183
  value: o.tool_id,
184
- leadingIcon: fe(Z(o.source ?? u.Manifest)) ?? void 0
184
+ leadingIcon: fe(J(o.source ?? u.Manifest)) ?? void 0
185
185
  });
186
186
  }), e.map((o) => ({
187
187
  source: o,
188
- label: Xe(o),
188
+ label: Xe(o, h),
189
189
  options: t.get(o) ?? [],
190
190
  // Not connected → the source button opens the connect flow instead of
191
191
  // its tool list (mirrors Step 3's tool section).
192
- connected: A?.[o],
193
- onConnect: () => R?.(o)
192
+ connected: R?.[o],
193
+ onConnect: () => _?.(o)
194
194
  }));
195
195
  })(), Ge = async () => {
196
196
  if (!ae || oe)
197
197
  return;
198
198
  const e = f({
199
- name: K.trim(),
200
- instructions: b,
201
- guardrail: C,
202
- tools: N,
199
+ name: N.trim(),
200
+ instructions: C,
201
+ guardrail: I,
202
+ tools: D,
203
203
  configTools: p,
204
204
  restApiTools: m
205
205
  });
@@ -212,34 +212,34 @@ const it = 1e3, J = 1002, he = (x, f) => {
212
212
  }
213
213
  }
214
214
  }, ue = async (e) => {
215
- if (!(!d || I)) {
215
+ if (!(!d || S)) {
216
216
  se(e);
217
217
  try {
218
- const o = await d(e, e === "instructions" ? b : C);
219
- e === "instructions" ? (w(o), G((r) => r + 1)) : (k(o), L((r) => r + 1));
218
+ const o = await d(e, e === "instructions" ? C : I);
219
+ e === "instructions" ? (k(o), P((r) => r + 1)) : (E(o), z((r) => r + 1));
220
220
  } finally {
221
221
  se(null);
222
222
  }
223
223
  }
224
224
  };
225
- return /* @__PURE__ */ de(Le, { children: [
225
+ return /* @__PURE__ */ de(Pe, { children: [
226
226
  /* @__PURE__ */ de(
227
227
  nt,
228
228
  {
229
- header: ee,
229
+ header: te,
230
230
  closeOnEscapeKey: !1,
231
231
  zIndex: it,
232
232
  headerCustomComponent: /* @__PURE__ */ c(
233
233
  et,
234
234
  {
235
- title: ee,
235
+ title: te,
236
236
  subtitle: "Each sub-agent handles one piece of the job. Use @ in the main instructions to call them."
237
237
  }
238
238
  ),
239
239
  width: "421px",
240
240
  headerStyle: Ve,
241
241
  bodyStyle: Qe,
242
- onClose: x,
242
+ onClose: A,
243
243
  saveButtonProps: {
244
244
  "data-test": "subagent-save",
245
245
  buttonText: "Save",
@@ -254,7 +254,7 @@ const it = 1e3, J = 1002, he = (x, f) => {
254
254
  buttonText: "Cancel",
255
255
  buttonType: "tertiaryGray",
256
256
  size: "small",
257
- onClick: x
257
+ onClick: A
258
258
  },
259
259
  children: [
260
260
  /* @__PURE__ */ c(
@@ -264,12 +264,12 @@ const it = 1e3, J = 1002, he = (x, f) => {
264
264
  labelText: "Agent name",
265
265
  labelTextBold: !0,
266
266
  placeholder: "Enter agent name",
267
- value: K,
268
- maxCharLimit: T.name,
267
+ value: N,
268
+ maxCharLimit: b.name,
269
269
  maxCharLimitPosition: "TOP",
270
270
  maxCharStyle: { fontSize: 12, lineHeight: "16px" },
271
- state: q ? "invalid" : void 0,
272
- errorMessage: q ? "A sub-agent with this name already exists" : void 0,
271
+ state: Y ? "invalid" : void 0,
272
+ errorMessage: Y ? "A sub-agent with this name already exists" : void 0,
273
273
  onChangeText: be
274
274
  }
275
275
  ),
@@ -278,19 +278,20 @@ const it = 1e3, J = 1002, he = (x, f) => {
278
278
  {
279
279
  "data-test": "subagent-instructions",
280
280
  label: "Instructions",
281
- value: b,
282
- onChange: w,
283
- maxLength: T.instructions,
281
+ value: C,
282
+ onChange: k,
283
+ maxLength: b.instructions,
284
284
  placeholder: "Write the steps in plain English. The agent will follow them exactly. The more specific you are, the better it performs.",
285
285
  minHeight: "160px",
286
286
  resetKey: `instr-${Ce}`,
287
- mentionItems: P,
287
+ mentionItems: H,
288
288
  tools: s,
289
- toolActions: Y,
290
- variablesData: _,
289
+ toolActions: X,
290
+ variablesData: w,
291
291
  addDataButton: !0,
292
- integrationStatus: A,
293
- onConnectIntegration: R,
292
+ integrationStatus: R,
293
+ appLabel: h,
294
+ onConnectIntegration: _,
294
295
  onMentionSelect: ie,
295
296
  onFocus: xe,
296
297
  registerInsert: Se,
@@ -299,9 +300,9 @@ const it = 1e3, J = 1002, he = (x, f) => {
299
300
  {
300
301
  type: "button",
301
302
  "data-test": "subagent-improve-instructions",
302
- disabled: I !== null,
303
+ disabled: S !== null,
303
304
  onClick: () => ue("instructions"),
304
- children: I === "instructions" ? "Improving…" : "Improve with AI"
305
+ children: S === "instructions" ? "Improving…" : "Improve with AI"
305
306
  }
306
307
  ) : void 0
307
308
  }
@@ -311,19 +312,20 @@ const it = 1e3, J = 1002, he = (x, f) => {
311
312
  {
312
313
  "data-test": "subagent-guardrail",
313
314
  label: "Guardrails",
314
- value: C,
315
- onChange: k,
316
- maxLength: T.guardrail,
315
+ value: I,
316
+ onChange: E,
317
+ maxLength: b.guardrail,
317
318
  placeholder: "e.g. Never discuss competitor pricing. Always stay within the cancellation policy. Do not process refunds above ₹10,000 without human approval.",
318
319
  minHeight: "160px",
319
320
  resetKey: `guard-${Ie}`,
320
- mentionItems: P,
321
+ mentionItems: H,
321
322
  tools: s,
322
- toolActions: Y,
323
- variablesData: _,
323
+ toolActions: X,
324
+ variablesData: w,
324
325
  addDataButton: !0,
325
- integrationStatus: A,
326
- onConnectIntegration: R,
326
+ integrationStatus: R,
327
+ appLabel: h,
328
+ onConnectIntegration: _,
327
329
  onMentionSelect: ie,
328
330
  onFocus: Ae,
329
331
  registerInsert: ve,
@@ -332,9 +334,9 @@ const it = 1e3, J = 1002, he = (x, f) => {
332
334
  {
333
335
  type: "button",
334
336
  "data-test": "subagent-improve-guardrail",
335
- disabled: I !== null,
337
+ disabled: S !== null,
336
338
  onClick: () => ue("guardrail"),
337
- children: I === "guardrail" ? "Improving…" : "Improve with AI"
339
+ children: S === "guardrail" ? "Improving…" : "Improve with AI"
338
340
  }
339
341
  ) : void 0
340
342
  }
@@ -347,15 +349,16 @@ const it = 1e3, J = 1002, he = (x, f) => {
347
349
  items: Ne,
348
350
  addableOptions: De,
349
351
  sourceGroups: Be,
350
- mentionItems: P,
351
- actionSources: Y,
352
+ mentionItems: H,
353
+ actionSources: X,
352
354
  emptyText: "No tools added yet.",
355
+ appLabel: h,
353
356
  pickerOpensUp: !0,
354
357
  onAdd: (e) => {
355
- S(e), E((t) => me(t, e));
358
+ v(e), M((t) => me(t, e));
356
359
  },
357
360
  onRemove: ke,
358
- confirmDelete: { noun: "tool", zIndex: J + 1 }
361
+ confirmDelete: { noun: "tool", zIndex: Q + 1 }
359
362
  }
360
363
  )
361
364
  ]
@@ -365,12 +368,12 @@ const it = 1e3, J = 1002, he = (x, f) => {
365
368
  tt,
366
369
  {
367
370
  initial: l.initialRest,
368
- charLimits: T,
369
- variablesData: _,
370
- onImprove: Q,
371
- onClose: () => h(null),
371
+ charLimits: b,
372
+ variablesData: w,
373
+ onImprove: V,
374
+ onClose: () => y(null),
372
375
  onSave: _e,
373
- zIndex: J
376
+ zIndex: Q
374
377
  },
375
378
  l.key
376
379
  ),
@@ -380,19 +383,19 @@ const it = 1e3, J = 1002, he = (x, f) => {
380
383
  toolKey: l.toolKey,
381
384
  template: ce,
382
385
  initial: l.initialConfig,
383
- charLimits: T,
384
- variablesData: _,
385
- onImprove: Q,
386
- onClose: () => h(null),
386
+ charLimits: b,
387
+ variablesData: w,
388
+ onImprove: V,
389
+ onClose: () => y(null),
387
390
  onSave: we,
388
- zIndex: J
391
+ zIndex: Q
389
392
  },
390
393
  l.key
391
394
  ),
392
- $ && /* @__PURE__ */ c(
395
+ F && /* @__PURE__ */ c(
393
396
  rt,
394
397
  {
395
- text: $.message,
398
+ text: F.message,
396
399
  type: "info",
397
400
  position: "top-right",
398
401
  autoClose: 5e3,
@@ -402,9 +405,9 @@ const it = 1e3, J = 1002, he = (x, f) => {
402
405
  showButton: !0,
403
406
  onButtonClick: () => (Ee(), {})
404
407
  },
405
- onCloseToast: () => F(null)
408
+ onCloseToast: () => j(null)
406
409
  },
407
- $.id
410
+ F.id
408
411
  )
409
412
  ] });
410
413
  };