@redocly/replay 0.28.0-next.9 → 0.28.0
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-B_f9Wn8a.js → replay-AiChatProvider-BRqjyy2W.js} +2 -2
- package/dist/{replay-AiChatProvider-DuTK5g1N.js → replay-AiChatProvider-DUVoLgY2.js} +138 -140
- package/dist/{replay-AiChatSqliteDBStorage-cXsRIQfJ.js → replay-AiChatSqliteDBStorage-0evx56pl.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-CHfMo6M6.js → replay-AiChatSqliteDBStorage-C5AnRloD.js} +1 -1
- package/dist/{replay-AiPanel-CGbGwIMX.js → replay-AiPanel-CMjVD12K.js} +50 -50
- package/dist/{replay-AiPanel-C_C52r20.js → replay-AiPanel-PVgJioX3.js} +2 -2
- package/dist/replay-FileWatcher-CFYprlWN.js +364 -0
- package/dist/replay-FileWatcher-DGLwO5Kd.js +1 -0
- package/dist/{replay-SemanticSearchService-BLF1oOOu.js → replay-SemanticSearchService-Bh5xYa91.js} +15 -15
- package/dist/{replay-SemanticSearchService-DTc0oxN4.js → replay-SemanticSearchService-CulKCCNl.js} +1 -1
- package/dist/{replay-SqliteDBStorage-DF9kKplR.js → replay-SqliteDBStorage-Bz0muHEk.js} +1 -1
- package/dist/{replay-SqliteDBStorage-B_kyJ0a3.js → replay-SqliteDBStorage-CVHRAsPD.js} +1 -1
- package/dist/replay-TauriFileSystemAdapter-B163-f2D.js +108 -0
- package/dist/replay-TauriFileSystemAdapter-D4bOmvzP.js +1 -0
- package/dist/{replay-TauriRootStorage-Den8gI4S.js → replay-TauriRootStorage-2MPQE-3f.js} +192 -188
- package/dist/replay-TauriRootStorage-CjWUrnWz.js +1 -0
- package/dist/{replay-agent-loop-B8Mjb8DU.js → replay-agent-loop-BgYyBo9e.js} +3 -3
- package/dist/{replay-agent-loop-Z_nrrmg_.js → replay-agent-loop-DYDFXAZj.js} +1 -1
- package/dist/{replay-ai-chat-mappers-D7e8buTk.js → replay-ai-chat-mappers-BEwNRQPV.js} +1 -1
- package/dist/{replay-ai-chat-mappers-aJ_VMb6Z.js → replay-ai-chat-mappers-CMtNqQHX.js} +1 -1
- package/dist/{replay-create-model-Bw20x80b.js → replay-create-model-B2ZsGTjs.js} +3 -3
- package/dist/{replay-create-model-Be3vPVDb.js → replay-create-model-DPxfOEfv.js} +4 -4
- package/dist/{replay-db-BQXljNM0.js → replay-db-C9iqyMet.js} +1 -1
- package/dist/{replay-db-BmZNrdZM.js → replay-db-D4-LmLRk.js} +1 -1
- package/dist/{replay-external-resolver-BQvSDNfH.js → replay-external-resolver-BXgVrfzk.js} +2 -2
- package/dist/{replay-external-resolver-BLzbbtnT.js → replay-external-resolver-CTUbNZGW.js} +1 -1
- package/dist/{replay-index-BCz452N6.js → replay-index-4TEahAPK.js} +21604 -21055
- package/dist/{replay-index-C0kvTxxm.js → replay-index-B4U7iZuq.js} +41 -41
- package/dist/{replay-index-DAIwC3ls.js → replay-index-B8O3wYqo.js} +1 -1
- package/dist/{replay-index-C7y4K4Cr.js → replay-index-Bdg7noSD.js} +1 -1
- package/dist/replay-index-CG9VN2JQ.js +4 -0
- package/dist/{replay-index-B-uZhXHj.js → replay-index-DcC173cC.js} +1 -1
- package/dist/{replay-index-DYtXcqDk.js → replay-index-Nz5obVS5.js} +1131 -1131
- package/dist/{replay-index-wBHsAQEV.js → replay-index-q63USe25.js} +1 -1
- package/dist/{replay-lint-BzkTeXqI.js → replay-lint-4XFKTmSY.js} +97 -97
- package/dist/{replay-lint-graphql-BZF2eLiZ.js → replay-lint-graphql-BsBWkZ6L.js} +1 -1
- package/dist/{replay-lint-graphql-BDBGJSir.js → replay-lint-graphql-De2eDZnT.js} +1 -1
- package/dist/{replay-lint-CqDMOMQt.js → replay-lint-s7ylMBWz.js} +6100 -6063
- package/dist/{replay-periodic-revalidation-C7SkB1vs.js → replay-periodic-revalidation-BMFP7f-u.js} +1 -1
- package/dist/{replay-periodic-revalidation-orCv_JoF.js → replay-periodic-revalidation-DJbblUef.js} +1 -1
- package/dist/{replay-resolve-DZMWoig2.js → replay-resolve-BtNxNrKo.js} +1 -1
- package/dist/{replay-resolve-0e5f8I7b.js → replay-resolve-BueEsOnR.js} +1 -1
- package/dist/{replay-respect-run-ChP63WzG.js → replay-respect-run-B_dJjlti.js} +1 -1
- package/dist/{replay-respect-run-CLW3wGhx.js → replay-respect-run-Dfpbcsns.js} +3 -3
- package/dist/{replay-tauri-path-DBt1dqkG.js → replay-tauri-path-Bht3XIt7.js} +1 -1
- package/dist/{replay-tauri-path-DvLF4Z8f.js → replay-tauri-path-CiuYXh_j.js} +2 -2
- package/dist/replay-useAiChatQueries-02CRdEPJ.js +215 -0
- package/dist/{replay-useAiChatQueries-S6v5duiJ.js → replay-useAiChatQueries-D2hh5omV.js} +994 -945
- package/dist/{replay-validate-key-CNl7BV_v.js → replay-validate-key-ALwOF1Ux.js} +1 -1
- package/dist/{replay-validate-key-CMJODIH6.js → replay-validate-key-B7fbWbfv.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +5 -0
- package/dist/replay.js +8 -8
- package/package.json +5 -5
- package/dist/replay-FileWatcher-DEOB0_DG.js +0 -1
- package/dist/replay-FileWatcher-Z6eygcBI.js +0 -359
- package/dist/replay-TauriFileSystemAdapter-CwSMakdJ.js +0 -1
- package/dist/replay-TauriFileSystemAdapter-DcFBYSUW.js +0 -99
- package/dist/replay-TauriRootStorage-DEGEIJrz.js +0 -1
- package/dist/replay-index-gM6vL6iT.js +0 -4
- package/dist/replay-useAiChatQueries-Bypgnkwa.js +0 -215
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as m, jsx as i, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as _, useMemo as A, useState as
|
|
2
|
+
import { useCallback as _, useMemo as A, useState as Y, Fragment as ht, useRef as F, useEffect as B, useLayoutEffect as je } from "react";
|
|
3
3
|
import c, { css as ue } from "styled-components";
|
|
4
|
-
import {
|
|
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
|
|
4
|
+
import { a3 as be, at as Ce, au as mt, ag as gt, ah as vt, u as yt, av as fe, aw as pe, S as V, ax as xe, ay as xt, az as wt, aA as ke, c as bt, aB as Ct, aC as Ue, aD as kt, aE as Tt, R as he, A as le, aF as We, ao as Ge, aG as we, aH as U, aI as It } from "./replay-index-4TEahAPK.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 Ye, C as I, y as Dt, z as qe, L as Mt, B as Q, D as _t, E as zt, F as Vt, G as $t, H as N } from "./replay-useAiChatQueries-D2hh5omV.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
9
|
import { StopIcon as Ft } from "@redocly/theme/icons/StopIcon/StopIcon";
|
|
10
|
-
import { M as z } from "./replay-db-
|
|
10
|
+
import { M as z } from "./replay-db-D4-LmLRk.js";
|
|
11
11
|
import { CheckboxIcon as Nt } 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
|
-
import { SubtractIcon as
|
|
15
|
+
import { SubtractIcon as Gt } from "@redocly/theme/icons/SubtractIcon/SubtractIcon";
|
|
16
16
|
import { capitalize as re } from "@redocly/theme/core/utils";
|
|
17
|
-
import { ChevronDownIcon as
|
|
18
|
-
import { ChevronRightIcon as
|
|
17
|
+
import { ChevronDownIcon as Yt } from "@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon";
|
|
18
|
+
import { ChevronRightIcon as qt } from "@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";
|
|
19
19
|
import { Dropdown as Kt } from "@redocly/theme/components/Dropdown/Dropdown";
|
|
20
20
|
import { DropdownMenu as Jt } from "@redocly/theme/components/Dropdown/DropdownMenu";
|
|
21
21
|
import { DropdownMenuItem as Ke } from "@redocly/theme/components/Dropdown/DropdownMenuItem";
|
|
@@ -25,7 +25,7 @@ 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 Te } from "./replay-SemanticSearchService-
|
|
28
|
+
import { g as Te } from "./replay-SemanticSearchService-Bh5xYa91.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";
|
|
@@ -359,17 +359,17 @@ class xn {
|
|
|
359
359
|
let S;
|
|
360
360
|
const R = y[v - 1], O = y[v + 1];
|
|
361
361
|
R && (y[v - 1] = void 0);
|
|
362
|
-
let
|
|
362
|
+
let q = !1;
|
|
363
363
|
if (O) {
|
|
364
364
|
const ee = O.oldPos - v;
|
|
365
|
-
|
|
365
|
+
q = O && 0 <= ee && ee < l;
|
|
366
366
|
}
|
|
367
367
|
const $ = R && R.oldPos + 1 < d;
|
|
368
|
-
if (!
|
|
368
|
+
if (!q && !$) {
|
|
369
369
|
y[v] = void 0;
|
|
370
370
|
continue;
|
|
371
371
|
}
|
|
372
|
-
if (!$ ||
|
|
372
|
+
if (!$ || q && 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)
|
|
373
373
|
return s(this.buildValues(S.lastComponent, n, t)) || !0;
|
|
374
374
|
y[v] = S, S.oldPos + 1 >= d && (b = Math.min(b, v - 1)), g + 1 >= l && (x = Math.max(x, v + 1));
|
|
375
375
|
}
|
|
@@ -554,7 +554,7 @@ function Le({ oldValue: e, newValue: t }) {
|
|
|
554
554
|
const { row: l } = a, d = En(l.type);
|
|
555
555
|
return /* @__PURE__ */ m(d, { children: [
|
|
556
556
|
/* @__PURE__ */ m(_n, { children: [
|
|
557
|
-
l.type === "remove" && /* @__PURE__ */ i(
|
|
557
|
+
l.type === "remove" && /* @__PURE__ */ i(Gt, { size: "12px" }),
|
|
558
558
|
l.type === "add" && /* @__PURE__ */ i(Wt, { size: "12px" })
|
|
559
559
|
] }),
|
|
560
560
|
/* @__PURE__ */ i(Pe, { children: l.text === "" ? " " : l.text })
|
|
@@ -647,7 +647,7 @@ function Fn(e, t) {
|
|
|
647
647
|
return o;
|
|
648
648
|
}
|
|
649
649
|
function Xe(e, t) {
|
|
650
|
-
return Ot(e) &&
|
|
650
|
+
return Ot(e) && Ye(e) && e.toolCallId === t;
|
|
651
651
|
}
|
|
652
652
|
function Nn(e, t, n) {
|
|
653
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) };
|
|
@@ -686,7 +686,7 @@ function Un({
|
|
|
686
686
|
}) {
|
|
687
687
|
const { primaryLabel: o, categoryLabel: a, diffLineKey: s } = Wn(e.target);
|
|
688
688
|
return /* @__PURE__ */ i(
|
|
689
|
-
|
|
689
|
+
Gn,
|
|
690
690
|
{
|
|
691
691
|
isIncluded: t,
|
|
692
692
|
onToggle: n,
|
|
@@ -722,7 +722,7 @@ function Wn(e) {
|
|
|
722
722
|
diffLineKey: void 0
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Gn({
|
|
726
726
|
isIncluded: e,
|
|
727
727
|
onToggle: t,
|
|
728
728
|
readOnly: n,
|
|
@@ -730,8 +730,8 @@ function Yn({
|
|
|
730
730
|
categoryLabel: o,
|
|
731
731
|
children: a
|
|
732
732
|
}) {
|
|
733
|
-
return /* @__PURE__ */ m(
|
|
734
|
-
/* @__PURE__ */ m(
|
|
733
|
+
return /* @__PURE__ */ m(Yn, { $dimmed: n && !e, children: [
|
|
734
|
+
/* @__PURE__ */ m(qn, { children: [
|
|
735
735
|
n ? /* @__PURE__ */ i(er, { children: e ? /* @__PURE__ */ i(tr, { size: "16px" }) : /* @__PURE__ */ i(nr, { size: "16px" }) }) : /* @__PURE__ */ m(Zn, { children: [
|
|
736
736
|
/* @__PURE__ */ i(Xn, { checked: e }),
|
|
737
737
|
/* @__PURE__ */ i(Qn, { type: "checkbox", checked: e, onChange: t })
|
|
@@ -742,7 +742,7 @@ function Yn({
|
|
|
742
742
|
a
|
|
743
743
|
] });
|
|
744
744
|
}
|
|
745
|
-
const
|
|
745
|
+
const Yn = c.div`
|
|
746
746
|
display: flex;
|
|
747
747
|
flex-direction: column;
|
|
748
748
|
gap: var(--spacing-xs);
|
|
@@ -754,7 +754,7 @@ const qn = c.div`
|
|
|
754
754
|
&:last-child {
|
|
755
755
|
border-bottom: none;
|
|
756
756
|
}
|
|
757
|
-
`,
|
|
757
|
+
`, qn = c.div`
|
|
758
758
|
display: flex;
|
|
759
759
|
align-items: center;
|
|
760
760
|
gap: var(--spacing-xs);
|
|
@@ -1026,7 +1026,7 @@ function k({
|
|
|
1026
1026
|
function H(e, t, n) {
|
|
1027
1027
|
return k({ id: e, targetType: t, targetStepId: n, oldValue: void 0, newValue: void 0 });
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function G({
|
|
1030
1030
|
data: e,
|
|
1031
1031
|
baseId: t,
|
|
1032
1032
|
targetType: n,
|
|
@@ -1076,7 +1076,7 @@ function xr({
|
|
|
1076
1076
|
const r = /* @__PURE__ */ new Map(), o = (a) => {
|
|
1077
1077
|
const s = r.get(a);
|
|
1078
1078
|
if (s) return s;
|
|
1079
|
-
const l =
|
|
1079
|
+
const l = qe(
|
|
1080
1080
|
e,
|
|
1081
1081
|
t,
|
|
1082
1082
|
n.collectionId,
|
|
@@ -1110,7 +1110,7 @@ function br(e, t, n, r) {
|
|
|
1110
1110
|
}),
|
|
1111
1111
|
s
|
|
1112
1112
|
) : K(
|
|
1113
|
-
|
|
1113
|
+
G({
|
|
1114
1114
|
data: l,
|
|
1115
1115
|
baseId: o,
|
|
1116
1116
|
targetType: a,
|
|
@@ -1133,7 +1133,7 @@ function br(e, t, n, r) {
|
|
|
1133
1133
|
}),
|
|
1134
1134
|
d
|
|
1135
1135
|
) : K(
|
|
1136
|
-
|
|
1136
|
+
G({
|
|
1137
1137
|
data: s,
|
|
1138
1138
|
baseId: o,
|
|
1139
1139
|
targetType: a,
|
|
@@ -1205,7 +1205,7 @@ function kr({
|
|
|
1205
1205
|
input: n
|
|
1206
1206
|
}) {
|
|
1207
1207
|
if (!Tr(n)) return [];
|
|
1208
|
-
const r =
|
|
1208
|
+
const r = qe(
|
|
1209
1209
|
e,
|
|
1210
1210
|
t,
|
|
1211
1211
|
n.collectionId,
|
|
@@ -1346,7 +1346,7 @@ function Pr(e, t, n) {
|
|
|
1346
1346
|
const { data: r } = t;
|
|
1347
1347
|
switch (t.action) {
|
|
1348
1348
|
case I.ADD:
|
|
1349
|
-
return
|
|
1349
|
+
return G({
|
|
1350
1350
|
data: r,
|
|
1351
1351
|
baseId: n,
|
|
1352
1352
|
targetType: "Body",
|
|
@@ -1357,7 +1357,7 @@ function Pr(e, t, n) {
|
|
|
1357
1357
|
});
|
|
1358
1358
|
case I.UPDATE: {
|
|
1359
1359
|
const o = e?.requestBody.type, a = r.contentType ?? o;
|
|
1360
|
-
return
|
|
1360
|
+
return G({
|
|
1361
1361
|
data: r,
|
|
1362
1362
|
baseId: n,
|
|
1363
1363
|
targetType: "Body",
|
|
@@ -1389,7 +1389,7 @@ function Pr(e, t, n) {
|
|
|
1389
1389
|
function Er(e, t, n) {
|
|
1390
1390
|
switch (t.action) {
|
|
1391
1391
|
case I.ADD:
|
|
1392
|
-
return t.data ?
|
|
1392
|
+
return t.data ? G({
|
|
1393
1393
|
data: t.data,
|
|
1394
1394
|
baseId: n,
|
|
1395
1395
|
targetType: "successCriteria",
|
|
@@ -1400,7 +1400,7 @@ function Er(e, t, n) {
|
|
|
1400
1400
|
case I.UPDATE: {
|
|
1401
1401
|
if (!t.data) return H(n, "successCriteria");
|
|
1402
1402
|
const r = typeof t.id == "string" && e ? _e(e, t.id) : void 0;
|
|
1403
|
-
return
|
|
1403
|
+
return G({
|
|
1404
1404
|
data: t.data,
|
|
1405
1405
|
baseId: n,
|
|
1406
1406
|
targetType: "successCriteria",
|
|
@@ -1495,7 +1495,7 @@ function ot(e, t) {
|
|
|
1495
1495
|
} catch (f) {
|
|
1496
1496
|
return console.error("Unable to build change previews", f), [];
|
|
1497
1497
|
}
|
|
1498
|
-
}, [e, n, r, t]), [a, s] =
|
|
1498
|
+
}, [e, n, r, t]), [a, s] = Y(
|
|
1499
1499
|
() => Object.fromEntries(o.map((u) => [u.id, u.included]))
|
|
1500
1500
|
), l = A(
|
|
1501
1501
|
() => o.map((u) => ({ ...u, included: a[u.id] ?? u.included })),
|
|
@@ -1671,9 +1671,9 @@ function jr({
|
|
|
1671
1671
|
/* @__PURE__ */ i(et, { toolName: e, input: n }),
|
|
1672
1672
|
/* @__PURE__ */ i(Wr, { children: /* @__PURE__ */ i(Ze, { previews: d, readOnly: !0 }) }),
|
|
1673
1673
|
/* @__PURE__ */ i(Ue, {}),
|
|
1674
|
-
/* @__PURE__ */ m(
|
|
1675
|
-
/* @__PURE__ */ i(
|
|
1676
|
-
a ? /* @__PURE__ */ i(
|
|
1674
|
+
/* @__PURE__ */ m(Gr, { children: [
|
|
1675
|
+
/* @__PURE__ */ i(Yr, { children: h }),
|
|
1676
|
+
a ? /* @__PURE__ */ i(qr, { size: "small", variant: "outlined", onClick: a, children: "Undo" }) : null
|
|
1677
1677
|
] })
|
|
1678
1678
|
] });
|
|
1679
1679
|
}
|
|
@@ -1691,28 +1691,28 @@ const Ur = c.div`
|
|
|
1691
1691
|
display: flex;
|
|
1692
1692
|
flex-direction: column;
|
|
1693
1693
|
min-width: 0;
|
|
1694
|
-
`,
|
|
1694
|
+
`, Gr = c.div`
|
|
1695
1695
|
display: flex;
|
|
1696
1696
|
justify-content: space-between;
|
|
1697
1697
|
align-items: center;
|
|
1698
1698
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
1699
1699
|
gap: var(--spacing-xs);
|
|
1700
|
-
`,
|
|
1700
|
+
`, Yr = c.span`
|
|
1701
1701
|
font-size: var(--font-size-sm);
|
|
1702
1702
|
font-weight: var(--font-weight-regular);
|
|
1703
1703
|
line-height: var(--line-height-sm);
|
|
1704
1704
|
color: var(--text-color-secondary);
|
|
1705
|
-
`,
|
|
1705
|
+
`, qr = c(P)`
|
|
1706
1706
|
padding-top: 0;
|
|
1707
1707
|
padding-bottom: 0;
|
|
1708
1708
|
`;
|
|
1709
1709
|
function Kr({ items: e, isLast: t }) {
|
|
1710
|
-
const [n, r] =
|
|
1710
|
+
const [n, r] = Y(t), o = _(() => {
|
|
1711
1711
|
r((s) => !s);
|
|
1712
1712
|
}, []), a = A(() => e.filter((s) => s.kind === "action"), [e]);
|
|
1713
1713
|
return /* @__PURE__ */ m(Xr, { children: [
|
|
1714
1714
|
/* @__PURE__ */ m(Zr, { type: "button", onClick: o, "aria-expanded": n, children: [
|
|
1715
|
-
/* @__PURE__ */ i(Qr, { children: n ? /* @__PURE__ */ i(
|
|
1715
|
+
/* @__PURE__ */ i(Qr, { children: n ? /* @__PURE__ */ i(Yt, { size: "12px", color: "var(--icon-color-additional)" }) : /* @__PURE__ */ i(qt, { size: "12px", color: "var(--icon-color-additional)" }) }),
|
|
1716
1716
|
/* @__PURE__ */ m(eo, { children: [
|
|
1717
1717
|
a.length,
|
|
1718
1718
|
" ",
|
|
@@ -1837,7 +1837,7 @@ function co({
|
|
|
1837
1837
|
n.key
|
|
1838
1838
|
);
|
|
1839
1839
|
const { part: o } = n, a = _t(o.type);
|
|
1840
|
-
return a &&
|
|
1840
|
+
return a && Ye(o) ? /* @__PURE__ */ i(
|
|
1841
1841
|
Nr,
|
|
1842
1842
|
{
|
|
1843
1843
|
approvalId: o.approval.id,
|
|
@@ -2243,7 +2243,7 @@ const Oo = c.div`
|
|
|
2243
2243
|
flex-shrink: 0;
|
|
2244
2244
|
`, Fo = 280;
|
|
2245
2245
|
function lt({ pinToBottom: e = !1 }) {
|
|
2246
|
-
const [t, n] =
|
|
2246
|
+
const [t, n] = Y(
|
|
2247
2247
|
() => Te().getIndexingActivityState().inProgress
|
|
2248
2248
|
);
|
|
2249
2249
|
return B(() => Te().subscribe("indexing-activity", (o) => {
|
|
@@ -2309,7 +2309,7 @@ function Wo() {
|
|
|
2309
2309
|
selectedModelId: a,
|
|
2310
2310
|
selectModel: s,
|
|
2311
2311
|
onSettingsOpen: l
|
|
2312
|
-
} = We(), { messages: d, isStreaming: u, sendMessage: f, stopGeneration: h } = Q(), { isOpen: p } =
|
|
2312
|
+
} = We(), { messages: d, isStreaming: u, sendMessage: f, stopGeneration: h } = Q(), { isOpen: p } = Ge(), [y, g] = Y(""), x = F(null), b = F(null), w = F(!0), v = d.length > 0, S = t || v, R = Ao(d.length), q = R !== void 0 && R > 0 && !v, $ = _((L = "smooth") => {
|
|
2313
2313
|
b.current && b.current.scrollTo({
|
|
2314
2314
|
top: b.current.scrollHeight,
|
|
2315
2315
|
behavior: L
|
|
@@ -2346,16 +2346,16 @@ function Wo() {
|
|
|
2346
2346
|
[p, n, r]
|
|
2347
2347
|
), /* @__PURE__ */ m(ct, { children: [
|
|
2348
2348
|
/* @__PURE__ */ i(
|
|
2349
|
-
|
|
2349
|
+
Go,
|
|
2350
2350
|
{
|
|
2351
2351
|
ref: b,
|
|
2352
2352
|
$isExpanded: S,
|
|
2353
|
-
$isAnimated: u ||
|
|
2353
|
+
$isAnimated: u || q,
|
|
2354
2354
|
onScroll: ee,
|
|
2355
|
-
children: t ? /* @__PURE__ */ i(
|
|
2355
|
+
children: t ? /* @__PURE__ */ i(qo, { children: /* @__PURE__ */ i(we, { size: "20px" }) }) : /* @__PURE__ */ i(To, {})
|
|
2356
2356
|
}
|
|
2357
2357
|
),
|
|
2358
|
-
/* @__PURE__ */ m(
|
|
2358
|
+
/* @__PURE__ */ m(Yo, { $isExpanded: !S, children: [
|
|
2359
2359
|
/* @__PURE__ */ i(lt, { pinToBottom: !S }),
|
|
2360
2360
|
/* @__PURE__ */ i(
|
|
2361
2361
|
ln,
|
|
@@ -2381,7 +2381,7 @@ function Wo() {
|
|
|
2381
2381
|
] })
|
|
2382
2382
|
] });
|
|
2383
2383
|
}
|
|
2384
|
-
const
|
|
2384
|
+
const Go = c.div`
|
|
2385
2385
|
flex: ${({ $isExpanded: e }) => e ? 1 : 0};
|
|
2386
2386
|
width: 100%;
|
|
2387
2387
|
overflow: auto;
|
|
@@ -2389,13 +2389,13 @@ const Yo = c.div`
|
|
|
2389
2389
|
transition-property: flex;
|
|
2390
2390
|
transition-duration: ${(e) => e.$isAnimated ? "var(--replay-transition-duration)" : "0s"};
|
|
2391
2391
|
transition-timing-function: var(--replay-transition-timing-function);
|
|
2392
|
-
`,
|
|
2392
|
+
`, Yo = c.div`
|
|
2393
2393
|
position: relative;
|
|
2394
2394
|
display: flex;
|
|
2395
2395
|
flex-direction: column;
|
|
2396
2396
|
width: 100%;
|
|
2397
2397
|
flex: ${({ $isExpanded: e }) => e ? 1 : 0};
|
|
2398
|
-
`,
|
|
2398
|
+
`, qo = c.div`
|
|
2399
2399
|
display: flex;
|
|
2400
2400
|
justify-content: center;
|
|
2401
2401
|
height: 100%;
|
|
@@ -2591,7 +2591,7 @@ function mi(e) {
|
|
|
2591
2591
|
] });
|
|
2592
2592
|
}
|
|
2593
2593
|
function gi() {
|
|
2594
|
-
const e = F(null), [t, n] =
|
|
2594
|
+
const e = F(null), [t, n] = Y(!1);
|
|
2595
2595
|
return je(() => {
|
|
2596
2596
|
if (!e.current) return;
|
|
2597
2597
|
const r = e.current;
|
|
@@ -2715,7 +2715,7 @@ const Si = c.div`
|
|
|
2715
2715
|
user-select: none;
|
|
2716
2716
|
`;
|
|
2717
2717
|
function ma() {
|
|
2718
|
-
const [e, t] =
|
|
2718
|
+
const [e, t] = Y(N.CHAT), n = Ge(), r = We(), o = () => {
|
|
2719
2719
|
t(N.HISTORY);
|
|
2720
2720
|
}, a = () => {
|
|
2721
2721
|
t(N.CHAT);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),h=require("react"),X=require("styled-components"),f=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),h=require("react"),X=require("styled-components"),f=require("./replay-index-Nz5obVS5.js"),x=require("./replay-useAiChatQueries-02CRdEPJ.js"),Ge=require("@redocly/theme/core/constants/search"),E=require("@redocly/theme/components/Button/Button"),Ue=require("@redocly/theme/icons/SendIcon/SendIcon"),We=require("@redocly/theme/icons/StopIcon/StopIcon"),M=require("./replay-db-C9iqyMet.js"),Ye=require("@redocly/theme/icons/CheckboxIcon/CheckboxIcon"),Ke=require("@redocly/theme/icons/CheckmarkFilledIcon/CheckmarkFilledIcon"),Je=require("@redocly/theme/icons/CloseFilledIcon/CloseFilledIcon"),Xe=require("@redocly/theme/icons/AddIcon/AddIcon"),Ze=require("@redocly/theme/icons/SubtractIcon/SubtractIcon"),K=require("@redocly/theme/core/utils"),Qe=require("@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon"),et=require("@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon"),tt=require("@redocly/theme/components/Dropdown/Dropdown"),nt=require("@redocly/theme/components/Dropdown/DropdownMenu"),Ie=require("@redocly/theme/components/Dropdown/DropdownMenuItem"),rt=require("@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon"),ot=require("@redocly/theme/icons/SettingsCogIcon/SettingsCogIcon"),it=require("@redocly/theme/icons/ChatGptIcon/ChatGptIcon"),st=require("@redocly/theme/icons/GeminiIcon/GeminiIcon"),at=require("@redocly/theme/icons/ClaudeIcon/ClaudeIcon"),B=require("@redocly/theme/components/Tooltip/Tooltip"),ae=require("./replay-SemanticSearchService-CulKCCNl.js");require("@tanstack/react-query");const G=require("@redocly/theme/components/Typography/Typography"),lt=require("@redocly/theme/icons/TrashCanIcon/TrashCanIcon"),ct=require("@redocly/theme/icons/AiStarsGradientIcon/AiStarsGradientIcon"),dt=require("@redocly/theme/icons/CloseIcon/CloseIcon"),ut=require("@redocly/theme/icons/NewChatIcon/NewChatIcon"),ft=require("@redocly/theme/icons/RecentlyViewedIcon/RecentlyViewedIcon"),pt=require("@redocly/theme/icons/ArrowLeftIcon/ArrowLeftIcon"),ht=e=>e&&e.__esModule?e:{default:e},l=ht(X);function xt({placeholder:e="Ask anything...",className:t,disabled:n,isStreaming:r=!1,onStop:o,modelSelector:s,value:a,onValueChange:c,onSubmit:d,textareaRef:u}){const p=a.trim(),v=!n&&p.length>0&&!r,g=!n&&p.length>0,w=A=>{c(A.target.value)},m=()=>{!p||n||r||d()},b=()=>{!r||!o||o()},C=A=>{A.key==="Enter"&&!A.shiftKey&&!A.nativeEvent.isComposing&&(A.preventDefault(),r&&o?b():m())};return i.jsxs(gt,{className:t,$isActive:g,children:[i.jsx(vt,{ref:u,rows:1,maxLength:Ge.AI_SEARCH_MAX_MESSAGE_LENGTH,placeholder:e,value:a,disabled:n,spellCheck:!1,onChange:w,onKeyDown:C}),i.jsxs(mt,{children:[s,r&&o?i.jsx(wt,{type:"button",size:"small","aria-label":"Stop generating",icon:i.jsx(We.StopIcon,{color:"var(--icon-color-on-color)"}),onClick:b}):i.jsx(yt,{type:"button",size:"small","aria-label":"Send message",icon:i.jsx(Ue.SendIcon,{color:"var(--icon-color-on-color)"}),onClick:m,disabled:!v})]})]})}const gt=l.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xs);
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
box-sizing: border-box;
|
|
63
63
|
background: var(--color-warm-grey-9);
|
|
64
64
|
border-radius: var(--border-radius-xxl);
|
|
65
|
-
`,bt=new Set(["collection","workflow","step","operation","workflow-run"]);function re(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function O(e,t){const n=e.get(t);if(n==null)return null;const r=n.trim();return r.length>0?r:null}function Ct(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!bt.has(n))return null;const r=t.searchParams;switch(n){case"collection":{const o=O(r,"collectionId");return o?{kind:"collection",collectionId:o}:null}case"workflow":{const o=O(r,"collectionId"),s=O(r,"workflowId");return!o||!s?null:{kind:"workflow",collectionId:o,workflowId:s}}case"step":{const o=O(r,"collectionId"),s=O(r,"workflowId"),a=O(r,"stepId");return!o||!s||!a?null:{kind:"step",collectionId:o,workflowId:s,stepId:a}}case"operation":{const o=O(r,"operationId");return o?{kind:"operation",operationId:o}:null}case"workflow-run":{const o=O(r,"collectionId"),s=O(r,"workflowId");if(!o||!s)return null;const a=O(r,"historyId"),c=a==="null"||a==="undefined"?null:a;return{kind:"workflow-run",collectionId:o,workflowId:s,...c?{historyId:c}:{}}}default:return null}}function At(e,t,n={}){switch(t.kind){case"collection":e.openCollectionTab({collectionId:t.collectionId,activeTabName:f.TAB_NAMES.COLLECTION_SETTINGS});break;case"workflow":e.openWorkflowTab({collectionId:t.collectionId,workflowId:t.workflowId,activeTabName:f.TAB_NAMES.WORKFLOW_SETTINGS});break;case"step":e.openStepTabFromCollection({collectionId:t.collectionId,workflowId:t.workflowId,stepId:t.stepId,state:f.TabState.Normal});break;case"workflow-run":{const r=n.workflowRunHistoryIds?.[x.workflowRunKey(t.collectionId,t.workflowId)]??[],o=t.historyId&&r.includes(t.historyId)?t.historyId:r.at(-1)??t.historyId;if(o){e.openWorkflowRunTabFromHistory(o,{state:f.TabState.Normal});break}e.focusWorkflowRunTab({collectionId:t.collectionId,workflowId:t.workflowId})||e.openWorkflowRunTab({collectionId:t.collectionId,workflowId:t.workflowId});break}case"operation":{const r=x.resolveOperation(e.apis,t.operationId);if(!r.ok){console.warn("[executeReplayChatLink] Operation not resolved",{operationId:t.operationId,message:r.message});return}x.openOrFocusOperationEditorTab(x.operationListItemToCollectionOperation(r.value),e);break}}}function Tt(e,t,n={}){const r=Ct(t);r&&At(e,r,n)}function je({workflowRunHistoryIds:e}={}){const t=f.useApis(),{getApiOperation:n}=f.
|
|
65
|
+
`,bt=new Set(["collection","workflow","step","operation","workflow-run"]);function re(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function O(e,t){const n=e.get(t);if(n==null)return null;const r=n.trim();return r.length>0?r:null}function Ct(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!bt.has(n))return null;const r=t.searchParams;switch(n){case"collection":{const o=O(r,"collectionId");return o?{kind:"collection",collectionId:o}:null}case"workflow":{const o=O(r,"collectionId"),s=O(r,"workflowId");return!o||!s?null:{kind:"workflow",collectionId:o,workflowId:s}}case"step":{const o=O(r,"collectionId"),s=O(r,"workflowId"),a=O(r,"stepId");return!o||!s||!a?null:{kind:"step",collectionId:o,workflowId:s,stepId:a}}case"operation":{const o=O(r,"operationId");return o?{kind:"operation",operationId:o}:null}case"workflow-run":{const o=O(r,"collectionId"),s=O(r,"workflowId");if(!o||!s)return null;const a=O(r,"historyId"),c=a==="null"||a==="undefined"?null:a;return{kind:"workflow-run",collectionId:o,workflowId:s,...c?{historyId:c}:{}}}default:return null}}function At(e,t,n={}){switch(t.kind){case"collection":e.openCollectionTab({collectionId:t.collectionId,activeTabName:f.TAB_NAMES.COLLECTION_SETTINGS});break;case"workflow":e.openWorkflowTab({collectionId:t.collectionId,workflowId:t.workflowId,activeTabName:f.TAB_NAMES.WORKFLOW_SETTINGS});break;case"step":e.openStepTabFromCollection({collectionId:t.collectionId,workflowId:t.workflowId,stepId:t.stepId,state:f.TabState.Normal});break;case"workflow-run":{const r=n.workflowRunHistoryIds?.[x.workflowRunKey(t.collectionId,t.workflowId)]??[],o=t.historyId&&r.includes(t.historyId)?t.historyId:r.at(-1)??t.historyId;if(o){e.openWorkflowRunTabFromHistory(o,{state:f.TabState.Normal});break}e.focusWorkflowRunTab({collectionId:t.collectionId,workflowId:t.workflowId})||e.openWorkflowRunTab({collectionId:t.collectionId,workflowId:t.workflowId});break}case"operation":{const r=x.resolveOperation(e.apis,t.operationId);if(!r.ok){console.warn("[executeReplayChatLink] Operation not resolved",{operationId:t.operationId,message:r.message});return}x.openOrFocusOperationEditorTab(x.operationListItemToCollectionOperation(r.value),e);break}}}function Tt(e,t,n={}){const r=Ct(t);r&&At(e,r,n)}function je({workflowRunHistoryIds:e}={}){const t=f.useApis(),{getApiOperation:n}=f.useApiOperationGetter(),{focusOperationTab:r,addNewTab:o,openCollectionTab:s,openWorkflowTab:a,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,focusWorkflowRunTab:p}=f.useTabHandlers();return h.useCallback(v=>{const g=v.target;if(!(g instanceof Element))return;const w=g.closest("a[href]");if(!(w instanceof HTMLAnchorElement))return;const m=w.getAttribute("href");m?.startsWith("replay:")&&(v.preventDefault(),v.stopPropagation(),Tt({apis:t,getApiOperation:n,focusOperationTab:r,addNewTab:o,openCollectionTab:s,openWorkflowTab:a,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,focusWorkflowRunTab:p},m,{workflowRunHistoryIds:e}))},[e,t,n,r,o,s,a,c,d,u,p])}class It{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const s=this.castInput(t,r),a=this.castInput(n,r),c=this.removeEmpty(this.tokenize(s,r)),d=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(c,d,r,o)}diffWithOptionsObj(t,n,r,o){var s;const a=y=>{if(y=this.postProcess(y,r),o){setTimeout(function(){o(y)},0);return}else return y},c=n.length,d=t.length;let u=1,p=c+d;r.maxEditLength!=null&&(p=Math.min(p,r.maxEditLength));const v=(s=r.timeout)!==null&&s!==void 0?s:1/0,g=Date.now()+v,w=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(w[0],n,t,0,r);if(w[0].oldPos+1>=d&&m+1>=c)return a(this.buildValues(w[0].lastComponent,n,t));let b=-1/0,C=1/0;const A=()=>{for(let y=Math.max(b,-u);y<=Math.min(C,u);y+=2){let S;const R=w[y-1],P=w[y+1];R&&(w[y-1]=void 0);let z=!1;if(P){const U=P.oldPos-y;z=P&&0<=U&&U<c}const D=R&&R.oldPos+1<d;if(!z&&!D){w[y]=void 0;continue}if(!D||z&&R.oldPos<P.oldPos?S=this.addToPath(P,!0,!1,0,r):S=this.addToPath(R,!1,!0,1,r),m=this.extractCommon(S,n,t,y,r),S.oldPos+1>=d&&m+1>=c)return a(this.buildValues(S.lastComponent,n,t))||!0;w[y]=S,S.oldPos+1>=d&&(C=Math.min(C,y-1)),m+1>=c&&(b=Math.max(b,y+1))}u++};if(o)(function y(){setTimeout(function(){if(u>p||Date.now()>g)return o(void 0);A()||y()},0)})();else for(;u<=p&&Date.now()<=g;){const y=A();if(y)return y}}addToPath(t,n,r,o,s){const a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,o,s){const a=n.length,c=r.length;let d=t.oldPos,u=d-o,p=0;for(;u+1<a&&d+1<c&&this.equals(r[d+1],n[u+1],s);)u++,d++,p++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!s.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const a=o.length;let c=0,d=0,u=0;for(;c<a;c++){const p=o[c];if(p.removed)p.value=this.join(r.slice(u,u+p.count)),u+=p.count;else{if(!p.added&&this.useLongestToken){let v=n.slice(d,d+p.count);v=v.map(function(g,w){const m=r[u+w];return m.length>g.length?m:g}),p.value=this.join(v)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(u+=p.count)}}return o}}class jt extends It{constructor(){super(...arguments),this.tokenize=Et}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
66
66
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
67
67
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
68
68
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|