@redocly/replay 0.28.0-next.4 → 0.28.0-next.6
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/{replay-AiChatProvider-BIplPHOS.js → replay-AiChatProvider-Bj2P_hdU.js} +371 -369
- package/dist/replay-AiChatProvider-GeumgtIo.js +6 -0
- package/dist/{replay-AiChatSqliteDBStorage-Bay95FHW.js → replay-AiChatSqliteDBStorage-0M2Ejnzu.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-C-rkQ3jG.js → replay-AiChatSqliteDBStorage-BWJl1qdO.js} +1 -1
- package/dist/{replay-AiPanel-DU5aVA3q.js → replay-AiPanel-DfOpKMDQ.js} +709 -712
- package/dist/replay-AiPanel-ON_QfwBN.js +742 -0
- package/dist/replay-FileWatcher-04GlEkra.js +360 -0
- package/dist/replay-FileWatcher-B-T0jz_R.js +1 -0
- package/dist/{replay-SemanticSearchService-Dk4UTm2r.js → replay-SemanticSearchService-BQgdj2wy.js} +1 -1
- package/dist/{replay-SemanticSearchService-BWwCFW3F.js → replay-SemanticSearchService-CPIb_cUk.js} +7 -7
- package/dist/{replay-SqliteDBStorage-BFdjYsG7.js → replay-SqliteDBStorage-Bt2xXqei.js} +1 -1
- package/dist/{replay-SqliteDBStorage-DGQjzDy4.js → replay-SqliteDBStorage-vehgvWXZ.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-CLzYSck7.js → replay-TauriFileSystemAdapter-D2yxrS6Q.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-C8k9RvT1.js → replay-TauriFileSystemAdapter-YLdtT-Xp.js} +1 -1
- package/dist/{replay-TauriRootStorage-C1MIH5ji.js → replay-TauriRootStorage-BE6RmQfE.js} +162 -165
- package/dist/replay-TauriRootStorage-DcENVsBJ.js +1 -0
- package/dist/{replay-agent-loop-BoEw65rR.js → replay-agent-loop-CvopOugZ.js} +13 -13
- package/dist/{replay-agent-loop-Cm1iS9G2.js → replay-agent-loop-UwDSVh-4.js} +1 -1
- package/dist/{replay-ai-chat-mappers-IZNFNXug.js → replay-ai-chat-mappers-B7fm-v_w.js} +1 -1
- package/dist/{replay-ai-chat-mappers-Csm9vJrG.js → replay-ai-chat-mappers-yKBypIXh.js} +1 -1
- package/dist/{replay-create-model-BqvD-0wF.js → replay-create-model-CHahxEJy.js} +3 -3
- package/dist/{replay-create-model-Y9UJSztb.js → replay-create-model-CyBZMAWB.js} +4 -4
- package/dist/{replay-db-BImXgUGU.js → replay-db-CifZMdnr.js} +5 -5
- package/dist/{replay-db-C7FD3opa.js → replay-db-EWL-uAt-.js} +1 -1
- package/dist/{replay-external-resolver-CjM7Da6t.js → replay-external-resolver-D5fSfJEm.js} +1 -1
- package/dist/{replay-external-resolver-Bj3sLTnz.js → replay-external-resolver-G11iwLVZ.js} +2 -2
- package/dist/{replay-index-Dxk-kqkZ.js → replay-index-B2NUTBd8.js} +1 -1
- package/dist/{replay-index-CKRKzXMt.js → replay-index-B3MQaIS-.js} +1 -1
- package/dist/replay-index-Coy4kD_x.js +7009 -0
- package/dist/{replay-index-DJwfdo0s.js → replay-index-CqRiEj9e.js} +1 -1
- package/dist/{replay-index-DlTloE6S.js → replay-index-D0mbH_TN.js} +1 -1
- package/dist/{replay-index-Cp06WK82.js → replay-index-DDqKE6bs.js} +5 -5
- package/dist/{replay-index-xheWgsnj.js → replay-index-DrI9ZFwH.js} +2 -2
- package/dist/{replay-index-BH8cTSEK.js → replay-index-Dx8O3ZoA.js} +68783 -67874
- package/dist/{replay-lint-BIbkYU09.js → replay-lint-BiOcDIDr.js} +3 -3
- package/dist/{replay-lint--iBW-6Vj.js → replay-lint-CAo2fuiZ.js} +3 -3
- package/dist/{replay-lint-graphql-EXBI8I89.js → replay-lint-graphql-DAa8UNRg.js} +1 -1
- package/dist/{replay-lint-graphql-2b4GIER6.js → replay-lint-graphql-DzI2rUbR.js} +1 -1
- package/dist/replay-periodic-revalidation-D18ihfUc.js +1 -0
- package/dist/replay-periodic-revalidation-w7mrtjYg.js +22 -0
- package/dist/{replay-resolve-D9BUvjqv.js → replay-resolve-CojDRP37.js} +1 -1
- package/dist/{replay-resolve-B5yIfyuT.js → replay-resolve-DgAthAfi.js} +1 -1
- package/dist/{replay-respect-run-DNFoFnJU.js → replay-respect-run-3ukV7LMg.js} +1 -1
- package/dist/{replay-respect-run-Bx46aUHi.js → replay-respect-run-DNvB8rLX.js} +3 -3
- package/dist/replay-tauri-path-DM8PdMK8.js +22 -0
- package/dist/{replay-tauri-path-C8GiFO5s.js → replay-tauri-path-kr9DtxLs.js} +1 -1
- package/dist/{replay-useAiChatQueries-BTuu2xLG.js → replay-useAiChatQueries-BULoKr4E.js} +1564 -1395
- package/dist/replay-useAiChatQueries-BdjsFz1P.js +215 -0
- package/dist/{replay-validate-key-D4M7QvCw.js → replay-validate-key-CGmguj5X.js} +1 -1
- package/dist/{replay-validate-key-CjcIElmE.js → replay-validate-key-DzseOR5a.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +3 -3
- package/dist/replay.js +10 -10
- package/package.json +12 -5
- package/dist/replay-AiChatProvider-TF1u9E5L.js +0 -6
- package/dist/replay-AiPanel-DzGN1t86.js +0 -742
- package/dist/replay-FileWatcher-XMkIoDEA.js +0 -1
- package/dist/replay-FileWatcher-iYbHpwCv.js +0 -352
- package/dist/replay-TauriRootStorage-CiGY8MO6.js +0 -1
- package/dist/replay-index-BuYoH96w.js +0 -6982
- package/dist/replay-periodic-revalidation-BoyLQHtg.js +0 -1
- package/dist/replay-periodic-revalidation-Dsp-n7ui.js +0 -21
- package/dist/replay-tauri-path-BVoW6En0.js +0 -22
- package/dist/replay-useAiChatQueries-BDgjmzz-.js +0 -215
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useCallback as _, useMemo as A, useState as
|
|
3
|
-
import c, { css as
|
|
4
|
-
import { T as
|
|
5
|
-
import { l as At, n as St, p as Lt, q as Pt, T as Et, t as Rt, v as Ot, x as qe, C as I, y as Dt, z as
|
|
1
|
+
import { jsxs as m, jsx as i, Fragment as Fe } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as _, useMemo as A, useState as q, Fragment as ht, useRef as N, useEffect as B, useLayoutEffect as je } from "react";
|
|
3
|
+
import c, { css as ue } from "styled-components";
|
|
4
|
+
import { T as be, ac as Ce, ad as mt, ae as gt, E as vt, c as yt, af as fe, ag as pe, ah as V, ai as xe, aj as xt, ak as wt, al as ke, h as bt, am as Ct, an as Ue, ao as kt, ap as Tt, U as he, a2 as le, aq as We, N as Ye, ar as we, as as U, at as It } from "./replay-index-Dx8O3ZoA.js";
|
|
5
|
+
import { l as At, n as St, p as Lt, q as Pt, T as Et, t as Rt, v as Ot, x as qe, C as I, y as Dt, z as Ge, L as Mt, B as Q, D as _t, E as zt, F as Vt, G as $t, H as F } from "./replay-useAiChatQueries-BULoKr4E.js";
|
|
6
6
|
import { AI_SEARCH_MAX_MESSAGE_LENGTH as Ht } from "@redocly/theme/core/constants/search";
|
|
7
7
|
import { Button as P } from "@redocly/theme/components/Button/Button";
|
|
8
8
|
import { SendIcon as Bt } from "@redocly/theme/icons/SendIcon/SendIcon";
|
|
9
|
-
import { StopIcon as
|
|
10
|
-
import { M as z } from "./replay-db-
|
|
11
|
-
import { CheckboxIcon as
|
|
9
|
+
import { StopIcon as Nt } from "@redocly/theme/icons/StopIcon/StopIcon";
|
|
10
|
+
import { M as z } from "./replay-db-CifZMdnr.js";
|
|
11
|
+
import { CheckboxIcon as Ft } from "@redocly/theme/icons/CheckboxIcon/CheckboxIcon";
|
|
12
12
|
import { CheckmarkFilledIcon as jt } from "@redocly/theme/icons/CheckmarkFilledIcon/CheckmarkFilledIcon";
|
|
13
13
|
import { CloseFilledIcon as Ut } from "@redocly/theme/icons/CloseFilledIcon/CloseFilledIcon";
|
|
14
14
|
import { AddIcon as Wt } from "@redocly/theme/icons/AddIcon/AddIcon";
|
|
15
15
|
import { SubtractIcon as Yt } from "@redocly/theme/icons/SubtractIcon/SubtractIcon";
|
|
16
|
-
import { capitalize as
|
|
17
|
-
import { ChevronDownIcon as
|
|
18
|
-
import { ChevronRightIcon as
|
|
16
|
+
import { capitalize as re } from "@redocly/theme/core/utils";
|
|
17
|
+
import { ChevronDownIcon as qt } from "@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon";
|
|
18
|
+
import { ChevronRightIcon as Gt } from "@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";
|
|
19
19
|
import { Dropdown as Kt } from "@redocly/theme/components/Dropdown/Dropdown";
|
|
20
|
-
import { DropdownMenu as
|
|
21
|
-
import { DropdownMenuItem as
|
|
22
|
-
import { CheckmarkIcon as
|
|
20
|
+
import { DropdownMenu as Jt } from "@redocly/theme/components/Dropdown/DropdownMenu";
|
|
21
|
+
import { DropdownMenuItem as Ke } from "@redocly/theme/components/Dropdown/DropdownMenuItem";
|
|
22
|
+
import { CheckmarkIcon as Xt } from "@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";
|
|
23
23
|
import { SettingsCogIcon as Zt } from "@redocly/theme/icons/SettingsCogIcon/SettingsCogIcon";
|
|
24
24
|
import { ChatGptIcon as Qt } from "@redocly/theme/icons/ChatGptIcon/ChatGptIcon";
|
|
25
25
|
import { GeminiIcon as en } from "@redocly/theme/icons/GeminiIcon/GeminiIcon";
|
|
26
26
|
import { ClaudeIcon as tn } from "@redocly/theme/icons/ClaudeIcon/ClaudeIcon";
|
|
27
27
|
import { Tooltip as W } from "@redocly/theme/components/Tooltip/Tooltip";
|
|
28
|
-
import { g as
|
|
28
|
+
import { g as Te } from "./replay-SemanticSearchService-CPIb_cUk.js";
|
|
29
29
|
import "@tanstack/react-query";
|
|
30
30
|
import { Typography as Z } from "@redocly/theme/components/Typography/Typography";
|
|
31
31
|
import { TrashCanIcon as nn } from "@redocly/theme/icons/TrashCanIcon/TrashCanIcon";
|
|
@@ -42,18 +42,18 @@ function ln({
|
|
|
42
42
|
onStop: o,
|
|
43
43
|
modelSelector: a,
|
|
44
44
|
value: s,
|
|
45
|
-
onValueChange:
|
|
46
|
-
onSubmit:
|
|
45
|
+
onValueChange: l,
|
|
46
|
+
onSubmit: d,
|
|
47
47
|
textareaRef: u
|
|
48
48
|
}) {
|
|
49
|
-
const f = s.trim(),
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
!f || n || r ||
|
|
49
|
+
const f = s.trim(), h = !n && f.length > 0 && !r, p = !n && f.length > 0, y = (w) => {
|
|
50
|
+
l(w.target.value);
|
|
51
|
+
}, g = () => {
|
|
52
|
+
!f || n || r || d();
|
|
53
53
|
}, x = () => {
|
|
54
54
|
!r || !o || o();
|
|
55
55
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ m(dn, { className: t, $isActive: p, children: [
|
|
57
57
|
/* @__PURE__ */ i(
|
|
58
58
|
un,
|
|
59
59
|
{
|
|
@@ -66,11 +66,11 @@ function ln({
|
|
|
66
66
|
spellCheck: !1,
|
|
67
67
|
onChange: y,
|
|
68
68
|
onKeyDown: (w) => {
|
|
69
|
-
w.key === "Enter" && !w.shiftKey && !w.nativeEvent.isComposing && (w.preventDefault(), r && o ? x() :
|
|
69
|
+
w.key === "Enter" && !w.shiftKey && !w.nativeEvent.isComposing && (w.preventDefault(), r && o ? x() : g());
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ m(fn, { children: [
|
|
74
74
|
a,
|
|
75
75
|
r && o ? /* @__PURE__ */ i(
|
|
76
76
|
hn,
|
|
@@ -78,7 +78,7 @@ function ln({
|
|
|
78
78
|
type: "button",
|
|
79
79
|
size: "small",
|
|
80
80
|
"aria-label": "Stop generating",
|
|
81
|
-
icon: /* @__PURE__ */ i(
|
|
81
|
+
icon: /* @__PURE__ */ i(Nt, { color: "var(--icon-color-on-color)" }),
|
|
82
82
|
onClick: x
|
|
83
83
|
}
|
|
84
84
|
) : /* @__PURE__ */ i(
|
|
@@ -88,8 +88,8 @@ function ln({
|
|
|
88
88
|
size: "small",
|
|
89
89
|
"aria-label": "Send message",
|
|
90
90
|
icon: /* @__PURE__ */ i(Bt, { color: "var(--icon-color-on-color)" }),
|
|
91
|
-
onClick:
|
|
92
|
-
disabled: !
|
|
91
|
+
onClick: g,
|
|
92
|
+
disabled: !h
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
] })
|
|
@@ -114,7 +114,7 @@ const dn = c.div`
|
|
|
114
114
|
var(--replay-ai-gradient-soft) border-box;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
${({ $isActive: e }) => e &&
|
|
117
|
+
${({ $isActive: e }) => e && ue`
|
|
118
118
|
border-color: transparent;
|
|
119
119
|
background:
|
|
120
120
|
linear-gradient(var(--layer-color), var(--layer-color)) padding-box,
|
|
@@ -159,8 +159,8 @@ const dn = c.div`
|
|
|
159
159
|
box-sizing: border-box;
|
|
160
160
|
background: var(--color-warm-grey-9);
|
|
161
161
|
border-radius: var(--border-radius-xxl);
|
|
162
|
-
`,
|
|
163
|
-
function
|
|
162
|
+
`, mn = /* @__PURE__ */ new Set(["collection", "workflow", "step", "operation", "workflow-run"]);
|
|
163
|
+
function me(e) {
|
|
164
164
|
return `replay://step?${new URLSearchParams({
|
|
165
165
|
collectionId: e.collectionId.trim(),
|
|
166
166
|
workflowId: e.workflowId.trim(),
|
|
@@ -174,7 +174,7 @@ function D(e, t) {
|
|
|
174
174
|
const r = n.trim();
|
|
175
175
|
return r.length > 0 ? r : null;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function gn(e) {
|
|
178
178
|
let t;
|
|
179
179
|
try {
|
|
180
180
|
t = new URL(e);
|
|
@@ -184,7 +184,7 @@ function mn(e) {
|
|
|
184
184
|
if (t.protocol !== "replay:")
|
|
185
185
|
return null;
|
|
186
186
|
const n = t.hostname.toLowerCase();
|
|
187
|
-
if (!
|
|
187
|
+
if (!mn.has(n))
|
|
188
188
|
return null;
|
|
189
189
|
const r = t.searchParams;
|
|
190
190
|
switch (n) {
|
|
@@ -207,123 +207,110 @@ function mn(e) {
|
|
|
207
207
|
case "workflow-run": {
|
|
208
208
|
const o = D(r, "collectionId"), a = D(r, "workflowId");
|
|
209
209
|
if (!o || !a) return null;
|
|
210
|
-
const s = D(r, "historyId"),
|
|
210
|
+
const s = D(r, "historyId"), l = s === "null" || s === "undefined" ? null : s;
|
|
211
211
|
return {
|
|
212
212
|
kind: "workflow-run",
|
|
213
213
|
collectionId: o,
|
|
214
214
|
workflowId: a,
|
|
215
|
-
...
|
|
215
|
+
...l ? { historyId: l } : {}
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
default:
|
|
219
219
|
return null;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
function vn(e, t, n) {
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
function yn(e, t, n, r = {}) {
|
|
226
|
-
switch (n.kind) {
|
|
222
|
+
function vn(e, t, n = {}) {
|
|
223
|
+
switch (t.kind) {
|
|
227
224
|
case "collection":
|
|
228
|
-
|
|
229
|
-
collectionId:
|
|
230
|
-
activeTabName:
|
|
225
|
+
e.openCollectionTab({
|
|
226
|
+
collectionId: t.collectionId,
|
|
227
|
+
activeTabName: Ce.COLLECTION_SETTINGS
|
|
231
228
|
});
|
|
232
229
|
break;
|
|
233
230
|
case "workflow":
|
|
234
|
-
|
|
235
|
-
collectionId:
|
|
236
|
-
workflowId:
|
|
237
|
-
activeTabName:
|
|
231
|
+
e.openWorkflowTab({
|
|
232
|
+
collectionId: t.collectionId,
|
|
233
|
+
workflowId: t.workflowId,
|
|
234
|
+
activeTabName: Ce.WORKFLOW_SETTINGS
|
|
238
235
|
});
|
|
239
236
|
break;
|
|
240
237
|
case "step":
|
|
241
|
-
|
|
242
|
-
collectionId:
|
|
243
|
-
workflowId:
|
|
244
|
-
stepId:
|
|
245
|
-
state:
|
|
238
|
+
e.openStepTabFromCollection({
|
|
239
|
+
collectionId: t.collectionId,
|
|
240
|
+
workflowId: t.workflowId,
|
|
241
|
+
stepId: t.stepId,
|
|
242
|
+
state: be.Normal
|
|
246
243
|
});
|
|
247
244
|
break;
|
|
248
245
|
case "workflow-run": {
|
|
249
|
-
const
|
|
250
|
-
if (
|
|
251
|
-
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
const s = vn(
|
|
255
|
-
e,
|
|
256
|
-
n.collectionId,
|
|
257
|
-
n.workflowId
|
|
258
|
-
);
|
|
259
|
-
if (s !== -1) {
|
|
260
|
-
e.tabsState.tabs.get({ noproxy: !0 })[s].state === te.Preview && t.changeTabState(s, te.Normal), t.handleTabChange(s);
|
|
246
|
+
const r = n.workflowRunHistoryIds?.[Pt(t.collectionId, t.workflowId)] ?? [], o = t.historyId && r.includes(t.historyId) ? t.historyId : r.at(-1) ?? t.historyId;
|
|
247
|
+
if (o) {
|
|
248
|
+
e.openWorkflowRunTabFromHistory(o, { state: be.Normal });
|
|
261
249
|
break;
|
|
262
250
|
}
|
|
263
|
-
|
|
264
|
-
collectionId:
|
|
265
|
-
workflowId:
|
|
251
|
+
e.focusWorkflowRunTab({
|
|
252
|
+
collectionId: t.collectionId,
|
|
253
|
+
workflowId: t.workflowId
|
|
254
|
+
}) || e.openWorkflowRunTab({
|
|
255
|
+
collectionId: t.collectionId,
|
|
256
|
+
workflowId: t.workflowId
|
|
266
257
|
});
|
|
267
258
|
break;
|
|
268
259
|
}
|
|
269
260
|
case "operation": {
|
|
270
|
-
const
|
|
271
|
-
if (!
|
|
261
|
+
const r = At(e.apis, t.operationId);
|
|
262
|
+
if (!r.ok) {
|
|
272
263
|
console.warn("[executeReplayChatLink] Operation not resolved", {
|
|
273
|
-
operationId:
|
|
274
|
-
message:
|
|
264
|
+
operationId: t.operationId,
|
|
265
|
+
message: r.message
|
|
275
266
|
});
|
|
276
267
|
return;
|
|
277
268
|
}
|
|
278
|
-
St(
|
|
279
|
-
e,
|
|
280
|
-
Lt(o.value),
|
|
281
|
-
t
|
|
282
|
-
);
|
|
269
|
+
St(Lt(r.value), e);
|
|
283
270
|
break;
|
|
284
271
|
}
|
|
285
272
|
}
|
|
286
273
|
}
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
|
|
274
|
+
function yn(e, t, n = {}) {
|
|
275
|
+
const r = gn(t);
|
|
276
|
+
r && vn(e, r, n);
|
|
290
277
|
}
|
|
291
278
|
function Je({
|
|
292
279
|
workflowRunHistoryIds: e
|
|
293
280
|
} = {}) {
|
|
294
|
-
const t =
|
|
295
|
-
|
|
281
|
+
const t = mt(), { getApiOperation: n } = gt(), {
|
|
282
|
+
focusOperationTab: r,
|
|
296
283
|
addNewTab: o,
|
|
297
284
|
openCollectionTab: a,
|
|
298
285
|
openWorkflowTab: s,
|
|
299
|
-
openStepTabFromCollection:
|
|
300
|
-
openWorkflowRunTab:
|
|
286
|
+
openStepTabFromCollection: l,
|
|
287
|
+
openWorkflowRunTab: d,
|
|
301
288
|
openWorkflowRunTabFromHistory: u,
|
|
302
|
-
|
|
303
|
-
} =
|
|
289
|
+
focusWorkflowRunTab: f
|
|
290
|
+
} = vt();
|
|
304
291
|
return _(
|
|
305
|
-
(
|
|
306
|
-
const
|
|
307
|
-
if (!(
|
|
292
|
+
(h) => {
|
|
293
|
+
const p = h.target;
|
|
294
|
+
if (!(p instanceof Element))
|
|
308
295
|
return;
|
|
309
|
-
const y =
|
|
296
|
+
const y = p.closest("a[href]");
|
|
310
297
|
if (!(y instanceof HTMLAnchorElement))
|
|
311
298
|
return;
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
t,
|
|
299
|
+
const g = y.getAttribute("href");
|
|
300
|
+
g?.startsWith("replay:") && (h.preventDefault(), h.stopPropagation(), yn(
|
|
315
301
|
{
|
|
302
|
+
apis: t,
|
|
316
303
|
getApiOperation: n,
|
|
317
|
-
|
|
304
|
+
focusOperationTab: r,
|
|
318
305
|
addNewTab: o,
|
|
319
306
|
openCollectionTab: a,
|
|
320
307
|
openWorkflowTab: s,
|
|
321
|
-
openStepTabFromCollection:
|
|
322
|
-
openWorkflowRunTab:
|
|
308
|
+
openStepTabFromCollection: l,
|
|
309
|
+
openWorkflowRunTab: d,
|
|
323
310
|
openWorkflowRunTabFromHistory: u,
|
|
324
|
-
|
|
311
|
+
focusWorkflowRunTab: f
|
|
325
312
|
},
|
|
326
|
-
|
|
313
|
+
g,
|
|
327
314
|
{ workflowRunHistoryIds: e }
|
|
328
315
|
));
|
|
329
316
|
},
|
|
@@ -335,19 +322,19 @@ function Je({
|
|
|
335
322
|
o,
|
|
336
323
|
a,
|
|
337
324
|
s,
|
|
338
|
-
d,
|
|
339
325
|
l,
|
|
326
|
+
d,
|
|
340
327
|
u,
|
|
341
328
|
f
|
|
342
329
|
]
|
|
343
330
|
);
|
|
344
331
|
}
|
|
345
|
-
class
|
|
332
|
+
class xn {
|
|
346
333
|
diff(t, n, r = {}) {
|
|
347
334
|
let o;
|
|
348
335
|
typeof r == "function" ? (o = r, r = {}) : "callback" in r && (o = r.callback);
|
|
349
|
-
const a = this.castInput(t, r), s = this.castInput(n, r),
|
|
350
|
-
return this.diffWithOptionsObj(
|
|
336
|
+
const a = this.castInput(t, r), s = this.castInput(n, r), l = this.removeEmpty(this.tokenize(a, r)), d = this.removeEmpty(this.tokenize(s, r));
|
|
337
|
+
return this.diffWithOptionsObj(l, d, r, o);
|
|
351
338
|
}
|
|
352
339
|
diffWithOptionsObj(t, n, r, o) {
|
|
353
340
|
var a;
|
|
@@ -359,12 +346,12 @@ class wn {
|
|
|
359
346
|
return;
|
|
360
347
|
} else
|
|
361
348
|
return v;
|
|
362
|
-
},
|
|
363
|
-
let u = 1, f =
|
|
349
|
+
}, l = n.length, d = t.length;
|
|
350
|
+
let u = 1, f = l + d;
|
|
364
351
|
r.maxEditLength != null && (f = Math.min(f, r.maxEditLength));
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
if (y[0].oldPos + 1 >=
|
|
352
|
+
const h = (a = r.timeout) !== null && a !== void 0 ? a : 1 / 0, p = Date.now() + h, y = [{ oldPos: -1, lastComponent: void 0 }];
|
|
353
|
+
let g = this.extractCommon(y[0], n, t, 0, r);
|
|
354
|
+
if (y[0].oldPos + 1 >= d && g + 1 >= l)
|
|
368
355
|
return s(this.buildValues(y[0].lastComponent, n, t));
|
|
369
356
|
let x = -1 / 0, b = 1 / 0;
|
|
370
357
|
const w = () => {
|
|
@@ -372,32 +359,32 @@ class wn {
|
|
|
372
359
|
let S;
|
|
373
360
|
const R = y[v - 1], O = y[v + 1];
|
|
374
361
|
R && (y[v - 1] = void 0);
|
|
375
|
-
let
|
|
362
|
+
let G = !1;
|
|
376
363
|
if (O) {
|
|
377
364
|
const ee = O.oldPos - v;
|
|
378
|
-
|
|
365
|
+
G = O && 0 <= ee && ee < l;
|
|
379
366
|
}
|
|
380
|
-
const $ = R && R.oldPos + 1 <
|
|
381
|
-
if (!
|
|
367
|
+
const $ = R && R.oldPos + 1 < d;
|
|
368
|
+
if (!G && !$) {
|
|
382
369
|
y[v] = void 0;
|
|
383
370
|
continue;
|
|
384
371
|
}
|
|
385
|
-
if (!$ ||
|
|
372
|
+
if (!$ || G && R.oldPos < O.oldPos ? S = this.addToPath(O, !0, !1, 0, r) : S = this.addToPath(R, !1, !0, 1, r), g = this.extractCommon(S, n, t, v, r), S.oldPos + 1 >= d && g + 1 >= l)
|
|
386
373
|
return s(this.buildValues(S.lastComponent, n, t)) || !0;
|
|
387
|
-
y[v] = S, S.oldPos + 1 >=
|
|
374
|
+
y[v] = S, S.oldPos + 1 >= d && (b = Math.min(b, v - 1)), g + 1 >= l && (x = Math.max(x, v + 1));
|
|
388
375
|
}
|
|
389
376
|
u++;
|
|
390
377
|
};
|
|
391
378
|
if (o)
|
|
392
379
|
(function v() {
|
|
393
380
|
setTimeout(function() {
|
|
394
|
-
if (u > f || Date.now() >
|
|
381
|
+
if (u > f || Date.now() > p)
|
|
395
382
|
return o(void 0);
|
|
396
383
|
w() || v();
|
|
397
384
|
}, 0);
|
|
398
385
|
})();
|
|
399
386
|
else
|
|
400
|
-
for (; u <= f && Date.now() <=
|
|
387
|
+
for (; u <= f && Date.now() <= p; ) {
|
|
401
388
|
const v = w();
|
|
402
389
|
if (v)
|
|
403
390
|
return v;
|
|
@@ -414,11 +401,11 @@ class wn {
|
|
|
414
401
|
};
|
|
415
402
|
}
|
|
416
403
|
extractCommon(t, n, r, o, a) {
|
|
417
|
-
const s = n.length,
|
|
418
|
-
let
|
|
419
|
-
for (; u + 1 < s &&
|
|
420
|
-
u++,
|
|
421
|
-
return f && !a.oneChangePerToken && (t.lastComponent = { count: f, previousComponent: t.lastComponent, added: !1, removed: !1 }), t.oldPos =
|
|
404
|
+
const s = n.length, l = r.length;
|
|
405
|
+
let d = t.oldPos, u = d - o, f = 0;
|
|
406
|
+
for (; u + 1 < s && d + 1 < l && this.equals(r[d + 1], n[u + 1], a); )
|
|
407
|
+
u++, d++, f++, a.oneChangePerToken && (t.lastComponent = { count: 1, previousComponent: t.lastComponent, added: !1, removed: !1 });
|
|
408
|
+
return f && !a.oneChangePerToken && (t.lastComponent = { count: f, previousComponent: t.lastComponent, added: !1, removed: !1 }), t.oldPos = d, u;
|
|
422
409
|
}
|
|
423
410
|
equals(t, n, r) {
|
|
424
411
|
return r.comparator ? r.comparator(t, n) : t === n || !!r.ignoreCase && t.toLowerCase() === n.toLowerCase();
|
|
@@ -453,27 +440,27 @@ class wn {
|
|
|
453
440
|
o.push(t), a = t.previousComponent, delete t.previousComponent, t = a;
|
|
454
441
|
o.reverse();
|
|
455
442
|
const s = o.length;
|
|
456
|
-
let
|
|
457
|
-
for (;
|
|
458
|
-
const f = o[
|
|
443
|
+
let l = 0, d = 0, u = 0;
|
|
444
|
+
for (; l < s; l++) {
|
|
445
|
+
const f = o[l];
|
|
459
446
|
if (f.removed)
|
|
460
447
|
f.value = this.join(r.slice(u, u + f.count)), u += f.count;
|
|
461
448
|
else {
|
|
462
449
|
if (!f.added && this.useLongestToken) {
|
|
463
|
-
let
|
|
464
|
-
|
|
465
|
-
const
|
|
466
|
-
return
|
|
467
|
-
}), f.value = this.join(
|
|
450
|
+
let h = n.slice(d, d + f.count);
|
|
451
|
+
h = h.map(function(p, y) {
|
|
452
|
+
const g = r[u + y];
|
|
453
|
+
return g.length > p.length ? g : p;
|
|
454
|
+
}), f.value = this.join(h);
|
|
468
455
|
} else
|
|
469
|
-
f.value = this.join(n.slice(
|
|
470
|
-
|
|
456
|
+
f.value = this.join(n.slice(d, d + f.count));
|
|
457
|
+
d += f.count, f.added || (u += f.count);
|
|
471
458
|
}
|
|
472
459
|
}
|
|
473
460
|
return o;
|
|
474
461
|
}
|
|
475
462
|
}
|
|
476
|
-
class
|
|
463
|
+
class wn extends xn {
|
|
477
464
|
constructor() {
|
|
478
465
|
super(...arguments), this.tokenize = kn;
|
|
479
466
|
}
|
|
@@ -485,9 +472,9 @@ class bn extends wn {
|
|
|
485
472
|
`) && (n = n.slice(0, -1))), super.equals(t, n, r);
|
|
486
473
|
}
|
|
487
474
|
}
|
|
488
|
-
const
|
|
489
|
-
function
|
|
490
|
-
return
|
|
475
|
+
const bn = new wn();
|
|
476
|
+
function Cn(e, t, n) {
|
|
477
|
+
return bn.diff(e, t, n);
|
|
491
478
|
}
|
|
492
479
|
function kn(e, t) {
|
|
493
480
|
t.stripTrailingCr && (e = e.replace(/\r\n/g, `
|
|
@@ -500,9 +487,9 @@ function kn(e, t) {
|
|
|
500
487
|
}
|
|
501
488
|
return n;
|
|
502
489
|
}
|
|
503
|
-
const
|
|
504
|
-
function
|
|
505
|
-
const n =
|
|
490
|
+
const Tn = 500;
|
|
491
|
+
function In(e, t) {
|
|
492
|
+
const n = An(e, t);
|
|
506
493
|
if (n.length === 0) return [];
|
|
507
494
|
const r = [];
|
|
508
495
|
let o = 0;
|
|
@@ -510,30 +497,30 @@ function An(e, t) {
|
|
|
510
497
|
let a = o;
|
|
511
498
|
const s = n[o].type === "context";
|
|
512
499
|
for (; a < n.length && n[a].type === "context" === s; ) a++;
|
|
513
|
-
const
|
|
500
|
+
const l = n.slice(o, a);
|
|
514
501
|
r.push({
|
|
515
502
|
start: o,
|
|
516
503
|
end: a,
|
|
517
|
-
rows:
|
|
518
|
-
hasAdditions:
|
|
519
|
-
hasRemovals:
|
|
504
|
+
rows: l,
|
|
505
|
+
hasAdditions: l.some((d) => d.type === "add"),
|
|
506
|
+
hasRemovals: l.some((d) => d.type === "remove")
|
|
520
507
|
}), o = a;
|
|
521
508
|
}
|
|
522
509
|
return r;
|
|
523
510
|
}
|
|
524
|
-
function
|
|
511
|
+
function An(e, t) {
|
|
525
512
|
if (e === void 0)
|
|
526
513
|
return t === void 0 ? [] : j(t, "add");
|
|
527
514
|
if (t === void 0) return j(e, "remove");
|
|
528
515
|
if (e === t) return j(t, "context");
|
|
529
|
-
const n =
|
|
516
|
+
const n = Sn(e, t);
|
|
530
517
|
return n ? n.flatMap(
|
|
531
518
|
(r) => j(r.value, r.added ? "add" : r.removed ? "remove" : "context")
|
|
532
519
|
) : [...j(e, "remove"), ...j(t, "add")];
|
|
533
520
|
}
|
|
534
|
-
function
|
|
521
|
+
function Sn(e, t) {
|
|
535
522
|
try {
|
|
536
|
-
return
|
|
523
|
+
return Cn(e, t, { timeout: Tn });
|
|
537
524
|
} catch {
|
|
538
525
|
return;
|
|
539
526
|
}
|
|
@@ -544,40 +531,40 @@ function j(e, t) {
|
|
|
544
531
|
return n.length > 1 && n[n.length - 1] === "" && n.pop(), n.map((r) => ({ type: t, text: r }));
|
|
545
532
|
}
|
|
546
533
|
const Ie = 1, Ae = (e) => e && e.hasAdditions !== e.hasRemovals, Se = (e) => e && (e.hasAdditions || e.hasRemovals);
|
|
547
|
-
function
|
|
534
|
+
function Ln(e, t, n) {
|
|
548
535
|
if (e.hasAdditions || e.hasRemovals)
|
|
549
|
-
return
|
|
536
|
+
return te(e.rows);
|
|
550
537
|
const r = n[t - 1], o = n[t + 1], a = Ae(r) ? Ie : 0, s = Ae(o) ? Ie : 0;
|
|
551
|
-
if (a + s >= e.rows.length) return
|
|
552
|
-
const
|
|
553
|
-
return u.push(...
|
|
538
|
+
if (a + s >= e.rows.length) return te(e.rows);
|
|
539
|
+
const l = e.rows.slice(0, a), d = s > 0 ? e.rows.slice(-s) : [], u = [];
|
|
540
|
+
return u.push(...te(l)), Se(r) && Se(o) && u.push({ kind: "separator" }), u.push(...te(d)), u;
|
|
554
541
|
}
|
|
555
|
-
function
|
|
542
|
+
function te(e) {
|
|
556
543
|
return e.map((t) => ({
|
|
557
544
|
kind: "row",
|
|
558
545
|
row: t
|
|
559
546
|
}));
|
|
560
547
|
}
|
|
561
|
-
const
|
|
548
|
+
const Pn = 200;
|
|
562
549
|
function Le({ oldValue: e, newValue: t }) {
|
|
563
|
-
const n = A(() =>
|
|
564
|
-
return A(() => n.some((a) => a.hasAdditions || a.hasRemovals), [n]) ? /* @__PURE__ */ i(
|
|
550
|
+
const n = A(() => In(e, t), [e, t]), r = A(() => n.flatMap(Ln), [n]);
|
|
551
|
+
return A(() => n.some((a) => a.hasAdditions || a.hasRemovals), [n]) ? /* @__PURE__ */ i(Rn, { $maxHeight: Pn, children: r.map((a, s) => {
|
|
565
552
|
if (a.kind === "separator")
|
|
566
|
-
return /* @__PURE__ */ i(
|
|
567
|
-
const { row:
|
|
568
|
-
return /* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
|
|
571
|
-
|
|
553
|
+
return /* @__PURE__ */ i(zn, { children: /* @__PURE__ */ i(Pe, { children: "···" }) }, s);
|
|
554
|
+
const { row: l } = a, d = En(l.type);
|
|
555
|
+
return /* @__PURE__ */ m(d, { children: [
|
|
556
|
+
/* @__PURE__ */ m(_n, { children: [
|
|
557
|
+
l.type === "remove" && /* @__PURE__ */ i(Yt, { size: "12px" }),
|
|
558
|
+
l.type === "add" && /* @__PURE__ */ i(Wt, { size: "12px" })
|
|
572
559
|
] }),
|
|
573
|
-
/* @__PURE__ */ i(Pe, { children:
|
|
560
|
+
/* @__PURE__ */ i(Pe, { children: l.text === "" ? " " : l.text })
|
|
574
561
|
] }, s);
|
|
575
562
|
}) }) : null;
|
|
576
563
|
}
|
|
577
|
-
function
|
|
578
|
-
return e === "remove" ?
|
|
564
|
+
function En(e) {
|
|
565
|
+
return e === "remove" ? On : e === "add" ? Dn : Mn;
|
|
579
566
|
}
|
|
580
|
-
const
|
|
567
|
+
const Rn = c.div`
|
|
581
568
|
display: flex;
|
|
582
569
|
flex-direction: column;
|
|
583
570
|
width: 100%;
|
|
@@ -588,22 +575,22 @@ const On = c.div`
|
|
|
588
575
|
&::-webkit-scrollbar-track {
|
|
589
576
|
margin: var(--spacing-xxs) 0;
|
|
590
577
|
}
|
|
591
|
-
`,
|
|
578
|
+
`, se = c.div`
|
|
592
579
|
display: flex;
|
|
593
580
|
font-size: var(--font-size-sm);
|
|
594
581
|
line-height: var(--line-height-sm);
|
|
595
582
|
font-weight: var(--font-weight-regular);
|
|
596
583
|
padding-right: var(--spacing-xxs);
|
|
597
|
-
`,
|
|
584
|
+
`, On = c(se)`
|
|
598
585
|
background: var(--admonition-danger-bg-color);
|
|
599
586
|
color: var(--color-raspberry-7);
|
|
600
|
-
`,
|
|
587
|
+
`, Dn = c(se)`
|
|
601
588
|
background: var(--admonition-success-bg-color);
|
|
602
589
|
color: var(--color-green-7);
|
|
603
|
-
`,
|
|
590
|
+
`, Mn = c(se)`
|
|
604
591
|
background: transparent;
|
|
605
592
|
color: var(--text-color-secondary);
|
|
606
|
-
`,
|
|
593
|
+
`, _n = c.span`
|
|
607
594
|
display: flex;
|
|
608
595
|
align-items: center;
|
|
609
596
|
justify-content: center;
|
|
@@ -618,24 +605,24 @@ const On = c.div`
|
|
|
618
605
|
font-weight: var(--font-weight-regular);
|
|
619
606
|
white-space: pre-wrap;
|
|
620
607
|
word-break: break-all;
|
|
621
|
-
`,
|
|
608
|
+
`, zn = c(se)`
|
|
622
609
|
user-select: none;
|
|
623
|
-
`,
|
|
610
|
+
`, Vn = (e) => typeof e != "object" || e === null ? !1 : "kind" in e && e.kind === "batch" ? "changes" in e ? Array.isArray(e.changes) && e.changes.every(Ee) : !1 : Ee(e);
|
|
624
611
|
function Ee(e) {
|
|
625
612
|
return typeof e != "object" || e === null || !("id" in e) || !("target" in e) || !("included" in e) || !("kind" in e) ? !1 : e.kind === "single";
|
|
626
613
|
}
|
|
627
|
-
const
|
|
614
|
+
const $n = {
|
|
628
615
|
approveLabel: "Approve",
|
|
629
616
|
denyLabel: "Deny"
|
|
630
617
|
};
|
|
631
|
-
function
|
|
618
|
+
function Hn(e, t) {
|
|
632
619
|
const n = C(t, "action");
|
|
633
620
|
if (n) {
|
|
634
621
|
const o = Et[n];
|
|
635
622
|
if (o) return o;
|
|
636
623
|
}
|
|
637
624
|
const r = Rt[e];
|
|
638
|
-
return r ||
|
|
625
|
+
return r || $n;
|
|
639
626
|
}
|
|
640
627
|
function C(e, t) {
|
|
641
628
|
if (!e || typeof e != "object") return null;
|
|
@@ -644,43 +631,43 @@ function C(e, t) {
|
|
|
644
631
|
const r = n[t];
|
|
645
632
|
return typeof r != "string" ? null : r.trim() || null;
|
|
646
633
|
}
|
|
647
|
-
function
|
|
634
|
+
function ne(e, t) {
|
|
648
635
|
if (!(typeof t > "u"))
|
|
649
636
|
return e ? `${e}: ${t}` : t;
|
|
650
637
|
}
|
|
651
|
-
function
|
|
638
|
+
function Bn(e) {
|
|
652
639
|
return e ? "changes" in e ? Array.isArray(e.changes) ? e.changes.map((t) => !t || typeof t != "object" || !("approved" in t) ? !1 : t.approved === !0) : [] : [] : [];
|
|
653
640
|
}
|
|
654
641
|
function Nn(e, t) {
|
|
655
642
|
if (!e || typeof e != "object") return;
|
|
656
|
-
const n =
|
|
643
|
+
const n = ie(e, fe), r = ie(n, pe);
|
|
657
644
|
if (!(t in r)) return;
|
|
658
645
|
const o = r[t];
|
|
659
|
-
if (Array.isArray(o) && o.length !== 0 && o.every(
|
|
646
|
+
if (Array.isArray(o) && o.length !== 0 && o.every(Vn))
|
|
660
647
|
return o;
|
|
661
648
|
}
|
|
662
|
-
function
|
|
649
|
+
function Xe(e, t) {
|
|
663
650
|
return Ot(e) && qe(e) && e.toolCallId === t;
|
|
664
651
|
}
|
|
665
|
-
function
|
|
666
|
-
const r = e.parts.map((
|
|
652
|
+
function Fn(e, t, n) {
|
|
653
|
+
const r = e.parts.map((d) => Xe(d, t) ? { ...d, input: jn(d.input, n) } : d), o = e.metadata && typeof e.metadata == "object" ? e.metadata : {}, a = ie(o, fe), l = { ...ie(a, pe), [t]: yt(n) };
|
|
667
654
|
return {
|
|
668
655
|
...e,
|
|
669
656
|
parts: r,
|
|
670
657
|
metadata: {
|
|
671
658
|
...o,
|
|
672
|
-
[
|
|
659
|
+
[fe]: {
|
|
673
660
|
...a,
|
|
674
|
-
[
|
|
661
|
+
[pe]: l
|
|
675
662
|
}
|
|
676
663
|
}
|
|
677
664
|
};
|
|
678
665
|
}
|
|
679
|
-
function
|
|
666
|
+
function ie(e, t) {
|
|
680
667
|
const n = e[t];
|
|
681
668
|
return typeof n == "object" && n !== null ? n : {};
|
|
682
669
|
}
|
|
683
|
-
function
|
|
670
|
+
function jn(e, t) {
|
|
684
671
|
if (!e || !("changes" in e) || !Array.isArray(e.changes)) return e;
|
|
685
672
|
const { changes: n, ...r } = e;
|
|
686
673
|
return {
|
|
@@ -691,39 +678,39 @@ function Un(e, t) {
|
|
|
691
678
|
}))
|
|
692
679
|
};
|
|
693
680
|
}
|
|
694
|
-
function
|
|
681
|
+
function Un({
|
|
695
682
|
preview: e,
|
|
696
683
|
isIncluded: t,
|
|
697
684
|
onToggle: n,
|
|
698
685
|
readOnly: r
|
|
699
686
|
}) {
|
|
700
|
-
const { primaryLabel: o, categoryLabel: a, diffLineKey: s } =
|
|
687
|
+
const { primaryLabel: o, categoryLabel: a, diffLineKey: s } = Wn(e.target);
|
|
701
688
|
return /* @__PURE__ */ i(
|
|
702
|
-
|
|
689
|
+
Yn,
|
|
703
690
|
{
|
|
704
691
|
isIncluded: t,
|
|
705
692
|
onToggle: n,
|
|
706
693
|
readOnly: r,
|
|
707
694
|
primaryLabel: o,
|
|
708
695
|
categoryLabel: a,
|
|
709
|
-
children: e.kind === "batch" ? /* @__PURE__ */ i(
|
|
696
|
+
children: e.kind === "batch" ? /* @__PURE__ */ i(rr, { children: e.changes.map((l) => /* @__PURE__ */ i(
|
|
710
697
|
Le,
|
|
711
698
|
{
|
|
712
|
-
oldValue:
|
|
713
|
-
newValue:
|
|
699
|
+
oldValue: ne(l.target.key, l.oldValue),
|
|
700
|
+
newValue: ne(l.target.key, l.newValue)
|
|
714
701
|
},
|
|
715
|
-
|
|
702
|
+
l.id
|
|
716
703
|
)) }) : /* @__PURE__ */ i(
|
|
717
704
|
Le,
|
|
718
705
|
{
|
|
719
|
-
oldValue:
|
|
720
|
-
newValue:
|
|
706
|
+
oldValue: ne(s, e.oldValue),
|
|
707
|
+
newValue: ne(s, e.newValue)
|
|
721
708
|
}
|
|
722
709
|
)
|
|
723
710
|
}
|
|
724
711
|
);
|
|
725
712
|
}
|
|
726
|
-
function
|
|
713
|
+
function Wn(e) {
|
|
727
714
|
const t = e.schemeId ?? e.type;
|
|
728
715
|
return e.stepId || e.schemeId ? {
|
|
729
716
|
primaryLabel: e.stepId ?? t,
|
|
@@ -735,7 +722,7 @@ function Yn(e) {
|
|
|
735
722
|
diffLineKey: void 0
|
|
736
723
|
};
|
|
737
724
|
}
|
|
738
|
-
function
|
|
725
|
+
function Yn({
|
|
739
726
|
isIncluded: e,
|
|
740
727
|
onToggle: t,
|
|
741
728
|
readOnly: n,
|
|
@@ -743,13 +730,13 @@ function Gn({
|
|
|
743
730
|
categoryLabel: o,
|
|
744
731
|
children: a
|
|
745
732
|
}) {
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
748
|
-
n ? /* @__PURE__ */ i(
|
|
749
|
-
/* @__PURE__ */ i(
|
|
750
|
-
/* @__PURE__ */ i(
|
|
733
|
+
return /* @__PURE__ */ m(qn, { $dimmed: n && !e, children: [
|
|
734
|
+
/* @__PURE__ */ m(Gn, { children: [
|
|
735
|
+
n ? /* @__PURE__ */ i(er, { children: e ? /* @__PURE__ */ i(tr, { size: "16px" }) : /* @__PURE__ */ i(nr, { size: "16px" }) }) : /* @__PURE__ */ m(Zn, { children: [
|
|
736
|
+
/* @__PURE__ */ i(Xn, { checked: e }),
|
|
737
|
+
/* @__PURE__ */ i(Qn, { type: "checkbox", checked: e, onChange: t })
|
|
751
738
|
] }),
|
|
752
|
-
/* @__PURE__ */ i(
|
|
739
|
+
/* @__PURE__ */ i(Kn, { children: r }),
|
|
753
740
|
o ? /* @__PURE__ */ i(Jn, { children: o }) : null
|
|
754
741
|
] }),
|
|
755
742
|
a
|
|
@@ -767,12 +754,12 @@ const qn = c.div`
|
|
|
767
754
|
&:last-child {
|
|
768
755
|
border-bottom: none;
|
|
769
756
|
}
|
|
770
|
-
`,
|
|
757
|
+
`, Gn = c.div`
|
|
771
758
|
display: flex;
|
|
772
759
|
align-items: center;
|
|
773
760
|
gap: var(--spacing-xs);
|
|
774
761
|
min-width: 0;
|
|
775
|
-
`,
|
|
762
|
+
`, Kn = c.span`
|
|
776
763
|
flex: 1;
|
|
777
764
|
min-width: 0;
|
|
778
765
|
color: var(--text-color-primary);
|
|
@@ -789,17 +776,17 @@ const qn = c.div`
|
|
|
789
776
|
font-weight: var(--font-weight-regular);
|
|
790
777
|
line-height: var(--line-height-sm);
|
|
791
778
|
color: var(--text-color-secondary);
|
|
792
|
-
`,
|
|
779
|
+
`, Xn = c(Ft).attrs({ "aria-hidden": !0 })`
|
|
793
780
|
--checkbox-border-color: var(--color-blueberry-6);
|
|
794
781
|
--checkbox-box-color: var(--color-blueberry-6);
|
|
795
782
|
--checkbox-box-color-active: var(--color-blueberry-6);
|
|
796
|
-
`,
|
|
783
|
+
`, Zn = c.span`
|
|
797
784
|
position: relative;
|
|
798
785
|
display: inline-flex;
|
|
799
786
|
flex-shrink: 0;
|
|
800
787
|
width: 16px;
|
|
801
788
|
height: 16px;
|
|
802
|
-
`,
|
|
789
|
+
`, Qn = c.input`
|
|
803
790
|
position: absolute;
|
|
804
791
|
inset: 0;
|
|
805
792
|
width: 16px;
|
|
@@ -807,30 +794,30 @@ const qn = c.div`
|
|
|
807
794
|
margin: 0;
|
|
808
795
|
opacity: 0;
|
|
809
796
|
cursor: pointer;
|
|
810
|
-
`,
|
|
797
|
+
`, er = c.span`
|
|
811
798
|
display: inline-flex;
|
|
812
799
|
flex-shrink: 0;
|
|
813
800
|
width: 16px;
|
|
814
801
|
height: 16px;
|
|
815
802
|
align-items: center;
|
|
816
803
|
justify-content: center;
|
|
817
|
-
`,
|
|
804
|
+
`, tr = c(jt)`
|
|
818
805
|
color: var(--color-success-base);
|
|
819
|
-
`,
|
|
806
|
+
`, nr = c(Ut)`
|
|
820
807
|
color: var(--text-color-description);
|
|
821
|
-
`,
|
|
808
|
+
`, rr = c.div`
|
|
822
809
|
display: flex;
|
|
823
810
|
flex-direction: column;
|
|
824
811
|
gap: var(--spacing-xxs);
|
|
825
812
|
min-width: 0;
|
|
826
813
|
`;
|
|
827
|
-
function
|
|
814
|
+
function Ze({
|
|
828
815
|
previews: e,
|
|
829
816
|
handleToggle: t,
|
|
830
817
|
readOnly: n
|
|
831
818
|
}) {
|
|
832
|
-
return e.length === 0 ? null : /* @__PURE__ */ i(
|
|
833
|
-
|
|
819
|
+
return e.length === 0 ? null : /* @__PURE__ */ i(or, { children: e.map((r, o) => /* @__PURE__ */ i(
|
|
820
|
+
Un,
|
|
834
821
|
{
|
|
835
822
|
preview: r,
|
|
836
823
|
isIncluded: r.included,
|
|
@@ -840,126 +827,126 @@ function Qe({
|
|
|
840
827
|
r.id
|
|
841
828
|
)) });
|
|
842
829
|
}
|
|
843
|
-
const
|
|
830
|
+
const or = c.div`
|
|
844
831
|
display: flex;
|
|
845
832
|
flex-direction: column;
|
|
846
|
-
`,
|
|
847
|
-
update_step:
|
|
848
|
-
update_security:
|
|
849
|
-
run_request:
|
|
850
|
-
web_search:
|
|
851
|
-
manage_environment:
|
|
852
|
-
manage_collection:
|
|
833
|
+
`, ir = {
|
|
834
|
+
update_step: cr,
|
|
835
|
+
update_security: lr,
|
|
836
|
+
run_request: pr,
|
|
837
|
+
web_search: hr,
|
|
838
|
+
manage_environment: ur,
|
|
839
|
+
manage_collection: fr
|
|
853
840
|
};
|
|
854
|
-
function
|
|
855
|
-
const n =
|
|
856
|
-
return n ? n(t) :
|
|
841
|
+
function ar(e, t) {
|
|
842
|
+
const n = ir[e];
|
|
843
|
+
return n ? n(t) : sr(e);
|
|
857
844
|
}
|
|
858
|
-
function
|
|
845
|
+
function sr(e) {
|
|
859
846
|
return [{ kind: "text", text: e.split("_").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") }];
|
|
860
847
|
}
|
|
861
|
-
function
|
|
862
|
-
return
|
|
848
|
+
function cr(e) {
|
|
849
|
+
return Qe(e, "Update step");
|
|
863
850
|
}
|
|
864
|
-
function
|
|
865
|
-
const t =
|
|
866
|
-
if (t.size > 1) return
|
|
851
|
+
function lr(e) {
|
|
852
|
+
const t = dr(e);
|
|
853
|
+
if (t.size > 1) return T("Update security");
|
|
867
854
|
const [n] = t;
|
|
868
|
-
return
|
|
855
|
+
return Qe(e, "Update security", n);
|
|
869
856
|
}
|
|
870
|
-
function
|
|
857
|
+
function dr(e) {
|
|
871
858
|
const t = e && "changes" in e ? e.changes : void 0;
|
|
872
859
|
if (!Array.isArray(t)) return /* @__PURE__ */ new Set();
|
|
873
|
-
const n =
|
|
860
|
+
const n = J(e, "stepId"), r = t.map((o) => J(o, "stepId") ?? n);
|
|
874
861
|
return new Set(r.filter((o) => !!o));
|
|
875
862
|
}
|
|
876
|
-
function
|
|
863
|
+
function Qe(e, t, n) {
|
|
877
864
|
const { collectionId: r, workflowId: o, stepId: a } = mr(e), s = n ?? a;
|
|
878
|
-
return !r || !o || !s ?
|
|
865
|
+
return !r || !o || !s ? T(t) : ge(
|
|
879
866
|
`${t} `,
|
|
880
|
-
|
|
867
|
+
me({ collectionId: r, workflowId: o, stepId: s }),
|
|
881
868
|
s
|
|
882
869
|
);
|
|
883
870
|
}
|
|
884
|
-
function
|
|
871
|
+
function T(e) {
|
|
885
872
|
return [{ kind: "text", text: e }];
|
|
886
873
|
}
|
|
887
874
|
function E(e, t) {
|
|
888
875
|
return t ? `${e} "${t}"` : e;
|
|
889
876
|
}
|
|
890
|
-
function
|
|
877
|
+
function ge(e, t, n) {
|
|
891
878
|
return [
|
|
892
879
|
{ kind: "text", text: e },
|
|
893
880
|
{ kind: "link", href: t, label: n }
|
|
894
881
|
];
|
|
895
882
|
}
|
|
896
|
-
function
|
|
883
|
+
function ur(e) {
|
|
897
884
|
const t = C(e, "action"), n = C(e, "environment"), r = n ? ` in environment "${n}"` : "";
|
|
898
885
|
switch (t) {
|
|
899
886
|
case "add_environment":
|
|
900
|
-
return
|
|
887
|
+
return T(E("Add environment", n));
|
|
901
888
|
case "set_active_environment":
|
|
902
|
-
return
|
|
889
|
+
return T(
|
|
903
890
|
n ? `Switch active environment to ${n}` : "Switch active environment"
|
|
904
891
|
);
|
|
905
892
|
case "upsert_input":
|
|
906
|
-
return
|
|
893
|
+
return T(E("Set input", C(e, "name")) + r);
|
|
907
894
|
case "remove_input":
|
|
908
|
-
return
|
|
895
|
+
return T(
|
|
909
896
|
E("Remove input", C(e, "inputName")) + r
|
|
910
897
|
);
|
|
911
898
|
case "upsert_server":
|
|
912
|
-
return
|
|
899
|
+
return T(E("Set server", C(e, "apiId")) + r);
|
|
913
900
|
case "remove_server":
|
|
914
|
-
return
|
|
901
|
+
return T(
|
|
915
902
|
E("Remove server", C(e, "apiId")) + r
|
|
916
903
|
);
|
|
917
904
|
default:
|
|
918
|
-
return
|
|
905
|
+
return T("Manage environment");
|
|
919
906
|
}
|
|
920
907
|
}
|
|
921
|
-
function
|
|
908
|
+
function fr(e) {
|
|
922
909
|
switch (C(e, "action")) {
|
|
923
910
|
case "create_collection":
|
|
924
|
-
return
|
|
911
|
+
return T(E("Create collection", C(e, "title")));
|
|
925
912
|
case "delete_collection":
|
|
926
|
-
return
|
|
913
|
+
return T(
|
|
927
914
|
E("Delete collection", C(e, "collectionId"))
|
|
928
915
|
);
|
|
929
916
|
case "create_workflow":
|
|
930
|
-
return
|
|
917
|
+
return T(E("Create workflow", C(e, "name")));
|
|
931
918
|
case "delete_workflow":
|
|
932
|
-
return
|
|
919
|
+
return T(E("Delete workflow", C(e, "workflowId")));
|
|
933
920
|
case "create_step":
|
|
934
|
-
return
|
|
921
|
+
return T(E("Create step", C(e, "stepName")));
|
|
935
922
|
case "delete_step": {
|
|
936
923
|
const n = C(e, "collectionId"), r = C(e, "workflowId"), o = C(e, "stepId");
|
|
937
|
-
return !n || !r || !o ?
|
|
924
|
+
return !n || !r || !o ? T("Delete step") : ge(
|
|
938
925
|
"Delete step ",
|
|
939
|
-
|
|
926
|
+
me({ collectionId: n, workflowId: r, stepId: o }),
|
|
940
927
|
o
|
|
941
928
|
);
|
|
942
929
|
}
|
|
943
930
|
case "move_step": {
|
|
944
931
|
const n = C(e, "collectionId"), r = C(e, "workflowId"), o = C(e, "stepId");
|
|
945
|
-
return !n || !r || !o ?
|
|
932
|
+
return !n || !r || !o ? T("Move step") : ge(
|
|
946
933
|
"Move step ",
|
|
947
|
-
|
|
934
|
+
me({ collectionId: n, workflowId: r, stepId: o }),
|
|
948
935
|
o
|
|
949
936
|
);
|
|
950
937
|
}
|
|
951
938
|
case "save_tab_to_collection":
|
|
952
|
-
return
|
|
939
|
+
return T(
|
|
953
940
|
E("Save tab as step", C(e, "newStepName"))
|
|
954
941
|
);
|
|
955
942
|
default:
|
|
956
|
-
return
|
|
943
|
+
return T("Manage collection");
|
|
957
944
|
}
|
|
958
945
|
}
|
|
959
|
-
function
|
|
946
|
+
function pr() {
|
|
960
947
|
return [{ kind: "text", text: "Run current request" }];
|
|
961
948
|
}
|
|
962
|
-
function
|
|
949
|
+
function hr(e) {
|
|
963
950
|
return [
|
|
964
951
|
{
|
|
965
952
|
kind: "text",
|
|
@@ -974,23 +961,23 @@ function gr(e) {
|
|
|
974
961
|
}
|
|
975
962
|
function mr(e) {
|
|
976
963
|
return {
|
|
977
|
-
collectionId:
|
|
978
|
-
workflowId:
|
|
979
|
-
stepId:
|
|
964
|
+
collectionId: J(e, "collectionId"),
|
|
965
|
+
workflowId: J(e, "workflowId"),
|
|
966
|
+
stepId: J(e, "stepId")
|
|
980
967
|
};
|
|
981
968
|
}
|
|
982
|
-
function
|
|
969
|
+
function J(e, t) {
|
|
983
970
|
if (typeof e != "object" || e === null || !(t in e)) return null;
|
|
984
971
|
const n = e[t];
|
|
985
972
|
return typeof n == "string" && n.trim() || null;
|
|
986
973
|
}
|
|
987
|
-
function
|
|
988
|
-
const n =
|
|
989
|
-
return /* @__PURE__ */ i(
|
|
990
|
-
(o, a) => o.kind === "text" ? /* @__PURE__ */ i("span", { children: o.text }, a) : /* @__PURE__ */ i(
|
|
974
|
+
function et({ toolName: e, input: t }) {
|
|
975
|
+
const n = ar(e, t), r = Je();
|
|
976
|
+
return /* @__PURE__ */ i(gr, { onClick: r, children: /* @__PURE__ */ i(vr, { children: n.map(
|
|
977
|
+
(o, a) => o.kind === "text" ? /* @__PURE__ */ i("span", { children: o.text }, a) : /* @__PURE__ */ i(yr, { href: o.href, children: o.label }, a)
|
|
991
978
|
) }) });
|
|
992
979
|
}
|
|
993
|
-
const
|
|
980
|
+
const gr = c.div`
|
|
994
981
|
display: flex;
|
|
995
982
|
flex-direction: column;
|
|
996
983
|
gap: 0;
|
|
@@ -1000,13 +987,13 @@ const vr = c.div`
|
|
|
1000
987
|
&:not(:last-child) {
|
|
1001
988
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
1002
989
|
}
|
|
1003
|
-
`,
|
|
990
|
+
`, vr = c.span`
|
|
1004
991
|
font-family: var(--font-family-base);
|
|
1005
992
|
font-size: var(--font-size-sm);
|
|
1006
993
|
font-weight: var(--font-weight-regular);
|
|
1007
994
|
line-height: var(--line-height-sm);
|
|
1008
995
|
color: var(--text-color-primary);
|
|
1009
|
-
`,
|
|
996
|
+
`, yr = c.a`
|
|
1010
997
|
color: var(--link-color-primary);
|
|
1011
998
|
cursor: pointer;
|
|
1012
999
|
text-decoration: none;
|
|
@@ -1015,11 +1002,11 @@ const vr = c.div`
|
|
|
1015
1002
|
color: var(--link-color-primary, var(--text-color-link));
|
|
1016
1003
|
}
|
|
1017
1004
|
`;
|
|
1018
|
-
function
|
|
1005
|
+
function tt(e, t, n) {
|
|
1019
1006
|
const r = { type: e };
|
|
1020
1007
|
return t !== void 0 && (r.key = t), n && (r.stepId = n), r;
|
|
1021
1008
|
}
|
|
1022
|
-
function
|
|
1009
|
+
function k({
|
|
1023
1010
|
id: e,
|
|
1024
1011
|
targetType: t,
|
|
1025
1012
|
targetKey: n,
|
|
@@ -1030,14 +1017,14 @@ function T({
|
|
|
1030
1017
|
return {
|
|
1031
1018
|
kind: "single",
|
|
1032
1019
|
id: e,
|
|
1033
|
-
target:
|
|
1020
|
+
target: tt(t, n, r),
|
|
1034
1021
|
oldValue: o,
|
|
1035
1022
|
newValue: a,
|
|
1036
1023
|
included: !0
|
|
1037
1024
|
};
|
|
1038
1025
|
}
|
|
1039
1026
|
function H(e, t, n) {
|
|
1040
|
-
return
|
|
1027
|
+
return k({ id: e, targetType: t, targetStepId: n, oldValue: void 0, newValue: void 0 });
|
|
1041
1028
|
}
|
|
1042
1029
|
function Y({
|
|
1043
1030
|
data: e,
|
|
@@ -1046,68 +1033,75 @@ function Y({
|
|
|
1046
1033
|
batchTargetKey: r,
|
|
1047
1034
|
targetStepId: o,
|
|
1048
1035
|
getOldValue: a,
|
|
1049
|
-
getNewValue: s = (
|
|
1050
|
-
resolveTargetKey:
|
|
1036
|
+
getNewValue: s = (d, u) => String(u ?? ""),
|
|
1037
|
+
resolveTargetKey: l = (d) => d
|
|
1051
1038
|
}) {
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1039
|
+
const d = Object.entries(e).filter(([, h]) => h !== void 0);
|
|
1040
|
+
if (d.length === 0)
|
|
1054
1041
|
return H(t, n, o);
|
|
1055
|
-
if (
|
|
1056
|
-
const
|
|
1057
|
-
([
|
|
1058
|
-
id: `${t}:${
|
|
1042
|
+
if (d.length >= 2) {
|
|
1043
|
+
const h = d.map(
|
|
1044
|
+
([p, y]) => k({
|
|
1045
|
+
id: `${t}:${p}`,
|
|
1059
1046
|
targetType: n,
|
|
1060
|
-
targetKey:
|
|
1061
|
-
oldValue: a(
|
|
1062
|
-
newValue: s(
|
|
1047
|
+
targetKey: l(p),
|
|
1048
|
+
oldValue: a(p),
|
|
1049
|
+
newValue: s(p, y)
|
|
1063
1050
|
})
|
|
1064
1051
|
);
|
|
1065
1052
|
return {
|
|
1066
1053
|
kind: "batch",
|
|
1067
1054
|
id: t,
|
|
1068
|
-
target:
|
|
1069
|
-
changes:
|
|
1055
|
+
target: tt(n, r, o),
|
|
1056
|
+
changes: h,
|
|
1070
1057
|
included: !0
|
|
1071
1058
|
};
|
|
1072
1059
|
}
|
|
1073
|
-
const [u, f] =
|
|
1074
|
-
return
|
|
1060
|
+
const [u, f] = d[0];
|
|
1061
|
+
return k({
|
|
1075
1062
|
id: t,
|
|
1076
1063
|
targetType: n,
|
|
1077
|
-
targetKey:
|
|
1064
|
+
targetKey: l(u),
|
|
1078
1065
|
targetStepId: o,
|
|
1079
1066
|
oldValue: a(u),
|
|
1080
1067
|
newValue: s(u, f)
|
|
1081
1068
|
});
|
|
1082
1069
|
}
|
|
1083
|
-
function
|
|
1084
|
-
|
|
1085
|
-
|
|
1070
|
+
function xr({
|
|
1071
|
+
collections: e,
|
|
1072
|
+
activeTab: t,
|
|
1073
|
+
input: n
|
|
1086
1074
|
}) {
|
|
1087
|
-
if (!
|
|
1088
|
-
const
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1075
|
+
if (!wr(n)) return [];
|
|
1076
|
+
const r = /* @__PURE__ */ new Map(), o = (a) => {
|
|
1077
|
+
const s = r.get(a);
|
|
1078
|
+
if (s) return s;
|
|
1079
|
+
const l = Ge(
|
|
1080
|
+
e,
|
|
1081
|
+
t,
|
|
1082
|
+
n.collectionId,
|
|
1083
|
+
n.workflowId,
|
|
1084
|
+
a
|
|
1085
|
+
), d = l.ok ? Array.from(l.value.step.security) : [];
|
|
1086
|
+
return r.set(a, d), d;
|
|
1093
1087
|
};
|
|
1094
|
-
return
|
|
1095
|
-
const
|
|
1096
|
-
return
|
|
1088
|
+
return n.changes.map((a, s) => {
|
|
1089
|
+
const l = a.stepId?.trim(), d = l || n.stepId;
|
|
1090
|
+
return br(o(d), a, s, l);
|
|
1097
1091
|
});
|
|
1098
1092
|
}
|
|
1099
|
-
function
|
|
1093
|
+
function wr(e) {
|
|
1100
1094
|
if (typeof e != "object" || e === null) return !1;
|
|
1101
1095
|
const t = e;
|
|
1102
1096
|
return typeof t.collectionId == "string" && typeof t.workflowId == "string" && typeof t.stepId == "string" && Array.isArray(t.changes) && t.changes.length > 0;
|
|
1103
1097
|
}
|
|
1104
|
-
function
|
|
1098
|
+
function br(e, t, n, r) {
|
|
1105
1099
|
const o = `security[${n}]`;
|
|
1106
1100
|
switch (t.action) {
|
|
1107
1101
|
case I.ADD: {
|
|
1108
|
-
const { type: a, schemeId: s, data:
|
|
1109
|
-
return !
|
|
1110
|
-
|
|
1102
|
+
const { type: a, schemeId: s, data: l } = t;
|
|
1103
|
+
return !l || Object.keys(l).length === 0 ? K(
|
|
1104
|
+
k({
|
|
1111
1105
|
id: o,
|
|
1112
1106
|
targetType: a,
|
|
1113
1107
|
targetStepId: r,
|
|
@@ -1117,7 +1111,7 @@ function Cr(e, t, n, r) {
|
|
|
1117
1111
|
s
|
|
1118
1112
|
) : K(
|
|
1119
1113
|
Y({
|
|
1120
|
-
data:
|
|
1114
|
+
data: l,
|
|
1121
1115
|
baseId: o,
|
|
1122
1116
|
targetType: a,
|
|
1123
1117
|
targetStepId: r,
|
|
@@ -1128,38 +1122,38 @@ function Cr(e, t, n, r) {
|
|
|
1128
1122
|
);
|
|
1129
1123
|
}
|
|
1130
1124
|
case I.UPDATE: {
|
|
1131
|
-
const { type: a, data: s } = t,
|
|
1125
|
+
const { type: a, data: s } = t, l = t.index !== void 0 ? e[t.index] : void 0, d = t.schemeId || ve(l);
|
|
1132
1126
|
return !s || Object.keys(s).length === 0 ? K(
|
|
1133
|
-
|
|
1127
|
+
k({
|
|
1134
1128
|
id: o,
|
|
1135
1129
|
targetType: a,
|
|
1136
1130
|
targetStepId: r,
|
|
1137
|
-
oldValue: Oe(
|
|
1131
|
+
oldValue: Oe(l),
|
|
1138
1132
|
newValue: a
|
|
1139
1133
|
}),
|
|
1140
|
-
|
|
1134
|
+
d
|
|
1141
1135
|
) : K(
|
|
1142
1136
|
Y({
|
|
1143
1137
|
data: s,
|
|
1144
1138
|
baseId: o,
|
|
1145
1139
|
targetType: a,
|
|
1146
1140
|
targetStepId: r,
|
|
1147
|
-
getOldValue: (u) =>
|
|
1141
|
+
getOldValue: (u) => l ? Cr(l, u) : void 0
|
|
1148
1142
|
}),
|
|
1149
|
-
|
|
1143
|
+
d
|
|
1150
1144
|
);
|
|
1151
1145
|
}
|
|
1152
1146
|
case I.REMOVE: {
|
|
1153
1147
|
const a = Dt(e, t), s = a.ok ? a.entry : void 0;
|
|
1154
1148
|
return K(
|
|
1155
|
-
|
|
1149
|
+
k({
|
|
1156
1150
|
id: o,
|
|
1157
1151
|
targetType: s?.securityType ?? "Security",
|
|
1158
1152
|
targetStepId: r,
|
|
1159
1153
|
oldValue: Oe(s),
|
|
1160
1154
|
newValue: void 0
|
|
1161
1155
|
}),
|
|
1162
|
-
|
|
1156
|
+
ve(s)
|
|
1163
1157
|
);
|
|
1164
1158
|
}
|
|
1165
1159
|
}
|
|
@@ -1167,7 +1161,7 @@ function Cr(e, t, n, r) {
|
|
|
1167
1161
|
function K(e, t) {
|
|
1168
1162
|
return t ? { ...e, target: { ...e.target, schemeId: t } } : e;
|
|
1169
1163
|
}
|
|
1170
|
-
function
|
|
1164
|
+
function Cr(e, t) {
|
|
1171
1165
|
switch (e.securityType) {
|
|
1172
1166
|
case V.NoAuth:
|
|
1173
1167
|
return;
|
|
@@ -1179,11 +1173,11 @@ function Tr(e, t) {
|
|
|
1179
1173
|
}
|
|
1180
1174
|
case V.APIKey: {
|
|
1181
1175
|
const n = e[V.APIKey];
|
|
1182
|
-
return t === "location" ?
|
|
1176
|
+
return t === "location" ? oe(n, t)?.toLowerCase() : oe(n, t);
|
|
1183
1177
|
}
|
|
1184
1178
|
default: {
|
|
1185
1179
|
const n = e[e.securityType];
|
|
1186
|
-
return
|
|
1180
|
+
return oe(n, t);
|
|
1187
1181
|
}
|
|
1188
1182
|
}
|
|
1189
1183
|
}
|
|
@@ -1191,67 +1185,74 @@ function Re(e, t) {
|
|
|
1191
1185
|
if (t === "grantType") return e.grantType || void 0;
|
|
1192
1186
|
if (!e.grantType) return;
|
|
1193
1187
|
const n = e[e.grantType];
|
|
1194
|
-
return
|
|
1188
|
+
return oe(n, t);
|
|
1195
1189
|
}
|
|
1196
|
-
function
|
|
1190
|
+
function oe(e, t) {
|
|
1197
1191
|
const n = e[t];
|
|
1198
1192
|
return n !== void 0 && n !== "" ? String(n) : void 0;
|
|
1199
1193
|
}
|
|
1200
1194
|
function Oe(e) {
|
|
1201
1195
|
if (!e || e.securityType === V.NoAuth) return;
|
|
1202
|
-
const t =
|
|
1196
|
+
const t = ve(e);
|
|
1203
1197
|
return t ? `${e.securityType} (${t})` : e.securityType;
|
|
1204
1198
|
}
|
|
1205
|
-
function
|
|
1199
|
+
function ve(e) {
|
|
1206
1200
|
return !e || e.securityType === V.NoAuth ? void 0 : e[e.securityType]?.schemeName || void 0;
|
|
1207
1201
|
}
|
|
1208
1202
|
function kr({
|
|
1209
|
-
|
|
1210
|
-
|
|
1203
|
+
collections: e,
|
|
1204
|
+
activeTab: t,
|
|
1205
|
+
input: n
|
|
1211
1206
|
}) {
|
|
1212
|
-
if (!
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1207
|
+
if (!Tr(n)) return [];
|
|
1208
|
+
const r = Ge(
|
|
1209
|
+
e,
|
|
1210
|
+
t,
|
|
1211
|
+
n.collectionId,
|
|
1212
|
+
n.workflowId,
|
|
1213
|
+
n.stepId
|
|
1214
|
+
), o = r.ok ? r.value.step : null;
|
|
1215
|
+
return n.changes.map((a, s) => Ir(o, a, s));
|
|
1216
|
+
}
|
|
1217
|
+
function Tr(e) {
|
|
1217
1218
|
return typeof e != "object" || e === null ? !1 : "collectionId" in e && "workflowId" in e && "stepId" in e && "changes" in e && Array.isArray(e.changes) && e.changes.length > 0 && typeof e.collectionId == "string" && typeof e.workflowId == "string" && typeof e.stepId == "string";
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
+
function Ir(e, t, n) {
|
|
1220
1221
|
const r = t.id ?? `${t.field}[${n}]`;
|
|
1221
1222
|
switch (t.field) {
|
|
1222
1223
|
case "method":
|
|
1223
1224
|
case "url":
|
|
1224
1225
|
case "description":
|
|
1225
|
-
return
|
|
1226
|
+
return Ar(e, t, r);
|
|
1226
1227
|
case "parameters":
|
|
1227
|
-
return
|
|
1228
|
+
return Sr(e, t, r);
|
|
1228
1229
|
case "outputs":
|
|
1229
|
-
return
|
|
1230
|
+
return Lr(e, t, r);
|
|
1230
1231
|
case "body":
|
|
1231
|
-
return
|
|
1232
|
+
return Pr(e, t, r);
|
|
1232
1233
|
case "successCriteria":
|
|
1233
|
-
return
|
|
1234
|
+
return Er(e, t, r);
|
|
1234
1235
|
}
|
|
1235
1236
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const r =
|
|
1237
|
+
function Ar(e, t, n) {
|
|
1238
|
+
const r = re(t.field);
|
|
1238
1239
|
switch (t.action) {
|
|
1239
1240
|
case I.ADD:
|
|
1240
|
-
return
|
|
1241
|
+
return k({
|
|
1241
1242
|
id: n,
|
|
1242
1243
|
targetType: r,
|
|
1243
1244
|
oldValue: void 0,
|
|
1244
1245
|
newValue: t.data
|
|
1245
1246
|
});
|
|
1246
1247
|
case I.UPDATE:
|
|
1247
|
-
return
|
|
1248
|
+
return k({
|
|
1248
1249
|
id: n,
|
|
1249
1250
|
targetType: r,
|
|
1250
1251
|
oldValue: De(e, t.field),
|
|
1251
1252
|
newValue: t.data
|
|
1252
1253
|
});
|
|
1253
1254
|
case I.REMOVE:
|
|
1254
|
-
return
|
|
1255
|
+
return k({
|
|
1255
1256
|
id: n,
|
|
1256
1257
|
targetType: r,
|
|
1257
1258
|
oldValue: De(e, t.field),
|
|
@@ -1259,14 +1260,14 @@ function Sr(e, t, n) {
|
|
|
1259
1260
|
});
|
|
1260
1261
|
}
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
+
function Sr(e, t, n) {
|
|
1263
1264
|
switch (t.action) {
|
|
1264
1265
|
case I.ADD: {
|
|
1265
1266
|
if (!t.data) return H(n, "parameter");
|
|
1266
1267
|
const { in: r, name: o, value: a } = t.data;
|
|
1267
|
-
return
|
|
1268
|
+
return k({
|
|
1268
1269
|
id: n,
|
|
1269
|
-
targetType:
|
|
1270
|
+
targetType: re(r),
|
|
1270
1271
|
targetKey: o,
|
|
1271
1272
|
oldValue: void 0,
|
|
1272
1273
|
newValue: a
|
|
@@ -1275,9 +1276,9 @@ function Lr(e, t, n) {
|
|
|
1275
1276
|
case I.UPDATE: {
|
|
1276
1277
|
if (!t.id && !t.data?.name) return H(n, "parameter");
|
|
1277
1278
|
const r = Me(e, t), o = t.data?.in ?? r?.in ?? "parameter";
|
|
1278
|
-
return
|
|
1279
|
+
return k({
|
|
1279
1280
|
id: n,
|
|
1280
|
-
targetType:
|
|
1281
|
+
targetType: re(o),
|
|
1281
1282
|
targetKey: t.data?.name ?? r?.key,
|
|
1282
1283
|
oldValue: r ? r.value ?? "" : void 0,
|
|
1283
1284
|
newValue: t.data?.value
|
|
@@ -1286,9 +1287,9 @@ function Lr(e, t, n) {
|
|
|
1286
1287
|
case I.REMOVE: {
|
|
1287
1288
|
if (!t.id && !t.data?.name) return H(n, "parameter");
|
|
1288
1289
|
const r = Me(e, t), o = t.data?.in ?? r?.in ?? "parameter";
|
|
1289
|
-
return
|
|
1290
|
+
return k({
|
|
1290
1291
|
id: n,
|
|
1291
|
-
targetType:
|
|
1292
|
+
targetType: re(o),
|
|
1292
1293
|
targetKey: r?.key ?? t.data?.name,
|
|
1293
1294
|
oldValue: r ? r.value ?? "" : void 0,
|
|
1294
1295
|
newValue: void 0
|
|
@@ -1296,16 +1297,16 @@ function Lr(e, t, n) {
|
|
|
1296
1297
|
}
|
|
1297
1298
|
}
|
|
1298
1299
|
}
|
|
1299
|
-
function
|
|
1300
|
+
function Lr(e, t, n) {
|
|
1300
1301
|
switch (t.action) {
|
|
1301
1302
|
case I.ADD:
|
|
1302
|
-
return t.data ?
|
|
1303
|
+
return t.data ? k({
|
|
1303
1304
|
id: n,
|
|
1304
1305
|
targetType: "Output",
|
|
1305
1306
|
targetKey: t.data.name,
|
|
1306
1307
|
oldValue: void 0,
|
|
1307
1308
|
newValue: t.data.expression
|
|
1308
|
-
}) :
|
|
1309
|
+
}) : k({
|
|
1309
1310
|
id: n,
|
|
1310
1311
|
targetType: "Output",
|
|
1311
1312
|
oldValue: void 0,
|
|
@@ -1313,14 +1314,14 @@ function Pr(e, t, n) {
|
|
|
1313
1314
|
});
|
|
1314
1315
|
case I.UPDATE: {
|
|
1315
1316
|
if (!t.data)
|
|
1316
|
-
return
|
|
1317
|
+
return k({
|
|
1317
1318
|
id: n,
|
|
1318
1319
|
targetType: "Output",
|
|
1319
1320
|
oldValue: void 0,
|
|
1320
1321
|
newValue: void 0
|
|
1321
1322
|
});
|
|
1322
1323
|
const r = t.id && e ? ze(e, t.id) : void 0;
|
|
1323
|
-
return
|
|
1324
|
+
return k({
|
|
1324
1325
|
id: n,
|
|
1325
1326
|
targetType: "Output",
|
|
1326
1327
|
targetKey: t.data.name,
|
|
@@ -1331,7 +1332,7 @@ function Pr(e, t, n) {
|
|
|
1331
1332
|
case I.REMOVE: {
|
|
1332
1333
|
if (!t.id && !t.data?.name) return H(n, "Output");
|
|
1333
1334
|
let r = t.id && e ? ze(e, t.id) : void 0;
|
|
1334
|
-
return !r && e && t.data?.name && (r =
|
|
1335
|
+
return !r && e && t.data?.name && (r = Dr(e, t.data.name)), k({
|
|
1335
1336
|
id: n,
|
|
1336
1337
|
targetType: "Output",
|
|
1337
1338
|
targetKey: r?.key ?? t.data?.name,
|
|
@@ -1341,7 +1342,7 @@ function Pr(e, t, n) {
|
|
|
1341
1342
|
}
|
|
1342
1343
|
}
|
|
1343
1344
|
}
|
|
1344
|
-
function
|
|
1345
|
+
function Pr(e, t, n) {
|
|
1345
1346
|
const { data: r } = t;
|
|
1346
1347
|
switch (t.action) {
|
|
1347
1348
|
case I.ADD:
|
|
@@ -1351,11 +1352,11 @@ function Er(e, t, n) {
|
|
|
1351
1352
|
targetType: "Body",
|
|
1352
1353
|
getOldValue: () => {
|
|
1353
1354
|
},
|
|
1354
|
-
getNewValue: (o) => o === "content" ?
|
|
1355
|
+
getNewValue: (o) => o === "content" ? de(r.content, r.contentType) : ae(r[o]),
|
|
1355
1356
|
resolveTargetKey: (o) => o === "content" ? void 0 : o
|
|
1356
1357
|
});
|
|
1357
1358
|
case I.UPDATE: {
|
|
1358
|
-
const o = e?.requestBody.type
|
|
1359
|
+
const o = e?.requestBody.type, a = r.contentType ?? o;
|
|
1359
1360
|
return Y({
|
|
1360
1361
|
data: r,
|
|
1361
1362
|
baseId: n,
|
|
@@ -1363,20 +1364,20 @@ function Er(e, t, n) {
|
|
|
1363
1364
|
getOldValue: (s) => {
|
|
1364
1365
|
if (e) {
|
|
1365
1366
|
if (s === "content")
|
|
1366
|
-
return
|
|
1367
|
+
return de(e.requestBody.content, o) || void 0;
|
|
1367
1368
|
if (s === "contentType") return o;
|
|
1368
1369
|
}
|
|
1369
1370
|
},
|
|
1370
|
-
getNewValue: (s) => s === "content" ?
|
|
1371
|
+
getNewValue: (s) => s === "content" ? de(r.content, a) : ae(r[s]),
|
|
1371
1372
|
resolveTargetKey: (s) => s === "content" ? void 0 : s
|
|
1372
1373
|
});
|
|
1373
1374
|
}
|
|
1374
1375
|
case I.REMOVE: {
|
|
1375
|
-
const o = e ?
|
|
1376
|
-
contentType: e.requestBody.type
|
|
1377
|
-
content: e.requestBody.content
|
|
1376
|
+
const o = e ? xe({
|
|
1377
|
+
contentType: e.requestBody.type,
|
|
1378
|
+
content: e.requestBody.content
|
|
1378
1379
|
}) : void 0;
|
|
1379
|
-
return
|
|
1380
|
+
return k({
|
|
1380
1381
|
id: n,
|
|
1381
1382
|
targetType: "Body",
|
|
1382
1383
|
oldValue: o,
|
|
@@ -1385,7 +1386,7 @@ function Er(e, t, n) {
|
|
|
1385
1386
|
}
|
|
1386
1387
|
}
|
|
1387
1388
|
}
|
|
1388
|
-
function
|
|
1389
|
+
function Er(e, t, n) {
|
|
1389
1390
|
switch (t.action) {
|
|
1390
1391
|
case I.ADD:
|
|
1391
1392
|
return t.data ? Y({
|
|
@@ -1394,7 +1395,7 @@ function Rr(e, t, n) {
|
|
|
1394
1395
|
targetType: "successCriteria",
|
|
1395
1396
|
getOldValue: () => {
|
|
1396
1397
|
},
|
|
1397
|
-
getNewValue: (r) =>
|
|
1398
|
+
getNewValue: (r) => ae(t.data[r])
|
|
1398
1399
|
}) : H(n, "successCriteria");
|
|
1399
1400
|
case I.UPDATE: {
|
|
1400
1401
|
if (!t.data) return H(n, "successCriteria");
|
|
@@ -1410,17 +1411,17 @@ function Rr(e, t, n) {
|
|
|
1410
1411
|
if (o === "type") return r.type;
|
|
1411
1412
|
}
|
|
1412
1413
|
},
|
|
1413
|
-
getNewValue: (o) =>
|
|
1414
|
+
getNewValue: (o) => ae(t.data[o])
|
|
1414
1415
|
});
|
|
1415
1416
|
}
|
|
1416
1417
|
case I.REMOVE: {
|
|
1417
1418
|
if (typeof t.id != "string") return H(n, "successCriteria");
|
|
1418
1419
|
const r = e ? _e(e, t.id) : void 0;
|
|
1419
|
-
return
|
|
1420
|
+
return k({
|
|
1420
1421
|
id: n,
|
|
1421
1422
|
targetType: "successCriteria",
|
|
1422
1423
|
targetKey: r?.condition,
|
|
1423
|
-
oldValue: r ?
|
|
1424
|
+
oldValue: r ? xe(r) : void 0,
|
|
1424
1425
|
newValue: void 0
|
|
1425
1426
|
});
|
|
1426
1427
|
}
|
|
@@ -1430,159 +1431,155 @@ function De(e, t) {
|
|
|
1430
1431
|
if (e)
|
|
1431
1432
|
switch (t) {
|
|
1432
1433
|
case "method":
|
|
1433
|
-
return e.xOperation
|
|
1434
|
+
return e.xOperation?.method;
|
|
1434
1435
|
case "url":
|
|
1435
|
-
return e.xOperation
|
|
1436
|
+
return e.xOperation?.url;
|
|
1436
1437
|
case "description":
|
|
1437
|
-
return e.description
|
|
1438
|
+
return e.description;
|
|
1438
1439
|
}
|
|
1439
1440
|
}
|
|
1440
1441
|
function Me(e, t) {
|
|
1441
|
-
let n = t.id && e ?
|
|
1442
|
-
return !n && e && t.data?.name && (n =
|
|
1442
|
+
let n = t.id && e ? Rr(e, t.id) : null;
|
|
1443
|
+
return !n && e && t.data?.name && (n = Or(e, t.data.name)), n;
|
|
1443
1444
|
}
|
|
1444
|
-
function
|
|
1445
|
+
function nt(e, t) {
|
|
1445
1446
|
for (const n of ["path", "query", "header", "cookie"]) {
|
|
1446
|
-
const r = e.parameters[Mt[n]].
|
|
1447
|
+
const r = e.parameters[Mt[n]].find(
|
|
1448
|
+
(o) => xt(o) && t(o)
|
|
1449
|
+
);
|
|
1447
1450
|
if (r) return r;
|
|
1448
1451
|
}
|
|
1449
1452
|
return null;
|
|
1450
1453
|
}
|
|
1451
|
-
function
|
|
1452
|
-
return
|
|
1454
|
+
function Rr(e, t) {
|
|
1455
|
+
return nt(e, (n) => n.id === t);
|
|
1453
1456
|
}
|
|
1454
|
-
function
|
|
1455
|
-
return
|
|
1457
|
+
function Or(e, t) {
|
|
1458
|
+
return nt(e, (n) => n.key === t);
|
|
1456
1459
|
}
|
|
1457
1460
|
function _e(e, t) {
|
|
1458
|
-
return e.successCriteria.
|
|
1461
|
+
return e.successCriteria.find((n) => n.condition === t);
|
|
1459
1462
|
}
|
|
1460
|
-
function
|
|
1461
|
-
for (const n of e.outputs
|
|
1463
|
+
function rt(e, t) {
|
|
1464
|
+
for (const n of e.outputs)
|
|
1462
1465
|
if (t(n))
|
|
1463
|
-
return {
|
|
1464
|
-
key: se(n.key),
|
|
1465
|
-
value: se(n.value)
|
|
1466
|
-
};
|
|
1466
|
+
return { key: n.key, value: n.value };
|
|
1467
1467
|
}
|
|
1468
1468
|
function ze(e, t) {
|
|
1469
|
-
return
|
|
1470
|
-
}
|
|
1471
|
-
function Mr(e, t) {
|
|
1472
|
-
return ot(e, (n) => se(n.key) === t);
|
|
1469
|
+
return rt(e, (n) => n.id === t);
|
|
1473
1470
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1471
|
+
function Dr(e, t) {
|
|
1472
|
+
return rt(e, (n) => n.key === t);
|
|
1476
1473
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return e == null ? "" : typeof e == "string" ? e :
|
|
1474
|
+
function ae(e) {
|
|
1475
|
+
return e == null ? "" : typeof e == "string" ? e : xe(e);
|
|
1479
1476
|
}
|
|
1480
|
-
function
|
|
1481
|
-
if (!e || t !==
|
|
1477
|
+
function de(e, t) {
|
|
1478
|
+
if (!e || t !== wt.JSON) return e;
|
|
1482
1479
|
try {
|
|
1483
1480
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
1484
1481
|
} catch {
|
|
1485
1482
|
return e;
|
|
1486
1483
|
}
|
|
1487
1484
|
}
|
|
1488
|
-
const
|
|
1489
|
-
update_security:
|
|
1485
|
+
const Mr = {
|
|
1486
|
+
update_security: xr,
|
|
1490
1487
|
update_step: kr
|
|
1491
1488
|
};
|
|
1492
|
-
function
|
|
1493
|
-
const n =
|
|
1494
|
-
const
|
|
1495
|
-
if (!
|
|
1489
|
+
function ot(e, t) {
|
|
1490
|
+
const n = ke(bt), r = ke(Ct), o = A(() => {
|
|
1491
|
+
const u = e ? Mr[e] : void 0;
|
|
1492
|
+
if (!u) return [];
|
|
1496
1493
|
try {
|
|
1497
|
-
return
|
|
1498
|
-
} catch (
|
|
1499
|
-
return console.error("Unable to build change previews",
|
|
1494
|
+
return u({ collections: n, activeTab: r, input: t });
|
|
1495
|
+
} catch (f) {
|
|
1496
|
+
return console.error("Unable to build change previews", f), [];
|
|
1500
1497
|
}
|
|
1501
|
-
}, [e, n, t]), [
|
|
1502
|
-
() => Object.fromEntries(
|
|
1503
|
-
),
|
|
1504
|
-
() =>
|
|
1505
|
-
[
|
|
1498
|
+
}, [e, n, r, t]), [a, s] = q(
|
|
1499
|
+
() => Object.fromEntries(o.map((u) => [u.id, u.included]))
|
|
1500
|
+
), l = A(
|
|
1501
|
+
() => o.map((u) => ({ ...u, included: a[u.id] ?? u.included })),
|
|
1502
|
+
[o, a]
|
|
1506
1503
|
), d = _(
|
|
1507
|
-
(
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1504
|
+
(u) => {
|
|
1505
|
+
s(typeof u == "function" ? (f) => {
|
|
1506
|
+
const h = o.map((p) => ({
|
|
1510
1507
|
...p,
|
|
1511
|
-
included:
|
|
1508
|
+
included: f[p.id] ?? p.included
|
|
1512
1509
|
}));
|
|
1513
|
-
return Object.fromEntries(
|
|
1514
|
-
} : Object.fromEntries(
|
|
1510
|
+
return Object.fromEntries(u(h).map((p) => [p.id, p.included]));
|
|
1511
|
+
} : Object.fromEntries(u.map((f) => [f.id, f.included])));
|
|
1515
1512
|
},
|
|
1516
|
-
[
|
|
1513
|
+
[o]
|
|
1517
1514
|
);
|
|
1518
|
-
return { previews:
|
|
1515
|
+
return { previews: l, setPreviews: d };
|
|
1519
1516
|
}
|
|
1520
|
-
function
|
|
1517
|
+
function _r({
|
|
1521
1518
|
toolCallId: e,
|
|
1522
1519
|
toolName: t,
|
|
1523
1520
|
input: n,
|
|
1524
1521
|
onApprove: r,
|
|
1525
1522
|
onDeny: o
|
|
1526
1523
|
}) {
|
|
1527
|
-
const { updateMessages: a } = Q(), { previews: s, setPreviews:
|
|
1524
|
+
const { updateMessages: a } = Q(), { previews: s, setPreviews: l } = ot(t, n), { includedCount: d, totalCount: u } = A(
|
|
1528
1525
|
() => ({
|
|
1529
|
-
includedCount: s.filter((
|
|
1526
|
+
includedCount: s.filter((g) => g.included).length,
|
|
1530
1527
|
totalCount: s.length
|
|
1531
1528
|
}),
|
|
1532
1529
|
[s]
|
|
1533
|
-
), { approveLabel: f, denyLabel:
|
|
1534
|
-
() =>
|
|
1530
|
+
), { approveLabel: f, denyLabel: h } = A(
|
|
1531
|
+
() => Hn(t, n),
|
|
1535
1532
|
[t, n]
|
|
1536
|
-
),
|
|
1537
|
-
a((
|
|
1533
|
+
), p = _(() => {
|
|
1534
|
+
a((g) => {
|
|
1538
1535
|
const x = [];
|
|
1539
|
-
for (let b = 0; b <
|
|
1540
|
-
const w =
|
|
1541
|
-
(O) =>
|
|
1536
|
+
for (let b = 0; b < g.length; b++) {
|
|
1537
|
+
const w = g[b], { parts: v } = w, S = w.role === "assistant", R = v.some(
|
|
1538
|
+
(O) => Xe(O, e)
|
|
1542
1539
|
);
|
|
1543
1540
|
if (S && R) {
|
|
1544
|
-
const O =
|
|
1541
|
+
const O = Fn(w, e, s);
|
|
1545
1542
|
x.push({ index: b, message: O });
|
|
1546
1543
|
}
|
|
1547
1544
|
}
|
|
1548
1545
|
return x;
|
|
1549
1546
|
}), r();
|
|
1550
1547
|
}, [s, r, a, e]), y = _(
|
|
1551
|
-
(
|
|
1552
|
-
|
|
1548
|
+
(g) => {
|
|
1549
|
+
l(
|
|
1553
1550
|
(x) => x.map(
|
|
1554
|
-
(b, w) => w ===
|
|
1551
|
+
(b, w) => w === g ? { ...b, included: !b.included } : b
|
|
1555
1552
|
)
|
|
1556
1553
|
);
|
|
1557
1554
|
},
|
|
1558
|
-
[
|
|
1555
|
+
[l]
|
|
1559
1556
|
);
|
|
1560
|
-
return /* @__PURE__ */
|
|
1561
|
-
/* @__PURE__ */ i(
|
|
1562
|
-
s.length ? /* @__PURE__ */ i(
|
|
1563
|
-
s.length ? /* @__PURE__ */ i(
|
|
1564
|
-
/* @__PURE__ */
|
|
1565
|
-
u > 1 ? /* @__PURE__ */
|
|
1566
|
-
|
|
1557
|
+
return /* @__PURE__ */ m(zr, { children: [
|
|
1558
|
+
/* @__PURE__ */ i(et, { toolName: t, input: n }),
|
|
1559
|
+
s.length ? /* @__PURE__ */ i(Vr, { children: /* @__PURE__ */ i(Ze, { previews: s, handleToggle: y }) }) : null,
|
|
1560
|
+
s.length ? /* @__PURE__ */ i(Ue, {}) : null,
|
|
1561
|
+
/* @__PURE__ */ m($r, { children: [
|
|
1562
|
+
u > 1 ? /* @__PURE__ */ m(Hr, { children: [
|
|
1563
|
+
d,
|
|
1567
1564
|
" of ",
|
|
1568
1565
|
u,
|
|
1569
1566
|
" selected"
|
|
1570
1567
|
] }) : null,
|
|
1571
|
-
/* @__PURE__ */ i(
|
|
1568
|
+
/* @__PURE__ */ i(Br, { size: "small", variant: "secondary", onClick: o, children: h }),
|
|
1572
1569
|
/* @__PURE__ */ i(
|
|
1573
1570
|
Nr,
|
|
1574
1571
|
{
|
|
1575
1572
|
size: "small",
|
|
1576
1573
|
variant: "primary",
|
|
1577
|
-
onClick:
|
|
1578
|
-
disabled: u > 0 ?
|
|
1574
|
+
onClick: p,
|
|
1575
|
+
disabled: u > 0 ? d === 0 : !1,
|
|
1579
1576
|
children: f
|
|
1580
1577
|
}
|
|
1581
1578
|
)
|
|
1582
1579
|
] })
|
|
1583
1580
|
] });
|
|
1584
1581
|
}
|
|
1585
|
-
const
|
|
1582
|
+
const zr = c.div`
|
|
1586
1583
|
display: flex;
|
|
1587
1584
|
color: var(--text-color-primary);
|
|
1588
1585
|
flex-direction: column;
|
|
@@ -1593,25 +1590,25 @@ const Vr = c.div`
|
|
|
1593
1590
|
border: 1px solid var(--border-color-secondary);
|
|
1594
1591
|
background: var(--layer-color);
|
|
1595
1592
|
line-height: var(--line-height-sm);
|
|
1596
|
-
`,
|
|
1593
|
+
`, Vr = c.div`
|
|
1597
1594
|
display: flex;
|
|
1598
1595
|
flex-direction: column;
|
|
1599
1596
|
gap: var(--spacing-xs);
|
|
1600
1597
|
min-width: 0;
|
|
1601
|
-
`,
|
|
1598
|
+
`, $r = c.div`
|
|
1602
1599
|
display: flex;
|
|
1603
1600
|
flex-wrap: wrap;
|
|
1604
1601
|
justify-content: flex-end;
|
|
1605
1602
|
align-items: center;
|
|
1606
1603
|
padding: 0 var(--spacing-sm) var(--spacing-xs) var(--spacing-sm);
|
|
1607
1604
|
gap: var(--spacing-xxs);
|
|
1608
|
-
`,
|
|
1605
|
+
`, Hr = c.span`
|
|
1609
1606
|
flex: 1;
|
|
1610
1607
|
font-size: var(--font-size-sm);
|
|
1611
1608
|
font-weight: var(--font-weight-regular);
|
|
1612
1609
|
line-height: var(--line-height-sm);
|
|
1613
1610
|
color: var(--text-color-secondary);
|
|
1614
|
-
`,
|
|
1611
|
+
`, Br = c(P)`
|
|
1615
1612
|
background: none;
|
|
1616
1613
|
`, Nr = c(P)`
|
|
1617
1614
|
border: 1px solid var(--button-bg-color);
|
|
@@ -1621,7 +1618,7 @@ const Vr = c.div`
|
|
|
1621
1618
|
border: 1px solid var(--button-border-color-disabled);
|
|
1622
1619
|
}
|
|
1623
1620
|
`;
|
|
1624
|
-
function
|
|
1621
|
+
function Fr({
|
|
1625
1622
|
approvalId: e,
|
|
1626
1623
|
toolCallId: t,
|
|
1627
1624
|
toolName: n,
|
|
@@ -1633,7 +1630,7 @@ function jr({
|
|
|
1633
1630
|
o({ id: e, approved: !1 });
|
|
1634
1631
|
}, [e, o]);
|
|
1635
1632
|
return /* @__PURE__ */ i(
|
|
1636
|
-
|
|
1633
|
+
_r,
|
|
1637
1634
|
{
|
|
1638
1635
|
onApprove: a,
|
|
1639
1636
|
onDeny: s,
|
|
@@ -1643,7 +1640,7 @@ function jr({
|
|
|
1643
1640
|
}
|
|
1644
1641
|
);
|
|
1645
1642
|
}
|
|
1646
|
-
function
|
|
1643
|
+
function jr({
|
|
1647
1644
|
toolName: e,
|
|
1648
1645
|
toolCallId: t,
|
|
1649
1646
|
input: n,
|
|
@@ -1654,33 +1651,33 @@ function Ur({
|
|
|
1654
1651
|
const s = A(
|
|
1655
1652
|
() => Nn(o, t),
|
|
1656
1653
|
[o, t]
|
|
1657
|
-
), { previews:
|
|
1654
|
+
), { previews: l } = ot(
|
|
1658
1655
|
s ? void 0 : e,
|
|
1659
1656
|
n
|
|
1660
|
-
),
|
|
1661
|
-
const
|
|
1657
|
+
), d = A(() => {
|
|
1658
|
+
const p = s ?? l;
|
|
1662
1659
|
if (r)
|
|
1663
|
-
return
|
|
1664
|
-
const y =
|
|
1665
|
-
return
|
|
1666
|
-
...
|
|
1667
|
-
included: y[x] ??
|
|
1660
|
+
return p.map((g) => ({ ...g, included: !1 }));
|
|
1661
|
+
const y = Bn(n);
|
|
1662
|
+
return p.map((g, x) => ({
|
|
1663
|
+
...g,
|
|
1664
|
+
included: y[x] ?? g.included
|
|
1668
1665
|
}));
|
|
1669
|
-
}, [s,
|
|
1670
|
-
if (
|
|
1666
|
+
}, [s, l, n, r]);
|
|
1667
|
+
if (d.length === 0)
|
|
1671
1668
|
return null;
|
|
1672
|
-
const u =
|
|
1673
|
-
return /* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */ i(
|
|
1675
|
-
/* @__PURE__ */ i(
|
|
1676
|
-
/* @__PURE__ */ i(
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */ i(qr, { children:
|
|
1679
|
-
a ? /* @__PURE__ */ i(
|
|
1669
|
+
const u = d.filter((p) => p.included).length, h = u === 0 ? "Nothing applied" : `${u} ${u === 1 ? "change" : "changes"} applied`;
|
|
1670
|
+
return /* @__PURE__ */ m(Ur, { children: [
|
|
1671
|
+
/* @__PURE__ */ i(et, { toolName: e, input: n }),
|
|
1672
|
+
/* @__PURE__ */ i(Wr, { children: /* @__PURE__ */ i(Ze, { previews: d, readOnly: !0 }) }),
|
|
1673
|
+
/* @__PURE__ */ i(Ue, {}),
|
|
1674
|
+
/* @__PURE__ */ m(Yr, { children: [
|
|
1675
|
+
/* @__PURE__ */ i(qr, { children: h }),
|
|
1676
|
+
a ? /* @__PURE__ */ i(Gr, { size: "small", variant: "outlined", onClick: a, children: "Undo" }) : null
|
|
1680
1677
|
] })
|
|
1681
1678
|
] });
|
|
1682
1679
|
}
|
|
1683
|
-
const
|
|
1680
|
+
const Ur = c.div`
|
|
1684
1681
|
display: flex;
|
|
1685
1682
|
color: var(--text-color-primary);
|
|
1686
1683
|
flex-direction: column;
|
|
@@ -1690,11 +1687,11 @@ const Wr = c.div`
|
|
|
1690
1687
|
border: 1px solid var(--border-color-secondary);
|
|
1691
1688
|
background: var(--layer-color);
|
|
1692
1689
|
line-height: var(--line-height-sm);
|
|
1693
|
-
`,
|
|
1690
|
+
`, Wr = c.div`
|
|
1694
1691
|
display: flex;
|
|
1695
1692
|
flex-direction: column;
|
|
1696
1693
|
min-width: 0;
|
|
1697
|
-
`,
|
|
1694
|
+
`, Yr = c.div`
|
|
1698
1695
|
display: flex;
|
|
1699
1696
|
justify-content: space-between;
|
|
1700
1697
|
align-items: center;
|
|
@@ -1705,62 +1702,62 @@ const Wr = c.div`
|
|
|
1705
1702
|
font-weight: var(--font-weight-regular);
|
|
1706
1703
|
line-height: var(--line-height-sm);
|
|
1707
1704
|
color: var(--text-color-secondary);
|
|
1708
|
-
`,
|
|
1705
|
+
`, Gr = c(P)`
|
|
1709
1706
|
padding-top: 0;
|
|
1710
1707
|
padding-bottom: 0;
|
|
1711
1708
|
`;
|
|
1712
|
-
function
|
|
1713
|
-
const [n, r] =
|
|
1709
|
+
function Kr({ items: e, isLast: t }) {
|
|
1710
|
+
const [n, r] = q(t), o = _(() => {
|
|
1714
1711
|
r((s) => !s);
|
|
1715
1712
|
}, []), a = A(() => e.filter((s) => s.kind === "action"), [e]);
|
|
1716
|
-
return /* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
-
/* @__PURE__ */ i(
|
|
1719
|
-
/* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ m(Xr, { children: [
|
|
1714
|
+
/* @__PURE__ */ m(Zr, { type: "button", onClick: o, "aria-expanded": n, children: [
|
|
1715
|
+
/* @__PURE__ */ i(Qr, { children: n ? /* @__PURE__ */ i(qt, { size: "12px", color: "var(--icon-color-additional)" }) : /* @__PURE__ */ i(Gt, { size: "12px", color: "var(--icon-color-additional)" }) }),
|
|
1716
|
+
/* @__PURE__ */ m(eo, { children: [
|
|
1720
1717
|
a.length,
|
|
1721
1718
|
" ",
|
|
1722
1719
|
a.length === 1 ? "action" : "actions"
|
|
1723
1720
|
] })
|
|
1724
1721
|
] }),
|
|
1725
|
-
n && /* @__PURE__ */ i(
|
|
1722
|
+
n && /* @__PURE__ */ i(to, { children: a.map((s, l) => /* @__PURE__ */ i(Jr, { text: s.text }, l)) })
|
|
1726
1723
|
] });
|
|
1727
1724
|
}
|
|
1728
1725
|
function Jr({ text: e }) {
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */ i(
|
|
1732
|
-
/* @__PURE__ */ i(
|
|
1733
|
-
/* @__PURE__ */ i(
|
|
1726
|
+
return /* @__PURE__ */ m(no, { children: [
|
|
1727
|
+
/* @__PURE__ */ m(ro, { children: [
|
|
1728
|
+
/* @__PURE__ */ i(oo, { "aria-hidden": !0 }),
|
|
1729
|
+
/* @__PURE__ */ i(io, { children: /* @__PURE__ */ i(ao, { "aria-hidden": !0 }) }),
|
|
1730
|
+
/* @__PURE__ */ i(it, { "aria-hidden": !0 })
|
|
1734
1731
|
] }),
|
|
1735
|
-
/* @__PURE__ */ i(
|
|
1732
|
+
/* @__PURE__ */ i(so, { children: e })
|
|
1736
1733
|
] });
|
|
1737
1734
|
}
|
|
1738
|
-
const
|
|
1735
|
+
const Xr = c.div`
|
|
1739
1736
|
display: flex;
|
|
1740
1737
|
flex-direction: column;
|
|
1741
1738
|
width: 100%;
|
|
1742
1739
|
min-width: 0;
|
|
1743
|
-
`,
|
|
1740
|
+
`, Zr = c.button`
|
|
1744
1741
|
display: flex;
|
|
1745
1742
|
align-items: center;
|
|
1746
1743
|
cursor: pointer;
|
|
1747
1744
|
user-select: none;
|
|
1748
1745
|
width: fit-content;
|
|
1749
1746
|
padding: 0;
|
|
1750
|
-
`,
|
|
1747
|
+
`, Qr = c.span`
|
|
1751
1748
|
display: flex;
|
|
1752
1749
|
align-items: center;
|
|
1753
1750
|
flex-shrink: 0;
|
|
1754
|
-
`,
|
|
1751
|
+
`, eo = c.span`
|
|
1755
1752
|
font-size: var(--font-size-sm);
|
|
1756
1753
|
font-weight: var(--font-weight-regular);
|
|
1757
1754
|
line-height: var(--line-height-sm);
|
|
1758
1755
|
color: var(--text-color-description);
|
|
1759
|
-
`,
|
|
1756
|
+
`, to = c.div`
|
|
1760
1757
|
display: flex;
|
|
1761
1758
|
flex-direction: column;
|
|
1762
1759
|
gap: 0;
|
|
1763
|
-
`,
|
|
1760
|
+
`, it = c.span`
|
|
1764
1761
|
display: block;
|
|
1765
1762
|
width: 1px;
|
|
1766
1763
|
flex-shrink: 0;
|
|
@@ -1768,7 +1765,7 @@ const Zr = c.div`
|
|
|
1768
1765
|
background: var(--border-color-secondary);
|
|
1769
1766
|
flex: 1 1 auto;
|
|
1770
1767
|
min-height: 8px;
|
|
1771
|
-
`,
|
|
1768
|
+
`, no = c.div`
|
|
1772
1769
|
display: flex;
|
|
1773
1770
|
flex-direction: row;
|
|
1774
1771
|
align-items: stretch;
|
|
@@ -1776,11 +1773,11 @@ const Zr = c.div`
|
|
|
1776
1773
|
min-width: 0;
|
|
1777
1774
|
|
|
1778
1775
|
&:last-child {
|
|
1779
|
-
${
|
|
1776
|
+
${it} {
|
|
1780
1777
|
display: none;
|
|
1781
1778
|
}
|
|
1782
1779
|
}
|
|
1783
|
-
`,
|
|
1780
|
+
`, ro = c.div`
|
|
1784
1781
|
display: flex;
|
|
1785
1782
|
flex-direction: column;
|
|
1786
1783
|
align-items: center;
|
|
@@ -1789,14 +1786,14 @@ const Zr = c.div`
|
|
|
1789
1786
|
flex: 0 0 auto;
|
|
1790
1787
|
align-self: stretch;
|
|
1791
1788
|
min-height: 0;
|
|
1792
|
-
`,
|
|
1789
|
+
`, oo = c.span`
|
|
1793
1790
|
display: block;
|
|
1794
1791
|
width: 1px;
|
|
1795
1792
|
height: 4px;
|
|
1796
1793
|
flex: 0 0 auto;
|
|
1797
1794
|
flex-shrink: 0;
|
|
1798
1795
|
background: var(--border-color-secondary);
|
|
1799
|
-
`,
|
|
1796
|
+
`, io = c.div`
|
|
1800
1797
|
width: 12px;
|
|
1801
1798
|
height: 12px;
|
|
1802
1799
|
flex: 0 0 auto;
|
|
@@ -1804,7 +1801,7 @@ const Zr = c.div`
|
|
|
1804
1801
|
display: flex;
|
|
1805
1802
|
align-items: center;
|
|
1806
1803
|
justify-content: center;
|
|
1807
|
-
`,
|
|
1804
|
+
`, ao = c.span`
|
|
1808
1805
|
width: 4px;
|
|
1809
1806
|
height: 4px;
|
|
1810
1807
|
flex-shrink: 0;
|
|
@@ -1812,7 +1809,7 @@ const Zr = c.div`
|
|
|
1812
1809
|
box-sizing: border-box;
|
|
1813
1810
|
border: 1px solid var(--border-color-secondary);
|
|
1814
1811
|
background: transparent;
|
|
1815
|
-
`,
|
|
1812
|
+
`, so = c.span`
|
|
1816
1813
|
flex: 1;
|
|
1817
1814
|
min-width: 0;
|
|
1818
1815
|
align-self: flex-start;
|
|
@@ -1821,18 +1818,18 @@ const Zr = c.div`
|
|
|
1821
1818
|
line-height: var(--line-height-sm);
|
|
1822
1819
|
color: var(--text-color-helper);
|
|
1823
1820
|
`;
|
|
1824
|
-
function
|
|
1821
|
+
function co({
|
|
1825
1822
|
items: e,
|
|
1826
1823
|
messageMetadata: t
|
|
1827
1824
|
}) {
|
|
1828
|
-
return /* @__PURE__ */ i(
|
|
1825
|
+
return /* @__PURE__ */ i(uo, { children: e.map((n, r) => {
|
|
1829
1826
|
if (n.kind === "reasoning-block") {
|
|
1830
1827
|
const s = r === e.length - 1;
|
|
1831
|
-
return /* @__PURE__ */ i(
|
|
1828
|
+
return /* @__PURE__ */ i(Kr, { items: n.items, isLast: s }, n.key);
|
|
1832
1829
|
}
|
|
1833
1830
|
if (n.kind === "text")
|
|
1834
1831
|
return /* @__PURE__ */ i(
|
|
1835
|
-
|
|
1832
|
+
lo,
|
|
1836
1833
|
{
|
|
1837
1834
|
rawMarkdown: n.text,
|
|
1838
1835
|
workflowRunHistoryIds: n.workflowRunHistoryIds
|
|
@@ -1841,7 +1838,7 @@ function lo({
|
|
|
1841
1838
|
);
|
|
1842
1839
|
const { part: o } = n, a = _t(o.type);
|
|
1843
1840
|
return a && qe(o) ? /* @__PURE__ */ i(
|
|
1844
|
-
|
|
1841
|
+
Fr,
|
|
1845
1842
|
{
|
|
1846
1843
|
approvalId: o.approval.id,
|
|
1847
1844
|
toolCallId: o.toolCallId,
|
|
@@ -1850,7 +1847,7 @@ function lo({
|
|
|
1850
1847
|
},
|
|
1851
1848
|
n.key
|
|
1852
1849
|
) : a && zt(o) ? /* @__PURE__ */ i(
|
|
1853
|
-
|
|
1850
|
+
jr,
|
|
1854
1851
|
{
|
|
1855
1852
|
toolName: a,
|
|
1856
1853
|
toolCallId: o.toolCallId,
|
|
@@ -1862,18 +1859,18 @@ function lo({
|
|
|
1862
1859
|
) : null;
|
|
1863
1860
|
}) });
|
|
1864
1861
|
}
|
|
1865
|
-
function
|
|
1862
|
+
function lo({
|
|
1866
1863
|
rawMarkdown: e,
|
|
1867
1864
|
workflowRunHistoryIds: t
|
|
1868
1865
|
}) {
|
|
1869
1866
|
const n = Je({ workflowRunHistoryIds: t });
|
|
1870
|
-
return /* @__PURE__ */ i(
|
|
1867
|
+
return /* @__PURE__ */ i(fo, { onClick: n, children: /* @__PURE__ */ i(kt, { rawMarkdown: e, parser: Tt }) });
|
|
1871
1868
|
}
|
|
1872
|
-
const
|
|
1869
|
+
const uo = c.div`
|
|
1873
1870
|
display: flex;
|
|
1874
1871
|
flex-direction: column;
|
|
1875
1872
|
gap: var(--spacing-xs);
|
|
1876
|
-
`,
|
|
1873
|
+
`, fo = c.div`
|
|
1877
1874
|
white-space: normal;
|
|
1878
1875
|
|
|
1879
1876
|
max-width: 100%;
|
|
@@ -1886,12 +1883,12 @@ const fo = c.div`
|
|
|
1886
1883
|
p:last-child {
|
|
1887
1884
|
margin-bottom: 0;
|
|
1888
1885
|
}
|
|
1889
|
-
`,
|
|
1886
|
+
`, at = c.div`
|
|
1890
1887
|
font-family: var(--font-family-base);
|
|
1891
1888
|
font-size: var(--font-size-sm);
|
|
1892
1889
|
line-height: var(--line-height-sm);
|
|
1893
1890
|
color: var(--text-color-primary);
|
|
1894
|
-
`,
|
|
1891
|
+
`, X = c.div`
|
|
1895
1892
|
width: var(--search-ai-thinking-dot-size);
|
|
1896
1893
|
height: var(--search-ai-thinking-dot-size);
|
|
1897
1894
|
border-radius: 50%;
|
|
@@ -1923,14 +1920,14 @@ const fo = c.div`
|
|
|
1923
1920
|
}
|
|
1924
1921
|
}
|
|
1925
1922
|
`;
|
|
1926
|
-
function
|
|
1927
|
-
return /* @__PURE__ */
|
|
1928
|
-
/* @__PURE__ */ i(
|
|
1929
|
-
/* @__PURE__ */ i(
|
|
1930
|
-
/* @__PURE__ */ i(
|
|
1923
|
+
function po() {
|
|
1924
|
+
return /* @__PURE__ */ m(ho, { children: [
|
|
1925
|
+
/* @__PURE__ */ i(X, {}),
|
|
1926
|
+
/* @__PURE__ */ i(X, {}),
|
|
1927
|
+
/* @__PURE__ */ i(X, {})
|
|
1931
1928
|
] });
|
|
1932
1929
|
}
|
|
1933
|
-
const
|
|
1930
|
+
const ho = c.div`
|
|
1934
1931
|
display: flex;
|
|
1935
1932
|
align-items: center;
|
|
1936
1933
|
justify-content: space-between;
|
|
@@ -1938,44 +1935,44 @@ const go = c.div`
|
|
|
1938
1935
|
height: 24px;
|
|
1939
1936
|
`;
|
|
1940
1937
|
function mo() {
|
|
1941
|
-
return /* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */ i(
|
|
1943
|
-
/* @__PURE__ */ i(
|
|
1938
|
+
return /* @__PURE__ */ m(go, { children: [
|
|
1939
|
+
/* @__PURE__ */ i(po, {}),
|
|
1940
|
+
/* @__PURE__ */ i(vo, { children: "Thinking" })
|
|
1944
1941
|
] });
|
|
1945
1942
|
}
|
|
1946
|
-
const
|
|
1943
|
+
const go = c.div`
|
|
1947
1944
|
display: flex;
|
|
1948
1945
|
align-items: center;
|
|
1949
1946
|
gap: var(--spacing-xxs);
|
|
1950
|
-
`,
|
|
1947
|
+
`, vo = c.span`
|
|
1951
1948
|
font-family: var(--font-family-base);
|
|
1952
1949
|
font-size: var(--font-size-sm);
|
|
1953
1950
|
line-height: var(--line-height-sm);
|
|
1954
1951
|
color: var(--text-color-helper);
|
|
1955
1952
|
`;
|
|
1956
|
-
function
|
|
1957
|
-
return /* @__PURE__ */ i(
|
|
1953
|
+
function yo({ items: e }) {
|
|
1954
|
+
return /* @__PURE__ */ i(ht, { children: e.map((t) => t.kind !== "text" ? null : /* @__PURE__ */ i(at, { children: t.text }, t.key)) });
|
|
1958
1955
|
}
|
|
1959
|
-
const
|
|
1960
|
-
function
|
|
1956
|
+
const xo = "Something went wrong. Please try again.";
|
|
1957
|
+
function wo(e) {
|
|
1961
1958
|
const t = e?.message?.trim();
|
|
1962
|
-
return t ||
|
|
1959
|
+
return t || xo;
|
|
1963
1960
|
}
|
|
1964
|
-
function
|
|
1965
|
-
const { chatStatus: n, chatError: r } = Q(), { role: o, parts: a } = e, s = o === z.ASSISTANT,
|
|
1966
|
-
return !
|
|
1961
|
+
function bo({ message: e, isLastMessage: t }) {
|
|
1962
|
+
const { chatStatus: n, chatError: r } = Q(), { role: o, parts: a } = e, s = o === z.ASSISTANT, l = A(() => Vt(a), [a]), d = l.length > 0, u = n === "error" && t && s && !d;
|
|
1963
|
+
return !d && !u ? null : /* @__PURE__ */ i(st, { $role: o, children: /* @__PURE__ */ i(
|
|
1967
1964
|
ko,
|
|
1968
1965
|
{
|
|
1969
1966
|
isFailedEmptyAssistant: u,
|
|
1970
1967
|
chatError: r,
|
|
1971
1968
|
isAssistant: s,
|
|
1972
|
-
contentItems:
|
|
1969
|
+
contentItems: l,
|
|
1973
1970
|
messageMetadata: e.metadata
|
|
1974
1971
|
}
|
|
1975
1972
|
) });
|
|
1976
1973
|
}
|
|
1977
|
-
function
|
|
1978
|
-
return /* @__PURE__ */ i(
|
|
1974
|
+
function Co() {
|
|
1975
|
+
return /* @__PURE__ */ i(st, { $role: z.ASSISTANT, children: /* @__PURE__ */ i(ye, { children: /* @__PURE__ */ i(mo, {}) }) });
|
|
1979
1976
|
}
|
|
1980
1977
|
function ko({
|
|
1981
1978
|
isFailedEmptyAssistant: e,
|
|
@@ -1984,9 +1981,9 @@ function ko({
|
|
|
1984
1981
|
contentItems: r,
|
|
1985
1982
|
messageMetadata: o
|
|
1986
1983
|
}) {
|
|
1987
|
-
return e ? /* @__PURE__ */ i(
|
|
1984
|
+
return e ? /* @__PURE__ */ i(ye, { children: /* @__PURE__ */ i(at, { children: wo(t) }) }) : /* @__PURE__ */ i(ye, { children: n ? /* @__PURE__ */ i(co, { items: r, messageMetadata: o }) : /* @__PURE__ */ i(yo, { items: r }) });
|
|
1988
1985
|
}
|
|
1989
|
-
const
|
|
1986
|
+
const st = c.div`
|
|
1990
1987
|
display: flex;
|
|
1991
1988
|
flex-direction: column;
|
|
1992
1989
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
@@ -2001,24 +1998,24 @@ const ct = c.div`
|
|
|
2001
1998
|
word-wrap: break-word;
|
|
2002
1999
|
white-space: pre-wrap;
|
|
2003
2000
|
max-width: 100%;
|
|
2004
|
-
`,
|
|
2001
|
+
`, ye = c.div`
|
|
2005
2002
|
display: flex;
|
|
2006
2003
|
flex-direction: column;
|
|
2007
2004
|
gap: var(--spacing-xxs);
|
|
2008
2005
|
min-width: 0;
|
|
2009
2006
|
width: 100%;
|
|
2010
2007
|
`;
|
|
2011
|
-
function
|
|
2008
|
+
function To() {
|
|
2012
2009
|
const { messages: e, isStreaming: t } = Q(), n = e.at(-1), r = A(() => {
|
|
2013
2010
|
const o = n?.role === z.ASSISTANT, a = n?.parts.at(-1)?.type === "text";
|
|
2014
2011
|
return t && !(o && a);
|
|
2015
2012
|
}, [t, n?.parts, n?.role]);
|
|
2016
|
-
return /* @__PURE__ */
|
|
2017
|
-
e.map((o, a) => /* @__PURE__ */ i(Ve, { $role: o.role, children: /* @__PURE__ */ i($e, { $role: o.role, children: /* @__PURE__ */ i(
|
|
2018
|
-
r && /* @__PURE__ */ i(Ve, { $role: z.ASSISTANT, children: /* @__PURE__ */ i($e, { $role: z.ASSISTANT, children: /* @__PURE__ */ i(
|
|
2013
|
+
return /* @__PURE__ */ m(Io, { children: [
|
|
2014
|
+
e.map((o, a) => /* @__PURE__ */ i(Ve, { $role: o.role, children: /* @__PURE__ */ i($e, { $role: o.role, children: /* @__PURE__ */ i(bo, { message: o, isLastMessage: a === e.length - 1 }) }) }, o.id)),
|
|
2015
|
+
r && /* @__PURE__ */ i(Ve, { $role: z.ASSISTANT, children: /* @__PURE__ */ i($e, { $role: z.ASSISTANT, children: /* @__PURE__ */ i(Co, {}) }) })
|
|
2019
2016
|
] });
|
|
2020
2017
|
}
|
|
2021
|
-
const
|
|
2018
|
+
const Io = c.div`
|
|
2022
2019
|
display: flex;
|
|
2023
2020
|
flex-direction: column;
|
|
2024
2021
|
gap: var(--spacing-xs);
|
|
@@ -2036,20 +2033,20 @@ const Ao = c.div`
|
|
|
2036
2033
|
width: 100%;
|
|
2037
2034
|
max-width: 100%;
|
|
2038
2035
|
`;
|
|
2039
|
-
function
|
|
2040
|
-
const t =
|
|
2036
|
+
function Ao(e) {
|
|
2037
|
+
const t = N(void 0);
|
|
2041
2038
|
return B(() => {
|
|
2042
2039
|
t.current = e;
|
|
2043
2040
|
}), t.current;
|
|
2044
2041
|
}
|
|
2045
|
-
const
|
|
2042
|
+
const ct = c.div`
|
|
2046
2043
|
display: flex;
|
|
2047
2044
|
flex-direction: column;
|
|
2048
2045
|
flex: 1;
|
|
2049
2046
|
width: 100%;
|
|
2050
2047
|
overflow: auto;
|
|
2051
2048
|
padding: var(--spacing-xs);
|
|
2052
|
-
`,
|
|
2049
|
+
`, So = (e) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none", ...e, children: [
|
|
2053
2050
|
/* @__PURE__ */ i(
|
|
2054
2051
|
"path",
|
|
2055
2052
|
{
|
|
@@ -2064,7 +2061,7 @@ const lt = c.div`
|
|
|
2064
2061
|
fill: "url(#replay-icon-gradient)"
|
|
2065
2062
|
}
|
|
2066
2063
|
),
|
|
2067
|
-
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ m(
|
|
2068
2065
|
"linearGradient",
|
|
2069
2066
|
{
|
|
2070
2067
|
id: "replay-icon-gradient",
|
|
@@ -2081,63 +2078,63 @@ const lt = c.div`
|
|
|
2081
2078
|
]
|
|
2082
2079
|
}
|
|
2083
2080
|
) })
|
|
2084
|
-
] }),
|
|
2081
|
+
] }), Lo = c(So)`
|
|
2085
2082
|
height: ${({ size: e }) => e || "14px"};
|
|
2086
2083
|
width: ${({ size: e }) => e || "14px"};
|
|
2087
2084
|
`;
|
|
2088
|
-
function
|
|
2085
|
+
function Po(e) {
|
|
2089
2086
|
const t = "var(--font-size-base)";
|
|
2090
2087
|
switch (e) {
|
|
2091
|
-
case
|
|
2092
|
-
return /* @__PURE__ */ i(
|
|
2093
|
-
case
|
|
2088
|
+
case he:
|
|
2089
|
+
return /* @__PURE__ */ i(Lo, { size: t });
|
|
2090
|
+
case le.OPENAI:
|
|
2094
2091
|
return /* @__PURE__ */ i(Qt, { size: t, color: "var(--text-color-primary)" });
|
|
2095
|
-
case
|
|
2092
|
+
case le.GEMINI:
|
|
2096
2093
|
return /* @__PURE__ */ i(en, { size: t });
|
|
2097
|
-
case
|
|
2094
|
+
case le.ANTHROPIC:
|
|
2098
2095
|
return /* @__PURE__ */ i(tn, { size: t, color: "var(--replay-claude-icon-color)" });
|
|
2099
2096
|
}
|
|
2100
2097
|
}
|
|
2101
|
-
function
|
|
2098
|
+
function Eo({
|
|
2102
2099
|
models: e,
|
|
2103
2100
|
selectedModelId: t,
|
|
2104
2101
|
placement: n,
|
|
2105
2102
|
onModelSelect: r,
|
|
2106
2103
|
onSettingsOpen: o
|
|
2107
2104
|
}) {
|
|
2108
|
-
const a = e.find((
|
|
2109
|
-
return /* @__PURE__ */ i(
|
|
2110
|
-
|
|
2105
|
+
const a = e.find((h) => h.id === t), s = a?.label ?? "Replay AI", l = a?.id, d = e.filter((h) => h.provider === he), u = e.filter((h) => h.provider !== he), f = d.length > 0 && u.length > 0;
|
|
2106
|
+
return /* @__PURE__ */ i(Mo, { children: /* @__PURE__ */ i(
|
|
2107
|
+
_o,
|
|
2111
2108
|
{
|
|
2112
|
-
trigger: /* @__PURE__ */ i(
|
|
2109
|
+
trigger: /* @__PURE__ */ i(Ro, { label: s }),
|
|
2113
2110
|
placement: n,
|
|
2114
2111
|
alignment: "start",
|
|
2115
2112
|
withArrow: !0,
|
|
2116
|
-
children: /* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
|
|
2113
|
+
children: /* @__PURE__ */ m(zo, { children: [
|
|
2114
|
+
/* @__PURE__ */ m(Ho, { children: [
|
|
2115
|
+
d.map((h) => /* @__PURE__ */ i(
|
|
2119
2116
|
He,
|
|
2120
2117
|
{
|
|
2121
|
-
model:
|
|
2122
|
-
activeModelId:
|
|
2118
|
+
model: h,
|
|
2119
|
+
activeModelId: l,
|
|
2123
2120
|
onModelSelect: r
|
|
2124
2121
|
},
|
|
2125
|
-
|
|
2122
|
+
h.id
|
|
2126
2123
|
)),
|
|
2127
2124
|
f && /* @__PURE__ */ i(Be, { "aria-hidden": !0 }),
|
|
2128
|
-
u.length > 0 && /* @__PURE__ */ i(
|
|
2125
|
+
u.length > 0 && /* @__PURE__ */ i(Fe, { children: u.map((h) => /* @__PURE__ */ i(
|
|
2129
2126
|
He,
|
|
2130
2127
|
{
|
|
2131
|
-
model:
|
|
2132
|
-
activeModelId:
|
|
2128
|
+
model: h,
|
|
2129
|
+
activeModelId: l,
|
|
2133
2130
|
onModelSelect: r
|
|
2134
2131
|
},
|
|
2135
|
-
|
|
2132
|
+
h.id
|
|
2136
2133
|
)) })
|
|
2137
2134
|
] }),
|
|
2138
2135
|
o && e.length > 0 && /* @__PURE__ */ i(Be, { "aria-hidden": !0 }),
|
|
2139
2136
|
o && /* @__PURE__ */ i(
|
|
2140
|
-
|
|
2137
|
+
Bo,
|
|
2141
2138
|
{
|
|
2142
2139
|
prefix: /* @__PURE__ */ i(Zt, { size: "var(--font-size-base)", color: "var(--text-color-secondary)" }),
|
|
2143
2140
|
content: "Manage models",
|
|
@@ -2148,31 +2145,31 @@ function Ro({
|
|
|
2148
2145
|
}
|
|
2149
2146
|
) });
|
|
2150
2147
|
}
|
|
2151
|
-
function
|
|
2148
|
+
function Ro({
|
|
2152
2149
|
label: e,
|
|
2153
2150
|
icon: t,
|
|
2154
2151
|
onClick: n,
|
|
2155
2152
|
onKeyDown: r
|
|
2156
2153
|
}) {
|
|
2157
|
-
return /* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */ i(
|
|
2154
|
+
return /* @__PURE__ */ m(Oo, { onClick: n, onKeyDown: r, children: [
|
|
2155
|
+
/* @__PURE__ */ i(Do, { children: e }),
|
|
2159
2156
|
t
|
|
2160
2157
|
] });
|
|
2161
2158
|
}
|
|
2162
2159
|
function He({ model: e, activeModelId: t, onModelSelect: n }) {
|
|
2163
2160
|
const r = e.id === t;
|
|
2164
2161
|
return /* @__PURE__ */ i(
|
|
2165
|
-
|
|
2162
|
+
Ke,
|
|
2166
2163
|
{
|
|
2167
|
-
prefix:
|
|
2168
|
-
suffix: r ? /* @__PURE__ */ i(
|
|
2164
|
+
prefix: Po(e.provider),
|
|
2165
|
+
suffix: r ? /* @__PURE__ */ i($o, { size: "var(--font-size-base)", color: "var(--text-color-primary)" }) : void 0,
|
|
2169
2166
|
onAction: () => n(e.id),
|
|
2170
2167
|
active: r,
|
|
2171
|
-
children: /* @__PURE__ */ i(
|
|
2168
|
+
children: /* @__PURE__ */ i(Vo, { children: e.label })
|
|
2172
2169
|
}
|
|
2173
2170
|
);
|
|
2174
2171
|
}
|
|
2175
|
-
const
|
|
2172
|
+
const Oo = c.div`
|
|
2176
2173
|
display: flex;
|
|
2177
2174
|
align-items: center;
|
|
2178
2175
|
min-width: 0;
|
|
@@ -2187,7 +2184,7 @@ const Do = c.div`
|
|
|
2187
2184
|
&:hover {
|
|
2188
2185
|
background: var(--layer-color-active);
|
|
2189
2186
|
}
|
|
2190
|
-
`,
|
|
2187
|
+
`, Do = c.span`
|
|
2191
2188
|
overflow: hidden;
|
|
2192
2189
|
text-overflow: ellipsis;
|
|
2193
2190
|
font-family: var(--font-family-base);
|
|
@@ -2196,13 +2193,13 @@ const Do = c.div`
|
|
|
2196
2193
|
line-height: var(--line-height-base);
|
|
2197
2194
|
color: var(--text-color-primary);
|
|
2198
2195
|
white-space: nowrap;
|
|
2199
|
-
`,
|
|
2196
|
+
`, Mo = c.div`
|
|
2200
2197
|
--dropdown-menu-padding-top: 0;
|
|
2201
2198
|
|
|
2202
2199
|
min-width: 0;
|
|
2203
2200
|
flex: 1;
|
|
2204
2201
|
position: relative;
|
|
2205
|
-
`,
|
|
2202
|
+
`, _o = c(Kt)`
|
|
2206
2203
|
width: 100%;
|
|
2207
2204
|
min-width: 0;
|
|
2208
2205
|
flex: 1;
|
|
@@ -2211,7 +2208,7 @@ const Do = c.div`
|
|
|
2211
2208
|
width: 100%;
|
|
2212
2209
|
max-width: 200px;
|
|
2213
2210
|
}
|
|
2214
|
-
`,
|
|
2211
|
+
`, zo = c(Jt)`
|
|
2215
2212
|
--dropdown-menu-item-gap: calc(var(--spacing-unit) / 2);
|
|
2216
2213
|
--dropdown-menu-item-padding-vertical: var(--spacing-xxs);
|
|
2217
2214
|
--dropdown-menu-item-padding-horizontal: var(--spacing-xs);
|
|
@@ -2220,13 +2217,13 @@ const Do = c.div`
|
|
|
2220
2217
|
margin: 5px 0;
|
|
2221
2218
|
border-radius: var(--border-radius-lg);
|
|
2222
2219
|
background: var(--bg-color);
|
|
2223
|
-
`,
|
|
2220
|
+
`, Vo = c.span`
|
|
2224
2221
|
flex: 1;
|
|
2225
2222
|
min-width: 0;
|
|
2226
2223
|
overflow: hidden;
|
|
2227
2224
|
text-overflow: ellipsis;
|
|
2228
2225
|
white-space: nowrap;
|
|
2229
|
-
`,
|
|
2226
|
+
`, $o = c(Xt)`
|
|
2230
2227
|
margin-left: var(--spacing-xxs);
|
|
2231
2228
|
`, Be = c.li`
|
|
2232
2229
|
flex-shrink: 0;
|
|
@@ -2235,44 +2232,44 @@ const Do = c.div`
|
|
|
2235
2232
|
height: 1px;
|
|
2236
2233
|
margin: 0;
|
|
2237
2234
|
background: var(--border-color-secondary);
|
|
2238
|
-
`,
|
|
2235
|
+
`, Ho = c.li`
|
|
2239
2236
|
display: flex;
|
|
2240
2237
|
flex-direction: column;
|
|
2241
2238
|
gap: var(--dropdown-menu-item-gap);
|
|
2242
2239
|
list-style: none;
|
|
2243
2240
|
min-height: 0;
|
|
2244
2241
|
overflow-y: auto;
|
|
2245
|
-
`,
|
|
2242
|
+
`, Bo = c(Ke)`
|
|
2246
2243
|
flex-shrink: 0;
|
|
2247
2244
|
`, No = 280;
|
|
2248
|
-
function
|
|
2249
|
-
const [t, n] =
|
|
2250
|
-
() =>
|
|
2245
|
+
function lt({ pinToBottom: e = !1 }) {
|
|
2246
|
+
const [t, n] = q(
|
|
2247
|
+
() => Te().getIndexingActivityState().inProgress
|
|
2251
2248
|
);
|
|
2252
|
-
return B(() =>
|
|
2249
|
+
return B(() => Te().subscribe("indexing-activity", (o) => {
|
|
2253
2250
|
n(o.inProgress);
|
|
2254
|
-
}), []), /* @__PURE__ */ i(
|
|
2251
|
+
}), []), /* @__PURE__ */ i(Fo, { $open: t, $pinToBottom: e, "aria-hidden": !t, children: /* @__PURE__ */ i(
|
|
2255
2252
|
W,
|
|
2256
2253
|
{
|
|
2257
2254
|
tip: "We're building a search index of your project. Until it's ready, the assistant may need more context in each reply to stay accurate, which can use more tokens.",
|
|
2258
2255
|
placement: "top",
|
|
2259
2256
|
width: "240px",
|
|
2260
2257
|
arrowPosition: "left",
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
2263
|
-
/* @__PURE__ */ i(
|
|
2258
|
+
children: /* @__PURE__ */ m(jo, { role: "status", "aria-live": "polite", "aria-label": "Indexing in progress...", children: [
|
|
2259
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(X, {}) }),
|
|
2260
|
+
/* @__PURE__ */ i(Uo, { children: "Indexing in progress..." })
|
|
2264
2261
|
] })
|
|
2265
2262
|
}
|
|
2266
2263
|
) });
|
|
2267
2264
|
}
|
|
2268
|
-
const
|
|
2265
|
+
const Fo = c.div`
|
|
2269
2266
|
width: 100%;
|
|
2270
2267
|
display: block;
|
|
2271
2268
|
|
|
2272
|
-
${({ $pinToBottom: e }) => e ?
|
|
2269
|
+
${({ $pinToBottom: e }) => e ? ue`
|
|
2273
2270
|
order: 1;
|
|
2274
2271
|
margin-top: auto;
|
|
2275
|
-
` :
|
|
2272
|
+
` : ue`
|
|
2276
2273
|
position: absolute;
|
|
2277
2274
|
left: 0;
|
|
2278
2275
|
right: 0;
|
|
@@ -2285,10 +2282,10 @@ const jo = c.div`
|
|
|
2285
2282
|
transition: opacity ${No}ms ease-out;
|
|
2286
2283
|
pointer-events: ${({ $open: e }) => e ? "auto" : "none"};
|
|
2287
2284
|
|
|
2288
|
-
${
|
|
2285
|
+
${X} {
|
|
2289
2286
|
animation-play-state: ${({ $open: e }) => e ? "running" : "paused"};
|
|
2290
2287
|
}
|
|
2291
|
-
`,
|
|
2288
|
+
`, jo = c.div`
|
|
2292
2289
|
width: 100%;
|
|
2293
2290
|
display: flex;
|
|
2294
2291
|
align-items: center;
|
|
@@ -2298,11 +2295,11 @@ const jo = c.div`
|
|
|
2298
2295
|
border-radius: 4px;
|
|
2299
2296
|
font-size: var(--font-size-sm);
|
|
2300
2297
|
line-height: 12px;
|
|
2301
|
-
`,
|
|
2298
|
+
`, Uo = c.div`
|
|
2302
2299
|
flex: 1;
|
|
2303
2300
|
min-width: 0;
|
|
2304
2301
|
`;
|
|
2305
|
-
function
|
|
2302
|
+
function Wo() {
|
|
2306
2303
|
const {
|
|
2307
2304
|
chatId: e,
|
|
2308
2305
|
isLoading: t,
|
|
@@ -2311,8 +2308,8 @@ function Yo() {
|
|
|
2311
2308
|
availableModels: o,
|
|
2312
2309
|
selectedModelId: a,
|
|
2313
2310
|
selectModel: s,
|
|
2314
|
-
onSettingsOpen:
|
|
2315
|
-
} =
|
|
2311
|
+
onSettingsOpen: l
|
|
2312
|
+
} = We(), { messages: d, isStreaming: u, sendMessage: f, stopGeneration: h } = Q(), { isOpen: p } = Ye(), [y, g] = q(""), x = N(null), b = N(null), w = N(!0), v = d.length > 0, S = t || v, R = Ao(d.length), G = R !== void 0 && R > 0 && !v, $ = _((L = "smooth") => {
|
|
2316
2313
|
b.current && b.current.scrollTo({
|
|
2317
2314
|
top: b.current.scrollHeight,
|
|
2318
2315
|
behavior: L
|
|
@@ -2325,58 +2322,58 @@ function Yo() {
|
|
|
2325
2322
|
B(() => {
|
|
2326
2323
|
const L = b.current;
|
|
2327
2324
|
if (!L) return;
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2325
|
+
const ce = (pt) => {
|
|
2326
|
+
pt.deltaY < 0 && (w.current = !1);
|
|
2330
2327
|
};
|
|
2331
|
-
return L.addEventListener("wheel",
|
|
2328
|
+
return L.addEventListener("wheel", ce, { passive: !0 }), () => L.removeEventListener("wheel", ce);
|
|
2332
2329
|
}, []);
|
|
2333
|
-
const
|
|
2334
|
-
y && (
|
|
2330
|
+
const ft = _(async () => {
|
|
2331
|
+
y && (g(""), w.current = !0, await f(y), x.current && requestAnimationFrame(() => x.current?.focus()));
|
|
2335
2332
|
}, [f, y]);
|
|
2336
2333
|
return B(() => {
|
|
2337
|
-
|
|
2338
|
-
}, [
|
|
2334
|
+
p && (x.current && x.current.focus(), w.current = !0, $());
|
|
2335
|
+
}, [p, d.length, $]), B(() => {
|
|
2339
2336
|
u && w.current && $();
|
|
2340
2337
|
}), B(
|
|
2341
2338
|
function() {
|
|
2342
|
-
|
|
2339
|
+
p && x.current && (x.current.focus(), $("instant"));
|
|
2343
2340
|
},
|
|
2344
|
-
[e,
|
|
2341
|
+
[e, p, $]
|
|
2345
2342
|
), B(
|
|
2346
2343
|
function() {
|
|
2347
|
-
!
|
|
2344
|
+
!p || n === null || (g(n), r());
|
|
2348
2345
|
},
|
|
2349
|
-
[
|
|
2350
|
-
), /* @__PURE__ */
|
|
2346
|
+
[p, n, r]
|
|
2347
|
+
), /* @__PURE__ */ m(ct, { children: [
|
|
2351
2348
|
/* @__PURE__ */ i(
|
|
2352
|
-
|
|
2349
|
+
Yo,
|
|
2353
2350
|
{
|
|
2354
2351
|
ref: b,
|
|
2355
2352
|
$isExpanded: S,
|
|
2356
|
-
$isAnimated: u ||
|
|
2353
|
+
$isAnimated: u || G,
|
|
2357
2354
|
onScroll: ee,
|
|
2358
|
-
children: t ? /* @__PURE__ */ i(
|
|
2355
|
+
children: t ? /* @__PURE__ */ i(Go, { children: /* @__PURE__ */ i(we, { size: "20px" }) }) : /* @__PURE__ */ i(To, {})
|
|
2359
2356
|
}
|
|
2360
2357
|
),
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */ i(
|
|
2358
|
+
/* @__PURE__ */ m(qo, { $isExpanded: !S, children: [
|
|
2359
|
+
/* @__PURE__ */ i(lt, { pinToBottom: !S }),
|
|
2363
2360
|
/* @__PURE__ */ i(
|
|
2364
2361
|
ln,
|
|
2365
2362
|
{
|
|
2366
2363
|
value: y,
|
|
2367
|
-
onValueChange:
|
|
2368
|
-
onSubmit:
|
|
2364
|
+
onValueChange: g,
|
|
2365
|
+
onSubmit: ft,
|
|
2369
2366
|
isStreaming: u,
|
|
2370
|
-
onStop:
|
|
2367
|
+
onStop: h,
|
|
2371
2368
|
textareaRef: x,
|
|
2372
2369
|
modelSelector: /* @__PURE__ */ i(
|
|
2373
|
-
|
|
2370
|
+
Eo,
|
|
2374
2371
|
{
|
|
2375
2372
|
models: o,
|
|
2376
2373
|
selectedModelId: a,
|
|
2377
2374
|
placement: v ? "top" : "bottom",
|
|
2378
2375
|
onModelSelect: s,
|
|
2379
|
-
onSettingsOpen:
|
|
2376
|
+
onSettingsOpen: l
|
|
2380
2377
|
}
|
|
2381
2378
|
)
|
|
2382
2379
|
}
|
|
@@ -2384,7 +2381,7 @@ function Yo() {
|
|
|
2384
2381
|
] })
|
|
2385
2382
|
] });
|
|
2386
2383
|
}
|
|
2387
|
-
const
|
|
2384
|
+
const Yo = c.div`
|
|
2388
2385
|
flex: ${({ $isExpanded: e }) => e ? 1 : 0};
|
|
2389
2386
|
width: 100%;
|
|
2390
2387
|
overflow: auto;
|
|
@@ -2398,7 +2395,7 @@ const Go = c.div`
|
|
|
2398
2395
|
flex-direction: column;
|
|
2399
2396
|
width: 100%;
|
|
2400
2397
|
flex: ${({ $isExpanded: e }) => e ? 1 : 0};
|
|
2401
|
-
`,
|
|
2398
|
+
`, Go = c.div`
|
|
2402
2399
|
display: flex;
|
|
2403
2400
|
justify-content: center;
|
|
2404
2401
|
height: 100%;
|
|
@@ -2409,7 +2406,7 @@ const Go = c.div`
|
|
|
2409
2406
|
LAST_WEEK: "last_week",
|
|
2410
2407
|
LAST_MONTH: "last_month",
|
|
2411
2408
|
OLDER: "older"
|
|
2412
|
-
},
|
|
2409
|
+
}, Ko = {
|
|
2413
2410
|
[M.TODAY]: "Today",
|
|
2414
2411
|
[M.YESTERDAY]: "Yesterday",
|
|
2415
2412
|
[M.LAST_WEEK]: "Last 7 days",
|
|
@@ -2420,7 +2417,7 @@ function Jo(e, t = Date.now()) {
|
|
|
2420
2417
|
const n = U(e).startOf("day"), r = U(t).startOf("day"), o = U(t).subtract(1, "day").startOf("day"), a = U(t).subtract(7, "day").startOf("day"), s = U(t).subtract(30, "day").startOf("day");
|
|
2421
2418
|
return n.isSame(r, "day") ? M.TODAY : n.isSame(o, "day") ? M.YESTERDAY : !n.isBefore(a, "day") && n.isBefore(o, "day") ? M.LAST_WEEK : !n.isBefore(s, "day") && n.isBefore(a, "day") ? M.LAST_MONTH : M.OLDER;
|
|
2422
2419
|
}
|
|
2423
|
-
function
|
|
2420
|
+
function Xo(e) {
|
|
2424
2421
|
const t = [];
|
|
2425
2422
|
for (const n of e) {
|
|
2426
2423
|
const r = Jo(n.updatedAt), o = t[t.length - 1];
|
|
@@ -2428,7 +2425,7 @@ function Zo(e) {
|
|
|
2428
2425
|
}
|
|
2429
2426
|
return t;
|
|
2430
2427
|
}
|
|
2431
|
-
function
|
|
2428
|
+
function Zo(e) {
|
|
2432
2429
|
const {
|
|
2433
2430
|
scrollRef: t,
|
|
2434
2431
|
sentinelRef: n,
|
|
@@ -2438,57 +2435,57 @@ function Qo(e) {
|
|
|
2438
2435
|
observerResetKey: s
|
|
2439
2436
|
} = e;
|
|
2440
2437
|
je(() => {
|
|
2441
|
-
const
|
|
2442
|
-
if (!
|
|
2438
|
+
const l = t.current, d = n.current;
|
|
2439
|
+
if (!l || !d) return;
|
|
2443
2440
|
const u = new IntersectionObserver(
|
|
2444
2441
|
(f) => {
|
|
2445
|
-
const
|
|
2446
|
-
|
|
2442
|
+
const h = f[0];
|
|
2443
|
+
h && h.isIntersecting && r && (o || a());
|
|
2447
2444
|
},
|
|
2448
|
-
{ root:
|
|
2445
|
+
{ root: l, rootMargin: "80px" }
|
|
2449
2446
|
);
|
|
2450
|
-
return u.observe(
|
|
2447
|
+
return u.observe(d), () => {
|
|
2451
2448
|
u.disconnect();
|
|
2452
2449
|
};
|
|
2453
2450
|
}, [s, a, r, o, t, n]);
|
|
2454
2451
|
}
|
|
2455
|
-
const
|
|
2452
|
+
const dt = c(ct)`
|
|
2456
2453
|
gap: var(--spacing-xxs);
|
|
2457
2454
|
user-select: none;
|
|
2458
|
-
`,
|
|
2455
|
+
`, Qo = c.div`
|
|
2459
2456
|
display: flex;
|
|
2460
2457
|
flex-direction: column;
|
|
2461
2458
|
gap: var(--spacing-xs);
|
|
2462
|
-
`,
|
|
2459
|
+
`, ei = c.div`
|
|
2463
2460
|
display: flex;
|
|
2464
2461
|
flex-direction: column;
|
|
2465
2462
|
gap: var(--spacing-xxs);
|
|
2466
|
-
`,
|
|
2463
|
+
`, ti = c(dt)`
|
|
2467
2464
|
display: flex;
|
|
2468
2465
|
flex-grow: 1;
|
|
2469
2466
|
align-items: center;
|
|
2470
2467
|
flex-direction: column;
|
|
2471
2468
|
padding: var(--spacing-md);
|
|
2472
|
-
`,
|
|
2469
|
+
`, ni = c.div`
|
|
2473
2470
|
display: flex;
|
|
2474
2471
|
flex-grow: 1;
|
|
2475
2472
|
align-items: center;
|
|
2476
2473
|
justify-content: center;
|
|
2477
|
-
`,
|
|
2474
|
+
`, ri = c.div`
|
|
2478
2475
|
display: flex;
|
|
2479
2476
|
flex-direction: column;
|
|
2480
2477
|
align-items: center;
|
|
2481
2478
|
max-width: 75%;
|
|
2482
2479
|
gap: var(--spacing-xxs);
|
|
2483
|
-
`,
|
|
2480
|
+
`, oi = c.div`
|
|
2484
2481
|
display: flex;
|
|
2485
2482
|
justify-content: center;
|
|
2486
2483
|
padding: var(--spacing-xs);
|
|
2487
|
-
`,
|
|
2484
|
+
`, ii = c(Z)`
|
|
2488
2485
|
padding-left: var(--spacing-xs);
|
|
2489
2486
|
font-size: var(--font-size-sm);
|
|
2490
2487
|
color: var(--color-warm-grey-7);
|
|
2491
|
-
`,
|
|
2488
|
+
`, ai = c.div`
|
|
2492
2489
|
display: flex;
|
|
2493
2490
|
flex-grow: 1;
|
|
2494
2491
|
|
|
@@ -2496,7 +2493,7 @@ const ut = c(lt)`
|
|
|
2496
2493
|
flex-grow: 1;
|
|
2497
2494
|
min-width: 0;
|
|
2498
2495
|
}
|
|
2499
|
-
`,
|
|
2496
|
+
`, si = c.div`
|
|
2500
2497
|
display: flex;
|
|
2501
2498
|
align-items: center;
|
|
2502
2499
|
justify-content: space-between;
|
|
@@ -2519,18 +2516,18 @@ const ut = c(lt)`
|
|
|
2519
2516
|
display: inline-flex;
|
|
2520
2517
|
}
|
|
2521
2518
|
}
|
|
2522
|
-
`,
|
|
2519
|
+
`, ci = c(Z)`
|
|
2523
2520
|
overflow: hidden;
|
|
2524
2521
|
white-space: nowrap;
|
|
2525
2522
|
text-overflow: ellipsis;
|
|
2526
|
-
`,
|
|
2523
|
+
`, li = c.div`
|
|
2527
2524
|
height: 1px;
|
|
2528
2525
|
flex-shrink: 0;
|
|
2529
2526
|
`;
|
|
2530
|
-
function
|
|
2527
|
+
function di(e) {
|
|
2531
2528
|
const { chat: t, onSelect: n, onRemove: r } = e;
|
|
2532
|
-
return /* @__PURE__ */ i(
|
|
2533
|
-
/* @__PURE__ */ i(
|
|
2529
|
+
return /* @__PURE__ */ i(ai, { children: /* @__PURE__ */ i(W, { tip: U(t.updatedAt).format("MMM DD, YYYY, hh:mm:ss A"), className: "expanded", children: /* @__PURE__ */ m(si, { role: "button", onClick: () => n?.(t.id), children: [
|
|
2530
|
+
/* @__PURE__ */ i(ci, { children: t.title ?? "New chat" }),
|
|
2534
2531
|
/* @__PURE__ */ i(
|
|
2535
2532
|
P,
|
|
2536
2533
|
{
|
|
@@ -2545,12 +2542,12 @@ function ui(e) {
|
|
|
2545
2542
|
)
|
|
2546
2543
|
] }) }) });
|
|
2547
2544
|
}
|
|
2548
|
-
function
|
|
2545
|
+
function ui(e) {
|
|
2549
2546
|
const { group: t, onChatSelect: n, onChatRemove: r } = e;
|
|
2550
|
-
return /* @__PURE__ */
|
|
2551
|
-
/* @__PURE__ */ i(
|
|
2547
|
+
return /* @__PURE__ */ m(ei, { children: [
|
|
2548
|
+
/* @__PURE__ */ i(ii, { children: Ko[t.bucket] }),
|
|
2552
2549
|
t.chats.map((o) => /* @__PURE__ */ i(
|
|
2553
|
-
|
|
2550
|
+
di,
|
|
2554
2551
|
{
|
|
2555
2552
|
chat: o,
|
|
2556
2553
|
onSelect: n,
|
|
@@ -2560,41 +2557,41 @@ function fi(e) {
|
|
|
2560
2557
|
))
|
|
2561
2558
|
] });
|
|
2562
2559
|
}
|
|
2563
|
-
function
|
|
2564
|
-
return /* @__PURE__ */ i(
|
|
2560
|
+
function fi() {
|
|
2561
|
+
return /* @__PURE__ */ i(ni, { children: /* @__PURE__ */ m(ri, { children: [
|
|
2565
2562
|
/* @__PURE__ */ i(Z, { textAlign: "center", fontWeight: "var(--font-weight-semibold)", children: "No chat history" }),
|
|
2566
2563
|
/* @__PURE__ */ i(Z, { textAlign: "center", children: "Ask questions or let the assistant take action for you." })
|
|
2567
2564
|
] }) });
|
|
2568
2565
|
}
|
|
2569
|
-
function
|
|
2570
|
-
return /* @__PURE__ */ i(
|
|
2566
|
+
function pi() {
|
|
2567
|
+
return /* @__PURE__ */ i(ti, { children: /* @__PURE__ */ i(we, {}) });
|
|
2571
2568
|
}
|
|
2572
|
-
const
|
|
2569
|
+
const hi = 50;
|
|
2573
2570
|
function mi(e) {
|
|
2574
|
-
const { onChatSelect: t, onChatRemove: n } = e, r =
|
|
2575
|
-
return
|
|
2571
|
+
const { onChatSelect: t, onChatRemove: n } = e, r = N(null), o = N(null), { data: a, isPending: s, hasNextPage: l, isFetchingNextPage: d, fetchNextPage: u } = $t(hi), f = A(() => (a?.pages ?? []).flatMap((p) => p.items), [a?.pages]), h = A(() => Xo(f), [f]);
|
|
2572
|
+
return Zo({
|
|
2576
2573
|
scrollRef: r,
|
|
2577
2574
|
sentinelRef: o,
|
|
2578
|
-
hasNextPage:
|
|
2579
|
-
isFetchingNextPage:
|
|
2575
|
+
hasNextPage: l,
|
|
2576
|
+
isFetchingNextPage: d,
|
|
2580
2577
|
fetchNextPage: u,
|
|
2581
2578
|
observerResetKey: a?.pages.length
|
|
2582
|
-
}), s && !a ? /* @__PURE__ */ i(
|
|
2583
|
-
/* @__PURE__ */ i(
|
|
2584
|
-
|
|
2579
|
+
}), s && !a ? /* @__PURE__ */ i(pi, {}) : f.length === 0 ? /* @__PURE__ */ i(fi, {}) : /* @__PURE__ */ m(dt, { ref: r, children: [
|
|
2580
|
+
/* @__PURE__ */ i(Qo, { children: h.map((p) => /* @__PURE__ */ i(
|
|
2581
|
+
ui,
|
|
2585
2582
|
{
|
|
2586
|
-
group:
|
|
2583
|
+
group: p,
|
|
2587
2584
|
onChatSelect: t,
|
|
2588
2585
|
onChatRemove: n
|
|
2589
2586
|
},
|
|
2590
|
-
`${
|
|
2587
|
+
`${p.bucket}-${p.chats[0]?.id ?? ""}`
|
|
2591
2588
|
)) }),
|
|
2592
|
-
|
|
2593
|
-
|
|
2589
|
+
l && /* @__PURE__ */ i(li, { ref: o, "aria-hidden": !0 }),
|
|
2590
|
+
d && /* @__PURE__ */ i(oi, { children: /* @__PURE__ */ i(we, {}) })
|
|
2594
2591
|
] });
|
|
2595
2592
|
}
|
|
2596
|
-
function
|
|
2597
|
-
const e =
|
|
2593
|
+
function gi() {
|
|
2594
|
+
const e = N(null), [t, n] = q(!1);
|
|
2598
2595
|
return je(() => {
|
|
2599
2596
|
if (!e.current) return;
|
|
2600
2597
|
const r = e.current;
|
|
@@ -2609,16 +2606,16 @@ function vi() {
|
|
|
2609
2606
|
value: t
|
|
2610
2607
|
};
|
|
2611
2608
|
}
|
|
2612
|
-
function
|
|
2613
|
-
const { ref: t, value: n } =
|
|
2614
|
-
return /* @__PURE__ */ i(
|
|
2609
|
+
function vi(e) {
|
|
2610
|
+
const { ref: t, value: n } = gi();
|
|
2611
|
+
return /* @__PURE__ */ i(yi, { children: /* @__PURE__ */ i(W, { tip: e.value, className: "no-overflow", disabled: !n, children: /* @__PURE__ */ i(xi, { ref: t, children: e.value }) }) });
|
|
2615
2612
|
}
|
|
2616
|
-
const
|
|
2613
|
+
const yi = c.div`
|
|
2617
2614
|
overflow: hidden;
|
|
2618
2615
|
.tooltip-no-overflow {
|
|
2619
2616
|
overflow: hidden;
|
|
2620
2617
|
}
|
|
2621
|
-
`,
|
|
2618
|
+
`, xi = c.div`
|
|
2622
2619
|
color: var(--text-color-primary);
|
|
2623
2620
|
font-size: var(--font-size-base);
|
|
2624
2621
|
line-height: var(--line-height-base);
|
|
@@ -2627,14 +2624,14 @@ const xi = c.div`
|
|
|
2627
2624
|
text-overflow: ellipsis;
|
|
2628
2625
|
user-select: none;
|
|
2629
2626
|
`;
|
|
2630
|
-
function
|
|
2627
|
+
function ut(e) {
|
|
2631
2628
|
const { children: t, buttons: n } = e;
|
|
2632
|
-
return /* @__PURE__ */
|
|
2633
|
-
/* @__PURE__ */ i(
|
|
2634
|
-
n && /* @__PURE__ */ i(
|
|
2629
|
+
return /* @__PURE__ */ m(wi, { children: [
|
|
2630
|
+
/* @__PURE__ */ i(bi, { children: t }),
|
|
2631
|
+
n && /* @__PURE__ */ i(Ci, { children: n })
|
|
2635
2632
|
] });
|
|
2636
2633
|
}
|
|
2637
|
-
const
|
|
2634
|
+
const wi = c.div`
|
|
2638
2635
|
display: flex;
|
|
2639
2636
|
flex-direction: row;
|
|
2640
2637
|
align-items: center;
|
|
@@ -2642,20 +2639,20 @@ const bi = c.div`
|
|
|
2642
2639
|
gap: var(--spacing-xs);
|
|
2643
2640
|
width: 100%;
|
|
2644
2641
|
flex-shrink: 0;
|
|
2645
|
-
`,
|
|
2642
|
+
`, bi = c.div`
|
|
2646
2643
|
display: flex;
|
|
2647
2644
|
align-items: center;
|
|
2648
2645
|
gap: var(--spacing-xs);
|
|
2649
2646
|
min-width: 0;
|
|
2650
2647
|
flex: 1;
|
|
2651
|
-
`,
|
|
2648
|
+
`, Ci = c.div`
|
|
2652
2649
|
display: flex;
|
|
2653
2650
|
align-items: center;
|
|
2654
2651
|
gap: 2px;
|
|
2655
2652
|
`;
|
|
2656
2653
|
function ki(e) {
|
|
2657
2654
|
const { title: t, onCreateNewChat: n, onViewHistory: r, onClose: o } = e;
|
|
2658
|
-
return /* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ m(ut, { buttons: /* @__PURE__ */ m(Fe, { children: [
|
|
2659
2656
|
/* @__PURE__ */ i(W, { tip: "New chat", children: /* @__PURE__ */ i(
|
|
2660
2657
|
P,
|
|
2661
2658
|
{
|
|
@@ -2676,7 +2673,7 @@ function ki(e) {
|
|
|
2676
2673
|
icon: /* @__PURE__ */ i(sn, {})
|
|
2677
2674
|
}
|
|
2678
2675
|
) }),
|
|
2679
|
-
/* @__PURE__ */ i(
|
|
2676
|
+
/* @__PURE__ */ i(Ii, { children: /* @__PURE__ */ i(It, {}) }),
|
|
2680
2677
|
/* @__PURE__ */ i(W, { tip: "Close", arrowPosition: "left", children: /* @__PURE__ */ i(
|
|
2681
2678
|
P,
|
|
2682
2679
|
{
|
|
@@ -2688,19 +2685,19 @@ function ki(e) {
|
|
|
2688
2685
|
}
|
|
2689
2686
|
) })
|
|
2690
2687
|
] }), children: [
|
|
2691
|
-
/* @__PURE__ */ i(
|
|
2692
|
-
/* @__PURE__ */ i(
|
|
2688
|
+
/* @__PURE__ */ i(Ti, { children: /* @__PURE__ */ i(rn, { size: "14px" }) }),
|
|
2689
|
+
/* @__PURE__ */ i(vi, { value: t })
|
|
2693
2690
|
] });
|
|
2694
2691
|
}
|
|
2695
|
-
const
|
|
2692
|
+
const Ti = c.div`
|
|
2696
2693
|
display: flex;
|
|
2697
|
-
`,
|
|
2694
|
+
`, Ii = c.div`
|
|
2698
2695
|
display: flex;
|
|
2699
2696
|
height: 14px;
|
|
2700
2697
|
`;
|
|
2701
|
-
function
|
|
2698
|
+
function Ai(e) {
|
|
2702
2699
|
const { onReturnFromHistory: t } = e;
|
|
2703
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ m(ut, { children: [
|
|
2704
2701
|
/* @__PURE__ */ i(
|
|
2705
2702
|
P,
|
|
2706
2703
|
{
|
|
@@ -2711,22 +2708,22 @@ function Si(e) {
|
|
|
2711
2708
|
icon: /* @__PURE__ */ i(cn, {})
|
|
2712
2709
|
}
|
|
2713
2710
|
),
|
|
2714
|
-
/* @__PURE__ */ i(
|
|
2711
|
+
/* @__PURE__ */ i(Si, { children: /* @__PURE__ */ i(Z, { children: "Chat history" }) })
|
|
2715
2712
|
] });
|
|
2716
2713
|
}
|
|
2717
|
-
const
|
|
2714
|
+
const Si = c.div`
|
|
2718
2715
|
user-select: none;
|
|
2719
2716
|
`;
|
|
2720
2717
|
function ma() {
|
|
2721
|
-
const [e, t] =
|
|
2722
|
-
t(
|
|
2718
|
+
const [e, t] = q(F.CHAT), n = Ye(), r = We(), o = () => {
|
|
2719
|
+
t(F.HISTORY);
|
|
2723
2720
|
}, a = () => {
|
|
2724
|
-
t(
|
|
2725
|
-
}, s = async (
|
|
2726
|
-
r.selectChat(
|
|
2721
|
+
t(F.CHAT);
|
|
2722
|
+
}, s = async (l) => {
|
|
2723
|
+
r.selectChat(l), t(F.CHAT);
|
|
2727
2724
|
};
|
|
2728
|
-
return /* @__PURE__ */
|
|
2729
|
-
/* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ m(Li, { children: [
|
|
2726
|
+
/* @__PURE__ */ m(Ne, { isActive: e === F.CHAT, children: [
|
|
2730
2727
|
/* @__PURE__ */ i(
|
|
2731
2728
|
ki,
|
|
2732
2729
|
{
|
|
@@ -2736,24 +2733,24 @@ function ma() {
|
|
|
2736
2733
|
onClose: n.closePanel
|
|
2737
2734
|
}
|
|
2738
2735
|
),
|
|
2739
|
-
/* @__PURE__ */ i(
|
|
2736
|
+
/* @__PURE__ */ i(Wo, {})
|
|
2740
2737
|
] }),
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */ i(
|
|
2738
|
+
/* @__PURE__ */ m(Ne, { isActive: e === F.HISTORY, isSliding: !0, children: [
|
|
2739
|
+
/* @__PURE__ */ i(Ai, { onReturnFromHistory: a }),
|
|
2743
2740
|
/* @__PURE__ */ i(mi, { onChatSelect: s, onChatRemove: r.removeChat }),
|
|
2744
|
-
/* @__PURE__ */ i(
|
|
2741
|
+
/* @__PURE__ */ i(Ei, { children: /* @__PURE__ */ i(lt, { pinToBottom: !0 }) })
|
|
2745
2742
|
] })
|
|
2746
2743
|
] });
|
|
2747
2744
|
}
|
|
2748
|
-
function
|
|
2749
|
-
const { children: t, isActive: n, isSliding: r = !1 } = e, o = /* @__PURE__ */ i(
|
|
2750
|
-
return r ? /* @__PURE__ */ i(
|
|
2745
|
+
function Ne(e) {
|
|
2746
|
+
const { children: t, isActive: n, isSliding: r = !1 } = e, o = /* @__PURE__ */ i(Pi, { inert: !n, children: t });
|
|
2747
|
+
return r ? /* @__PURE__ */ i(Ri, { $isExpanded: n, children: o }) : o;
|
|
2751
2748
|
}
|
|
2752
|
-
const
|
|
2749
|
+
const Li = c.div`
|
|
2753
2750
|
position: relative;
|
|
2754
2751
|
height: 100%;
|
|
2755
2752
|
overflow: clip;
|
|
2756
|
-
`,
|
|
2753
|
+
`, Pi = c.div`
|
|
2757
2754
|
display: flex;
|
|
2758
2755
|
height: 100%;
|
|
2759
2756
|
flex-direction: column;
|
|
@@ -2761,12 +2758,12 @@ const Pi = c.div`
|
|
|
2761
2758
|
border-radius: var(--border-radius-md);
|
|
2762
2759
|
background: var(--bg-color);
|
|
2763
2760
|
margin-left: var(--spacing-xxs);
|
|
2764
|
-
`,
|
|
2761
|
+
`, Ei = c.div`
|
|
2765
2762
|
display: flex;
|
|
2766
2763
|
flex-direction: column;
|
|
2767
2764
|
width: 100%;
|
|
2768
2765
|
padding: 0 var(--spacing-xs) var(--spacing-xs);
|
|
2769
|
-
`,
|
|
2766
|
+
`, Ri = c.div`
|
|
2770
2767
|
position: absolute;
|
|
2771
2768
|
inset: 0;
|
|
2772
2769
|
transform: translateX(${(e) => e.$isExpanded ? "0%" : "100%"});
|