@burdenoff/fe-libs 2026.1027.13 → 2026.1027.14
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/index.d.ts +1 -0
- package/dist/shared/assistant/ui/AssistantAiDisclaimer.d.ts +26 -0
- package/dist/shared/assistant/ui/AssistantAiDisclaimer.js +13 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1176 -1174
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +159 -154
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +194 -192
- package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +7 -0
- package/dist/shared/providers/shell/useAssistantShellLabels.js +4 -1
- package/dist/shared-assistant.js +196 -195
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { usePrefersReducedMotion as e } from "./usePrefersReducedMotion.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { AssistantAiDisclaimer as t } from "./AssistantAiDisclaimer.js";
|
|
3
|
+
import { WRITE_PROPOSAL_MASK as n, formatWriteProposalValue as r, redactWriteProposalText as i, useWriteProposalRemainingMs as a, writeProposalArgumentValues as o, writeProposalConfirmState as ee, writeProposalCountdownText as te, writeProposalGatewayText as s, writeProposalKindText as ne, writeProposalRootFieldName as re, writeProposalSensitiveTexts as c, writeProposalVariableValues as l } from "./writeProposalPresentation.js";
|
|
4
|
+
import { useEffect as u, useId as ie, useRef as d, useState as f } from "react";
|
|
5
|
+
import { ShieldAlert as ae } from "lucide-react";
|
|
6
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
6
7
|
//#region src/shared/assistant/ui/AssistantWriteProposalCard.tsx
|
|
7
|
-
var
|
|
8
|
+
var h = new Set([
|
|
8
9
|
"destructive",
|
|
9
10
|
"financial",
|
|
10
11
|
"bulk",
|
|
@@ -12,10 +13,10 @@ var g = new Set([
|
|
|
12
13
|
"credential",
|
|
13
14
|
"irreversible"
|
|
14
15
|
]);
|
|
15
|
-
function
|
|
16
|
-
return e.description.confirmSurface.kind === "dialog" || e.risk.kinds.some((e) =>
|
|
16
|
+
function g(e) {
|
|
17
|
+
return e.description.confirmSurface.kind === "dialog" || e.risk.kinds.some((e) => h.has(e));
|
|
17
18
|
}
|
|
18
|
-
var
|
|
19
|
+
var _ = 500, oe = [
|
|
19
20
|
0,
|
|
20
21
|
.1,
|
|
21
22
|
.2,
|
|
@@ -27,30 +28,30 @@ var v = 500, ie = [
|
|
|
27
28
|
.8,
|
|
28
29
|
.9,
|
|
29
30
|
1
|
|
30
|
-
],
|
|
31
|
+
], v = new Set([
|
|
31
32
|
"FORBIDDEN",
|
|
32
33
|
"PERMISSION_DENIED",
|
|
33
34
|
"HTTP_403"
|
|
34
35
|
]);
|
|
35
|
-
function
|
|
36
|
-
return (e.result?.errors ?? []).some((e) => e.code !== void 0 &&
|
|
36
|
+
function y(e) {
|
|
37
|
+
return (e.result?.errors ?? []).some((e) => e.code !== void 0 && v.has(e.code));
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function b(e, t) {
|
|
39
40
|
switch (e.status) {
|
|
40
41
|
case "pending": return t("writeProposal.status.pending", "Waiting for you");
|
|
41
42
|
case "executing": return t("writeProposal.status.executing", "Working…");
|
|
42
43
|
case "succeeded": {
|
|
43
|
-
let n =
|
|
44
|
+
let n = i((e.result?.summary || e.description.readbackPast).trim(), c(e));
|
|
44
45
|
return n ? t("writeProposal.status.succeeded", "Done — {{summary}}", { summary: n }) : t("writeProposal.status.succeededNoDetail", "Done");
|
|
45
46
|
}
|
|
46
|
-
case "failed": return
|
|
47
|
+
case "failed": return y(e) ? t("writeProposal.status.failedNotPermitted", "Didn't go through — you don't have permission") : t("writeProposal.status.failedNoDetail", "Didn't go through");
|
|
47
48
|
case "outcome_unknown": return t("writeProposal.status.outcomeUnknown", "Couldn't confirm — check before trying again");
|
|
48
49
|
case "declined": return t("writeProposal.status.declined", "Cancelled");
|
|
49
50
|
case "superseded": return t("writeProposal.status.superseded", "Replaced — the conversation moved on");
|
|
50
51
|
case "expired": return t("writeProposal.status.expired", "Expired — nothing was done");
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function se(e) {
|
|
54
55
|
switch (e.status) {
|
|
55
56
|
case "pending":
|
|
56
57
|
case "outcome_unknown": return "border-status-warning-border bg-status-warning-bg text-status-warning-text";
|
|
@@ -62,7 +63,7 @@ function ae(e) {
|
|
|
62
63
|
case "expired": return "border-border-subtle bg-bg-muted text-text-secondary";
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function x(e, t) {
|
|
66
67
|
return [
|
|
67
68
|
{
|
|
68
69
|
key: "label",
|
|
@@ -76,18 +77,18 @@ function S(e, t) {
|
|
|
76
77
|
value: s(e, t),
|
|
77
78
|
sensitive: !1
|
|
78
79
|
},
|
|
79
|
-
...e.description.rootFields.flatMap((e) =>
|
|
80
|
+
...e.description.rootFields.flatMap((e) => o(e).map((t) => ({
|
|
80
81
|
...t,
|
|
81
82
|
label: `${e.alias ?? e.field}.${t.label}`
|
|
82
83
|
}))),
|
|
83
|
-
...
|
|
84
|
+
...l(e)
|
|
84
85
|
];
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
-
let i = new Map(
|
|
87
|
+
function ce(e, t, n) {
|
|
88
|
+
let i = new Map(x(e, n).map((e) => [e.key, e])), a = x(t, n), o = [];
|
|
88
89
|
for (let e of a) {
|
|
89
90
|
let t = i.get(e.key) ?? null;
|
|
90
|
-
i.delete(e.key), (!t ||
|
|
91
|
+
i.delete(e.key), (!t || r(t.value) !== r(e.value)) && o.push({
|
|
91
92
|
key: e.key,
|
|
92
93
|
label: e.label,
|
|
93
94
|
before: t,
|
|
@@ -102,21 +103,21 @@ function oe(e, t, r) {
|
|
|
102
103
|
});
|
|
103
104
|
return o;
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function le(e) {
|
|
106
107
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
107
108
|
}
|
|
108
|
-
var
|
|
109
|
-
let
|
|
110
|
-
proposalId:
|
|
109
|
+
var S = ({ view: h, serverNow: _, arrivedAt: v, capabilities: y, inert: x = !1, turnInFlight: S, tr: C, onApprove: w, onDecline: T, onReview: ue, onPresented: E, previous: D }) => {
|
|
110
|
+
let de = e(), fe = ie(), O = d(null), k = h.status === "pending", A = a(h.expiresAt, _, v, k), j = A <= 0, [M, pe] = f({
|
|
111
|
+
proposalId: h.proposalId,
|
|
111
112
|
keys: /* @__PURE__ */ new Set()
|
|
112
|
-
}),
|
|
113
|
-
let n = new Set(t.proposalId ===
|
|
113
|
+
}), me = M.proposalId === h.proposalId ? M.keys : /* @__PURE__ */ new Set(), he = (e) => pe((t) => {
|
|
114
|
+
let n = new Set(t.proposalId === h.proposalId ? t.keys : []);
|
|
114
115
|
return n.has(e) ? n.delete(e) : n.add(e), {
|
|
115
|
-
proposalId:
|
|
116
|
+
proposalId: h.proposalId,
|
|
116
117
|
keys: n
|
|
117
118
|
};
|
|
118
|
-
}), N =
|
|
119
|
-
let n =
|
|
119
|
+
}), N = d(null), [P, F] = f(null), I = P?.proposalId === h.proposalId ? P.action : null, L = (e, t) => {
|
|
120
|
+
let n = h.proposalId;
|
|
120
121
|
if (N.current?.proposalId === n) return;
|
|
121
122
|
let r = {
|
|
122
123
|
proposalId: n,
|
|
@@ -131,14 +132,14 @@ var w = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: S = !1,
|
|
|
131
132
|
} catch (e) {
|
|
132
133
|
throw i(), e;
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
-
}, { available: R, fenced:
|
|
136
|
-
|
|
135
|
+
le(a) && a.then(i, i);
|
|
136
|
+
}, { available: R, fenced: ge, showControls: z, offerConfirm: B } = ee(h, x ? null : y), V = d(E);
|
|
137
|
+
u(() => {
|
|
137
138
|
V.current = E;
|
|
138
139
|
});
|
|
139
|
-
let H =
|
|
140
|
-
|
|
141
|
-
let e =
|
|
140
|
+
let H = d(null);
|
|
141
|
+
u(() => {
|
|
142
|
+
let e = h.proposalId;
|
|
142
143
|
if (!k || !R || H.current === e) return;
|
|
143
144
|
let t = O.current;
|
|
144
145
|
if (!t || typeof IntersectionObserver > "u") return;
|
|
@@ -155,288 +156,292 @@ var w = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: S = !1,
|
|
|
155
156
|
n = null, H.current !== e && (H.current = e, i.disconnect(), V.current("card"));
|
|
156
157
|
}, 500));
|
|
157
158
|
}
|
|
158
|
-
}, { threshold:
|
|
159
|
+
}, { threshold: oe });
|
|
159
160
|
return i.observe(t), () => {
|
|
160
161
|
r(), i.disconnect();
|
|
161
162
|
};
|
|
162
163
|
}, [
|
|
163
|
-
|
|
164
|
+
h.proposalId,
|
|
164
165
|
k,
|
|
165
166
|
R
|
|
166
167
|
]);
|
|
167
|
-
let U =
|
|
168
|
-
e.isTrusted && (!B || U || G || L("approve",
|
|
169
|
-
},
|
|
170
|
-
!z || W || L("decline",
|
|
171
|
-
},
|
|
172
|
-
!B || !U || G ||
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, [
|
|
177
|
-
let J = [...new Set(
|
|
168
|
+
let U = g(h), W = S || I !== null, G = W || j, _e = (e) => {
|
|
169
|
+
e.isTrusted && (!B || U || G || L("approve", w));
|
|
170
|
+
}, ve = () => {
|
|
171
|
+
!z || W || L("decline", T);
|
|
172
|
+
}, ye = () => {
|
|
173
|
+
!B || !U || G || ue();
|
|
174
|
+
}, K = b(h, C), [q, be] = f("");
|
|
175
|
+
u(() => {
|
|
176
|
+
be(K);
|
|
177
|
+
}, [K]);
|
|
178
|
+
let J = [...new Set(h.risk.kinds)].map((e) => ({
|
|
178
179
|
kind: e,
|
|
179
|
-
text:
|
|
180
|
-
})).filter((e) => !!e.text), Y =
|
|
181
|
-
let i = e.sensitive && !
|
|
182
|
-
return /* @__PURE__ */
|
|
180
|
+
text: ne(e, C)
|
|
181
|
+
})).filter((e) => !!e.text), Y = l(h), X = h.revision > 1 && D && D.proposalId === h.supersedes ? ce(D, h, C) : null, Z = (e, t) => {
|
|
182
|
+
let i = e.sensitive && !me.has(e.key);
|
|
183
|
+
return /* @__PURE__ */ m("span", {
|
|
183
184
|
className: "inline-flex min-w-0 flex-wrap items-baseline gap-x-2",
|
|
184
|
-
children: [i ? /* @__PURE__ */
|
|
185
|
+
children: [i ? /* @__PURE__ */ m("span", {
|
|
185
186
|
"data-testid": "assistant-write-proposal-masked",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ p("span", {
|
|
187
188
|
"aria-hidden": "true",
|
|
188
189
|
className: "font-mono text-text-muted",
|
|
189
|
-
children:
|
|
190
|
-
}), /* @__PURE__ */
|
|
190
|
+
children: n
|
|
191
|
+
}), /* @__PURE__ */ p("span", {
|
|
191
192
|
className: "sr-only",
|
|
192
|
-
children:
|
|
193
|
+
children: C("writeProposal.hiddenValue", "Hidden value")
|
|
193
194
|
})]
|
|
194
|
-
}) : /* @__PURE__ */
|
|
195
|
+
}) : /* @__PURE__ */ p("span", {
|
|
195
196
|
className: "min-w-0 whitespace-pre-wrap break-words font-medium text-text-primary",
|
|
196
|
-
children:
|
|
197
|
-
}), e.sensitive &&
|
|
197
|
+
children: r(e.value)
|
|
198
|
+
}), e.sensitive && t ? /* @__PURE__ */ p("button", {
|
|
198
199
|
type: "button",
|
|
199
|
-
onClick: () =>
|
|
200
|
+
onClick: () => he(e.key),
|
|
200
201
|
"aria-pressed": !i,
|
|
201
|
-
"aria-describedby":
|
|
202
|
+
"aria-describedby": t,
|
|
202
203
|
className: "rounded text-[11px] font-medium text-text-link underline focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
203
204
|
"data-testid": "assistant-write-proposal-reveal",
|
|
204
|
-
children: i ?
|
|
205
|
+
children: i ? C("writeProposal.showValue", "Show") : C("writeProposal.hideValue", "Hide")
|
|
205
206
|
}) : null]
|
|
206
207
|
});
|
|
207
|
-
}, Q = (e, t) => /* @__PURE__ */
|
|
208
|
+
}, Q = (e, t) => /* @__PURE__ */ p("dl", {
|
|
208
209
|
className: "mt-1 grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",
|
|
209
210
|
children: e.map((e, n) => {
|
|
210
|
-
let r = `${
|
|
211
|
-
return /* @__PURE__ */
|
|
211
|
+
let r = `${fe}-${t}-${n}`;
|
|
212
|
+
return /* @__PURE__ */ m("div", {
|
|
212
213
|
className: "contents",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
214
215
|
id: r,
|
|
215
216
|
className: "truncate text-text-muted",
|
|
216
217
|
children: e.label
|
|
217
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ p("dd", {
|
|
218
219
|
className: "min-w-0",
|
|
219
220
|
children: Z(e, r)
|
|
220
221
|
})]
|
|
221
222
|
}, `${n}:${e.key}`);
|
|
222
223
|
})
|
|
223
|
-
}),
|
|
224
|
-
return /* @__PURE__ */
|
|
224
|
+
}), xe = c(h), $ = h.description.consequences.map((e) => i(e, xe));
|
|
225
|
+
return /* @__PURE__ */ m("div", {
|
|
225
226
|
ref: O,
|
|
226
227
|
role: "group",
|
|
227
|
-
"aria-label":
|
|
228
|
+
"aria-label": C("writeProposal.aria", "Proposed change: {{label}}", { label: h.description.label }),
|
|
228
229
|
className: `my-2 overflow-hidden rounded-xl border ${k ? "border-status-warning bg-status-warning/10" : "border-border-subtle bg-bg-surface"}`,
|
|
229
230
|
"data-testid": "assistant-write-proposal",
|
|
230
|
-
"data-status":
|
|
231
|
+
"data-status": h.status,
|
|
231
232
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ m("div", {
|
|
233
234
|
className: "flex items-start justify-between gap-2 border-b border-border-subtle px-3 py-2",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ m("div", {
|
|
235
236
|
className: "flex min-w-0 items-start gap-2",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ p(ae, {
|
|
237
238
|
className: "mt-0.5 size-4 flex-shrink-0 text-status-warning",
|
|
238
239
|
"aria-hidden": "true"
|
|
239
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ m("div", {
|
|
240
241
|
className: "min-w-0",
|
|
241
242
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ p("p", {
|
|
243
244
|
className: "break-words font-mono text-xs font-semibold text-text-primary",
|
|
244
245
|
"data-testid": "assistant-write-proposal-label",
|
|
245
|
-
children:
|
|
246
|
+
children: h.description.label
|
|
246
247
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ p("p", {
|
|
248
249
|
className: "text-[11px] text-text-muted",
|
|
249
|
-
children: s(
|
|
250
|
+
children: s(h, C)
|
|
250
251
|
}),
|
|
251
|
-
B ? /* @__PURE__ */
|
|
252
|
+
B ? /* @__PURE__ */ p("p", {
|
|
252
253
|
className: "text-[11px] text-text-secondary",
|
|
253
|
-
children:
|
|
254
|
+
children: C("writeProposal.title", "Review and approve this change.")
|
|
254
255
|
}) : null
|
|
255
256
|
]
|
|
256
257
|
})]
|
|
257
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ p("span", {
|
|
258
259
|
role: "status",
|
|
259
260
|
"aria-live": "polite",
|
|
260
261
|
"aria-atomic": "true",
|
|
261
|
-
className: `max-w-[50%] flex-shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium break-words ${
|
|
262
|
+
className: `max-w-[50%] flex-shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium break-words ${se(h)}`,
|
|
262
263
|
"data-testid": "assistant-write-proposal-status",
|
|
263
|
-
children:
|
|
264
|
+
children: q
|
|
264
265
|
})]
|
|
265
266
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ m("div", {
|
|
267
268
|
className: "space-y-2 px-3 py-2",
|
|
268
269
|
children: [
|
|
269
|
-
J.length > 0 ? /* @__PURE__ */
|
|
270
|
+
J.length > 0 ? /* @__PURE__ */ p("ul", {
|
|
270
271
|
className: "flex flex-wrap gap-1",
|
|
271
272
|
"data-testid": "assistant-write-proposal-kinds",
|
|
272
|
-
children: J.map(({ kind: e, text: t }) => /* @__PURE__ */
|
|
273
|
+
children: J.map(({ kind: e, text: t }) => /* @__PURE__ */ p("li", {
|
|
273
274
|
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",
|
|
274
275
|
children: t
|
|
275
276
|
}, e))
|
|
276
277
|
}) : null,
|
|
277
|
-
|
|
278
|
-
let n =
|
|
279
|
-
return /* @__PURE__ */
|
|
278
|
+
h.description.rootFields.map((e, t) => {
|
|
279
|
+
let n = o(e);
|
|
280
|
+
return /* @__PURE__ */ m("div", {
|
|
280
281
|
"data-testid": "assistant-write-proposal-field",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ p("p", {
|
|
282
283
|
className: "break-words font-mono text-xs text-text-primary",
|
|
283
|
-
children:
|
|
284
|
+
children: re(e)
|
|
284
285
|
}), n.length > 0 ? Q(n, `field${t}`) : null]
|
|
285
286
|
}, `${t}:${e.alias ?? e.field}`);
|
|
286
287
|
}),
|
|
287
|
-
Y.length > 0 ? /* @__PURE__ */
|
|
288
|
+
Y.length > 0 ? /* @__PURE__ */ m("div", {
|
|
288
289
|
"data-testid": "assistant-write-proposal-variables",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ p("p", {
|
|
290
291
|
className: "text-[11px] font-medium text-text-secondary",
|
|
291
|
-
children:
|
|
292
|
+
children: C("writeProposal.values", "Values")
|
|
292
293
|
}), Q(Y, "vars")]
|
|
293
294
|
}) : null,
|
|
294
|
-
|
|
295
|
+
h.description.variablesOmitted ? /* @__PURE__ */ p("p", {
|
|
295
296
|
className: "text-[11px] text-text-muted",
|
|
296
|
-
children:
|
|
297
|
+
children: C("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: h.description.variablesOmitted })
|
|
297
298
|
}) : null,
|
|
298
|
-
|
|
299
|
+
h.description.targetCount > 0 ? /* @__PURE__ */ p("p", {
|
|
299
300
|
className: "text-xs text-text-secondary",
|
|
300
301
|
"data-testid": "assistant-write-proposal-target-count",
|
|
301
|
-
children:
|
|
302
|
+
children: C("writeProposal.targetCount", "Items affected: {{count}}", { count: h.description.targetCount })
|
|
302
303
|
}) : null,
|
|
303
|
-
$.length > 0 ? /* @__PURE__ */
|
|
304
|
+
$.length > 0 ? /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
304
305
|
className: "text-[11px] font-medium text-text-secondary",
|
|
305
|
-
children:
|
|
306
|
-
}), /* @__PURE__ */
|
|
306
|
+
children: C("writeProposal.consequences", "What this will do")
|
|
307
|
+
}), /* @__PURE__ */ p("ul", {
|
|
307
308
|
className: "list-disc pl-4 text-xs text-text-primary",
|
|
308
309
|
"data-testid": "assistant-write-proposal-consequences",
|
|
309
|
-
children: $.map((e, t) => /* @__PURE__ */
|
|
310
|
+
children: $.map((e, t) => /* @__PURE__ */ p("li", { children: e }, t))
|
|
310
311
|
})] }) : null,
|
|
311
|
-
|
|
312
|
+
h.repeatOf ? /* @__PURE__ */ p("p", {
|
|
312
313
|
className: "text-xs text-status-warning-text",
|
|
313
|
-
children:
|
|
314
|
+
children: C("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
|
|
314
315
|
}) : null,
|
|
315
|
-
|
|
316
|
+
h.revision > 1 ? /* @__PURE__ */ m("div", {
|
|
316
317
|
"data-testid": "assistant-write-proposal-revision",
|
|
317
318
|
children: [
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ p("p", {
|
|
319
320
|
className: "text-[11px] font-medium text-text-secondary",
|
|
320
|
-
children:
|
|
321
|
+
children: C("writeProposal.revision", "Revised — version {{revision}}", { revision: h.revision })
|
|
321
322
|
}),
|
|
322
|
-
X && X.length === 0 ? /* @__PURE__ */
|
|
323
|
+
X && X.length === 0 ? /* @__PURE__ */ p("p", {
|
|
323
324
|
className: "text-[11px] text-text-muted",
|
|
324
|
-
children:
|
|
325
|
+
children: C("writeProposal.diff.none", "No values changed")
|
|
325
326
|
}) : null,
|
|
326
|
-
X && X.length > 0 ? /* @__PURE__ */
|
|
327
|
+
X && X.length > 0 ? /* @__PURE__ */ m("table", {
|
|
327
328
|
className: "mt-1 w-full table-fixed text-xs",
|
|
328
329
|
"data-testid": "assistant-write-proposal-diff",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
|
|
330
331
|
className: "text-left text-[11px] text-text-muted",
|
|
331
332
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ p("th", {
|
|
333
334
|
scope: "col",
|
|
334
335
|
className: "w-1/3 font-medium",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ p("span", {
|
|
336
337
|
className: "sr-only",
|
|
337
|
-
children:
|
|
338
|
+
children: C("writeProposal.diff.value", "Value")
|
|
338
339
|
})
|
|
339
340
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ p("th", {
|
|
341
342
|
scope: "col",
|
|
342
343
|
className: "font-medium",
|
|
343
|
-
children:
|
|
344
|
+
children: C("writeProposal.diff.before", "Before")
|
|
344
345
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ p("th", {
|
|
346
347
|
scope: "col",
|
|
347
348
|
className: "font-medium",
|
|
348
|
-
children:
|
|
349
|
+
children: C("writeProposal.diff.after", "After")
|
|
349
350
|
})
|
|
350
351
|
]
|
|
351
|
-
}) }), /* @__PURE__ */
|
|
352
|
+
}) }), /* @__PURE__ */ p("tbody", { children: X.map((e) => /* @__PURE__ */ m("tr", {
|
|
352
353
|
className: "align-top",
|
|
353
354
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ p("th", {
|
|
355
356
|
scope: "row",
|
|
356
357
|
className: "break-words pr-2 text-left font-normal text-text-muted",
|
|
357
358
|
children: e.label
|
|
358
359
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ p("td", {
|
|
360
361
|
className: "break-words pr-2",
|
|
361
362
|
children: e.before ? Z({
|
|
362
363
|
...e.before,
|
|
363
364
|
sensitive: e.before.sensitive || !!e.after?.sensitive
|
|
364
|
-
}, null) : /* @__PURE__ */
|
|
365
|
+
}, null) : /* @__PURE__ */ p("span", {
|
|
365
366
|
className: "text-text-muted",
|
|
366
|
-
children:
|
|
367
|
+
children: C("writeProposal.diff.absent", "(not set)")
|
|
367
368
|
})
|
|
368
369
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ p("td", {
|
|
370
371
|
className: "break-words",
|
|
371
|
-
children: e.after ? Z(e.after, null) : /* @__PURE__ */
|
|
372
|
+
children: e.after ? Z(e.after, null) : /* @__PURE__ */ p("span", {
|
|
372
373
|
className: "text-text-muted",
|
|
373
|
-
children:
|
|
374
|
+
children: C("writeProposal.diff.absent", "(not set)")
|
|
374
375
|
})
|
|
375
376
|
})
|
|
376
377
|
]
|
|
377
378
|
}, e.key)) })]
|
|
378
379
|
}) : null
|
|
379
380
|
]
|
|
380
|
-
}) : null
|
|
381
|
+
}) : null,
|
|
382
|
+
/* @__PURE__ */ p(t, {
|
|
383
|
+
align: "start",
|
|
384
|
+
testId: "assistant-write-proposal-ai-disclaimer"
|
|
385
|
+
})
|
|
381
386
|
]
|
|
382
387
|
}),
|
|
383
|
-
k ? /* @__PURE__ */
|
|
388
|
+
k ? /* @__PURE__ */ m("div", {
|
|
384
389
|
className: "space-y-1 border-t border-border-subtle px-3 py-2 text-[11px]",
|
|
385
390
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ p("p", {
|
|
387
392
|
className: "text-text-secondary",
|
|
388
393
|
"data-testid": "assistant-write-proposal-countdown",
|
|
389
|
-
children: j ?
|
|
394
|
+
children: j ? C("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : te(A, de, C)
|
|
390
395
|
}),
|
|
391
|
-
|
|
396
|
+
x ? /* @__PURE__ */ p("p", {
|
|
392
397
|
className: "text-text-secondary",
|
|
393
398
|
"data-testid": "assistant-write-proposal-inert",
|
|
394
|
-
children:
|
|
395
|
-
}) : R ?
|
|
399
|
+
children: C("writeProposal.inert", "This change can no longer be confirmed here. Nothing was done; ask the assistant to prepare it again if you still want it.")
|
|
400
|
+
}) : R ? h.approvable ? ge ? /* @__PURE__ */ p("p", {
|
|
396
401
|
className: "text-text-secondary",
|
|
397
402
|
"data-testid": "assistant-write-proposal-fenced",
|
|
398
|
-
children:
|
|
399
|
-
}) : null : /* @__PURE__ */
|
|
403
|
+
children: C("writeProposal.executionFenced", "You can review or cancel this change. Running it from the assistant becomes available once secure confirmation is enabled.")
|
|
404
|
+
}) : null : /* @__PURE__ */ p("p", {
|
|
400
405
|
className: "text-text-secondary",
|
|
401
406
|
"data-testid": "assistant-write-proposal-not-approvable",
|
|
402
|
-
children:
|
|
403
|
-
}) : /* @__PURE__ */
|
|
407
|
+
children: C("writeProposal.notApprovable", "This change isn't ready to confirm. If it stays this way, ask the assistant to prepare it again.")
|
|
408
|
+
}) : /* @__PURE__ */ p("p", {
|
|
404
409
|
className: "text-text-secondary",
|
|
405
410
|
"data-testid": "assistant-write-proposal-not-available",
|
|
406
|
-
children:
|
|
411
|
+
children: C("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
|
|
407
412
|
}),
|
|
408
|
-
z &&
|
|
413
|
+
z && S ? /* @__PURE__ */ p("p", {
|
|
409
414
|
className: "text-text-muted",
|
|
410
|
-
children:
|
|
415
|
+
children: C("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
|
|
411
416
|
}) : null
|
|
412
417
|
]
|
|
413
418
|
}) : null,
|
|
414
|
-
z ? /* @__PURE__ */
|
|
419
|
+
z ? /* @__PURE__ */ m("div", {
|
|
415
420
|
className: "flex flex-wrap justify-end gap-2 border-t border-border-subtle px-3 py-2",
|
|
416
421
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ p("button", {
|
|
418
423
|
type: "button",
|
|
419
|
-
onClick:
|
|
424
|
+
onClick: ve,
|
|
420
425
|
disabled: W,
|
|
421
426
|
className: "rounded-md border border-action-secondary-border bg-action-secondary-bg px-3 py-1.5 text-xs font-medium text-action-secondary-fg hover:bg-action-secondary-bg-hover disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
422
427
|
"data-testid": "assistant-write-proposal-cancel",
|
|
423
|
-
children:
|
|
428
|
+
children: C("writeProposal.cancel", "Cancel")
|
|
424
429
|
}),
|
|
425
|
-
B && U ? /* @__PURE__ */
|
|
430
|
+
B && U ? /* @__PURE__ */ p("button", {
|
|
426
431
|
type: "button",
|
|
427
|
-
onClick:
|
|
432
|
+
onClick: ye,
|
|
428
433
|
disabled: G,
|
|
429
434
|
className: "rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-fg hover:bg-action-primary-bg-hover disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
430
435
|
"data-testid": "assistant-write-proposal-review",
|
|
431
|
-
children:
|
|
436
|
+
children: C("writeProposal.review", "Review & confirm…")
|
|
432
437
|
}) : null,
|
|
433
|
-
B && !U ? /* @__PURE__ */
|
|
438
|
+
B && !U ? /* @__PURE__ */ p("button", {
|
|
434
439
|
type: "button",
|
|
435
|
-
onClick:
|
|
440
|
+
onClick: _e,
|
|
436
441
|
disabled: G,
|
|
437
442
|
className: "rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-fg hover:bg-action-primary-bg-hover disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
438
443
|
"data-testid": "assistant-write-proposal-confirm",
|
|
439
|
-
children: I === "approve" ?
|
|
444
|
+
children: I === "approve" ? C("writeProposal.confirming", "Confirming…") : h.description.confirmLabel.trim() || C("writeProposal.confirmFallback", "Confirm this change")
|
|
440
445
|
}) : null
|
|
441
446
|
]
|
|
442
447
|
}) : null
|
|
@@ -444,4 +449,4 @@ var w = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: S = !1,
|
|
|
444
449
|
});
|
|
445
450
|
};
|
|
446
451
|
//#endregion
|
|
447
|
-
export {
|
|
452
|
+
export { S as AssistantWriteProposalCard, h as WRITE_PROPOSAL_DIALOG_KINDS, _ as WRITE_PROPOSAL_PRESENTED_AFTER_MS, b as statusText, g as writeProposalUsesDialog };
|