@hanzo/dev 4.2.0 → 4.2.1
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/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-BCDMNW2g.js} +19 -19
- package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-BUidXqSs.js} +2460 -2460
- package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
- package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
- package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-2HD5qiyt.js} +227 -227
- package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-CuWvI5hS.js} +13 -13
- package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-Z2QVmBzu.js} +328 -328
- package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-CEfiCIGR.js} +3 -3
- package/dist/{DocumentPages-VSn83vty.js → DocumentPages-glImt2JO.js} +3 -3
- package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-iqO3LiIj.js} +404 -404
- package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-GwnRmXEh.js} +4 -4
- package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-CXWpTlfI.js} +1089 -1089
- package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-CDydHOXg.js} +2 -2
- package/dist/{FontViewer-CLDdwhSr.js → FontViewer-DDt9C5Cb.js} +5 -5
- package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-_sfrtw9j.js} +357 -357
- package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-coFQvyRw.js} +3 -3
- package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
- package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-D3RklYQB.js} +8 -8
- package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
- package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BmPdNxW5.js} +2 -2
- package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-BlKTevTF.js} +3 -3
- package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-C0gSEyeO.js} +10 -10
- package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-Ago_DWEt.js} +2 -2
- package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-DBRqtLet.js} +10 -10
- package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-DD_h7VLv.js} +287 -287
- package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-B4dxjpba.js} +4 -4
- package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
- package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-BwYKB-3e.js} +892 -892
- package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-6UU-M6_B.js} +3 -3
- package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-D-00K-A9.js} +3 -3
- package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-CiuHdDv8.js} +489 -489
- package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
- package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
- package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
- package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-pQXIfodT.js} +3 -3
- package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Cqfh5eN2.js} +476 -476
- package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-B4Lp8Ktf.js} +334 -334
- package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-7xXUUySV.js} +5 -5
- package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-B_yprjav.js} +2 -2
- package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
- package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
- package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-DCgE3ojz.js} +461 -461
- package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
- package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
- package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
- package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-BbVlDQYx.js} +18 -18
- package/dist/builder/api/models.d.ts +2 -0
- package/dist/builder/api/models.js +6 -1
- package/dist/builder/api/sandbox.d.ts +2 -0
- package/dist/builder/api/sandbox.js +3 -1
- package/dist/builder/desk.d.ts +6 -0
- package/dist/builder/desk.js +79 -14
- package/dist/builder/mind.d.ts +5 -5
- package/dist/builder/mind.js +35 -14
- package/dist/builder/pane.d.ts +1 -1
- package/dist/builder/pane.js +1 -1
- package/dist/builder/panel.js +5 -5
- package/dist/builder/preview-fallback.d.ts +47 -0
- package/dist/builder/preview-fallback.js +341 -0
- package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-DrjqPCpz.js} +5 -5
- package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
- package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
- package/dist/core.js +1 -1
- package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-ZtWU3urU.js} +2 -2
- package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
- package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
- package/dist/{embed-c030vUqM.js → embed-CPWZKyIW.js} +36098 -35677
- package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
- package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
- package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-DW94DZj4.js} +54 -54
- package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-Cfz-3q1U.js} +507 -507
- package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
- package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
- package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
- package/dist/keymap.js +1 -1
- package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
- package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
- package/dist/mediaSource-jW5c7b4r.js +70 -0
- package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
- package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
- package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
- package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
- package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
- package/dist/query-BPk2W3QN.js +63 -0
- package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-CjZdBNVR.js} +2 -2
- package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
- package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
- package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
- package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
- package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
- package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
- package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
- package/dist/{threadSearch-BHyWwcV3.js → threadSearch-CrtCof6n.js} +162 -162
- package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
- package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
- package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
- package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
- package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-PesehDX0.js} +33 -33
- package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
- package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
- package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-CNhjWfP0.js} +1 -1
- package/dist/{useSettings-DYG9Dmro.js → useSettings-B_MtcTyD.js} +139 -139
- package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-B1wCgLPO.js} +1404 -1404
- package/dist/{useTheme-D2ZM1gvV.js → useTheme-WlXpQRKG.js} +4 -4
- package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
- package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
- package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
- package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
- package/package.json +1 -1
- package/dist/mediaSource-zI7JWid4.js +0 -70
- package/dist/query-BxrrBAp6.js +0 -63
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { m as e } from "./session-
|
|
1
|
+
import { m as e } from "./session-Decc4Fo5.js";
|
|
2
2
|
import { c as t, n, s as r } from "./messages-yqmY7G5x.js";
|
|
3
|
-
import {
|
|
4
|
-
import { $p as R, $s as z, Ad as B, Ch as V, Dm as H, Et as U, Fc as ce, Hp as le, Ic as ue, Ih as de, Im as fe, Iv as pe, Iy as me, Km as he, Mp as ge, Nv as _e, Pd as ve, Qh as ye, Rg as be, Sh as xe, Tg as Se, Th as Ce, Uc as we, Up as Te, Yd as Ee, Z as W, Zc as De, Zp as Oe, Zs as ke, _m as Ae, _y as je, bc as Me, bd as Ne, bp as Pe, cd as Fe, cy as Ie, dc as Le, fc as Re, fy as ze, gy as Be, hd as Ve, im as He, jp as Ue, kd as We, nf as Ge, oc as Ke, qu as qe, rg as Je, sm as Ye, ta as Xe, vg as Ze, vp as Qe, vv as $e, vy as et, wd as tt, wt as nt, wv as rt, xc as it, xh as at, yd as ot, yh as st, zm as ct } from "./keybindings-
|
|
5
|
-
import { at as lt, ct as G, it as ut, ot as dt, st as ft } from "./themePalette-
|
|
6
|
-
import { a as pt, s as mt } from "./network-
|
|
7
|
-
import { S as ht, Zt as gt, an as _t, en as vt, in as yt, n as bt, r as xt, s as St } from "./threadSearch-
|
|
3
|
+
import { Af as i, C_ as a, Dd as o, Df as s, Gf as c, Hg as l, Kh as u, Lf as d, Qh as f, S_ as p, Xf as m, Yh as h, Yr as g, Zf as _, Zh as v, _g as y, b_ as b, cf as x, cg as S, ci as C, cp as w, df as T, dg as E, eg as D, ff as O, hg as k, ig as A, kf as j, nc as M, op as N, pp as P, rp as F, sg as ee, t as te, tp as I, uf as L, wg as ne, xf as re, xg as ie, xs as ae, yd as oe, zt as se } from "./utils-DtKQl-D3.js";
|
|
4
|
+
import { $p as R, $s as z, Ad as B, Ch as V, Dm as H, Et as U, Fc as ce, Hp as le, Ic as ue, Ih as de, Im as fe, Iv as pe, Iy as me, Km as he, Mp as ge, Nv as _e, Pd as ve, Qh as ye, Rg as be, Sh as xe, Tg as Se, Th as Ce, Uc as we, Up as Te, Yd as Ee, Z as W, Zc as De, Zp as Oe, Zs as ke, _m as Ae, _y as je, bc as Me, bd as Ne, bp as Pe, cd as Fe, cy as Ie, dc as Le, fc as Re, fy as ze, gy as Be, hd as Ve, im as He, jp as Ue, kd as We, nf as Ge, oc as Ke, qu as qe, rg as Je, sm as Ye, ta as Xe, vg as Ze, vp as Qe, vv as $e, vy as et, wd as tt, wt as nt, wv as rt, xc as it, xh as at, yd as ot, yh as st, zm as ct } from "./keybindings-D0pBlT1k.js";
|
|
5
|
+
import { at as lt, ct as G, it as ut, ot as dt, st as ft } from "./themePalette-C-GtwwqV.js";
|
|
6
|
+
import { a as pt, s as mt } from "./network-wuXD7-is.js";
|
|
7
|
+
import { S as ht, Zt as gt, an as _t, en as vt, in as yt, n as bt, r as xt, s as St } from "./threadSearch-CrtCof6n.js";
|
|
8
8
|
import { t as Ct } from "./message-circle-D3IVrLlW.js";
|
|
9
9
|
import { i as wt } from "./triangle-alert-CpJvcOXh.js";
|
|
10
10
|
import { p as Tt } from "./user-round-DXjpOTSK.js";
|
|
11
11
|
import { t as Et } from "./trash-2-BSTDk3P8.js";
|
|
12
|
-
import { i as Dt, t as Ot } from "./popover-
|
|
13
|
-
import "./errors-
|
|
14
|
-
import { o as kt } from "./assetUrls-
|
|
15
|
-
import { n as At } from "./query-
|
|
16
|
-
import { z as jt } from "./fileExplorerLabel-
|
|
17
|
-
import { A as Mt, Dt as Nt, G as Pt, Tt as Ft, g as It, n as Lt, ot as Rt, t as zt } from "./useTextFieldSpeech-
|
|
18
|
-
import { Z as Bt, cn as Vt, en as Ht, ln as Ut, nn as K, sn as Wt, un as Gt } from "./DiffWorkerPoolProvider-
|
|
12
|
+
import { i as Dt, t as Ot } from "./popover-BAyP2Tdr.js";
|
|
13
|
+
import "./errors-D8_Zn8KN.js";
|
|
14
|
+
import { o as kt } from "./assetUrls-D8lRk7Xd.js";
|
|
15
|
+
import { n as At } from "./query-BPk2W3QN.js";
|
|
16
|
+
import { z as jt } from "./fileExplorerLabel-Cfz-3q1U.js";
|
|
17
|
+
import { A as Mt, Dt as Nt, G as Pt, Tt as Ft, g as It, n as Lt, ot as Rt, t as zt } from "./useTextFieldSpeech-B1wCgLPO.js";
|
|
18
|
+
import { Z as Bt, cn as Vt, en as Ht, ln as Ut, nn as K, sn as Wt, un as Gt } from "./DiffWorkerPoolProvider-CEfiCIGR.js";
|
|
19
19
|
import { H as Kt } from "./diffRendering-tvIuzFsP.js";
|
|
20
20
|
import { a as qt, l as q, r as Jt, s as Yt } from "./utils-7X1WogxY.js";
|
|
21
21
|
import { useEffect as Xt, useId as Zt, useLayoutEffect as Qt, useRef as $t, useState as J } from "react";
|
|
@@ -25,11 +25,11 @@ import { flushSync as nn } from "react-dom";
|
|
|
25
25
|
// src/state/paginatedBranches.ts
|
|
26
26
|
function rn(e) {
|
|
27
27
|
let t = e.at(-1);
|
|
28
|
-
return e.length > 1 && t?.waiting === !0 && ze(
|
|
28
|
+
return e.length > 1 && t?.waiting === !0 && ze(ne(t));
|
|
29
29
|
}
|
|
30
30
|
// ../../packages/client-runtime/src/state/gitActions.ts
|
|
31
31
|
function an(e) {
|
|
32
|
-
return
|
|
32
|
+
return oe.get(e?.sourceControlProvider?.kind).changeRequest;
|
|
33
33
|
}
|
|
34
34
|
function on(e, t) {
|
|
35
35
|
return t ? e === "push" || e === "create_pr" || e === "commit_push" || e === "commit_push_pr" : !1;
|
|
@@ -108,7 +108,7 @@ var fn = Object.freeze({
|
|
|
108
108
|
phaseStartedAtMs: null,
|
|
109
109
|
hookStartedAtMs: null,
|
|
110
110
|
error: null
|
|
111
|
-
}), pn = () => Pe(Qe()), mn = 0, hn = Ee(B([qe, tt])), gn =
|
|
111
|
+
}), pn = () => Pe(Qe()), mn = 0, hn = Ee(B([qe, tt])), gn = h((e) => f(fn).pipe(v, S(`vcs-action:${e}`))), _n = f(fn).pipe(v, S("vcs-action:null"));
|
|
112
112
|
function vn(e) {
|
|
113
113
|
return e.environmentId === null || e.cwd === null ? null : JSON.stringify([e.environmentId, e.cwd]);
|
|
114
114
|
}
|
|
@@ -277,61 +277,61 @@ function jn(e, t) {
|
|
|
277
277
|
}
|
|
278
278
|
function Mn(e) {
|
|
279
279
|
let t = /* @__PURE__ */ new Map(), n = (n) => {
|
|
280
|
-
let r = vn(n),
|
|
280
|
+
let r = vn(n), a = r ?? JSON.stringify([
|
|
281
281
|
"vcs-action-target:unavailable",
|
|
282
282
|
n.environmentId,
|
|
283
283
|
n.cwd
|
|
284
|
-
]),
|
|
285
|
-
if (
|
|
286
|
-
let
|
|
287
|
-
label: `vcs-action:run-stacked:${
|
|
284
|
+
]), o = t.get(a);
|
|
285
|
+
if (o !== void 0) return o;
|
|
286
|
+
let l = r === null ? null : yn(r), u = r === null ? _n : gn(r), d = O(e, {
|
|
287
|
+
label: `vcs-action:run-stacked:${a}`,
|
|
288
288
|
scheduler: G,
|
|
289
289
|
concurrency: {
|
|
290
290
|
mode: "serial",
|
|
291
|
-
key: () =>
|
|
291
|
+
key: () => a
|
|
292
292
|
},
|
|
293
293
|
execute: Ye("VcsAction.runStackedAction")(function* (t, r) {
|
|
294
|
-
if (
|
|
294
|
+
if (l === null) return yield* new cn({
|
|
295
295
|
operation: "run_change_request",
|
|
296
296
|
environmentId: n.environmentId,
|
|
297
297
|
cwd: n.cwd
|
|
298
298
|
});
|
|
299
|
-
let
|
|
300
|
-
r.set(
|
|
299
|
+
let a = On(l, t.actionId);
|
|
300
|
+
r.set(u, Sn({
|
|
301
301
|
operation: "run_change_request",
|
|
302
302
|
label: Cn,
|
|
303
303
|
actionId: t.actionId
|
|
304
304
|
}));
|
|
305
|
-
let
|
|
306
|
-
actionId:
|
|
307
|
-
cwd:
|
|
305
|
+
let o = {
|
|
306
|
+
actionId: a,
|
|
307
|
+
cwd: l.cwd,
|
|
308
308
|
action: t.action,
|
|
309
309
|
...t.commitMessage ? { commitMessage: t.commitMessage } : {},
|
|
310
310
|
...t.featureBranch ? { featureBranch: !0 } : {},
|
|
311
311
|
...t.filePaths?.length ? { filePaths: [...t.filePaths] } : {},
|
|
312
312
|
...t.threadId === void 0 ? {} : { threadId: t.threadId },
|
|
313
313
|
...t.projectId === void 0 ? {} : { projectId: t.projectId }
|
|
314
|
-
},
|
|
315
|
-
r.get(
|
|
314
|
+
}, d = xe(() => {
|
|
315
|
+
r.get(u).actionId === t.actionId && r.set(u, fn);
|
|
316
316
|
});
|
|
317
|
-
return yield* An(
|
|
318
|
-
target:
|
|
319
|
-
transportActionId:
|
|
317
|
+
return yield* An(i(l.environmentId, I(W.gitRunStackedAction, o)), {
|
|
318
|
+
target: l,
|
|
319
|
+
transportActionId: a,
|
|
320
320
|
actionId: t.actionId,
|
|
321
321
|
action: t.action,
|
|
322
322
|
onProgress: (e) => xe(() => {
|
|
323
|
-
let n = r.get(
|
|
324
|
-
if (n.actionId === t.actionId && (r.set(
|
|
323
|
+
let n = r.get(u);
|
|
324
|
+
if (n.actionId === t.actionId && (r.set(u, jn(n, e)), t.onProgress !== void 0)) try {
|
|
325
325
|
t.onProgress(e);
|
|
326
326
|
} catch {}
|
|
327
327
|
})
|
|
328
|
-
}).pipe(he(
|
|
329
|
-
let n = r.get(
|
|
330
|
-
n.actionId === t.actionId && n.isRunning && r.set(
|
|
331
|
-
})), ct(() =>
|
|
328
|
+
}).pipe(he(c, { authorize: (t, n, i) => s(e, n).authorize(r, t, i) }), Oe(ut(r, l)), V(() => d), Ce((e) => xe(() => {
|
|
329
|
+
let n = r.get(u);
|
|
330
|
+
n.actionId === t.actionId && n.isRunning && r.set(u, Dn("run_change_request", t.actionId, e));
|
|
331
|
+
})), ct(() => d));
|
|
332
332
|
})
|
|
333
333
|
});
|
|
334
|
-
return t.set(
|
|
334
|
+
return t.set(a, d), d;
|
|
335
335
|
}, r = (e, t, n) => {
|
|
336
336
|
let r = vn(t);
|
|
337
337
|
if (r === null) return;
|
|
@@ -343,7 +343,7 @@ function Mn(e) {
|
|
|
343
343
|
runStackedAction: (e) => n(e),
|
|
344
344
|
track: async (e, t, n, r) => {
|
|
345
345
|
let i = vn(t);
|
|
346
|
-
if (i === null) return
|
|
346
|
+
if (i === null) return k(Ze(new cn({
|
|
347
347
|
operation: n.operation,
|
|
348
348
|
environmentId: t.environmentId,
|
|
349
349
|
cwd: t.cwd
|
|
@@ -351,7 +351,7 @@ function Mn(e) {
|
|
|
351
351
|
let a = gn(i), o = Sn(n);
|
|
352
352
|
e.set(a, o);
|
|
353
353
|
let s = await r();
|
|
354
|
-
return e.get(a).actionId === o.actionId && (
|
|
354
|
+
return e.get(a).actionId === o.actionId && (ie(s) || Se(s.cause) ? e.set(a, fn) : e.get(a).actionId === o.actionId && e.set(a, Dn(n.operation, o.actionId, be(s.cause)))), s;
|
|
355
355
|
},
|
|
356
356
|
resetError: (e, t, n) => {
|
|
357
357
|
r(e, t, (e) => !e.isRunning && e.operation === n ? fn : e);
|
|
@@ -360,14 +360,14 @@ function Mn(e) {
|
|
|
360
360
|
}
|
|
361
361
|
// ../../packages/client-runtime/src/state/vcsStatusRevalidation.ts
|
|
362
362
|
function Nn(e) {
|
|
363
|
-
let t =
|
|
363
|
+
let t = h((t) => {
|
|
364
364
|
let { environmentId: n, cwd: r } = t, i = `${n}:${r}`, a = async (t) => {
|
|
365
|
-
let i = await
|
|
365
|
+
let i = await re(t, e.refreshStatus, {
|
|
366
366
|
environmentId: n,
|
|
367
367
|
input: { cwd: r }
|
|
368
368
|
}, { reportFailure: !1 });
|
|
369
369
|
e.onRefreshed?.(i);
|
|
370
|
-
}, o =
|
|
370
|
+
}, o = f((t) => {
|
|
371
371
|
let n = e.subscribeWake;
|
|
372
372
|
if (n === void 0) return;
|
|
373
373
|
let r = t.registry, i, o = n(() => {
|
|
@@ -378,20 +378,20 @@ function Nn(e) {
|
|
|
378
378
|
t.addFinalizer(() => {
|
|
379
379
|
i !== void 0 && clearTimeout(i), o();
|
|
380
380
|
});
|
|
381
|
-
}).pipe(
|
|
382
|
-
return
|
|
381
|
+
}).pipe(S(`vcs-status-revalidation:wake:${i}`));
|
|
382
|
+
return f((t) => {
|
|
383
383
|
t(o);
|
|
384
384
|
let r = e.connected;
|
|
385
385
|
r !== void 0 && t(r(n)) && a(t.registry);
|
|
386
|
-
}).pipe(
|
|
387
|
-
}), n =
|
|
386
|
+
}).pipe(S(`vcs-status-revalidation:${i}`));
|
|
387
|
+
}), n = f(void 0).pipe(S("vcs-status-revalidation:idle"));
|
|
388
388
|
return (e) => e === null ? n : t({
|
|
389
389
|
environmentId: e.environmentId,
|
|
390
390
|
cwd: e.cwd
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
// ../../packages/client-runtime/src/state/vcs.ts
|
|
394
|
-
var Pn =
|
|
394
|
+
var Pn = h((e) => f(0).pipe(v)), Fn = 100, In = 3e4, Ln = 1e4, Rn = ye("1 second").pipe(Je(({ duration: e }) => st(_e(e, pe(30)))));
|
|
395
395
|
function zn(e) {
|
|
396
396
|
return e.query === void 0 && e.cursor === void 0 && e.includeMatchingRemoteRefs === void 0 && e.refKind === void 0 && e.limit === Fn;
|
|
397
397
|
}
|
|
@@ -403,29 +403,29 @@ var Bn = Ye("CachedVcsRefsState.commitRefresh")(function* (e, t, n) {
|
|
|
403
403
|
return n.persist && (a ||= yield* t.clearVcsRefs(n.environmentId).pipe(ge(!0), Te((e) => H("Could not recover invalidated cached Git refs.").pipe(Ue({
|
|
404
404
|
environmentId: n.environmentId,
|
|
405
405
|
cwd: n.cwd,
|
|
406
|
-
...
|
|
406
|
+
...P(e)
|
|
407
407
|
}), ge(!1)))), yield* t.saveVcsRefs(n.environmentId, n.cwd, n.refs).pipe(Te((e) => H("Could not persist cached Git refs.").pipe(Ue({
|
|
408
408
|
environmentId: n.environmentId,
|
|
409
409
|
cwd: n.cwd,
|
|
410
|
-
...
|
|
410
|
+
...P(e)
|
|
411
411
|
})))), a !== i.persistedCacheReadable && e.update(r, (e) => e.revision === n.expectedRevision ? {
|
|
412
412
|
...e,
|
|
413
413
|
persistedCacheReadable: a
|
|
414
414
|
} : e)), !0;
|
|
415
415
|
}));
|
|
416
416
|
}), Vn = Ye("CachedVcsRefsState.makeChanges")(function* (e, t, n, r = !0) {
|
|
417
|
-
let i = yield*
|
|
417
|
+
let i = yield* w, a = yield* d, o = i.target.environmentId, s = zn(e), c = s && r ? yield* a.loadVcsRefs(o, e.cwd).pipe(Te((t) => H("Could not load cached Git refs.").pipe(Ue({
|
|
418
418
|
environmentId: o,
|
|
419
419
|
cwd: e.cwd,
|
|
420
|
-
...
|
|
420
|
+
...P(t)
|
|
421
421
|
}), ge(je())))) : je(), u = Ye("CachedVcsRefsState.refresh")(function* () {
|
|
422
|
-
let r = Pn(`${o.length}:${o}${e.cwd}`), c = t !== void 0 && n !== void 0 && t > n.get(r), l = yield*
|
|
422
|
+
let r = Pn(`${o.length}:${o}${e.cwd}`), c = t !== void 0 && n !== void 0 && t > n.get(r), l = yield* _(W.vcsListRefs, c ? {
|
|
423
423
|
...e,
|
|
424
424
|
refresh: !0
|
|
425
|
-
} : e).pipe(he(
|
|
425
|
+
} : e).pipe(he(w, i)), u = a.saveVcsRefs(o, e.cwd, l).pipe(Te((t) => H("Could not persist cached Git refs.").pipe(Ue({
|
|
426
426
|
environmentId: o,
|
|
427
427
|
cwd: e.cwd,
|
|
428
|
-
...
|
|
428
|
+
...P(t)
|
|
429
429
|
}))));
|
|
430
430
|
if (t === void 0 || n === void 0) return s && (yield* u), et(l);
|
|
431
431
|
let d = yield* Bn(n, a, {
|
|
@@ -436,118 +436,118 @@ var Bn = Ye("CachedVcsRefsState.commitRefresh")(function* (e, t, n) {
|
|
|
436
436
|
persist: s
|
|
437
437
|
});
|
|
438
438
|
return d && c && n.set(r, t), d ? et(l) : je();
|
|
439
|
-
}),
|
|
439
|
+
}), f = Re(st(c)).pipe(Le((e) => Be(e, {
|
|
440
440
|
onNone: () => $e,
|
|
441
441
|
onSome: rt
|
|
442
|
-
}))),
|
|
442
|
+
}))), p = l(i.session).pipe(Me(Ie), ke, we((t) => t === null ? Ke : Re(u().pipe(le({ EnvironmentRpcUnavailableError: () => fe }), Ce((t) => H("Could not refresh Git refs.").pipe(Ue({
|
|
443
443
|
environmentId: o,
|
|
444
444
|
cwd: e.cwd,
|
|
445
|
-
...
|
|
445
|
+
...P(t)
|
|
446
446
|
}))))).pipe(ce(Rn), Le((e) => Be(e, {
|
|
447
447
|
onNone: () => $e,
|
|
448
448
|
onSome: rt
|
|
449
449
|
})))));
|
|
450
|
-
return z(
|
|
450
|
+
return z(f, p);
|
|
451
451
|
});
|
|
452
452
|
function Hn(e, t, n, r) {
|
|
453
|
-
return
|
|
454
|
-
return yield* Vn(t, n, yield*
|
|
453
|
+
return j(e, De(Ae(function* () {
|
|
454
|
+
return yield* Vn(t, n, yield* E, r);
|
|
455
455
|
})));
|
|
456
456
|
}
|
|
457
457
|
function Un(e) {
|
|
458
|
-
let t =
|
|
458
|
+
let t = h((t) => {
|
|
459
459
|
let [n, r] = JSON.parse(t);
|
|
460
460
|
return e.atom((e) => {
|
|
461
461
|
let t = e(lt({ environmentId: n }));
|
|
462
462
|
return Hn(n, r, t.revision, t.persistedCacheReadable);
|
|
463
|
-
}).pipe(
|
|
463
|
+
}).pipe(A(In), S(`environment-data:vcs:list-refs:${t}`));
|
|
464
464
|
}), n = (e) => t(JSON.stringify([e.environmentId, e.input])), r = (e, t) => ut(t, {
|
|
465
465
|
environmentId: e.environmentId,
|
|
466
466
|
cwd: e.input.cwd
|
|
467
467
|
});
|
|
468
468
|
return {
|
|
469
469
|
listRefs: n,
|
|
470
|
-
readRefs:
|
|
470
|
+
readRefs: x(e, {
|
|
471
471
|
label: "environment-data:vcs:read-refs",
|
|
472
472
|
tag: W.vcsListRefs
|
|
473
473
|
}),
|
|
474
|
-
branch:
|
|
474
|
+
branch: T(e, {
|
|
475
475
|
label: "environment-data:vcs:branch",
|
|
476
476
|
idleTtlMs: Ln,
|
|
477
|
-
subscribe: (e) =>
|
|
477
|
+
subscribe: (e) => N(e)
|
|
478
478
|
}),
|
|
479
|
-
refreshBranch:
|
|
479
|
+
refreshBranch: x(e, {
|
|
480
480
|
label: "environment-data:vcs:refresh-branch",
|
|
481
481
|
tag: W.vcsRefreshBranch,
|
|
482
|
-
execute:
|
|
482
|
+
execute: m,
|
|
483
483
|
scheduler: G,
|
|
484
484
|
concurrency: ft
|
|
485
485
|
}),
|
|
486
|
-
status:
|
|
486
|
+
status: T(e, {
|
|
487
487
|
label: "environment-data:vcs:status",
|
|
488
488
|
idleTtlMs: Ln,
|
|
489
|
-
subscribe: (e) =>
|
|
489
|
+
subscribe: (e) => F(W.subscribeVcsStatus, e).pipe(it(() => null, (e, t) => {
|
|
490
490
|
let n = o(e, t);
|
|
491
491
|
return [n, [n]];
|
|
492
492
|
}))
|
|
493
493
|
}),
|
|
494
|
-
pull:
|
|
494
|
+
pull: x(e, {
|
|
495
495
|
label: "environment-data:vcs:pull",
|
|
496
496
|
tag: W.vcsPull,
|
|
497
497
|
scheduler: G,
|
|
498
498
|
concurrency: ft,
|
|
499
499
|
onSettled: r
|
|
500
500
|
}),
|
|
501
|
-
refreshStatus:
|
|
501
|
+
refreshStatus: x(e, {
|
|
502
502
|
label: "environment-data:vcs:refresh-status",
|
|
503
503
|
tag: W.vcsRefreshStatus,
|
|
504
504
|
scheduler: G,
|
|
505
505
|
concurrency: ft,
|
|
506
506
|
onSettled: r
|
|
507
507
|
}),
|
|
508
|
-
refreshLocalStatusForPicker:
|
|
508
|
+
refreshLocalStatusForPicker: x(e, {
|
|
509
509
|
label: "environment-data:vcs:refresh-local-status-for-picker",
|
|
510
510
|
tag: W.vcsRefreshStatus,
|
|
511
511
|
onSettled: r
|
|
512
512
|
}),
|
|
513
|
-
createWorktree:
|
|
513
|
+
createWorktree: x(e, {
|
|
514
514
|
label: "environment-data:vcs:create-worktree",
|
|
515
515
|
tag: W.vcsCreateWorktree,
|
|
516
516
|
scheduler: G,
|
|
517
517
|
concurrency: ft,
|
|
518
518
|
onSettled: r
|
|
519
519
|
}),
|
|
520
|
-
worktreeSetup:
|
|
520
|
+
worktreeSetup: L(e, {
|
|
521
521
|
label: "environment-data:vcs:worktree-setup",
|
|
522
522
|
tag: W.subscribeWorktreeSetup,
|
|
523
523
|
idleTtlMs: Ln
|
|
524
524
|
}),
|
|
525
|
-
cancelWorktreeSetup:
|
|
525
|
+
cancelWorktreeSetup: x(e, {
|
|
526
526
|
label: "environment-data:vcs:cancel-worktree-setup",
|
|
527
527
|
tag: W.worktreeSetupCancel
|
|
528
528
|
}),
|
|
529
|
-
removeWorktree:
|
|
529
|
+
removeWorktree: x(e, {
|
|
530
530
|
label: "environment-data:vcs:remove-worktree",
|
|
531
531
|
tag: W.vcsRemoveWorktree,
|
|
532
532
|
scheduler: G,
|
|
533
533
|
concurrency: ft,
|
|
534
534
|
onSettled: r
|
|
535
535
|
}),
|
|
536
|
-
createRef:
|
|
536
|
+
createRef: x(e, {
|
|
537
537
|
label: "environment-data:vcs:create-ref",
|
|
538
538
|
tag: W.vcsCreateRef,
|
|
539
539
|
scheduler: G,
|
|
540
540
|
concurrency: ft,
|
|
541
541
|
onSettled: r
|
|
542
542
|
}),
|
|
543
|
-
switchRef:
|
|
543
|
+
switchRef: x(e, {
|
|
544
544
|
label: "environment-data:vcs:switch-ref",
|
|
545
545
|
tag: W.vcsSwitchRef,
|
|
546
546
|
scheduler: G,
|
|
547
547
|
concurrency: ft,
|
|
548
548
|
onSettled: r
|
|
549
549
|
}),
|
|
550
|
-
init:
|
|
550
|
+
init: x(e, {
|
|
551
551
|
label: "environment-data:vcs:init",
|
|
552
552
|
tag: W.vcsInit,
|
|
553
553
|
scheduler: G,
|
|
@@ -594,8 +594,8 @@ function Zn(e) {
|
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
596
|
// src/state/vcs.ts
|
|
597
|
-
var Qn = Un(e), $n = Mn(e), er =
|
|
598
|
-
let t =
|
|
597
|
+
var Qn = Un(e), $n = Mn(e), er = h((e) => D(e, (e) => {
|
|
598
|
+
let t = y(e, () => null);
|
|
599
599
|
if (t === null) return null;
|
|
600
600
|
let { isRepo: n, refName: r, hasWorkingTreeChanges: i, pr: a } = t;
|
|
601
601
|
return {
|
|
@@ -604,7 +604,7 @@ var Qn = Un(e), $n = Mn(e), er = u((e) => i(e, (e) => {
|
|
|
604
604
|
hasWorkingTreeChanges: i,
|
|
605
605
|
pr: a
|
|
606
606
|
};
|
|
607
|
-
}).pipe(
|
|
607
|
+
}).pipe(ee(me))), tr = f(null), nr = Nn({
|
|
608
608
|
refreshStatus: Qn.refreshStatus,
|
|
609
609
|
subscribeWake: Zn,
|
|
610
610
|
wakeDebounceMs: 250
|
|
@@ -612,12 +612,12 @@ var Qn = Un(e), $n = Mn(e), er = u((e) => i(e, (e) => {
|
|
|
612
612
|
refreshStatus: Qn.refreshBranch,
|
|
613
613
|
subscribeWake: Zn,
|
|
614
614
|
wakeDebounceMs: 250
|
|
615
|
-
}), ir = 120, ar = 80, or = 120, sr = 500, cr = 3e4, lr = Ge(Xe), ur = 120, dr = 100, fr = [], pr = [], mr = [], hr = [void 0], gr = Object.freeze([]), _r =
|
|
615
|
+
}), ir = 120, ar = 80, or = 120, sr = 500, cr = 3e4, lr = Ge(Xe), ur = 120, dr = 100, fr = [], pr = [], mr = [], hr = [void 0], gr = Object.freeze([]), _r = f({
|
|
616
616
|
matches: gr,
|
|
617
617
|
isLoading: !1,
|
|
618
618
|
failed: !1,
|
|
619
619
|
rows: []
|
|
620
|
-
}).pipe(
|
|
620
|
+
}).pipe(S("web:thread-search:empty")), vr = h((e) => f((t) => t(gt.olderSettledAtom(e))?.before ?? null).pipe(S(`web:older-settled-before:${e}`))), yr = h((e) => f((t) => JSON.parse(e).some((e) => t(vr(e)) !== null)).pipe(S(`web:any-older-settled:${e}`))), br = bt({
|
|
621
621
|
getSearchAtom: (e, t) => t.olderSettledBefore === void 0 ? Mt.threadSearch({
|
|
622
622
|
environmentId: e,
|
|
623
623
|
input: t
|
|
@@ -641,18 +641,18 @@ function Sr(e, t, n) {
|
|
|
641
641
|
r[0] === n ? i = r[1] : (i = n === void 0 ? {} : n, r[0] = n, r[1] = i);
|
|
642
642
|
let a = i, o;
|
|
643
643
|
r[2] === t ? o = r[3] : (o = t.trim().slice(0, 200).trim(), r[2] = t, r[3] = o);
|
|
644
|
-
let s = o,
|
|
645
|
-
r[4] === e ?
|
|
646
|
-
let d =
|
|
644
|
+
let s = o, c = xr(s, ur), l;
|
|
645
|
+
r[4] === e ? l = r[5] : (l = yr(JSON.stringify(e)), r[4] = e, r[5] = l);
|
|
646
|
+
let d = u(l), f;
|
|
647
647
|
r[6] !== d || r[7] !== e.length || r[8] !== s || r[9] !== a ? (f = e.length > 0 && (a.titlesOnly !== !0 && ht(s).long.length > 0 || d && s.length >= 2), r[6] = d, r[7] = e.length, r[8] = s, r[9] = a, r[10] = f) : f = r[10];
|
|
648
|
-
let p = f, m = p && s ===
|
|
648
|
+
let p = f, m = p && s === c ? c : null, h;
|
|
649
649
|
r[11] !== e || r[12] !== a ? (h = (t) => xt(e, t, a), r[11] = e, r[12] = a, r[13] = h) : h = r[13];
|
|
650
650
|
let g = h, _, v;
|
|
651
651
|
if (r[14] !== g || r[15] !== m) {
|
|
652
652
|
let e = m === null ? null : g(m);
|
|
653
|
-
_ =
|
|
653
|
+
_ = u, v = e === null ? _r : br.results(e), r[14] = g, r[15] = m, r[16] = _, r[17] = v;
|
|
654
654
|
} else _ = r[16], v = r[17];
|
|
655
|
-
let y = _(v), b = p && (s !==
|
|
655
|
+
let y = _(v), b = p && (s !== c || y.isLoading), x = m !== null && !y.isLoading && y.failed, S;
|
|
656
656
|
r[18] !== y || r[19] !== m ? (S = m !== null && (!y.isLoading || y.matches.length > 0 || y.rows.length > 0) ? {
|
|
657
657
|
query: m,
|
|
658
658
|
matches: y.matches
|
|
@@ -667,18 +667,18 @@ function Sr(e, t, n) {
|
|
|
667
667
|
let O = E, k, A;
|
|
668
668
|
r[28] === O ? (k = r[29], A = r[30]) : (k = () => {
|
|
669
669
|
if (O === null) return;
|
|
670
|
-
let e = JSON.parse(O)[0].map((e) => vt.mountRows(
|
|
670
|
+
let e = JSON.parse(O)[0].map((e) => vt.mountRows(M, e, `search:${O}`, br.rows(O, e)));
|
|
671
671
|
return () => {
|
|
672
672
|
for (let t of e) t();
|
|
673
673
|
};
|
|
674
674
|
}, A = [O], r[28] = O, r[29] = k, r[30] = A), Xt(k, A);
|
|
675
|
-
let
|
|
676
|
-
return r[31] !== x || r[32] !== b || r[33] !== D.matches || r[34] !== D.query ? (
|
|
675
|
+
let j;
|
|
676
|
+
return r[31] !== x || r[32] !== b || r[33] !== D.matches || r[34] !== D.query ? (j = {
|
|
677
677
|
matches: D.matches,
|
|
678
678
|
query: D.query,
|
|
679
679
|
isPending: b,
|
|
680
680
|
failed: x
|
|
681
|
-
}, r[31] = x, r[32] = b, r[33] = D.matches, r[34] = D.query, r[35] =
|
|
681
|
+
}, r[31] = x, r[32] = b, r[33] = D.matches, r[34] = D.query, r[35] = j) : j = r[35], j;
|
|
682
682
|
}
|
|
683
683
|
function Cr(e, t) {
|
|
684
684
|
let [n, r, i] = JSON.parse(e);
|
|
@@ -692,9 +692,9 @@ function Cr(e, t) {
|
|
|
692
692
|
}
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
var wr =
|
|
695
|
+
var wr = f([]).pipe(S("web:vcs-ref-pages:empty")), Tr = h((e) => {
|
|
696
696
|
let [t, n] = JSON.parse(e), r = n.map((e) => Cr(t, e ?? void 0));
|
|
697
|
-
return
|
|
697
|
+
return f((e) => r.map((t) => e(t))).pipe(S(`web:vcs-ref-pages:${e}`));
|
|
698
698
|
});
|
|
699
699
|
function Er(e, r) {
|
|
700
700
|
let i = Y(32), a = r === void 0 ? n : r, o;
|
|
@@ -702,16 +702,16 @@ function Er(e, r) {
|
|
|
702
702
|
targetKey: null,
|
|
703
703
|
cursors: hr
|
|
704
704
|
}, i[0] = o) : o = i[0];
|
|
705
|
-
let [s,
|
|
706
|
-
if (i[1] !== d || i[2] !==
|
|
705
|
+
let [s, c] = J(o), { environmentId: l, cwd: d } = e, f, p, m;
|
|
706
|
+
if (i[1] !== d || i[2] !== l || i[3] !== s.cursors || i[4] !== s.targetKey || i[5] !== e.query) {
|
|
707
707
|
let t = e.query?.trim() ?? "";
|
|
708
|
-
m =
|
|
709
|
-
|
|
708
|
+
m = l !== null && d !== null ? JSON.stringify([
|
|
709
|
+
l,
|
|
710
710
|
d,
|
|
711
711
|
t
|
|
712
712
|
]) : null;
|
|
713
713
|
let n = s.targetKey === m ? s.cursors : hr, r = m === null ? null : JSON.stringify([m, n]);
|
|
714
|
-
f =
|
|
714
|
+
f = u, p = r === null ? wr : Tr(r), i[1] = d, i[2] = l, i[3] = s.cursors, i[4] = s.targetKey, i[5] = e.query, i[6] = f, i[7] = p, i[8] = m;
|
|
715
715
|
} else f = i[6], p = i[7], m = i[8];
|
|
716
716
|
let h = f(p), g;
|
|
717
717
|
if (i[9] !== h) {
|
|
@@ -736,14 +736,14 @@ function Er(e, r) {
|
|
|
736
736
|
} else v = i[13], y = i[14];
|
|
737
737
|
let b = y, x;
|
|
738
738
|
i[17] === m ? x = i[18] : (x = () => {
|
|
739
|
-
|
|
739
|
+
c({
|
|
740
740
|
targetKey: m,
|
|
741
741
|
cursors: hr
|
|
742
|
-
}), m !== null &&
|
|
742
|
+
}), m !== null && M.refresh(Cr(m, void 0));
|
|
743
743
|
}, i[17] = m, i[18] = x);
|
|
744
744
|
let S = x, C = _?.nextCursor, w;
|
|
745
745
|
i[19] !== C || i[20] !== m ? (w = () => {
|
|
746
|
-
m !== null && C != null &&
|
|
746
|
+
m !== null && C != null && c((e) => {
|
|
747
747
|
let t = e.targetKey === m ? e.cursors : hr;
|
|
748
748
|
return t.includes(C) ? {
|
|
749
749
|
targetKey: m,
|
|
@@ -777,7 +777,7 @@ function kr(e) {
|
|
|
777
777
|
return e.totalCount;
|
|
778
778
|
}
|
|
779
779
|
function Ar(e) {
|
|
780
|
-
let t =
|
|
780
|
+
let t = y(e, jr);
|
|
781
781
|
return t === null ? [] : [t];
|
|
782
782
|
}
|
|
783
783
|
function jr() {
|
|
@@ -2553,7 +2553,7 @@ var Ta = class e {
|
|
|
2553
2553
|
let t = _.text === "" ? { matches: [] } : o(y());
|
|
2554
2554
|
v.all = t.matches;
|
|
2555
2555
|
let n = v.all.length === 0;
|
|
2556
|
-
|
|
2556
|
+
I.disabled = n, L.disabled = n, n ? (S.textContent = K.t("noSearchResults"), S.dataset.noMatches = "", v.current = void 0, d(t)) : (delete S.dataset.noMatches, C(d(t, e))), x();
|
|
2557
2557
|
};
|
|
2558
2558
|
this.#o = T;
|
|
2559
2559
|
let E = (e, t) => {
|
|
@@ -2602,7 +2602,7 @@ var Ta = class e {
|
|
|
2602
2602
|
}
|
|
2603
2603
|
});
|
|
2604
2604
|
return r.ariaPressed = String(_[n]), r;
|
|
2605
|
-
}, N = M("case", K.t("matchCase"), "caseSensitive"),
|
|
2605
|
+
}, N = M("case", K.t("matchCase"), "caseSensitive"), P = M("whole-word", K.t("wholeWord"), "wholeWord"), F = M("regex", K.t("regularExpression"), "regex");
|
|
2606
2606
|
this.#n = q("input", {
|
|
2607
2607
|
type: "text",
|
|
2608
2608
|
placeholder: K.t("searchPlaceholder"),
|
|
@@ -2619,20 +2619,20 @@ var Ta = class e {
|
|
|
2619
2619
|
}), this.#u = (e) => {
|
|
2620
2620
|
this.#n.value !== e && (this.#n.value = e, v.current = void 0, E("text", e));
|
|
2621
2621
|
};
|
|
2622
|
-
let
|
|
2622
|
+
let ee = q("div", {
|
|
2623
2623
|
dataset: "searchToggles",
|
|
2624
2624
|
children: [
|
|
2625
2625
|
N,
|
|
2626
|
-
|
|
2627
|
-
|
|
2626
|
+
P,
|
|
2627
|
+
F
|
|
2628
2628
|
]
|
|
2629
|
-
}),
|
|
2629
|
+
}), te = q("div", {
|
|
2630
2630
|
dataset: {
|
|
2631
2631
|
inputBox: "",
|
|
2632
2632
|
find: ""
|
|
2633
2633
|
},
|
|
2634
|
-
children: [this.#n,
|
|
2635
|
-
}),
|
|
2634
|
+
children: [this.#n, ee]
|
|
2635
|
+
}), I = j({
|
|
2636
2636
|
icon: "arrow-up",
|
|
2637
2637
|
label: K.t("previousMatch"),
|
|
2638
2638
|
onClick: () => {
|
|
@@ -2645,10 +2645,10 @@ var Ta = class e {
|
|
|
2645
2645
|
D();
|
|
2646
2646
|
}
|
|
2647
2647
|
});
|
|
2648
|
-
|
|
2648
|
+
I.disabled = !0, L.disabled = !0;
|
|
2649
2649
|
let ne = q("div", {
|
|
2650
2650
|
dataset: "searchNav",
|
|
2651
|
-
children: [
|
|
2651
|
+
children: [I, L]
|
|
2652
2652
|
}), re = j({
|
|
2653
2653
|
icon: "close",
|
|
2654
2654
|
label: K.t("closeSearch"),
|
|
@@ -2702,7 +2702,7 @@ var Ta = class e {
|
|
|
2702
2702
|
},
|
|
2703
2703
|
children: [
|
|
2704
2704
|
se,
|
|
2705
|
-
|
|
2705
|
+
te,
|
|
2706
2706
|
ae,
|
|
2707
2707
|
oe,
|
|
2708
2708
|
S,
|
|
@@ -2806,7 +2806,7 @@ function Fa(e) {
|
|
|
2806
2806
|
let s = a === void 0 ? "default" : a, c = o !== void 0 && o, l;
|
|
2807
2807
|
t[6] !== n || t[7] !== c ? (l = te(!c && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] has-focus-visible:ring-inset not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", n) || void 0, t[6] = n, t[7] = c, t[8] = l) : l = t[8];
|
|
2808
2808
|
let u;
|
|
2809
|
-
t[9] !== r || t[10] !== i || t[11] !== s ? (u = /* @__PURE__ */ X(
|
|
2809
|
+
t[9] !== r || t[10] !== i || t[11] !== s ? (u = /* @__PURE__ */ X(g, { render: (e) => /* @__PURE__ */ X("textarea", {
|
|
2810
2810
|
className: te("field-sizing-content max-h-64 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none wrap-anywhere", i === void 0 && "min-h-17.5 max-sm:min-h-20.5", s === "sm" && "px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)]", s === "sm" && i === void 0 && "min-h-16.5 max-sm:min-h-19.5", s === "lg" && "py-[calc(--spacing(2)-1px)]", s === "lg" && i === void 0 && "min-h-18.5 max-sm:min-h-21.5"),
|
|
2811
2811
|
style: i === void 0 ? void 0 : { minHeight: `calc(${i}lh + 2 * (var(--spacing) * ${s === "sm" ? 1 : s === "lg" ? 2 : 1.5} - 1px))` },
|
|
2812
2812
|
"data-slot": "textarea",
|
|
@@ -2925,7 +2925,7 @@ function Ya(e, t) {
|
|
|
2925
2925
|
}, n[12] = d, n[13] = f, n[14] = p, n[15] = m) : m = n[15], m;
|
|
2926
2926
|
}
|
|
2927
2927
|
function Xa(e) {
|
|
2928
|
-
let n = Y(12), { candidate: r } = e, i =
|
|
2928
|
+
let n = Y(12), { candidate: r } = e, i = p(), a, o, s, c;
|
|
2929
2929
|
if (n[0] !== r.kind || n[1] !== r.state || n[2] !== i) {
|
|
2930
2930
|
let e = r.kind === "change-request" ? Ft({
|
|
2931
2931
|
state: r.state,
|
|
@@ -3012,68 +3012,68 @@ function $a(e, t) {
|
|
|
3012
3012
|
function eo(e) {
|
|
3013
3013
|
let t = Y(82), n, r, i, a, o, s, c, l, u;
|
|
3014
3014
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9]) : ({ref: l, value: u, onValueChange: s, completionScope: n, onKeyDown: a, onSelect: o, onFocus: i, onBlur: r, ...c} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u);
|
|
3015
|
-
let d =
|
|
3016
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3015
|
+
let d = p(), f = Zt(), [m, h] = J(null), [g, _] = J(null), [v, y] = J("bottom"), [b, x] = J(null), S;
|
|
3016
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
3017
3017
|
query: "",
|
|
3018
3018
|
index: 0
|
|
3019
|
-
}, t[10] =
|
|
3020
|
-
let [
|
|
3021
|
-
t[11] !==
|
|
3022
|
-
let
|
|
3023
|
-
t[16] === f ?
|
|
3024
|
-
let
|
|
3025
|
-
t[18] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3026
|
-
|
|
3027
|
-
}, t[18] =
|
|
3028
|
-
let
|
|
3029
|
-
t[19] !==
|
|
3030
|
-
if (
|
|
3031
|
-
let t = Ra(u,
|
|
3032
|
-
nn(() => s(t.text)),
|
|
3033
|
-
}, t[19] =
|
|
3034
|
-
let
|
|
3035
|
-
t[24] === l ?
|
|
3036
|
-
|
|
3037
|
-
}, t[24] = l, t[25] =
|
|
3038
|
-
let
|
|
3019
|
+
}, t[10] = S) : S = t[10];
|
|
3020
|
+
let [C, w] = J(S), T;
|
|
3021
|
+
t[11] !== g || t[12] !== n || t[13] !== c || t[14] !== u ? (T = n === null || g === null || c.readOnly ? null : La(u, g, n.support), t[11] = g, t[12] = n, t[13] = c, t[14] = u, t[15] = T) : T = t[15];
|
|
3022
|
+
let E = T, D = E !== null && E.rangeStart !== b, { completions: O, isPending: k, failed: A } = Ya(n, D ? E : null), j = E !== null && C.query === E.query ? Math.min(C.index, Math.max(0, O.length - 1)) : 0, M = D ? O[j] : void 0, N;
|
|
3023
|
+
t[16] === f ? N = t[17] : (N = (e) => `${f}-${e}`, t[16] = f, t[17] = N);
|
|
3024
|
+
let P = N, F;
|
|
3025
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (F = (e) => {
|
|
3026
|
+
y(Ka(e)), _(e.selectionStart === e.selectionEnd ? e.selectionStart : null);
|
|
3027
|
+
}, t[18] = F) : F = t[18];
|
|
3028
|
+
let ee = F, I;
|
|
3029
|
+
t[19] !== m || t[20] !== s || t[21] !== E || t[22] !== u ? (I = (e) => {
|
|
3030
|
+
if (E === null || m === null) return;
|
|
3031
|
+
let t = Ra(u, E, e.token);
|
|
3032
|
+
nn(() => s(t.text)), m.setSelectionRange(t.cursor, t.cursor), _(t.cursor);
|
|
3033
|
+
}, t[19] = m, t[20] = s, t[21] = E, t[22] = u, t[23] = I) : I = t[23];
|
|
3034
|
+
let L = I, ne;
|
|
3035
|
+
t[24] === l ? ne = t[25] : (ne = (e) => {
|
|
3036
|
+
h(e), $a(l, e);
|
|
3037
|
+
}, t[24] = l, t[25] = ne);
|
|
3038
|
+
let re = n === null ? void 0 : "combobox", ie = n === null ? void 0 : "list", ae = n === null ? void 0 : D, oe = D && O.length > 0 ? f : void 0, se = M ? P(M.token) : void 0, R;
|
|
3039
3039
|
t[26] === s ? R = t[27] : (R = (e) => {
|
|
3040
|
-
s(e.target.value),
|
|
3040
|
+
s(e.target.value), ee(e.target), x(null);
|
|
3041
3041
|
}, t[26] = s, t[27] = R);
|
|
3042
3042
|
let z;
|
|
3043
3043
|
t[28] === o ? z = t[29] : (z = (e) => {
|
|
3044
|
-
|
|
3044
|
+
ee(e.currentTarget), o?.(e);
|
|
3045
3045
|
}, t[28] = o, t[29] = z);
|
|
3046
3046
|
let B;
|
|
3047
3047
|
t[30] === i ? B = t[31] : (B = (e) => {
|
|
3048
|
-
|
|
3048
|
+
ee(e.currentTarget), i?.(e);
|
|
3049
3049
|
}, t[30] = i, t[31] = B);
|
|
3050
3050
|
let V;
|
|
3051
3051
|
t[32] === r ? V = t[33] : (V = (e) => {
|
|
3052
|
-
|
|
3052
|
+
_(null), r?.(e);
|
|
3053
3053
|
}, t[32] = r, t[33] = V);
|
|
3054
3054
|
let H;
|
|
3055
|
-
t[34] !==
|
|
3056
|
-
|
|
3057
|
-
if (e.key === "Escape") return
|
|
3058
|
-
if (
|
|
3055
|
+
t[34] !== M || t[35] !== j || t[36] !== O.length || t[37] !== a || t[38] !== D || t[39] !== L || t[40] !== E ? (H = (e) => {
|
|
3056
|
+
D && !e.nativeEvent.isComposing && e.nativeEvent.keyCode !== 229 && (() => {
|
|
3057
|
+
if (e.key === "Escape") return x(E.rangeStart), !0;
|
|
3058
|
+
if (O.length === 0) return !1;
|
|
3059
3059
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3060
3060
|
let t = e.key === "ArrowDown" ? 1 : -1;
|
|
3061
|
-
return
|
|
3062
|
-
query:
|
|
3063
|
-
index: (
|
|
3061
|
+
return w({
|
|
3062
|
+
query: E.query,
|
|
3063
|
+
index: (j + t + O.length) % O.length
|
|
3064
3064
|
}), !0;
|
|
3065
3065
|
}
|
|
3066
3066
|
let t = !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey;
|
|
3067
|
-
return (e.key === "Enter" || e.key === "Tab") && t &&
|
|
3067
|
+
return (e.key === "Enter" || e.key === "Tab") && t && M ? (L(M), !0) : !1;
|
|
3068
3068
|
})() ? (e.preventDefault(), e.stopPropagation()) : a?.(e);
|
|
3069
|
-
}, t[34] =
|
|
3069
|
+
}, t[34] = M, t[35] = j, t[36] = O.length, t[37] = a, t[38] = D, t[39] = L, t[40] = E, t[41] = H) : H = t[41];
|
|
3070
3070
|
let U;
|
|
3071
|
-
t[42] !== c || t[43] !== oe || t[44] !== se || t[45] !== R || t[46] !== z || t[47] !== B || t[48] !== V || t[49] !== H || t[50] !==
|
|
3071
|
+
t[42] !== c || t[43] !== oe || t[44] !== se || t[45] !== R || t[46] !== z || t[47] !== B || t[48] !== V || t[49] !== H || t[50] !== ne || t[51] !== re || t[52] !== ie || t[53] !== ae || t[54] !== u ? (U = /* @__PURE__ */ X(Fa, {
|
|
3072
3072
|
...c,
|
|
3073
|
-
ref:
|
|
3073
|
+
ref: ne,
|
|
3074
3074
|
value: u,
|
|
3075
|
-
role:
|
|
3076
|
-
"aria-autocomplete":
|
|
3075
|
+
role: re,
|
|
3076
|
+
"aria-autocomplete": ie,
|
|
3077
3077
|
"aria-expanded": ae,
|
|
3078
3078
|
"aria-controls": oe,
|
|
3079
3079
|
"aria-activedescendant": se,
|
|
@@ -3082,54 +3082,54 @@ function eo(e) {
|
|
|
3082
3082
|
onFocus: B,
|
|
3083
3083
|
onBlur: V,
|
|
3084
3084
|
onKeyDown: H
|
|
3085
|
-
}), t[42] = c, t[43] = oe, t[44] = se, t[45] = R, t[46] = z, t[47] = B, t[48] = V, t[49] = H, t[50] =
|
|
3085
|
+
}), t[42] = c, t[43] = oe, t[44] = se, t[45] = R, t[46] = z, t[47] = B, t[48] = V, t[49] = H, t[50] = ne, t[51] = re, t[52] = ie, t[53] = ae, t[54] = u, t[55] = U) : U = t[55];
|
|
3086
3086
|
let ce;
|
|
3087
|
-
t[56] !==
|
|
3088
|
-
e || t.event?.target ===
|
|
3089
|
-
}, t[56] =
|
|
3090
|
-
let le =
|
|
3091
|
-
t[59] !==
|
|
3087
|
+
t[56] !== m || t[57] !== E ? (ce = (e, t) => {
|
|
3088
|
+
e || t.event?.target === m || E !== null && x(E.rangeStart);
|
|
3089
|
+
}, t[56] = m, t[57] = E, t[58] = ce) : ce = t[58];
|
|
3090
|
+
let le = E?.kind === "reference" ? "md" : "sm", ue;
|
|
3091
|
+
t[59] !== j || t[60] !== O || t[61] !== A || t[62] !== k || t[63] !== f || t[64] !== d || t[65] !== P || t[66] !== L || t[67] !== E?.kind || t[68] !== E?.query ? (ue = O.length > 0 ? /* @__PURE__ */ X("div", {
|
|
3092
3092
|
id: f,
|
|
3093
3093
|
role: "listbox",
|
|
3094
|
-
"aria-label": d(Qa[
|
|
3094
|
+
"aria-label": d(Qa[E?.kind ?? "mention"].label),
|
|
3095
3095
|
className: "-mx-1.5",
|
|
3096
|
-
children:
|
|
3097
|
-
id:
|
|
3096
|
+
children: O.map((e, t) => /* @__PURE__ */ X("div", {
|
|
3097
|
+
id: P(e.token),
|
|
3098
3098
|
role: "option",
|
|
3099
|
-
"aria-selected": t ===
|
|
3100
|
-
className: te("flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm", t ===
|
|
3099
|
+
"aria-selected": t === j,
|
|
3100
|
+
className: te("flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm", t === j && "bg-accent text-accent-foreground"),
|
|
3101
3101
|
onMouseMove: () => {
|
|
3102
|
-
t !==
|
|
3103
|
-
query:
|
|
3102
|
+
t !== j && w({
|
|
3103
|
+
query: E?.query ?? "",
|
|
3104
3104
|
index: t
|
|
3105
3105
|
});
|
|
3106
3106
|
},
|
|
3107
3107
|
onMouseDown: to,
|
|
3108
|
-
onClick: () =>
|
|
3108
|
+
onClick: () => L(e),
|
|
3109
3109
|
children: /* @__PURE__ */ X(Za, { completion: e })
|
|
3110
3110
|
}, e.token))
|
|
3111
3111
|
}) : /* @__PURE__ */ X("p", {
|
|
3112
3112
|
className: "px-1 text-xs text-muted-foreground",
|
|
3113
|
-
children: d(Qa[
|
|
3114
|
-
}), t[59] =
|
|
3113
|
+
children: d(Qa[E?.kind ?? "mention"][k ? "pending" : A ? "failed" : "none"])
|
|
3114
|
+
}), t[59] = j, t[60] = O, t[61] = A, t[62] = k, t[63] = f, t[64] = d, t[65] = P, t[66] = L, t[67] = E?.kind, t[68] = E?.query, t[69] = ue) : ue = t[69];
|
|
3115
3115
|
let de;
|
|
3116
|
-
t[70] !==
|
|
3117
|
-
anchor:
|
|
3118
|
-
side:
|
|
3116
|
+
t[70] !== m || t[71] !== v || t[72] !== le || t[73] !== ue ? (de = /* @__PURE__ */ X(Dt, {
|
|
3117
|
+
anchor: m,
|
|
3118
|
+
side: v,
|
|
3119
3119
|
align: "start",
|
|
3120
3120
|
padding: "compact",
|
|
3121
3121
|
width: le,
|
|
3122
3122
|
initialFocus: !1,
|
|
3123
3123
|
finalFocus: !1,
|
|
3124
3124
|
children: ue
|
|
3125
|
-
}), t[70] =
|
|
3125
|
+
}), t[70] = m, t[71] = v, t[72] = le, t[73] = ue, t[74] = de) : de = t[74];
|
|
3126
3126
|
let fe;
|
|
3127
|
-
t[75] !==
|
|
3128
|
-
open:
|
|
3127
|
+
t[75] !== D || t[76] !== ce || t[77] !== de ? (fe = /* @__PURE__ */ X(Ot, {
|
|
3128
|
+
open: D,
|
|
3129
3129
|
modal: !1,
|
|
3130
3130
|
onOpenChange: ce,
|
|
3131
3131
|
children: de
|
|
3132
|
-
}), t[75] =
|
|
3132
|
+
}), t[75] = D, t[76] = ce, t[77] = de, t[78] = fe) : fe = t[78];
|
|
3133
3133
|
let pe;
|
|
3134
3134
|
return t[79] !== U || t[80] !== fe ? (pe = /* @__PURE__ */ tn(en, { children: [U, fe] }), t[79] = U, t[80] = fe, t[81] = pe) : pe = t[81], pe;
|
|
3135
3135
|
}
|
|
@@ -3142,38 +3142,38 @@ function no(e, t, n, r = !1) {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
// src/components/diffs/DiffCommentAnnotation.tsx
|
|
3144
3144
|
function ro(e) {
|
|
3145
|
-
let t = Y(19), { environmentId: n, projectId: r, ownerKey: i, kind:
|
|
3146
|
-
if (t[0] !==
|
|
3147
|
-
if (
|
|
3145
|
+
let t = Y(19), { environmentId: n, projectId: r, ownerKey: i, kind: o, rangeLabel: s, text: c, onTextChange: l, onCancel: u, onComment: d, onDelete: f, placeholder: m, submitLabel: h, pending: g, secondaryAction: _, focusOnMount: v, completionScope: y } = e, x = g !== void 0 && g, S = v === void 0 || v, w = y === void 0 ? null : y, T = a(), E = p(), [D, O] = J(""), k = o === "draft" && !l ? D : c, A = k.trim(), j = $t(null), M, N;
|
|
3146
|
+
if (t[0] !== S || t[1] !== o ? (M = () => {
|
|
3147
|
+
if (o !== "draft" || !S) return;
|
|
3148
3148
|
let e = window.requestAnimationFrame(() => {
|
|
3149
|
-
|
|
3149
|
+
j.current?.focus({ preventScroll: !0 });
|
|
3150
3150
|
});
|
|
3151
3151
|
return () => window.cancelAnimationFrame(e);
|
|
3152
|
-
},
|
|
3152
|
+
}, N = [S, o], t[0] = S, t[1] = o, t[2] = M, t[3] = N) : (M = t[2], N = t[3]), Qt(M, N), o === "comment") {
|
|
3153
3153
|
let e;
|
|
3154
3154
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ X(Ct, {
|
|
3155
3155
|
className: "size-3.5 h-5 shrink-0 text-primary/70",
|
|
3156
3156
|
"aria-hidden": "true"
|
|
3157
3157
|
}), t[4] = e) : e = t[4];
|
|
3158
3158
|
let n;
|
|
3159
|
-
t[5] ===
|
|
3159
|
+
t[5] === k ? n = t[6] : (n = It(k), t[5] = k, t[6] = n);
|
|
3160
3160
|
let r;
|
|
3161
|
-
t[7] !==
|
|
3161
|
+
t[7] !== k || t[8] !== n ? (r = /* @__PURE__ */ X("p", {
|
|
3162
3162
|
className: "min-w-0 flex-1 whitespace-pre-wrap text-sm leading-5",
|
|
3163
3163
|
dir: n,
|
|
3164
|
-
children:
|
|
3165
|
-
}), t[7] =
|
|
3164
|
+
children: k
|
|
3165
|
+
}), t[7] = k, t[8] = n, t[9] = r) : r = t[9];
|
|
3166
3166
|
let i;
|
|
3167
|
-
t[10] !==
|
|
3167
|
+
t[10] !== T || t[11] !== f ? (i = f ? /* @__PURE__ */ X("span", {
|
|
3168
3168
|
className: "-my-1 -mr-1 flex shrink-0 opacity-0 transition-opacity group-hover/comment:opacity-100 focus-within:opacity-100 max-sm:opacity-100",
|
|
3169
3169
|
children: /* @__PURE__ */ X(C, {
|
|
3170
3170
|
variant: "ghost-muted",
|
|
3171
3171
|
size: "icon-xs",
|
|
3172
|
-
"aria-label":
|
|
3173
|
-
onClick:
|
|
3172
|
+
"aria-label": T("Delete comment"),
|
|
3173
|
+
onClick: f,
|
|
3174
3174
|
children: /* @__PURE__ */ X(Et, { className: "size-3" })
|
|
3175
3175
|
})
|
|
3176
|
-
}) : null, t[10] =
|
|
3176
|
+
}) : null, t[10] = T, t[11] = f, t[12] = i) : i = t[12];
|
|
3177
3177
|
let a;
|
|
3178
3178
|
return t[13] !== r || t[14] !== i ? (a = /* @__PURE__ */ tn("div", {
|
|
3179
3179
|
"data-diff-comment-annotation": !0,
|
|
@@ -3187,62 +3187,62 @@ function ro(e) {
|
|
|
3187
3187
|
]
|
|
3188
3188
|
}), t[13] = r, t[14] = i, t[15] = a) : a = t[15], a;
|
|
3189
3189
|
}
|
|
3190
|
-
let
|
|
3191
|
-
t[16] !==
|
|
3190
|
+
let P;
|
|
3191
|
+
t[16] !== k || t[17] !== x ? (P = (e, t, n) => {
|
|
3192
3192
|
let r = n !== void 0 && n, i = (e) => {
|
|
3193
|
-
!
|
|
3193
|
+
!x && (r || e.trim()) && t(e.trim());
|
|
3194
3194
|
};
|
|
3195
|
-
e ? e.submitAfterDictation(i) : i(
|
|
3196
|
-
}, t[16] =
|
|
3197
|
-
let
|
|
3195
|
+
e ? e.submitAfterDictation(i) : i(k);
|
|
3196
|
+
}, t[16] = k, t[17] = x, t[18] = P) : P = t[18];
|
|
3197
|
+
let F = P, ee = (e) => /* @__PURE__ */ tn("div", {
|
|
3198
3198
|
"data-diff-comment-annotation": !0,
|
|
3199
3199
|
className: "px-3 py-2 font-sans text-foreground caret-foreground selection:bg-primary selection:text-primary-foreground",
|
|
3200
3200
|
contentEditable: !1,
|
|
3201
3201
|
onPointerDown: ao,
|
|
3202
3202
|
children: [/* @__PURE__ */ X(eo, {
|
|
3203
|
-
ref:
|
|
3204
|
-
completionScope:
|
|
3203
|
+
ref: j,
|
|
3204
|
+
completionScope: w,
|
|
3205
3205
|
readOnly: e?.freezesEditor,
|
|
3206
|
-
autoFocus:
|
|
3206
|
+
autoFocus: S,
|
|
3207
3207
|
size: "sm",
|
|
3208
|
-
value:
|
|
3209
|
-
dir: It(
|
|
3210
|
-
placeholder:
|
|
3211
|
-
"aria-label":
|
|
3212
|
-
onValueChange:
|
|
3208
|
+
value: k,
|
|
3209
|
+
dir: It(k),
|
|
3210
|
+
placeholder: m ?? T("Add a comment…"),
|
|
3211
|
+
"aria-label": T("Comment on lines {rangeLabel}", { rangeLabel: se(s, E) }),
|
|
3212
|
+
onValueChange: l ?? O,
|
|
3213
3213
|
onFocus: io,
|
|
3214
3214
|
onKeyDown: (t) => {
|
|
3215
|
-
t.key === "Escape" && (t.preventDefault(), e && e.state.phase !== "idle" ? e.cancel() :
|
|
3215
|
+
t.key === "Escape" && (t.preventDefault(), e && e.state.phase !== "idle" ? e.cancel() : u()), no(t, A, x, e?.blocksSubmission) && (t.preventDefault(), F(e, d));
|
|
3216
3216
|
}
|
|
3217
3217
|
}), /* @__PURE__ */ tn("div", {
|
|
3218
3218
|
className: "mt-1.5 flex flex-wrap items-center gap-1",
|
|
3219
3219
|
children: [
|
|
3220
3220
|
/* @__PURE__ */ X("span", {
|
|
3221
3221
|
className: "mr-auto text-3xs text-muted-foreground/70",
|
|
3222
|
-
children: /* @__PURE__ */ X(
|
|
3222
|
+
children: /* @__PURE__ */ X(b, { children: "⌘/Ctrl Enter to send" })
|
|
3223
3223
|
}),
|
|
3224
3224
|
e ? /* @__PURE__ */ X(Lt, {
|
|
3225
3225
|
speech: e,
|
|
3226
|
-
disabled:
|
|
3226
|
+
disabled: x
|
|
3227
3227
|
}) : null,
|
|
3228
3228
|
/* @__PURE__ */ X(C, {
|
|
3229
3229
|
variant: "ghost-muted",
|
|
3230
3230
|
size: "xs",
|
|
3231
|
-
onClick:
|
|
3232
|
-
children: /* @__PURE__ */ X(
|
|
3231
|
+
onClick: u,
|
|
3232
|
+
children: /* @__PURE__ */ X(b, { children: "Cancel" })
|
|
3233
3233
|
}),
|
|
3234
|
-
|
|
3234
|
+
_ ? /* @__PURE__ */ tn(C, {
|
|
3235
3235
|
size: "xs",
|
|
3236
3236
|
variant: "outline",
|
|
3237
|
-
disabled: e?.preparing ||
|
|
3238
|
-
onClick: () =>
|
|
3239
|
-
children: [
|
|
3237
|
+
disabled: e?.preparing || x || !e?.blocksSubmission && !_.allowEmpty && !A,
|
|
3238
|
+
onClick: () => F(e, _.onAction, _.allowEmpty),
|
|
3239
|
+
children: [_.icon, _.label]
|
|
3240
3240
|
}) : null,
|
|
3241
3241
|
/* @__PURE__ */ X(C, {
|
|
3242
3242
|
size: "xs",
|
|
3243
|
-
disabled: e?.preparing ||
|
|
3244
|
-
onClick: () =>
|
|
3245
|
-
children:
|
|
3243
|
+
disabled: e?.preparing || x || !e?.blocksSubmission && !A,
|
|
3244
|
+
onClick: () => F(e, d),
|
|
3245
|
+
children: h ?? T("Comment", { $context: "verb, submit button" })
|
|
3246
3246
|
})
|
|
3247
3247
|
]
|
|
3248
3248
|
})]
|
|
@@ -3250,11 +3250,11 @@ function ro(e) {
|
|
|
3250
3250
|
return n ? /* @__PURE__ */ X(zt, {
|
|
3251
3251
|
environmentId: n,
|
|
3252
3252
|
projectId: r,
|
|
3253
|
-
ownerKey: i ??
|
|
3254
|
-
text:
|
|
3255
|
-
textareaRef:
|
|
3256
|
-
onTextChange:
|
|
3257
|
-
disabled:
|
|
3253
|
+
ownerKey: i ?? s,
|
|
3254
|
+
text: k,
|
|
3255
|
+
textareaRef: j,
|
|
3256
|
+
onTextChange: l ?? O,
|
|
3257
|
+
disabled: x,
|
|
3258
3258
|
children: ee
|
|
3259
3259
|
}) : ee();
|
|
3260
3260
|
}
|