@burdenoff/fe-libs 2026.930.1 → 2026.930.2
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/shared/assistant/i18nManifest.d.ts +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1 -0
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.js +104 -104
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +7 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +91 -87
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.js +3 -2
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +2 -2
- package/dist/shared/assistant/ui/useWriteProposals.d.ts +6 -0
- package/dist/shared/assistant/ui/useWriteProposals.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useWriteProposals.js +11 -3
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +26 -6
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts.map +1 -1
- package/dist/shared/assistant/ui/writeProposalPresentation.js +23 -16
- package/dist/shared-assistant.js +92 -92
- package/package.json +1 -1
|
@@ -373,8 +373,8 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
373
373
|
readonly "writeProposal.status.declined": "Cancelled";
|
|
374
374
|
readonly "writeProposal.status.executing": "Working…";
|
|
375
375
|
readonly "writeProposal.status.expired": "Expired — nothing was done";
|
|
376
|
-
readonly "writeProposal.status.failed": "Didn't go through: {{error}}";
|
|
377
376
|
readonly "writeProposal.status.failedNoDetail": "Didn't go through";
|
|
377
|
+
readonly "writeProposal.status.failedNotPermitted": "Didn't go through — you don't have permission";
|
|
378
378
|
readonly "writeProposal.status.outcomeUnknown": "Couldn't confirm — check before trying again";
|
|
379
379
|
readonly "writeProposal.status.pending": "Waiting for you";
|
|
380
380
|
readonly "writeProposal.status.succeeded": "Done — {{summary}}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18nManifest.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/i18nManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAa1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0GG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"i18nManifest.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/i18nManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAa1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AiCzB"}
|
|
@@ -271,8 +271,8 @@ var p = {
|
|
|
271
271
|
"writeProposal.status.declined": "Cancelled",
|
|
272
272
|
"writeProposal.status.executing": "Working…",
|
|
273
273
|
"writeProposal.status.expired": "Expired — nothing was done",
|
|
274
|
-
"writeProposal.status.failed": "Didn't go through: {{error}}",
|
|
275
274
|
"writeProposal.status.failedNoDetail": "Didn't go through",
|
|
275
|
+
"writeProposal.status.failedNotPermitted": "Didn't go through — you don't have permission",
|
|
276
276
|
"writeProposal.status.outcomeUnknown": "Couldn't confirm — check before trying again",
|
|
277
277
|
"writeProposal.status.pending": "Waiting for you",
|
|
278
278
|
"writeProposal.status.succeeded": "Done — {{summary}}",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAkNf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAmHvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAkNf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAmHvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA4kJxD,CAAC"}
|
|
@@ -1424,6 +1424,7 @@ var Ln = ({ visible: Ln = !0, writeAccess: Rn = "unknown" }) => {
|
|
|
1424
1424
|
...Tr.dialog,
|
|
1425
1425
|
view: zi?.view ?? Tr.dialog.view,
|
|
1426
1426
|
serverNow: zi?.serverNow ?? NaN,
|
|
1427
|
+
arrivedAt: zi?.arrivedAt ?? NaN,
|
|
1427
1428
|
capabilities: zi ? Sr[zi.session.sandboxId] : null,
|
|
1428
1429
|
turnInFlight: K,
|
|
1429
1430
|
tr: P
|
|
@@ -41,6 +41,8 @@ export interface AssistantWriteConfirmDialogProps {
|
|
|
41
41
|
view: WriteProposalView | null;
|
|
42
42
|
/** The issuing sandbox's clock when `view` was read (`list().serverNow`). */
|
|
43
43
|
serverNow: number;
|
|
44
|
+
/** This device's clock when that read arrived (BOFF-8163). */
|
|
45
|
+
arrivedAt: number;
|
|
44
46
|
/** The ISSUING sandbox's `/health` write capabilities; absent = unknown. */
|
|
45
47
|
capabilities: SandboxWriteCapabilities | null | undefined;
|
|
46
48
|
/** A turn is running in this conversation: no decision can be made. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantWriteConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantWriteConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EAExB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAmB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,gCAAgC;IAC/C,mFAAmF;IACnF,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,YAAY,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1D,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,qDAAqD;IACrD,SAAS,EAAE,CACT,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,iBAAiB,KACvB,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,iEAAiE;IACjE,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAiBD,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CAUjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"AssistantWriteConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantWriteConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EAExB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAmB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,gCAAgC;IAC/C,mFAAmF;IACnF,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,YAAY,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1D,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,qDAAqD;IACrD,SAAS,EAAE,CACT,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,iBAAiB,KACvB,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,iEAAiE;IACjE,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAiBD,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CAUjC,CAAC"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { Button as e } from "../../../ui/button.js";
|
|
2
2
|
import { ModalShell as t } from "../../../ui/modal-shell.js";
|
|
3
3
|
import { usePrefersReducedMotion as n } from "./usePrefersReducedMotion.js";
|
|
4
|
-
import { WRITE_PROPOSAL_MASK as r, formatWriteProposalValue as
|
|
5
|
-
import { writeProposalUsesDialog as
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { Fragment as
|
|
4
|
+
import { WRITE_PROPOSAL_MASK as r, formatWriteProposalValue as ee, redactWriteProposalText as i, useWriteProposalRemainingMs as a, writeProposalArgumentValues as te, writeProposalConfirmState as ne, writeProposalCountdownText as re, writeProposalGatewayText as o, writeProposalKindText as ie, writeProposalRootFieldName as ae, writeProposalSensitiveTexts as oe, writeProposalVariableValues as s } from "./writeProposalPresentation.js";
|
|
5
|
+
import { writeProposalUsesDialog as c } from "./AssistantWriteProposalCard.js";
|
|
6
|
+
import { useEffect as l, useId as se, useRef as u, useState as d } from "react";
|
|
7
|
+
import { Fragment as ce, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
//#region src/shared/assistant/ui/AssistantWriteConfirmDialog.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
9
|
+
var m = 600;
|
|
10
|
+
function le(e) {
|
|
11
11
|
return e.includes("destructive") || e.includes("irreversible");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function ue(e) {
|
|
14
14
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var h = ({ view: e, ...t }) => !e || !c(e) ? null : /* @__PURE__ */ f(g, {
|
|
17
17
|
view: e,
|
|
18
18
|
...t
|
|
19
|
-
}, e.proposalId),
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
if (!
|
|
19
|
+
}, e.proposalId), g = ({ open: c, view: m, serverNow: h, arrivedAt: g, capabilities: de, turnInFlight: _, tr: v, onApprove: y, onDecline: fe, onPresented: b, onDismiss: x }) => {
|
|
20
|
+
let pe = n(), S = se(), C = `${S}-exactly`, w = u(null), T = m.status === "pending", E = a(m.expiresAt, h, g, c && T), D = E <= 0, { available: O, fenced: me, showControls: k, offerConfirm: A } = ne(m, de), j = u(null), [M, N] = d(!1), [P, he] = d(0), [F, I] = d(/* @__PURE__ */ new Set());
|
|
21
|
+
l(() => {
|
|
22
|
+
if (!c) {
|
|
23
23
|
j.current = null, N(!1);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
j.current = Date.now(), N(!1),
|
|
26
|
+
j.current = Date.now(), N(!1), he((e) => e + 1), I(/* @__PURE__ */ new Set());
|
|
27
27
|
let e = setTimeout(() => N(!0), 600);
|
|
28
28
|
return () => clearTimeout(e);
|
|
29
|
-
}, [
|
|
30
|
-
let L =
|
|
31
|
-
|
|
29
|
+
}, [c]);
|
|
30
|
+
let L = u(b);
|
|
31
|
+
l(() => {
|
|
32
32
|
L.current = b;
|
|
33
33
|
});
|
|
34
|
-
let R =
|
|
35
|
-
|
|
36
|
-
!
|
|
34
|
+
let R = u(0);
|
|
35
|
+
l(() => {
|
|
36
|
+
!c || P === 0 || !T || !O || R.current !== P && (R.current = P, L.current("modal"));
|
|
37
37
|
}, [
|
|
38
|
-
|
|
38
|
+
c,
|
|
39
39
|
P,
|
|
40
40
|
T,
|
|
41
41
|
O
|
|
42
42
|
]);
|
|
43
|
-
let z =
|
|
43
|
+
let z = u(null), [B, V] = d(null), H = (e, t) => {
|
|
44
44
|
if (z.current !== null) return;
|
|
45
45
|
z.current = e, V(e);
|
|
46
46
|
let n = () => {
|
|
@@ -51,197 +51,197 @@ var g = ({ view: e, ...t }) => !e || !l(e) ? null : /* @__PURE__ */ p(_, {
|
|
|
51
51
|
} catch (e) {
|
|
52
52
|
throw n(), e;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
}, U =
|
|
54
|
+
ue(r) && r.then(n, n);
|
|
55
|
+
}, U = u(!1), W = (e) => {
|
|
56
56
|
e.key === "Enter" && (e.preventDefault(), U.current = !0);
|
|
57
57
|
}, G = (e) => {
|
|
58
58
|
e.key === "Enter" && (U.current = !1);
|
|
59
59
|
}, K = () => {
|
|
60
60
|
U.current = !1;
|
|
61
|
-
}, q =
|
|
61
|
+
}, q = _ || B !== null, J = q || D || !M, ge = (e) => {
|
|
62
62
|
if (!e.isTrusted || U.current) return;
|
|
63
63
|
let t = j.current;
|
|
64
|
-
!M || t === null || Date.now() - t < 600 || !A || J || H("approve", () =>
|
|
65
|
-
},
|
|
66
|
-
U.current || !k || q || H("decline", () =>
|
|
67
|
-
},
|
|
64
|
+
!M || t === null || Date.now() - t < 600 || !A || J || H("approve", () => y("assistant_modal"));
|
|
65
|
+
}, _e = () => {
|
|
66
|
+
U.current || !k || q || H("decline", () => fe("user_declined", "assistant_modal"));
|
|
67
|
+
}, ve = (e) => {
|
|
68
68
|
let t = w.current;
|
|
69
69
|
!t || t.disabled || (e.preventDefault(), t.focus());
|
|
70
|
-
}, Y =
|
|
70
|
+
}, Y = oe(m), ye = i(m.description.readback.trim(), Y) || m.description.label, X = m.description.consequences.map((e) => i(e, Y)), Z = [...new Set(m.risk.kinds)].map((e) => ({
|
|
71
71
|
kind: e,
|
|
72
|
-
text: ie(e,
|
|
73
|
-
})).filter((e) => !!e.text), Q =
|
|
72
|
+
text: ie(e, v)
|
|
73
|
+
})).filter((e) => !!e.text), Q = s(m), be = m.description.confirmLabel.trim() || v("writeProposal.confirmFallback", "Confirm this change"), xe = (e) => I((t) => {
|
|
74
74
|
let n = new Set(t);
|
|
75
75
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
76
|
-
}), $ = (e, t) => /* @__PURE__ */
|
|
76
|
+
}), $ = (e, t) => /* @__PURE__ */ f("dl", {
|
|
77
77
|
className: "mt-1 grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",
|
|
78
78
|
children: e.map((e, n) => {
|
|
79
|
-
let
|
|
80
|
-
return /* @__PURE__ */
|
|
79
|
+
let i = `${S}-${t}-${n}`, a = e.sensitive && !F.has(e.key);
|
|
80
|
+
return /* @__PURE__ */ p("div", {
|
|
81
81
|
className: "contents",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
id:
|
|
82
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
83
|
+
id: i,
|
|
84
84
|
className: "truncate text-text-muted",
|
|
85
85
|
children: e.label
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ f("dd", {
|
|
87
87
|
className: "min-w-0",
|
|
88
|
-
children: /* @__PURE__ */
|
|
88
|
+
children: /* @__PURE__ */ p("span", {
|
|
89
89
|
className: "inline-flex min-w-0 flex-wrap items-baseline gap-x-2",
|
|
90
|
-
children: [
|
|
90
|
+
children: [a ? /* @__PURE__ */ p("span", {
|
|
91
91
|
"data-testid": "assistant-write-confirm-masked",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ f("span", {
|
|
93
93
|
"aria-hidden": "true",
|
|
94
94
|
className: "font-mono text-text-muted",
|
|
95
95
|
children: r
|
|
96
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ f("span", {
|
|
97
97
|
className: "sr-only",
|
|
98
|
-
children:
|
|
98
|
+
children: v("writeProposal.hiddenValue", "Hidden value")
|
|
99
99
|
})]
|
|
100
|
-
}) : /* @__PURE__ */
|
|
100
|
+
}) : /* @__PURE__ */ f("span", {
|
|
101
101
|
className: "min-w-0 whitespace-pre-wrap break-words font-medium text-text-primary",
|
|
102
|
-
children:
|
|
103
|
-
}), e.sensitive ? /* @__PURE__ */
|
|
102
|
+
children: ee(e.value)
|
|
103
|
+
}), e.sensitive ? /* @__PURE__ */ f("button", {
|
|
104
104
|
type: "button",
|
|
105
|
-
onClick: () =>
|
|
106
|
-
"aria-pressed": !
|
|
107
|
-
"aria-describedby":
|
|
105
|
+
onClick: () => xe(e.key),
|
|
106
|
+
"aria-pressed": !a,
|
|
107
|
+
"aria-describedby": i,
|
|
108
108
|
className: "rounded text-[11px] font-medium text-text-link underline focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
109
109
|
"data-testid": "assistant-write-confirm-reveal",
|
|
110
|
-
children:
|
|
110
|
+
children: a ? v("writeProposal.showValue", "Show") : v("writeProposal.hideValue", "Hide")
|
|
111
111
|
}) : null]
|
|
112
112
|
})
|
|
113
113
|
})]
|
|
114
114
|
}, `${n}:${e.key}`);
|
|
115
115
|
})
|
|
116
|
-
}),
|
|
116
|
+
}), Se = k ? /* @__PURE__ */ p(ce, { children: [/* @__PURE__ */ f(e, {
|
|
117
117
|
ref: w,
|
|
118
118
|
variant: "outline",
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: _e,
|
|
120
120
|
onKeyDown: W,
|
|
121
121
|
onKeyUp: G,
|
|
122
122
|
onBlur: K,
|
|
123
123
|
disabled: q,
|
|
124
124
|
"data-testid": "assistant-write-confirm-cancel",
|
|
125
|
-
children:
|
|
126
|
-
}), A ? /* @__PURE__ */
|
|
127
|
-
variant:
|
|
128
|
-
onClick:
|
|
125
|
+
children: v("writeProposal.cancel", "Cancel")
|
|
126
|
+
}), A ? /* @__PURE__ */ f(e, {
|
|
127
|
+
variant: le(m.risk.kinds) ? "destructive" : "default",
|
|
128
|
+
onClick: ge,
|
|
129
129
|
onKeyDown: W,
|
|
130
130
|
onKeyUp: G,
|
|
131
131
|
onBlur: K,
|
|
132
132
|
disabled: J,
|
|
133
133
|
"data-testid": "assistant-write-confirm-confirm",
|
|
134
|
-
children: B === "approve" ?
|
|
135
|
-
}) : null] }) : /* @__PURE__ */
|
|
134
|
+
children: B === "approve" ? v("writeProposal.confirming", "Confirming…") : be
|
|
135
|
+
}) : null] }) : /* @__PURE__ */ f(e, {
|
|
136
136
|
ref: w,
|
|
137
137
|
variant: "outline",
|
|
138
138
|
onClick: x,
|
|
139
139
|
"data-testid": "assistant-write-confirm-close",
|
|
140
|
-
children:
|
|
140
|
+
children: v("writeProposal.dialog.close", "Close")
|
|
141
141
|
});
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
open:
|
|
142
|
+
return /* @__PURE__ */ f(t, {
|
|
143
|
+
open: c,
|
|
144
144
|
onClose: x,
|
|
145
145
|
role: "alertdialog",
|
|
146
|
-
onOpenAutoFocus:
|
|
146
|
+
onOpenAutoFocus: ve,
|
|
147
147
|
testId: "assistant-write-confirm-dialog",
|
|
148
148
|
size: "md",
|
|
149
|
-
title:
|
|
150
|
-
description:
|
|
151
|
-
footer:
|
|
152
|
-
children: /* @__PURE__ */
|
|
149
|
+
title: v("writeProposal.dialog.title", "Confirm this change"),
|
|
150
|
+
description: ye,
|
|
151
|
+
footer: Se,
|
|
152
|
+
children: /* @__PURE__ */ p("div", {
|
|
153
153
|
className: "space-y-3 text-sm text-text-primary",
|
|
154
154
|
"data-testid": "assistant-write-confirm-body",
|
|
155
|
-
"data-status":
|
|
155
|
+
"data-status": m.status,
|
|
156
156
|
children: [
|
|
157
|
-
Z.length > 0 ? /* @__PURE__ */
|
|
157
|
+
Z.length > 0 ? /* @__PURE__ */ f("ul", {
|
|
158
158
|
className: "flex flex-wrap gap-1",
|
|
159
159
|
"data-testid": "assistant-write-confirm-kinds",
|
|
160
|
-
children: Z.map(({ kind: e, text: t }) => /* @__PURE__ */
|
|
160
|
+
children: Z.map(({ kind: e, text: t }) => /* @__PURE__ */ f("li", {
|
|
161
161
|
className: "rounded-full border border-status-error-border bg-status-error-bg px-2 py-0.5 text-[11px] font-medium text-status-error-text",
|
|
162
162
|
children: t
|
|
163
163
|
}, e))
|
|
164
164
|
}) : null,
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ p("section", {
|
|
166
166
|
"aria-labelledby": C,
|
|
167
167
|
className: "space-y-2 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2",
|
|
168
168
|
"data-testid": "assistant-write-confirm-exactly",
|
|
169
169
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ f("h3", {
|
|
171
171
|
id: C,
|
|
172
172
|
className: "text-xs font-semibold text-text-secondary",
|
|
173
|
-
children:
|
|
173
|
+
children: v("writeProposal.dialog.exactly", "Exactly what will happen")
|
|
174
174
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ f("p", {
|
|
176
176
|
className: "text-xs text-text-secondary",
|
|
177
|
-
children:
|
|
177
|
+
children: o(m, v)
|
|
178
178
|
}),
|
|
179
|
-
|
|
180
|
-
let n =
|
|
181
|
-
return /* @__PURE__ */
|
|
179
|
+
m.description.rootFields.map((e, t) => {
|
|
180
|
+
let n = te(e);
|
|
181
|
+
return /* @__PURE__ */ p("div", {
|
|
182
182
|
"data-testid": "assistant-write-confirm-field",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ f("p", {
|
|
184
184
|
className: "break-words font-mono text-xs text-text-primary",
|
|
185
185
|
children: ae(e)
|
|
186
186
|
}), n.length > 0 ? $(n, `field${t}`) : null]
|
|
187
187
|
}, `${t}:${e.alias ?? e.field}`);
|
|
188
188
|
}),
|
|
189
|
-
Q.length > 0 ? /* @__PURE__ */
|
|
189
|
+
Q.length > 0 ? /* @__PURE__ */ p("div", {
|
|
190
190
|
"data-testid": "assistant-write-confirm-variables",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ f("p", {
|
|
192
192
|
className: "text-[11px] font-medium text-text-secondary",
|
|
193
|
-
children:
|
|
193
|
+
children: v("writeProposal.values", "Values")
|
|
194
194
|
}), $(Q, "vars")]
|
|
195
195
|
}) : null,
|
|
196
|
-
|
|
196
|
+
m.description.variablesOmitted ? /* @__PURE__ */ f("p", {
|
|
197
197
|
className: "text-[11px] text-text-muted",
|
|
198
|
-
children:
|
|
198
|
+
children: v("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: m.description.variablesOmitted })
|
|
199
199
|
}) : null,
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ f("p", {
|
|
201
201
|
className: "text-xs text-text-secondary",
|
|
202
202
|
"data-testid": "assistant-write-confirm-target-count",
|
|
203
|
-
children:
|
|
203
|
+
children: v("writeProposal.targetCount", "Items affected: {{count}}", { count: m.description.targetCount })
|
|
204
204
|
})
|
|
205
205
|
]
|
|
206
206
|
}),
|
|
207
|
-
X.length > 0 ? /* @__PURE__ */
|
|
207
|
+
X.length > 0 ? /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
208
208
|
className: "text-[11px] font-medium text-text-secondary",
|
|
209
|
-
children:
|
|
210
|
-
}), /* @__PURE__ */
|
|
209
|
+
children: v("writeProposal.consequences", "What this will do")
|
|
210
|
+
}), /* @__PURE__ */ f("ul", {
|
|
211
211
|
className: "list-disc pl-4 text-xs text-text-primary",
|
|
212
212
|
"data-testid": "assistant-write-confirm-consequences",
|
|
213
|
-
children: X.map((e, t) => /* @__PURE__ */
|
|
213
|
+
children: X.map((e, t) => /* @__PURE__ */ f("li", { children: e }, t))
|
|
214
214
|
})] }) : null,
|
|
215
|
-
|
|
215
|
+
m.repeatOf ? /* @__PURE__ */ f("p", {
|
|
216
216
|
className: "text-xs text-status-warning-text",
|
|
217
|
-
children:
|
|
217
|
+
children: v("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
|
|
218
218
|
}) : null,
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ p("div", {
|
|
220
220
|
className: "space-y-1 text-[11px]",
|
|
221
221
|
children: [
|
|
222
|
-
T ? /* @__PURE__ */
|
|
222
|
+
T ? /* @__PURE__ */ f("p", {
|
|
223
223
|
className: "text-text-secondary",
|
|
224
224
|
"data-testid": "assistant-write-confirm-countdown",
|
|
225
|
-
children: D ?
|
|
226
|
-
}) : /* @__PURE__ */
|
|
225
|
+
children: D ? v("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : re(E, pe, v)
|
|
226
|
+
}) : /* @__PURE__ */ f("p", {
|
|
227
227
|
className: "text-text-secondary",
|
|
228
228
|
"data-testid": "assistant-write-confirm-no-longer-pending",
|
|
229
|
-
children:
|
|
229
|
+
children: v("writeProposal.dialog.noLongerPending", "This change can no longer be confirmed here.")
|
|
230
230
|
}),
|
|
231
|
-
T && !O ? /* @__PURE__ */
|
|
231
|
+
T && !O ? /* @__PURE__ */ f("p", {
|
|
232
232
|
className: "text-text-secondary",
|
|
233
|
-
children:
|
|
234
|
-
}) : T && !
|
|
233
|
+
children: v("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
|
|
234
|
+
}) : T && !m.approvable ? /* @__PURE__ */ f("p", {
|
|
235
235
|
className: "text-text-secondary",
|
|
236
|
-
children:
|
|
237
|
-
}) : T &&
|
|
236
|
+
children: v("writeProposal.notApprovable", "This change isn't ready to confirm. If it stays this way, ask the assistant to prepare it again.")
|
|
237
|
+
}) : T && me ? /* @__PURE__ */ f("p", {
|
|
238
238
|
className: "text-text-secondary",
|
|
239
239
|
"data-testid": "assistant-write-confirm-fenced",
|
|
240
|
-
children:
|
|
240
|
+
children: v("writeProposal.executionFenced", "You can review or cancel this change. Running it from the assistant becomes available once secure confirmation is enabled.")
|
|
241
241
|
}) : null,
|
|
242
|
-
k &&
|
|
242
|
+
k && _ ? /* @__PURE__ */ f("p", {
|
|
243
243
|
className: "text-text-muted",
|
|
244
|
-
children:
|
|
244
|
+
children: v("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
|
|
245
245
|
}) : null
|
|
246
246
|
]
|
|
247
247
|
})
|
|
@@ -250,4 +250,4 @@ var g = ({ view: e, ...t }) => !e || !l(e) ? null : /* @__PURE__ */ p(_, {
|
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
252
|
//#endregion
|
|
253
|
-
export {
|
|
253
|
+
export { h as AssistantWriteConfirmDialog, m as WRITE_CONFIRM_ARM_MS };
|
|
@@ -38,6 +38,13 @@ export interface AssistantWriteProposalCardProps {
|
|
|
38
38
|
* The countdown corrects for the difference from this device's clock.
|
|
39
39
|
*/
|
|
40
40
|
serverNow: number;
|
|
41
|
+
/**
|
|
42
|
+
* This device's clock when the read carrying `serverNow` ARRIVED
|
|
43
|
+
* (BOFF-8163). The countdown measures the time passed since that read from
|
|
44
|
+
* it, so a card drawn long after the read (the voice tray, a reopened
|
|
45
|
+
* conversation) is not given that time back.
|
|
46
|
+
*/
|
|
47
|
+
arrivedAt: number;
|
|
41
48
|
/** The ISSUING sandbox's `/health` write capabilities; absent = unknown. */
|
|
42
49
|
capabilities: SandboxWriteCapabilities | null | undefined;
|
|
43
50
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantWriteProposalCard.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantWriteProposalCard.tsx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