@bikdotai/bik-component-library 0.0.853-beta.0 → 0.0.854

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 (153) 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/components/AgentBuilderFooter.js +1 -1
  4. package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
  6. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js +11 -11
  8. package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
  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 +1 -7
  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 +26 -53
  18. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +1 -1
  20. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +5 -6
  22. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  23. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +1 -1
  24. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  25. package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js +2 -2
  26. package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
  27. package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
  28. package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
  29. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  30. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.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/utils/mentionSerialization.js +4 -4
  34. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  35. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  36. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  37. package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
  38. package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
  39. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js +1 -1
  40. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  41. package/dist/cjs/components/toaster/Toaster.js +1 -1
  42. package/dist/cjs/components/toaster/Toaster.js.map +1 -1
  43. package/dist/cjs/components/toaster/Toaster.styled.js +7 -7
  44. package/dist/cjs/components/toaster/Toaster.styled.js.map +1 -1
  45. package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
  46. package/dist/cjs/components/variable-picker-v3/Content.js.map +1 -1
  47. package/dist/cjs/components/zeroState/ZeroState.js +3 -3
  48. package/dist/cjs/components/zeroState/ZeroState.js.map +1 -1
  49. package/dist/cjs/editor/BikEditor.js +1 -1
  50. package/dist/cjs/editor/BikEditor.js.map +1 -1
  51. package/dist/cjs/editor/BikEditor.styles.js +21 -23
  52. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  53. package/dist/cjs/editor/BikEditor.types.js.map +1 -1
  54. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
  55. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  56. package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
  57. package/dist/cjs/editor/extensions/mention/MentionDropdown.js.map +1 -1
  58. package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
  59. package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
  60. package/dist/cjs/index.js +1 -1
  61. package/dist/esm/components/add-variableV2/index.d.ts +0 -1
  62. package/dist/esm/components/agent-builder/AgentBuilder.js +127 -119
  63. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  64. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +7 -10
  65. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +2 -0
  66. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +29 -26
  67. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  68. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +30 -29
  69. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  70. package/dist/esm/components/agent-builder/components/ConfigToolPanel.d.ts +0 -8
  71. package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +136 -182
  72. package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
  73. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +9 -3
  74. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +230 -222
  75. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  76. package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -13
  77. package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
  78. package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -12
  79. package/dist/esm/components/agent-builder/components/MentionEditor.js +103 -144
  80. package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
  81. package/dist/esm/components/agent-builder/components/MentionField.js +45 -48
  82. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  83. package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +1 -14
  84. package/dist/esm/components/agent-builder/components/MentionPicker.js +248 -292
  85. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  86. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +8 -8
  87. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  88. package/dist/esm/components/agent-builder/components/RestApiToolPanel.d.ts +0 -8
  89. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +172 -185
  90. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  91. package/dist/esm/components/agent-builder/components/SelectableListSection.js +73 -69
  92. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  93. package/dist/esm/components/agent-builder/components/ToolInstructionsField.d.ts +0 -9
  94. package/dist/esm/components/agent-builder/components/ToolInstructionsField.js +48 -67
  95. package/dist/esm/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
  96. package/dist/esm/components/agent-builder/constants/tools.d.ts +21 -1
  97. package/dist/esm/components/agent-builder/constants/tools.js +33 -23
  98. package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
  99. package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +0 -7
  100. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +96 -99
  101. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  102. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +272 -261
  103. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  104. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +4 -14
  105. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +36 -54
  106. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  107. package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +6 -6
  108. package/dist/esm/components/agent-builder/utils/sourceIcons.js +21 -19
  109. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  110. package/dist/esm/components/agent-listing/AgentTableRow.js +26 -23
  111. package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
  112. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js +3 -2
  113. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  114. package/dist/esm/components/toaster/Toaster.js +30 -25
  115. package/dist/esm/components/toaster/Toaster.js.map +1 -1
  116. package/dist/esm/components/toaster/Toaster.styled.js +5 -5
  117. package/dist/esm/components/toaster/Toaster.styled.js.map +1 -1
  118. package/dist/esm/components/variable-picker-v3/Content.js +15 -16
  119. package/dist/esm/components/variable-picker-v3/Content.js.map +1 -1
  120. package/dist/esm/components/zeroState/ZeroState.d.ts +2 -0
  121. package/dist/esm/components/zeroState/ZeroState.js +18 -17
  122. package/dist/esm/components/zeroState/ZeroState.js.map +1 -1
  123. package/dist/esm/editor/BikEditor.js +229 -222
  124. package/dist/esm/editor/BikEditor.js.map +1 -1
  125. package/dist/esm/editor/BikEditor.styles.js +14 -16
  126. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  127. package/dist/esm/editor/BikEditor.types.d.ts +0 -9
  128. package/dist/esm/editor/BikEditor.types.js.map +1 -1
  129. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +62 -60
  130. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  131. package/dist/esm/editor/extensions/mention/MentionDropdown.js +28 -28
  132. package/dist/esm/editor/extensions/mention/MentionDropdown.js.map +1 -1
  133. package/dist/esm/editor/extensions/mention/MentionExtension.js +19 -23
  134. package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
  135. package/dist/esm/icons/index.d.ts +25 -25
  136. package/dist/esm/index.js +541 -543
  137. package/dist/esm/index.js.map +1 -1
  138. package/package.json +1 -1
  139. package/dist/cjs/components/add-variableV2/AddDataPill.js +0 -10
  140. package/dist/cjs/components/add-variableV2/AddDataPill.js.map +0 -1
  141. package/dist/cjs/components/agent-builder/components/VariableInlineField.js +0 -65
  142. package/dist/cjs/components/agent-builder/components/VariableInlineField.js.map +0 -1
  143. package/dist/cjs/components/agent-builder/components/VariableTriggerArea.js +0 -10
  144. package/dist/cjs/components/agent-builder/components/VariableTriggerArea.js.map +0 -1
  145. package/dist/esm/components/add-variableV2/AddDataPill.d.ts +0 -24
  146. package/dist/esm/components/add-variableV2/AddDataPill.js +0 -33
  147. package/dist/esm/components/add-variableV2/AddDataPill.js.map +0 -1
  148. package/dist/esm/components/agent-builder/components/VariableInlineField.d.ts +0 -26
  149. package/dist/esm/components/agent-builder/components/VariableInlineField.js +0 -149
  150. package/dist/esm/components/agent-builder/components/VariableInlineField.js.map +0 -1
  151. package/dist/esm/components/agent-builder/components/VariableTriggerArea.d.ts +0 -46
  152. package/dist/esm/components/agent-builder/components/VariableTriggerArea.js +0 -118
  153. package/dist/esm/components/agent-builder/components/VariableTriggerArea.js.map +0 -1
@@ -1,61 +1,60 @@
1
1
  import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
- import { useState as c, useCallback as t } from "react";
3
- import { COLORS as se } from "../../constants/Theme.js";
4
- import { BuilderRoot as le, Main as ce, Rail as de, Content as ue, ContentCard as ge, StepScroll as fe } from "./AgentBuilder.styled.js";
5
- import { AgentBuilderFooter as me } from "./components/AgentBuilderFooter.js";
6
- import { AgentBuilderTopBar as he } from "./components/AgentBuilderTopBar.js";
2
+ import { useState as i, useCallback as t } from "react";
3
+ import { COLORS as le } from "../../constants/Theme.js";
4
+ import { BuilderRoot as ce, Main as de, Rail as ue, Content as fe, ContentCard as ge, StepScroll as me } from "./AgentBuilder.styled.js";
5
+ import { AgentBuilderFooter as he } from "./components/AgentBuilderFooter.js";
6
+ import { AgentBuilderTopBar as pe } from "./components/AgentBuilderTopBar.js";
7
7
  import { DiscardModal as ve } from "./components/DiscardModal.js";
8
- import { GoLiveModal as pe } from "./components/GoLiveModal.js";
9
- import { StepRail as Se } from "./components/StepRail.js";
10
- import { UndoToast as be } from "./components/UndoToast.js";
11
- import { AgentBuilderProvider as Ce, useAgentBuilderContext as Ae } from "./context/AgentBuilderContext.js";
12
- import { Step1About as De } from "./steps/Step1About.js";
13
- import { Step2WhenItStepsIn as Le } from "./steps/Step2WhenItStepsIn.js";
8
+ import { GoLiveModal as Se } from "./components/GoLiveModal.js";
9
+ import { StepRail as be } from "./components/StepRail.js";
10
+ import { UndoToast as Ce } from "./components/UndoToast.js";
11
+ import { AgentBuilderProvider as Ae, useAgentBuilderContext as Le } from "./context/AgentBuilderContext.js";
12
+ import { Step1About as ye } from "./steps/Step1About.js";
13
+ import { Step2WhenItStepsIn as De } from "./steps/Step2WhenItStepsIn.js";
14
14
  import { Step3HowItResponds as Te } from "./steps/Step3HowItResponds.js";
15
- import { Step4HandoverRules as ye } from "./steps/Step4HandoverRules.js";
16
- import { Spinner as Be } from "../spinner/Spinner.js";
15
+ import { Step4HandoverRules as Be } from "./steps/Step4HandoverRules.js";
16
+ import { Spinner as we } from "../spinner/Spinner.js";
17
17
  const Ge = () => {
18
- const { activeStep: d } = Ae();
18
+ const { activeStep: d } = Le();
19
19
  switch (d) {
20
20
  case "about":
21
- return /* @__PURE__ */ o(De, {});
21
+ return /* @__PURE__ */ o(ye, {});
22
22
  case "trigger":
23
- return /* @__PURE__ */ o(Le, {});
23
+ return /* @__PURE__ */ o(De, {});
24
24
  case "response":
25
25
  return /* @__PURE__ */ o(Te, {});
26
26
  case "handover":
27
- return /* @__PURE__ */ o(ye, {});
27
+ return /* @__PURE__ */ o(Be, {});
28
28
  default:
29
29
  return null;
30
30
  }
31
31
  }, Ie = (d) => {
32
32
  const {
33
33
  config: P,
34
- onChange: v,
34
+ onChange: p,
35
35
  onStepChange: u,
36
- onDiscard: p,
37
- onSaveDraft: r,
36
+ onDiscard: v,
37
+ onSaveDraft: s,
38
38
  onPublish: S,
39
- onBack: g,
40
- onTestAgent: f,
39
+ onBack: f,
40
+ onTestAgent: g,
41
41
  onGoToDashboard: m,
42
- onCreateSubAgent: i,
43
- onFetchSubAgent: w,
44
- onUpdateSubAgent: M,
45
- onImproveSubAgent: k,
46
- onImproveToolInstructions: R,
47
- onConnectIntegration: x,
48
- ...j
42
+ onCreateSubAgent: r,
43
+ onFetchSubAgent: M,
44
+ onUpdateSubAgent: k,
45
+ onImproveSubAgent: R,
46
+ onImproveToolInstructions: x,
47
+ onConnectIntegration: j,
48
+ ...H
49
49
  } = d, {
50
- value: s,
51
- activeStep: H,
52
- availableTools: F,
53
- availableSubAgents: N,
54
- availableIntents: O = [],
55
- availableModels: U = [],
56
- configToolTemplates: z,
57
- integrationStatus: E,
58
- variablesData: W,
50
+ value: l,
51
+ activeStep: F,
52
+ availableTools: N,
53
+ availableSubAgents: O,
54
+ availableIntents: U = [],
55
+ availableModels: z = [],
56
+ configToolTemplates: E,
57
+ integrationStatus: W,
59
58
  validation: $,
60
59
  applicationType: q,
61
60
  charLimits: J,
@@ -65,95 +64,103 @@ const Ge = () => {
65
64
  footerHint: Q = "Changes don’t affect customers until you go live",
66
65
  disableStepNavigation: V,
67
66
  debugLog: A
68
- } = P, [D, a] = c(null), [L, T] = c(!1), [X, l] = c(!1), [y, B] = c(!1), e = t(
69
- (n, ...ie) => {
70
- A && console.log(`[AgentBuilder] ${n}`, ...ie);
67
+ } = P, [L, a] = i(null), [y, D] = i(!1), [X, T] = i(!1), [Y, c] = i(!1), [B, w] = i(!1), n = t(
68
+ (e, ...re) => {
69
+ A && console.log(`[AgentBuilder] ${e}`, ...re);
71
70
  },
72
71
  [A]
73
- ), Y = t(
74
- (n) => {
75
- e("onChange", n), v(n);
76
- },
77
- [e, v]
78
72
  ), Z = t(
79
- (n) => {
80
- e("onStepChange", n), u?.(n);
73
+ (e) => {
74
+ n("onChange", e), p(e);
75
+ },
76
+ [n, p]
77
+ ), _ = t(
78
+ (e) => {
79
+ n("onStepChange", e), u?.(e);
81
80
  },
82
- [e, u]
83
- ), _ = t(() => (e("onSaveDraft"), r()), [e, r]), ee = t(() => (e("onPublish"), S()), [e, S]), ne = t(() => {
84
- e("onBack"), l(!0);
85
- }, [e]), oe = t(() => {
86
- e("onDiscardAndLeave"), l(!1), p();
87
- }, [e, p]), G = t(async () => {
88
- e("onSaveDraftAndLeave");
89
- const n = r();
90
- if (n && typeof n.then == "function") {
91
- B(!0);
81
+ [n, u]
82
+ ), ee = t(() => (n("onSaveDraft"), s()), [n, s]), ne = t(() => (n("onPublish"), S()), [n, S]), oe = t(() => {
83
+ n("onBack"), c(!0);
84
+ }, [n]), te = t(() => {
85
+ n("onDiscardAndLeave"), c(!1), v();
86
+ }, [n, v]), G = t(async () => {
87
+ n("onSaveDraftAndLeave");
88
+ const e = s();
89
+ if (e && typeof e.then == "function") {
90
+ w(!0);
92
91
  try {
93
- await n;
92
+ await e;
94
93
  } finally {
95
- B(!1);
94
+ w(!1);
96
95
  }
97
96
  }
98
- l(!1), g?.();
99
- }, [e, r, g]), te = t(() => {
100
- e("onTestAgent"), f?.();
101
- }, [e, f]), I = t(() => {
102
- e("onGoToDashboard"), m?.();
103
- }, [e, m]), ae = t(
104
- (n) => (e("onCreateSubAgent", n), i ? i(n) : Promise.reject(new Error("onCreateSubAgent not provided"))),
105
- [e, i]
106
- ), re = async () => {
107
- e("onGoLiveConfirm");
108
- const n = ee();
109
- if (n && typeof n.then == "function") {
97
+ c(!1), f?.();
98
+ }, [n, s, f]), ae = t(async () => {
99
+ n("onTestAgent");
100
+ const e = g?.();
101
+ if (e && typeof e.then == "function") {
110
102
  T(!0);
111
103
  try {
112
- await n, a("success");
104
+ await e;
113
105
  } finally {
114
106
  T(!1);
115
107
  }
108
+ }
109
+ }, [n, g]), I = t(() => {
110
+ n("onGoToDashboard"), m?.();
111
+ }, [n, m]), ie = t(
112
+ (e) => (n("onCreateSubAgent", e), r ? r(e) : Promise.reject(new Error("onCreateSubAgent not provided"))),
113
+ [n, r]
114
+ ), se = async () => {
115
+ n("onGoLiveConfirm");
116
+ const e = ne();
117
+ if (e && typeof e.then == "function") {
118
+ D(!0);
119
+ try {
120
+ await e, a("success");
121
+ } finally {
122
+ D(!1);
123
+ }
116
124
  } else
117
125
  a("success");
118
126
  };
119
127
  return /* @__PURE__ */ o(
120
- Ce,
128
+ Ae,
121
129
  {
122
- value: s,
123
- onChange: Y,
124
- activeStep: H,
125
- onStepChange: u ? Z : void 0,
126
- availableTools: F,
127
- availableSubAgents: N,
128
- availableIntents: O,
129
- availableModels: U,
130
- configToolTemplates: z,
131
- integrationStatus: E,
132
- onConnectIntegration: x,
133
- variablesData: W,
130
+ value: l,
131
+ onChange: Z,
132
+ activeStep: F,
133
+ onStepChange: u ? _ : void 0,
134
+ availableTools: N,
135
+ availableSubAgents: O,
136
+ availableIntents: U,
137
+ availableModels: z,
138
+ configToolTemplates: E,
139
+ integrationStatus: W,
140
+ onConnectIntegration: j,
134
141
  validation: $,
135
142
  applicationType: q,
136
143
  charLimits: J,
137
144
  disableStepNavigation: V,
138
- onCreateSubAgent: i ? ae : void 0,
139
- onFetchSubAgent: w,
140
- onUpdateSubAgent: M,
141
- onImproveSubAgent: k,
142
- onImproveToolInstructions: R,
143
- children: /* @__PURE__ */ h(le, { "data-test": j["data-test"] ?? "agent-builder", children: [
145
+ onCreateSubAgent: r ? ie : void 0,
146
+ onFetchSubAgent: M,
147
+ onUpdateSubAgent: k,
148
+ onImproveSubAgent: R,
149
+ onImproveToolInstructions: x,
150
+ children: /* @__PURE__ */ h(ce, { "data-test": H["data-test"] ?? "agent-builder", children: [
144
151
  /* @__PURE__ */ o(
145
- he,
152
+ pe,
146
153
  {
147
- name: s.name,
148
- status: s.status,
149
- onBack: g ? ne : void 0,
154
+ name: l.name,
155
+ status: l.status,
156
+ onBack: f ? oe : void 0,
150
157
  onSaveDraft: G,
151
- isSaving: b || y
158
+ isSaving: b || B
152
159
  }
153
160
  ),
154
- /* @__PURE__ */ h(ce, { children: [
155
- /* @__PURE__ */ o(de, { children: /* @__PURE__ */ o(Se, {}) }),
156
- /* @__PURE__ */ o(ue, { children: K ? /* @__PURE__ */ o(
161
+ /* @__PURE__ */ h(de, { children: [
162
+ /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(be, {}) }),
163
+ /* @__PURE__ */ o(fe, { children: K ? /* @__PURE__ */ o(
157
164
  "div",
158
165
  {
159
166
  style: {
@@ -162,51 +169,52 @@ const Ge = () => {
162
169
  justifyContent: "center",
163
170
  height: "100%"
164
171
  },
165
- children: /* @__PURE__ */ o(Be, { size: "large", color: se.stroke.brand })
172
+ children: /* @__PURE__ */ o(we, { size: "large", color: le.stroke.brand })
166
173
  }
167
174
  ) : /* @__PURE__ */ h(ge, { children: [
168
- /* @__PURE__ */ o(fe, { children: /* @__PURE__ */ o(Ge, {}) }),
175
+ /* @__PURE__ */ o(me, { children: /* @__PURE__ */ o(Ge, {}) }),
169
176
  /* @__PURE__ */ o(
170
- me,
177
+ he,
171
178
  {
172
179
  footerHint: Q,
173
- onTestAgent: f ? te : void 0,
180
+ onTestAgent: g ? ae : void 0,
181
+ isTesting: X,
174
182
  onGoLive: () => {
175
- e("onGoLive"), a("confirm");
183
+ n("onGoLive"), a("confirm");
176
184
  },
177
- isPublishing: C || L
185
+ isPublishing: C || y
178
186
  }
179
187
  )
180
188
  ] }) })
181
189
  ] }),
182
190
  /* @__PURE__ */ o(
183
- pe,
191
+ Se,
184
192
  {
185
- mode: D,
193
+ mode: L,
186
194
  onClose: () => {
187
- const n = D === "success";
188
- a(null), n && I();
195
+ const e = L === "success";
196
+ a(null), e && I();
189
197
  },
190
- onConfirm: re,
198
+ onConfirm: se,
191
199
  onSaveDraft: () => {
192
- a(null), _();
200
+ a(null), ee();
193
201
  },
194
202
  onGoToDashboard: m ? I : void 0,
195
- isPublishing: C || L
203
+ isPublishing: C || y
196
204
  }
197
205
  ),
198
206
  /* @__PURE__ */ o(
199
207
  ve,
200
208
  {
201
- open: X,
202
- onClose: () => l(!1),
203
- onDiscard: oe,
209
+ open: Y,
210
+ onClose: () => c(!1),
211
+ onDiscard: te,
204
212
  onSaveDraft: G,
205
- disableSaveDraft: !s.name.trim(),
206
- isSaving: b || y
213
+ disableSaveDraft: !l.name.trim(),
214
+ isSaving: b || B
207
215
  }
208
216
  ),
209
- /* @__PURE__ */ o(be, {})
217
+ /* @__PURE__ */ o(Ce, {})
210
218
  ] })
211
219
  }
212
220
  );
@@ -1 +1 @@
1
- {"version":3,"file":"AgentBuilder.js","sources":["../../../../src/components/agent-builder/AgentBuilder.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Spinner } from '@src/components/spinner';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAgentBuilderProps,\n\tAgentValue,\n\tSubAgentDraft,\n} from './AgentBuilder.model';\nimport {\n\tBuilderRoot,\n\tContent,\n\tContentCard,\n\tMain,\n\tRail,\n\tStepScroll,\n} from './AgentBuilder.styled';\nimport { AgentBuilderFooter } from './components/AgentBuilderFooter';\nimport { AgentBuilderTopBar } from './components/AgentBuilderTopBar';\nimport { DiscardModal } from './components/DiscardModal';\nimport { GoLiveModal, GoLiveModalMode } from './components/GoLiveModal';\nimport { StepRail } from './components/StepRail';\nimport { UndoToast } from './components/UndoToast';\nimport {\n\tAgentBuilderProvider,\n\tuseAgentBuilderContext,\n} from './context/AgentBuilderContext';\nimport { Step1About } from './steps/Step1About';\nimport { Step2WhenItStepsIn } from './steps/Step2WhenItStepsIn';\nimport { Step3HowItResponds } from './steps/Step3HowItResponds';\nimport { Step4HandoverRules } from './steps/Step4HandoverRules';\n\nconst StepContent: React.FC = () => {\n\tconst { activeStep } = useAgentBuilderContext();\n\tswitch (activeStep) {\n\t\tcase 'about':\n\t\t\treturn <Step1About />;\n\t\tcase 'trigger':\n\t\t\treturn <Step2WhenItStepsIn />;\n\t\tcase 'response':\n\t\t\treturn <Step3HowItResponds />;\n\t\tcase 'handover':\n\t\t\treturn <Step4HandoverRules />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\n/**\n * 4-step creation/edit wizard body for an AI agent. Presentational and\n * controlled — the consumer owns the `value`, persistence and routing.\n *\n * @example\n * <AgentBuilder\n * value={agent}\n * onChange={(patch) => setAgent({ ...agent, ...patch })}\n * availableTools={tools}\n * availableSubAgents={subAgents}\n * onDiscard={() => router.back()}\n * onSaveDraft={saveDraft}\n * onPublish={publish}\n * />\n */\nexport const AgentBuilder: React.FC<AgentBuilderProps> = (props) => {\n\tconst {\n\t\tconfig,\n\t\tonChange,\n\t\tonStepChange,\n\t\tonDiscard,\n\t\tonSaveDraft,\n\t\tonPublish,\n\t\tonBack,\n\t\tonTestAgent,\n\t\tonGoToDashboard,\n\t\tonCreateSubAgent,\n\t\tonFetchSubAgent,\n\t\tonUpdateSubAgent,\n\t\tonImproveSubAgent,\n\t\tonImproveToolInstructions,\n\t\tonConnectIntegration,\n\t\t...rest\n\t} = props;\n\tconst {\n\t\tvalue,\n\t\tactiveStep,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableIntents = [],\n\t\tavailableModels = [],\n\t\tconfigToolTemplates,\n\t\tintegrationStatus,\n\t\tvariablesData,\n\t\tvalidation,\n\t\tapplicationType,\n\t\tcharLimits,\n\t\tisSaving,\n\t\tisPublishing,\n\t\tisLoading,\n\t\tfooterHint = 'Changes don’t affect customers until you go live',\n\t\tdisableStepNavigation,\n\t\tdebugLog,\n\t} = config;\n\n\tconst [modalMode, setModalMode] = useState<GoLiveModalMode>(null);\n\tconst [publishingLocal, setPublishingLocal] = useState(false);\n\t// Back was pressed → confirm leaving (save draft / discard) before navigating.\n\tconst [showLeaveConfirm, setShowLeaveConfirm] = useState(false);\n\tconst [savingAndLeaving, setSavingAndLeaving] = useState(false);\n\n\t// Gated debug logging: each handler logs at its start only when `debugLog`.\n\tconst logAction = useCallback(\n\t\t(action: string, ...args: unknown[]) => {\n\t\t\tif (debugLog) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[AgentBuilder] ${action}`, ...args);\n\t\t\t}\n\t\t},\n\t\t[debugLog],\n\t);\n\n\tconst handleChange = useCallback(\n\t\t(patch: Partial<AgentValue>) => {\n\t\t\tlogAction('onChange', patch);\n\t\t\tonChange(patch);\n\t\t},\n\t\t[logAction, onChange],\n\t);\n\tconst handleStepChange = useCallback(\n\t\t(step: Parameters<NonNullable<typeof onStepChange>>[0]) => {\n\t\t\tlogAction('onStepChange', step);\n\t\t\tonStepChange?.(step);\n\t\t},\n\t\t[logAction, onStepChange],\n\t);\n\tconst handleSaveDraft = useCallback(() => {\n\t\tlogAction('onSaveDraft');\n\t\treturn onSaveDraft();\n\t}, [logAction, onSaveDraft]);\n\tconst handlePublish = useCallback(() => {\n\t\tlogAction('onPublish');\n\t\treturn onPublish();\n\t}, [logAction, onPublish]);\n\t// Back opens the \"Save as draft?\" confirmation rather than leaving directly.\n\tconst handleBack = useCallback(() => {\n\t\tlogAction('onBack');\n\t\tsetShowLeaveConfirm(true);\n\t}, [logAction]);\n\n\t// Modal \"Discard\" defers to the parent's discard handler (same as the top bar).\n\tconst handleDiscardAndLeave = useCallback(() => {\n\t\tlogAction('onDiscardAndLeave');\n\t\tsetShowLeaveConfirm(false);\n\t\tonDiscard();\n\t}, [logAction, onDiscard]);\n\n\tconst handleSaveDraftAndLeave = useCallback(async () => {\n\t\tlogAction('onSaveDraftAndLeave');\n\t\tconst result = onSaveDraft();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetSavingAndLeaving(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetSavingAndLeaving(false);\n\t\t\t}\n\t\t}\n\t\tsetShowLeaveConfirm(false);\n\t\tonBack?.();\n\t}, [logAction, onSaveDraft, onBack]);\n\tconst handleTestAgent = useCallback(() => {\n\t\tlogAction('onTestAgent');\n\t\tonTestAgent?.();\n\t}, [logAction, onTestAgent]);\n\tconst handleGoToDashboard = useCallback(() => {\n\t\tlogAction('onGoToDashboard');\n\t\tonGoToDashboard?.();\n\t}, [logAction, onGoToDashboard]);\n\tconst handleCreateSubAgent = useCallback(\n\t\t(draft: SubAgentDraft) => {\n\t\t\tlogAction('onCreateSubAgent', draft);\n\t\t\treturn onCreateSubAgent\n\t\t\t\t? onCreateSubAgent(draft)\n\t\t\t\t: Promise.reject(new Error('onCreateSubAgent not provided'));\n\t\t},\n\t\t[logAction, onCreateSubAgent],\n\t);\n\n\tconst handleConfirmGoLive = async () => {\n\t\tlogAction('onGoLiveConfirm');\n\t\tconst result = handlePublish();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetPublishingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t\tsetModalMode('success');\n\t\t\t} finally {\n\t\t\t\tsetPublishingLocal(false);\n\t\t\t}\n\t\t} else {\n\t\t\tsetModalMode('success');\n\t\t}\n\t};\n\n\treturn (\n\t\t<AgentBuilderProvider\n\t\t\tvalue={value}\n\t\t\tonChange={handleChange}\n\t\t\tactiveStep={activeStep}\n\t\t\tonStepChange={onStepChange ? handleStepChange : undefined}\n\t\t\tavailableTools={availableTools}\n\t\t\tavailableSubAgents={availableSubAgents}\n\t\t\tavailableIntents={availableIntents}\n\t\t\tavailableModels={availableModels}\n\t\t\tconfigToolTemplates={configToolTemplates}\n\t\t\tintegrationStatus={integrationStatus}\n\t\t\tonConnectIntegration={onConnectIntegration}\n\t\t\tvariablesData={variablesData}\n\t\t\tvalidation={validation}\n\t\t\tapplicationType={applicationType}\n\t\t\tcharLimits={charLimits}\n\t\t\tdisableStepNavigation={disableStepNavigation}\n\t\t\tonCreateSubAgent={onCreateSubAgent ? handleCreateSubAgent : undefined}\n\t\t\tonFetchSubAgent={onFetchSubAgent}\n\t\t\tonUpdateSubAgent={onUpdateSubAgent}\n\t\t\tonImproveSubAgent={onImproveSubAgent}\n\t\t\tonImproveToolInstructions={onImproveToolInstructions}\n\t\t>\n\t\t\t<BuilderRoot data-test={rest['data-test'] ?? 'agent-builder'}>\n\t\t\t\t<AgentBuilderTopBar\n\t\t\t\t\tname={value.name}\n\t\t\t\t\tstatus={value.status}\n\t\t\t\t\tonBack={onBack ? handleBack : undefined}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<Main>\n\t\t\t\t\t<Rail>\n\t\t\t\t\t\t<StepRail />\n\t\t\t\t\t</Rail>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Spinner size=\"large\" color={COLORS.stroke.brand} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ContentCard>\n\t\t\t\t\t\t\t\t<StepScroll>\n\t\t\t\t\t\t\t\t\t<StepContent />\n\t\t\t\t\t\t\t\t</StepScroll>\n\t\t\t\t\t\t\t\t<AgentBuilderFooter\n\t\t\t\t\t\t\t\t\tfooterHint={footerHint}\n\t\t\t\t\t\t\t\t\tonTestAgent={onTestAgent ? handleTestAgent : undefined}\n\t\t\t\t\t\t\t\t\tonGoLive={() => {\n\t\t\t\t\t\t\t\t\t\tlogAction('onGoLive');\n\t\t\t\t\t\t\t\t\t\tsetModalMode('confirm');\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ContentCard>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Content>\n\t\t\t\t</Main>\n\n\t\t\t\t<GoLiveModal\n\t\t\t\t\tmode={modalMode}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tconst wasSuccess = modalMode === 'success';\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\tif (wasSuccess) {\n\t\t\t\t\t\t\thandleGoToDashboard();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonConfirm={handleConfirmGoLive}\n\t\t\t\t\tonSaveDraft={() => {\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\thandleSaveDraft();\n\t\t\t\t\t}}\n\t\t\t\t\tonGoToDashboard={onGoToDashboard ? handleGoToDashboard : undefined}\n\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t/>\n\n\t\t\t\t<DiscardModal\n\t\t\t\t\topen={showLeaveConfirm}\n\t\t\t\t\tonClose={() => setShowLeaveConfirm(false)}\n\t\t\t\t\tonDiscard={handleDiscardAndLeave}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tdisableSaveDraft={!value.name.trim()}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<UndoToast />\n\t\t\t</BuilderRoot>\n\t\t</AgentBuilderProvider>\n\t);\n};\n\nAgentBuilder.displayName = 'AgentBuilder';\n"],"names":["StepContent","activeStep","useAgentBuilderContext","Step1About","Step2WhenItStepsIn","Step3HowItResponds","Step4HandoverRules","AgentBuilder","props","config","onChange","onStepChange","onDiscard","onSaveDraft","onPublish","onBack","onTestAgent","onGoToDashboard","onCreateSubAgent","onFetchSubAgent","onUpdateSubAgent","onImproveSubAgent","onImproveToolInstructions","onConnectIntegration","rest","value","availableTools","availableSubAgents","availableIntents","availableModels","configToolTemplates","integrationStatus","variablesData","validation","applicationType","charLimits","isSaving","isPublishing","isLoading","footerHint","disableStepNavigation","debugLog","modalMode","setModalMode","useState","publishingLocal","setPublishingLocal","showLeaveConfirm","setShowLeaveConfirm","savingAndLeaving","setSavingAndLeaving","logAction","useCallback","action","args","handleChange","patch","handleStepChange","step","handleSaveDraft","handlePublish","handleBack","handleDiscardAndLeave","handleSaveDraftAndLeave","result","handleTestAgent","handleGoToDashboard","handleCreateSubAgent","draft","handleConfirmGoLive","jsx","AgentBuilderProvider","BuilderRoot","AgentBuilderTopBar","Main","Rail","StepRail","Content","Spinner","COLORS","ContentCard","StepScroll","AgentBuilderFooter","GoLiveModal","wasSuccess","DiscardModal","UndoToast"],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAwB,MAAM;AACnC,QAAM,EAAE,YAAAC,EAAA,IAAeC,GAAA;AACvB,UAAQD,GAAA;AAAA,IACP,KAAK;AACJ,+BAAQE,IAAA,EAAW;AAAA,IACpB,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B;AACC,aAAO;AAAA,EAAA;AAEV,GAiBaC,KAA4C,CAACC,MAAU;AACnE,QAAM;AAAA,IACL,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACAhB,GACE;AAAA,IACL,OAAAiB;AAAA,IACA,YAAAxB;AAAA,IACA,gBAAAyB;AAAA,IACA,oBAAAC;AAAA,IACA,kBAAAC,IAAmB,CAAA;AAAA,IACnB,iBAAAC,IAAkB,CAAA;AAAA,IAClB,qBAAAC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AAA,gBACA,YAAA3C;AAAA,gBACA,aAAavB,IAAciD,KAAkB;AAAA,gBAC7C,UAAU,MAAM;AACf,kBAAAd,EAAU,UAAU,GACpBR,EAAa,SAAS;AAAA,gBACvB;AAAA,gBACA,cAAcN,KAAgBQ;AAAA,cAAA;AAAA,YAAA;AAAA,UAC/B,EAAA,CACD,EAAA,CAEF;AAAA,QAAA,GACD;AAAA,QAEA,gBAAAyB;AAAA,UAACa;AAAA,UAAA;AAAA,YACA,MAAMzC;AAAA,YACN,SAAS,MAAM;AACd,oBAAM0C,IAAa1C,MAAc;AACjC,cAAAC,EAAa,IAAI,GACbyC,KACHlB,EAAA;AAAA,YAEF;AAAA,YACA,WAAWG;AAAA,YACX,aAAa,MAAM;AAClB,cAAA1B,EAAa,IAAI,GACjBgB,EAAA;AAAA,YACD;AAAA,YACA,iBAAiB1C,IAAkBiD,IAAsB;AAAA,YACzD,cAAc7B,KAAgBQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAG/B,gBAAAyB;AAAA,UAACe;AAAA,UAAA;AAAA,YACA,MAAMtC;AAAA,YACN,SAAS,MAAMC,EAAoB,EAAK;AAAA,YACxC,WAAWc;AAAA,YACX,aAAaC;AAAA,YACb,kBAAkB,CAACtC,EAAM,KAAK,KAAA;AAAA,YAC9B,UAAUW,KAAYa;AAAA,UAAA;AAAA,QAAA;AAAA,0BAGtBqC,IAAA,CAAA,CAAU;AAAA,MAAA,EAAA,CACZ;AAAA,IAAA;AAAA,EAAA;AAGH;AAEA/E,GAAa,cAAc;"}
1
+ {"version":3,"file":"AgentBuilder.js","sources":["../../../../src/components/agent-builder/AgentBuilder.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Spinner } from '@src/components/spinner';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAgentBuilderProps,\n\tAgentValue,\n\tSubAgentDraft,\n} from './AgentBuilder.model';\nimport {\n\tBuilderRoot,\n\tContent,\n\tContentCard,\n\tMain,\n\tRail,\n\tStepScroll,\n} from './AgentBuilder.styled';\nimport { AgentBuilderFooter } from './components/AgentBuilderFooter';\nimport { AgentBuilderTopBar } from './components/AgentBuilderTopBar';\nimport { DiscardModal } from './components/DiscardModal';\nimport { GoLiveModal, GoLiveModalMode } from './components/GoLiveModal';\nimport { StepRail } from './components/StepRail';\nimport { UndoToast } from './components/UndoToast';\nimport {\n\tAgentBuilderProvider,\n\tuseAgentBuilderContext,\n} from './context/AgentBuilderContext';\nimport { Step1About } from './steps/Step1About';\nimport { Step2WhenItStepsIn } from './steps/Step2WhenItStepsIn';\nimport { Step3HowItResponds } from './steps/Step3HowItResponds';\nimport { Step4HandoverRules } from './steps/Step4HandoverRules';\n\nconst StepContent: React.FC = () => {\n\tconst { activeStep } = useAgentBuilderContext();\n\tswitch (activeStep) {\n\t\tcase 'about':\n\t\t\treturn <Step1About />;\n\t\tcase 'trigger':\n\t\t\treturn <Step2WhenItStepsIn />;\n\t\tcase 'response':\n\t\t\treturn <Step3HowItResponds />;\n\t\tcase 'handover':\n\t\t\treturn <Step4HandoverRules />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\n/**\n * 4-step creation/edit wizard body for an AI agent. Presentational and\n * controlled — the consumer owns the `value`, persistence and routing.\n *\n * @example\n * <AgentBuilder\n * value={agent}\n * onChange={(patch) => setAgent({ ...agent, ...patch })}\n * availableTools={tools}\n * availableSubAgents={subAgents}\n * onDiscard={() => router.back()}\n * onSaveDraft={saveDraft}\n * onPublish={publish}\n * />\n */\nexport const AgentBuilder: React.FC<AgentBuilderProps> = (props) => {\n\tconst {\n\t\tconfig,\n\t\tonChange,\n\t\tonStepChange,\n\t\tonDiscard,\n\t\tonSaveDraft,\n\t\tonPublish,\n\t\tonBack,\n\t\tonTestAgent,\n\t\tonGoToDashboard,\n\t\tonCreateSubAgent,\n\t\tonFetchSubAgent,\n\t\tonUpdateSubAgent,\n\t\tonImproveSubAgent,\n\t\tonImproveToolInstructions,\n\t\tonConnectIntegration,\n\t\t...rest\n\t} = props;\n\tconst {\n\t\tvalue,\n\t\tactiveStep,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableIntents = [],\n\t\tavailableModels = [],\n\t\tconfigToolTemplates,\n\t\tintegrationStatus,\n\t\tvalidation,\n\t\tapplicationType,\n\t\tcharLimits,\n\t\tisSaving,\n\t\tisPublishing,\n\t\tisLoading,\n\t\tfooterHint = 'Changes don’t affect customers until you go live',\n\t\tdisableStepNavigation,\n\t\tdebugLog,\n\t} = config;\n\n\tconst [modalMode, setModalMode] = useState<GoLiveModalMode>(null);\n\tconst [publishingLocal, setPublishingLocal] = useState(false);\n\t// True while onTestAgent's async work (e.g. save-as-draft before the test\n\t// modal opens) is in flight — loads + disables the Test agent button.\n\tconst [testingLocal, setTestingLocal] = useState(false);\n\t// Back was pressed → confirm leaving (save draft / discard) before navigating.\n\tconst [showLeaveConfirm, setShowLeaveConfirm] = useState(false);\n\tconst [savingAndLeaving, setSavingAndLeaving] = useState(false);\n\n\t// Gated debug logging: each handler logs at its start only when `debugLog`.\n\tconst logAction = useCallback(\n\t\t(action: string, ...args: unknown[]) => {\n\t\t\tif (debugLog) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[AgentBuilder] ${action}`, ...args);\n\t\t\t}\n\t\t},\n\t\t[debugLog],\n\t);\n\n\tconst handleChange = useCallback(\n\t\t(patch: Partial<AgentValue>) => {\n\t\t\tlogAction('onChange', patch);\n\t\t\tonChange(patch);\n\t\t},\n\t\t[logAction, onChange],\n\t);\n\tconst handleStepChange = useCallback(\n\t\t(step: Parameters<NonNullable<typeof onStepChange>>[0]) => {\n\t\t\tlogAction('onStepChange', step);\n\t\t\tonStepChange?.(step);\n\t\t},\n\t\t[logAction, onStepChange],\n\t);\n\tconst handleSaveDraft = useCallback(() => {\n\t\tlogAction('onSaveDraft');\n\t\treturn onSaveDraft();\n\t}, [logAction, onSaveDraft]);\n\tconst handlePublish = useCallback(() => {\n\t\tlogAction('onPublish');\n\t\treturn onPublish();\n\t}, [logAction, onPublish]);\n\t// Back opens the \"Save as draft?\" confirmation rather than leaving directly.\n\tconst handleBack = useCallback(() => {\n\t\tlogAction('onBack');\n\t\tsetShowLeaveConfirm(true);\n\t}, [logAction]);\n\n\t// Modal \"Discard\" defers to the parent's discard handler (same as the top bar).\n\tconst handleDiscardAndLeave = useCallback(() => {\n\t\tlogAction('onDiscardAndLeave');\n\t\tsetShowLeaveConfirm(false);\n\t\tonDiscard();\n\t}, [logAction, onDiscard]);\n\n\tconst handleSaveDraftAndLeave = useCallback(async () => {\n\t\tlogAction('onSaveDraftAndLeave');\n\t\tconst result = onSaveDraft();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetSavingAndLeaving(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetSavingAndLeaving(false);\n\t\t\t}\n\t\t}\n\t\tsetShowLeaveConfirm(false);\n\t\tonBack?.();\n\t}, [logAction, onSaveDraft, onBack]);\n\tconst handleTestAgent = useCallback(async () => {\n\t\tlogAction('onTestAgent');\n\t\tconst result = onTestAgent?.();\n\t\t// A new agent saves as draft before the test modal opens — that's slow, so\n\t\t// disable + load the button until it settles (prevents double-triggering).\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetTestingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetTestingLocal(false);\n\t\t\t}\n\t\t}\n\t}, [logAction, onTestAgent]);\n\tconst handleGoToDashboard = useCallback(() => {\n\t\tlogAction('onGoToDashboard');\n\t\tonGoToDashboard?.();\n\t}, [logAction, onGoToDashboard]);\n\tconst handleCreateSubAgent = useCallback(\n\t\t(draft: SubAgentDraft) => {\n\t\t\tlogAction('onCreateSubAgent', draft);\n\t\t\treturn onCreateSubAgent\n\t\t\t\t? onCreateSubAgent(draft)\n\t\t\t\t: Promise.reject(new Error('onCreateSubAgent not provided'));\n\t\t},\n\t\t[logAction, onCreateSubAgent],\n\t);\n\n\tconst handleConfirmGoLive = async () => {\n\t\tlogAction('onGoLiveConfirm');\n\t\tconst result = handlePublish();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetPublishingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t\tsetModalMode('success');\n\t\t\t} finally {\n\t\t\t\tsetPublishingLocal(false);\n\t\t\t}\n\t\t} else {\n\t\t\tsetModalMode('success');\n\t\t}\n\t};\n\n\treturn (\n\t\t<AgentBuilderProvider\n\t\t\tvalue={value}\n\t\t\tonChange={handleChange}\n\t\t\tactiveStep={activeStep}\n\t\t\tonStepChange={onStepChange ? handleStepChange : undefined}\n\t\t\tavailableTools={availableTools}\n\t\t\tavailableSubAgents={availableSubAgents}\n\t\t\tavailableIntents={availableIntents}\n\t\t\tavailableModels={availableModels}\n\t\t\tconfigToolTemplates={configToolTemplates}\n\t\t\tintegrationStatus={integrationStatus}\n\t\t\tonConnectIntegration={onConnectIntegration}\n\t\t\tvalidation={validation}\n\t\t\tapplicationType={applicationType}\n\t\t\tcharLimits={charLimits}\n\t\t\tdisableStepNavigation={disableStepNavigation}\n\t\t\tonCreateSubAgent={onCreateSubAgent ? handleCreateSubAgent : undefined}\n\t\t\tonFetchSubAgent={onFetchSubAgent}\n\t\t\tonUpdateSubAgent={onUpdateSubAgent}\n\t\t\tonImproveSubAgent={onImproveSubAgent}\n\t\t\tonImproveToolInstructions={onImproveToolInstructions}\n\t\t>\n\t\t\t<BuilderRoot data-test={rest['data-test'] ?? 'agent-builder'}>\n\t\t\t\t<AgentBuilderTopBar\n\t\t\t\t\tname={value.name}\n\t\t\t\t\tstatus={value.status}\n\t\t\t\t\tonBack={onBack ? handleBack : undefined}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<Main>\n\t\t\t\t\t<Rail>\n\t\t\t\t\t\t<StepRail />\n\t\t\t\t\t</Rail>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Spinner size=\"large\" color={COLORS.stroke.brand} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ContentCard>\n\t\t\t\t\t\t\t\t<StepScroll>\n\t\t\t\t\t\t\t\t\t<StepContent />\n\t\t\t\t\t\t\t\t</StepScroll>\n\t\t\t\t\t\t\t\t<AgentBuilderFooter\n\t\t\t\t\t\t\t\t\tfooterHint={footerHint}\n\t\t\t\t\t\t\t\t\tonTestAgent={onTestAgent ? handleTestAgent : undefined}\n\t\t\t\t\t\t\t\t\tisTesting={testingLocal}\n\t\t\t\t\t\t\t\t\tonGoLive={() => {\n\t\t\t\t\t\t\t\t\t\tlogAction('onGoLive');\n\t\t\t\t\t\t\t\t\t\tsetModalMode('confirm');\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ContentCard>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Content>\n\t\t\t\t</Main>\n\n\t\t\t\t<GoLiveModal\n\t\t\t\t\tmode={modalMode}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tconst wasSuccess = modalMode === 'success';\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\tif (wasSuccess) {\n\t\t\t\t\t\t\thandleGoToDashboard();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonConfirm={handleConfirmGoLive}\n\t\t\t\t\tonSaveDraft={() => {\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\thandleSaveDraft();\n\t\t\t\t\t}}\n\t\t\t\t\tonGoToDashboard={onGoToDashboard ? handleGoToDashboard : undefined}\n\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t/>\n\n\t\t\t\t<DiscardModal\n\t\t\t\t\topen={showLeaveConfirm}\n\t\t\t\t\tonClose={() => setShowLeaveConfirm(false)}\n\t\t\t\t\tonDiscard={handleDiscardAndLeave}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tdisableSaveDraft={!value.name.trim()}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<UndoToast />\n\t\t\t</BuilderRoot>\n\t\t</AgentBuilderProvider>\n\t);\n};\n\nAgentBuilder.displayName = 'AgentBuilder';\n"],"names":["StepContent","activeStep","useAgentBuilderContext","Step1About","Step2WhenItStepsIn","Step3HowItResponds","Step4HandoverRules","AgentBuilder","props","config","onChange","onStepChange","onDiscard","onSaveDraft","onPublish","onBack","onTestAgent","onGoToDashboard","onCreateSubAgent","onFetchSubAgent","onUpdateSubAgent","onImproveSubAgent","onImproveToolInstructions","onConnectIntegration","rest","value","availableTools","availableSubAgents","availableIntents","availableModels","configToolTemplates","integrationStatus","validation","applicationType","charLimits","isSaving","isPublishing","isLoading","footerHint","disableStepNavigation","debugLog","modalMode","setModalMode","useState","publishingLocal","setPublishingLocal","testingLocal","setTestingLocal","showLeaveConfirm","setShowLeaveConfirm","savingAndLeaving","setSavingAndLeaving","logAction","useCallback","action","args","handleChange","patch","handleStepChange","step","handleSaveDraft","handlePublish","handleBack","handleDiscardAndLeave","handleSaveDraftAndLeave","result","handleTestAgent","handleGoToDashboard","handleCreateSubAgent","draft","handleConfirmGoLive","jsx","AgentBuilderProvider","BuilderRoot","AgentBuilderTopBar","Main","Rail","StepRail","Content","Spinner","COLORS","ContentCard","StepScroll","AgentBuilderFooter","GoLiveModal","wasSuccess","DiscardModal","UndoToast"],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAwB,MAAM;AACnC,QAAM,EAAE,YAAAC,EAAA,IAAeC,GAAA;AACvB,UAAQD,GAAA;AAAA,IACP,KAAK;AACJ,+BAAQE,IAAA,EAAW;AAAA,IACpB,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B;AACC,aAAO;AAAA,EAAA;AAEV,GAiBaC,KAA4C,CAACC,MAAU;AACnE,QAAM;AAAA,IACL,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACAhB,GACE;AAAA,IACL,OAAAiB;AAAA,IACA,YAAAxB;AAAA,IACA,gBAAAyB;AAAA,IACA,oBAAAC;AAAA,IACA,kBAAAC,IAAmB,CAAA;AAAA,IACnB,iBAAAC,IAAkB,CAAA;AAAA,IAClB,qBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,uBAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,IACG/B,GAEE,CAACgC,GAAWC,CAAY,IAAIC,EAA0B,IAAI,GAC1D,CAACC,GAAiBC,CAAk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AM;AACf,kBAAAM,EAAU,UAAU,GACpBV,EAAa,SAAS;AAAA,gBACvB;AAAA,gBACA,cAAcN,KAAgBQ;AAAA,cAAA;AAAA,YAAA;AAAA,UAC/B,EAAA,CACD,EAAA,CAEF;AAAA,QAAA,GACD;AAAA,QAEA,gBAAA2B;AAAA,UAACa;AAAA,UAAA;AAAA,YACA,MAAM3C;AAAA,YACN,SAAS,MAAM;AACd,oBAAM4C,IAAa5C,MAAc;AACjC,cAAAC,EAAa,IAAI,GACb2C,KACHlB,EAAA;AAAA,YAEF;AAAA,YACA,WAAWG;AAAA,YACX,aAAa,MAAM;AAClB,cAAA5B,EAAa,IAAI,GACjBkB,GAAA;AAAA,YACD;AAAA,YACA,iBAAiB3C,IAAkBkD,IAAsB;AAAA,YACzD,cAAc/B,KAAgBQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAG/B,gBAAA2B;AAAA,UAACe;AAAA,UAAA;AAAA,YACA,MAAMtC;AAAA,YACN,SAAS,MAAMC,EAAoB,EAAK;AAAA,YACxC,WAAWc;AAAA,YACX,aAAaC;AAAA,YACb,kBAAkB,CAACvC,EAAM,KAAK,KAAA;AAAA,YAC9B,UAAUU,KAAYe;AAAA,UAAA;AAAA,QAAA;AAAA,0BAGtBqC,IAAA,CAAA,CAAU;AAAA,MAAA,EAAA,CACZ;AAAA,IAAA;AAAA,EAAA;AAGH;AAEAhF,GAAa,cAAc;"}
@@ -1,6 +1,5 @@
1
1
  import { AgentConfig, AgentHandoverConfig, AgentToolDoc, IntentOption, ModelOption, StepKey, StepValidation, SubAgentRef, Trigger } from '@bikdotai/bik-models/ai-agents';
2
2
  import { ApplicationType } from '@bikdotai/bik-models/growth';
3
- import { VariableListInterfaceV3 } from '../variable-picker-v3/model';
4
3
  import { AgentCharLimits } from './constants/charLimits';
5
4
  import { ConfigToolKey, ToolSource } from './constants/tools';
6
5
  /**
@@ -233,13 +232,6 @@ export interface AgentBuilderConfig {
233
232
  * {@link AgentBuilderProps.onConnectIntegration}.
234
233
  */
235
234
  integrationStatus?: Partial<Record<ToolSource, boolean>>;
236
- /**
237
- * Variable catalog for the `@` picker's "Variables" view (the shared
238
- * VariablePicker's `data` shape). Picking a variable inserts its
239
- * `{{actualValue}}` token into the instructions / guardrails at the cursor.
240
- * Omit (or pass empty) to hide the Variables category entirely.
241
- */
242
- variablesData?: VariableListInterfaceV3[];
243
235
  /** Host application context the merchant runs in (e.g. ApplicationType.MANIFEST). */
244
236
  applicationType?: ApplicationType;
245
237
  /** Optional consumer-supplied validity; merged over the builder's derived validity. */
@@ -286,8 +278,13 @@ export interface AgentBuilderProps {
286
278
  onPublish: () => void | Promise<void>;
287
279
  /** Back arrow in the top bar (e.g. return to listing). */
288
280
  onBack?: () => void;
289
- /** Trigger a test run of the agent (top-bar "Test" action). Omit to hide it. */
290
- onTestAgent?: () => void;
281
+ /**
282
+ * Trigger a test run of the agent (last-step "Test agent" action). Omit to
283
+ * hide it. If it returns a promise (e.g. a new agent is saved as draft before
284
+ * the test modal opens), the button shows a loader and stays disabled until it
285
+ * settles, so a slow save can't be double-triggered.
286
+ */
287
+ onTestAgent?: () => void | Promise<void>;
291
288
  /** After a successful go-live, navigate to the dashboard. Drives the success modal CTA. */
292
289
  onGoToDashboard?: () => void;
293
290
  /**
@@ -2,6 +2,8 @@ import { default as React } from 'react';
2
2
  interface AgentBuilderFooterProps {
3
3
  footerHint: string;
4
4
  onTestAgent?: () => void;
5
+ /** Loader + disabled on the Test agent button while its action is in flight. */
6
+ isTesting?: boolean;
5
7
  /** Opens the go-live confirmation. */
6
8
  onGoLive: () => void;
7
9
  isPublishing?: boolean;
@@ -1,41 +1,42 @@
1
- import { jsxs as e, jsx as t, Fragment as g } from "react/jsx-runtime";
2
- import x from "../../../assets/icons/info.svg.js";
3
- import { BodyCaption as y } from "../../TypographyStyle.js";
4
- import { COLORS as r } from "../../../constants/Theme.js";
5
- import { Footer as h, FooterHint as f, FooterActions as v } from "../AgentBuilder.styled.js";
1
+ import { jsxs as e, jsx as t, Fragment as x } from "react/jsx-runtime";
2
+ import y from "../../../assets/icons/info.svg.js";
3
+ import { BodyCaption as h } from "../../TypographyStyle.js";
4
+ import { COLORS as n } from "../../../constants/Theme.js";
5
+ import { Footer as f, FooterHint as v, FooterActions as C } from "../AgentBuilder.styled.js";
6
6
  import { useAgentBuilderContext as T } from "../context/AgentBuilderContext.js";
7
7
  import { Button as o } from "../../button/Button.js";
8
8
  const A = ({
9
- footerHint: n,
9
+ footerHint: a,
10
10
  onTestAgent: i,
11
+ isTesting: r,
11
12
  onGoLive: l,
12
- isPublishing: a
13
+ isPublishing: s
13
14
  }) => {
14
15
  const {
15
- isFirstStep: s,
16
- isLastStep: d,
17
- goPrev: c,
18
- goNext: p,
19
- isActiveStepValid: m,
20
- validation: u
21
- } = T(), b = Object.values(u).every(Boolean);
22
- return /* @__PURE__ */ e(h, { children: [
23
- /* @__PURE__ */ e(f, { children: [
24
- /* @__PURE__ */ t(x, { width: 14, height: 14, color: r.content.placeholder }),
25
- /* @__PURE__ */ t(y, { color: r.content.placeholder, children: n })
26
- ] }),
16
+ isFirstStep: d,
17
+ isLastStep: c,
18
+ goPrev: p,
19
+ goNext: m,
20
+ isActiveStepValid: u,
21
+ validation: b
22
+ } = T(), g = Object.values(b).every(Boolean);
23
+ return /* @__PURE__ */ e(f, { children: [
27
24
  /* @__PURE__ */ e(v, { children: [
28
- !s && /* @__PURE__ */ t(
25
+ /* @__PURE__ */ t(y, { width: 14, height: 14, color: n.content.placeholder }),
26
+ /* @__PURE__ */ t(h, { color: n.content.placeholder, children: a })
27
+ ] }),
28
+ /* @__PURE__ */ e(C, { children: [
29
+ !d && /* @__PURE__ */ t(
29
30
  o,
30
31
  {
31
32
  "data-test": "agent-builder-back-step",
32
33
  buttonType: "tertiaryGray",
33
34
  size: "small",
34
35
  buttonText: "Back",
35
- onClick: c
36
+ onClick: p
36
37
  }
37
38
  ),
38
- d ? /* @__PURE__ */ e(g, { children: [
39
+ c ? /* @__PURE__ */ e(x, { children: [
39
40
  i && /* @__PURE__ */ t(
40
41
  o,
41
42
  {
@@ -43,6 +44,8 @@ const A = ({
43
44
  buttonType: "secondary",
44
45
  size: "small",
45
46
  buttonText: "Test agent",
47
+ isLoading: r,
48
+ disabled: r,
46
49
  onClick: i
47
50
  }
48
51
  ),
@@ -53,8 +56,8 @@ const A = ({
53
56
  buttonType: "primary",
54
57
  size: "small",
55
58
  buttonText: "Go live",
56
- disabled: !b,
57
- isLoading: a,
59
+ disabled: !g,
60
+ isLoading: s,
58
61
  onClick: l
59
62
  }
60
63
  )
@@ -65,8 +68,8 @@ const A = ({
65
68
  buttonType: "primary",
66
69
  size: "small",
67
70
  buttonText: "Next",
68
- disabled: !m,
69
- onClick: p
71
+ disabled: !u,
72
+ onClick: m
70
73
  }
71
74
  )
72
75
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"AgentBuilderFooter.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderFooter.tsx"],"sourcesContent":["import InfoIcon from '@src/assets/icons/info.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { Footer, FooterActions, FooterHint } from '../AgentBuilder.styled';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\ninterface AgentBuilderFooterProps {\n\tfooterHint: string;\n\tonTestAgent?: () => void;\n\t/** Opens the go-live confirmation. */\n\tonGoLive: () => void;\n\tisPublishing?: boolean;\n}\n\nexport const AgentBuilderFooter: React.FC<AgentBuilderFooterProps> = ({\n\tfooterHint,\n\tonTestAgent,\n\tonGoLive,\n\tisPublishing,\n}) => {\n\tconst {\n\t\tisFirstStep,\n\t\tisLastStep,\n\t\tgoPrev,\n\t\tgoNext,\n\t\tisActiveStepValid,\n\t\tvalidation,\n\t} = useAgentBuilderContext();\n\t// Publishing requires every step complete, not just the active one.\n\tconst allStepsValid = Object.values(validation).every(Boolean);\n\n\treturn (\n\t\t<Footer>\n\t\t\t<FooterHint>\n\t\t\t\t<InfoIcon width={14} height={14} color={COLORS.content.placeholder} />\n\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t{footerHint}\n\t\t\t\t</BodyCaption>\n\t\t\t</FooterHint>\n\n\t\t\t<FooterActions>\n\t\t\t\t{!isFirstStep && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-back-step\"\n\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Back\"\n\t\t\t\t\t\tonClick={goPrev}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{isLastStep ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{onTestAgent && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-test=\"agent-builder-test\"\n\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tbuttonText=\"Test agent\"\n\t\t\t\t\t\t\t\tonClick={onTestAgent}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdata-test=\"agent-builder-go-live\"\n\t\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tbuttonText=\"Go live\"\n\t\t\t\t\t\t\tdisabled={!allStepsValid}\n\t\t\t\t\t\t\tisLoading={isPublishing}\n\t\t\t\t\t\t\tonClick={onGoLive}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-next\"\n\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Next\"\n\t\t\t\t\t\tdisabled={!isActiveStepValid}\n\t\t\t\t\t\tonClick={goNext}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</FooterActions>\n\t\t</Footer>\n\t);\n};\n"],"names":["AgentBuilderFooter","footerHint","onTestAgent","onGoLive","isPublishing","isFirstStep","isLastStep","goPrev","goNext","isActiveStepValid","validation","useAgentBuilderContext","allStepsValid","Footer","jsxs","FooterHint","jsx","InfoIcon","COLORS","BodyCaption","FooterActions","Button","Fragment"],"mappings":";;;;;;;AAgBO,MAAMA,IAAwD,CAAC;AAAA,EACrE,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AACD,MAAM;AACL,QAAM;AAAA,IACL,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACGC,EAAA,GAEEC,IAAgB,OAAO,OAAOF,CAAU,EAAE,MAAM,OAAO;AAE7D,2BACEG,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI,OAAOC,EAAO,QAAQ,YAAA,CAAa;AAAA,wBACnEC,GAAA,EAAY,OAAOD,EAAO,QAAQ,aACjC,UAAAjB,EAAA,CACF;AAAA,IAAA,GACD;AAAA,sBAECmB,GAAA,EACC,UAAA;AAAA,MAAA,CAACf,KACD,gBAAAW;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,YAAW;AAAA,UACX,MAAK;AAAA,UACL,YAAW;AAAA,UACX,SAASd;AAAA,QAAA;AAAA,MAAA;AAAA,MAIVD,IACA,gBAAAQ,EAAAQ,GAAA,EACE,UAAA;AAAA,QAAApB,KACA,gBAAAc;AAAA,UAACK;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,YAAW;AAAA,YACX,MAAK;AAAA,YACL,YAAW;AAAA,YACX,SAASnB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGX,gBAAAc;AAAA,UAACK;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,YAAW;AAAA,YACX,MAAK;AAAA,YACL,YAAW;AAAA,YACX,UAAU,CAACT;AAAA,YACX,WAAWR;AAAA,YACX,SAASD;AAAA,UAAA;AAAA,QAAA;AAAA,MACV,EAAA,CACD,IAEA,gBAAAa;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,YAAW;AAAA,UACX,MAAK;AAAA,UACL,YAAW;AAAA,UACX,UAAU,CAACZ;AAAA,UACX,SAASD;AAAA,QAAA;AAAA,MAAA;AAAA,IACV,EAAA,CAEF;AAAA,EAAA,GACD;AAEF;"}
1
+ {"version":3,"file":"AgentBuilderFooter.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderFooter.tsx"],"sourcesContent":["import InfoIcon from '@src/assets/icons/info.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { Footer, FooterActions, FooterHint } from '../AgentBuilder.styled';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\ninterface AgentBuilderFooterProps {\n\tfooterHint: string;\n\tonTestAgent?: () => void;\n\t/** Loader + disabled on the Test agent button while its action is in flight. */\n\tisTesting?: boolean;\n\t/** Opens the go-live confirmation. */\n\tonGoLive: () => void;\n\tisPublishing?: boolean;\n}\n\nexport const AgentBuilderFooter: React.FC<AgentBuilderFooterProps> = ({\n\tfooterHint,\n\tonTestAgent,\n\tisTesting,\n\tonGoLive,\n\tisPublishing,\n}) => {\n\tconst {\n\t\tisFirstStep,\n\t\tisLastStep,\n\t\tgoPrev,\n\t\tgoNext,\n\t\tisActiveStepValid,\n\t\tvalidation,\n\t} = useAgentBuilderContext();\n\t// Publishing requires every step complete, not just the active one.\n\tconst allStepsValid = Object.values(validation).every(Boolean);\n\n\treturn (\n\t\t<Footer>\n\t\t\t<FooterHint>\n\t\t\t\t<InfoIcon width={14} height={14} color={COLORS.content.placeholder} />\n\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t{footerHint}\n\t\t\t\t</BodyCaption>\n\t\t\t</FooterHint>\n\n\t\t\t<FooterActions>\n\t\t\t\t{!isFirstStep && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-back-step\"\n\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Back\"\n\t\t\t\t\t\tonClick={goPrev}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{isLastStep ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{onTestAgent && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-test=\"agent-builder-test\"\n\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tbuttonText=\"Test agent\"\n\t\t\t\t\t\t\t\tisLoading={isTesting}\n\t\t\t\t\t\t\t\tdisabled={isTesting}\n\t\t\t\t\t\t\t\tonClick={onTestAgent}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdata-test=\"agent-builder-go-live\"\n\t\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tbuttonText=\"Go live\"\n\t\t\t\t\t\t\tdisabled={!allStepsValid}\n\t\t\t\t\t\t\tisLoading={isPublishing}\n\t\t\t\t\t\t\tonClick={onGoLive}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-next\"\n\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Next\"\n\t\t\t\t\t\tdisabled={!isActiveStepValid}\n\t\t\t\t\t\tonClick={goNext}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</FooterActions>\n\t\t</Footer>\n\t);\n};\n"],"names":["AgentBuilderFooter","footerHint","onTestAgent","isTesting","onGoLive","isPublishing","isFirstStep","isLastStep","goPrev","goNext","isActiveStepValid","validation","useAgentBuilderContext","allStepsValid","Footer","jsxs","FooterHint","jsx","InfoIcon","COLORS","BodyCaption","FooterActions","Button","Fragment"],"mappings":";;;;;;;AAkBO,MAAMA,IAAwD,CAAC;AAAA,EACrE,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AACD,MAAM;AACL,QAAM;AAAA,IACL,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACGC,EAAA,GAEEC,IAAgB,OAAO,OAAOF,CAAU,EAAE,MAAM,OAAO;AAE7D,2BACEG,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI,OAAOC,EAAO,QAAQ,YAAA,CAAa;AAAA,wBACnEC,GAAA,EAAY,OAAOD,EAAO,QAAQ,aACjC,UAAAlB,EAAA,CACF;AAAA,IAAA,GACD;AAAA,sBAECoB,GAAA,EACC,UAAA;AAAA,MAAA,CAACf,KACD,gBAAAW;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,YAAW;AAAA,UACX,MAAK;AAAA,UACL,YAAW;AAAA,UACX,SAASd;AAAA,QAAA;AAAA,MAAA;AAAA,MAIVD,IACA,gBAAAQ,EAAAQ,GAAA,EACE,UAAA;AAAA,QAAArB,KACA,gBAAAe;AAAA,UA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