@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.
@@ -1,10 +1,11 @@
1
1
  import { usePrefersReducedMotion as e } from "./usePrefersReducedMotion.js";
2
- import { WRITE_PROPOSAL_MASK as t, formatWriteProposalValue as n, redactWriteProposalText as r, useWriteProposalRemainingMs as i, writeProposalArgumentValues as a, writeProposalConfirmState as o, writeProposalCountdownText as ee, writeProposalGatewayText as s, writeProposalKindText as te, writeProposalRootFieldName as c, writeProposalSensitiveTexts as l, writeProposalVariableValues as u } from "./writeProposalPresentation.js";
3
- import { useEffect as d, useId as ne, useRef as f, useState as p } from "react";
4
- import { ShieldAlert as re } from "lucide-react";
5
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
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 g = new Set([
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 _(e) {
16
- return e.description.confirmSurface.kind === "dialog" || e.risk.kinds.some((e) => g.has(e));
16
+ function g(e) {
17
+ return e.description.confirmSurface.kind === "dialog" || e.risk.kinds.some((e) => h.has(e));
17
18
  }
18
- var v = 500, ie = [
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
- ], y = new Set([
31
+ ], v = new Set([
31
32
  "FORBIDDEN",
32
33
  "PERMISSION_DENIED",
33
34
  "HTTP_403"
34
35
  ]);
35
- function b(e) {
36
- return (e.result?.errors ?? []).some((e) => e.code !== void 0 && y.has(e.code));
36
+ function y(e) {
37
+ return (e.result?.errors ?? []).some((e) => e.code !== void 0 && v.has(e.code));
37
38
  }
38
- function x(e, t) {
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 = r((e.result?.summary || e.description.readbackPast).trim(), l(e));
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 b(e) ? t("writeProposal.status.failedNotPermitted", "Didn't go through — you don't have permission") : t("writeProposal.status.failedNoDetail", "Didn't go through");
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 ae(e) {
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 S(e, t) {
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) => a(e).map((t) => ({
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
- ...u(e)
84
+ ...l(e)
84
85
  ];
85
86
  }
86
- function oe(e, t, r) {
87
- let i = new Map(S(e, r).map((e) => [e.key, e])), a = S(t, r), o = [];
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 || n(t.value) !== n(e.value)) && o.push({
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 C(e) {
106
+ function le(e) {
106
107
  return typeof e == "object" && !!e && typeof e.then == "function";
107
108
  }
108
- var w = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: S = !1, turnInFlight: w, tr: T, onApprove: se, onDecline: ce, onReview: le, onPresented: E, previous: D }) => {
109
- let ue = e(), de = ne(), O = f(null), k = g.status === "pending", A = i(g.expiresAt, v, y, k), j = A <= 0, [M, fe] = p({
110
- proposalId: g.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
- }), pe = M.proposalId === g.proposalId ? M.keys : /* @__PURE__ */ new Set(), me = (e) => fe((t) => {
113
- let n = new Set(t.proposalId === g.proposalId ? t.keys : []);
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: g.proposalId,
116
+ proposalId: h.proposalId,
116
117
  keys: n
117
118
  };
118
- }), N = f(null), [P, F] = p(null), I = P?.proposalId === g.proposalId ? P.action : null, L = (e, t) => {
119
- let n = g.proposalId;
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
- C(a) && a.then(i, i);
135
- }, { available: R, fenced: he, showControls: z, offerConfirm: B } = o(g, S ? null : b), V = f(E);
136
- d(() => {
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 = f(null);
140
- d(() => {
141
- let e = g.proposalId;
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: ie });
159
+ }, { threshold: oe });
159
160
  return i.observe(t), () => {
160
161
  r(), i.disconnect();
161
162
  };
162
163
  }, [
163
- g.proposalId,
164
+ h.proposalId,
164
165
  k,
165
166
  R
166
167
  ]);
167
- let U = _(g), W = w || I !== null, G = W || j, ge = (e) => {
168
- e.isTrusted && (!B || U || G || L("approve", se));
169
- }, _e = () => {
170
- !z || W || L("decline", ce);
171
- }, K = () => {
172
- !B || !U || G || le();
173
- }, q = x(g, T), [ve, ye] = p("");
174
- d(() => {
175
- ye(q);
176
- }, [q]);
177
- let J = [...new Set(g.risk.kinds)].map((e) => ({
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: te(e, T)
180
- })).filter((e) => !!e.text), Y = u(g), X = g.revision > 1 && D && D.proposalId === g.supersedes ? oe(D, g, T) : null, Z = (e, r) => {
181
- let i = e.sensitive && !pe.has(e.key);
182
- return /* @__PURE__ */ h("span", {
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__ */ h("span", {
185
+ children: [i ? /* @__PURE__ */ m("span", {
185
186
  "data-testid": "assistant-write-proposal-masked",
186
- children: [/* @__PURE__ */ m("span", {
187
+ children: [/* @__PURE__ */ p("span", {
187
188
  "aria-hidden": "true",
188
189
  className: "font-mono text-text-muted",
189
- children: t
190
- }), /* @__PURE__ */ m("span", {
190
+ children: n
191
+ }), /* @__PURE__ */ p("span", {
191
192
  className: "sr-only",
192
- children: T("writeProposal.hiddenValue", "Hidden value")
193
+ children: C("writeProposal.hiddenValue", "Hidden value")
193
194
  })]
194
- }) : /* @__PURE__ */ m("span", {
195
+ }) : /* @__PURE__ */ p("span", {
195
196
  className: "min-w-0 whitespace-pre-wrap break-words font-medium text-text-primary",
196
- children: n(e.value)
197
- }), e.sensitive && r ? /* @__PURE__ */ m("button", {
197
+ children: r(e.value)
198
+ }), e.sensitive && t ? /* @__PURE__ */ p("button", {
198
199
  type: "button",
199
- onClick: () => me(e.key),
200
+ onClick: () => he(e.key),
200
201
  "aria-pressed": !i,
201
- "aria-describedby": r,
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 ? T("writeProposal.showValue", "Show") : T("writeProposal.hideValue", "Hide")
205
+ children: i ? C("writeProposal.showValue", "Show") : C("writeProposal.hideValue", "Hide")
205
206
  }) : null]
206
207
  });
207
- }, Q = (e, t) => /* @__PURE__ */ m("dl", {
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 = `${de}-${t}-${n}`;
211
- return /* @__PURE__ */ h("div", {
211
+ let r = `${fe}-${t}-${n}`;
212
+ return /* @__PURE__ */ m("div", {
212
213
  className: "contents",
213
- children: [/* @__PURE__ */ m("dt", {
214
+ children: [/* @__PURE__ */ p("dt", {
214
215
  id: r,
215
216
  className: "truncate text-text-muted",
216
217
  children: e.label
217
- }), /* @__PURE__ */ m("dd", {
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
- }), be = l(g), $ = g.description.consequences.map((e) => r(e, be));
224
- return /* @__PURE__ */ h("div", {
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": T("writeProposal.aria", "Proposed change: {{label}}", { label: g.description.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": g.status,
231
+ "data-status": h.status,
231
232
  children: [
232
- /* @__PURE__ */ h("div", {
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__ */ h("div", {
235
+ children: [/* @__PURE__ */ m("div", {
235
236
  className: "flex min-w-0 items-start gap-2",
236
- children: [/* @__PURE__ */ m(re, {
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__ */ h("div", {
240
+ }), /* @__PURE__ */ m("div", {
240
241
  className: "min-w-0",
241
242
  children: [
242
- /* @__PURE__ */ m("p", {
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: g.description.label
246
+ children: h.description.label
246
247
  }),
247
- /* @__PURE__ */ m("p", {
248
+ /* @__PURE__ */ p("p", {
248
249
  className: "text-[11px] text-text-muted",
249
- children: s(g, T)
250
+ children: s(h, C)
250
251
  }),
251
- B ? /* @__PURE__ */ m("p", {
252
+ B ? /* @__PURE__ */ p("p", {
252
253
  className: "text-[11px] text-text-secondary",
253
- children: T("writeProposal.title", "Review and approve this change.")
254
+ children: C("writeProposal.title", "Review and approve this change.")
254
255
  }) : null
255
256
  ]
256
257
  })]
257
- }), /* @__PURE__ */ m("span", {
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 ${ae(g)}`,
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: ve
264
+ children: q
264
265
  })]
265
266
  }),
266
- /* @__PURE__ */ h("div", {
267
+ /* @__PURE__ */ m("div", {
267
268
  className: "space-y-2 px-3 py-2",
268
269
  children: [
269
- J.length > 0 ? /* @__PURE__ */ m("ul", {
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__ */ m("li", {
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
- g.description.rootFields.map((e, t) => {
278
- let n = a(e);
279
- return /* @__PURE__ */ h("div", {
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__ */ m("p", {
282
+ children: [/* @__PURE__ */ p("p", {
282
283
  className: "break-words font-mono text-xs text-text-primary",
283
- children: c(e)
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__ */ h("div", {
288
+ Y.length > 0 ? /* @__PURE__ */ m("div", {
288
289
  "data-testid": "assistant-write-proposal-variables",
289
- children: [/* @__PURE__ */ m("p", {
290
+ children: [/* @__PURE__ */ p("p", {
290
291
  className: "text-[11px] font-medium text-text-secondary",
291
- children: T("writeProposal.values", "Values")
292
+ children: C("writeProposal.values", "Values")
292
293
  }), Q(Y, "vars")]
293
294
  }) : null,
294
- g.description.variablesOmitted ? /* @__PURE__ */ m("p", {
295
+ h.description.variablesOmitted ? /* @__PURE__ */ p("p", {
295
296
  className: "text-[11px] text-text-muted",
296
- children: T("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: g.description.variablesOmitted })
297
+ children: C("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: h.description.variablesOmitted })
297
298
  }) : null,
298
- g.description.targetCount > 0 ? /* @__PURE__ */ m("p", {
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: T("writeProposal.targetCount", "Items affected: {{count}}", { count: g.description.targetCount })
302
+ children: C("writeProposal.targetCount", "Items affected: {{count}}", { count: h.description.targetCount })
302
303
  }) : null,
303
- $.length > 0 ? /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
304
+ $.length > 0 ? /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
304
305
  className: "text-[11px] font-medium text-text-secondary",
305
- children: T("writeProposal.consequences", "What this will do")
306
- }), /* @__PURE__ */ m("ul", {
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__ */ m("li", { children: e }, t))
310
+ children: $.map((e, t) => /* @__PURE__ */ p("li", { children: e }, t))
310
311
  })] }) : null,
311
- g.repeatOf ? /* @__PURE__ */ m("p", {
312
+ h.repeatOf ? /* @__PURE__ */ p("p", {
312
313
  className: "text-xs text-status-warning-text",
313
- children: T("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
314
+ children: C("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
314
315
  }) : null,
315
- g.revision > 1 ? /* @__PURE__ */ h("div", {
316
+ h.revision > 1 ? /* @__PURE__ */ m("div", {
316
317
  "data-testid": "assistant-write-proposal-revision",
317
318
  children: [
318
- /* @__PURE__ */ m("p", {
319
+ /* @__PURE__ */ p("p", {
319
320
  className: "text-[11px] font-medium text-text-secondary",
320
- children: T("writeProposal.revision", "Revised — version {{revision}}", { revision: g.revision })
321
+ children: C("writeProposal.revision", "Revised — version {{revision}}", { revision: h.revision })
321
322
  }),
322
- X && X.length === 0 ? /* @__PURE__ */ m("p", {
323
+ X && X.length === 0 ? /* @__PURE__ */ p("p", {
323
324
  className: "text-[11px] text-text-muted",
324
- children: T("writeProposal.diff.none", "No values changed")
325
+ children: C("writeProposal.diff.none", "No values changed")
325
326
  }) : null,
326
- X && X.length > 0 ? /* @__PURE__ */ h("table", {
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__ */ m("thead", { children: /* @__PURE__ */ h("tr", {
330
+ children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
330
331
  className: "text-left text-[11px] text-text-muted",
331
332
  children: [
332
- /* @__PURE__ */ m("th", {
333
+ /* @__PURE__ */ p("th", {
333
334
  scope: "col",
334
335
  className: "w-1/3 font-medium",
335
- children: /* @__PURE__ */ m("span", {
336
+ children: /* @__PURE__ */ p("span", {
336
337
  className: "sr-only",
337
- children: T("writeProposal.diff.value", "Value")
338
+ children: C("writeProposal.diff.value", "Value")
338
339
  })
339
340
  }),
340
- /* @__PURE__ */ m("th", {
341
+ /* @__PURE__ */ p("th", {
341
342
  scope: "col",
342
343
  className: "font-medium",
343
- children: T("writeProposal.diff.before", "Before")
344
+ children: C("writeProposal.diff.before", "Before")
344
345
  }),
345
- /* @__PURE__ */ m("th", {
346
+ /* @__PURE__ */ p("th", {
346
347
  scope: "col",
347
348
  className: "font-medium",
348
- children: T("writeProposal.diff.after", "After")
349
+ children: C("writeProposal.diff.after", "After")
349
350
  })
350
351
  ]
351
- }) }), /* @__PURE__ */ m("tbody", { children: X.map((e) => /* @__PURE__ */ h("tr", {
352
+ }) }), /* @__PURE__ */ p("tbody", { children: X.map((e) => /* @__PURE__ */ m("tr", {
352
353
  className: "align-top",
353
354
  children: [
354
- /* @__PURE__ */ m("th", {
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__ */ m("td", {
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__ */ m("span", {
365
+ }, null) : /* @__PURE__ */ p("span", {
365
366
  className: "text-text-muted",
366
- children: T("writeProposal.diff.absent", "(not set)")
367
+ children: C("writeProposal.diff.absent", "(not set)")
367
368
  })
368
369
  }),
369
- /* @__PURE__ */ m("td", {
370
+ /* @__PURE__ */ p("td", {
370
371
  className: "break-words",
371
- children: e.after ? Z(e.after, null) : /* @__PURE__ */ m("span", {
372
+ children: e.after ? Z(e.after, null) : /* @__PURE__ */ p("span", {
372
373
  className: "text-text-muted",
373
- children: T("writeProposal.diff.absent", "(not set)")
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__ */ h("div", {
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__ */ m("p", {
391
+ /* @__PURE__ */ p("p", {
387
392
  className: "text-text-secondary",
388
393
  "data-testid": "assistant-write-proposal-countdown",
389
- children: j ? T("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : ee(A, ue, T)
394
+ children: j ? C("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : te(A, de, C)
390
395
  }),
391
- S ? /* @__PURE__ */ m("p", {
396
+ x ? /* @__PURE__ */ p("p", {
392
397
  className: "text-text-secondary",
393
398
  "data-testid": "assistant-write-proposal-inert",
394
- children: T("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.")
395
- }) : R ? g.approvable ? he ? /* @__PURE__ */ m("p", {
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: T("writeProposal.executionFenced", "You can review or cancel this change. Running it from the assistant becomes available once secure confirmation is enabled.")
399
- }) : null : /* @__PURE__ */ m("p", {
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: T("writeProposal.notApprovable", "This change isn't ready to confirm. If it stays this way, ask the assistant to prepare it again.")
403
- }) : /* @__PURE__ */ m("p", {
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: T("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
411
+ children: C("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
407
412
  }),
408
- z && w ? /* @__PURE__ */ m("p", {
413
+ z && S ? /* @__PURE__ */ p("p", {
409
414
  className: "text-text-muted",
410
- children: T("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
415
+ children: C("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
411
416
  }) : null
412
417
  ]
413
418
  }) : null,
414
- z ? /* @__PURE__ */ h("div", {
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__ */ m("button", {
422
+ /* @__PURE__ */ p("button", {
418
423
  type: "button",
419
- onClick: _e,
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: T("writeProposal.cancel", "Cancel")
428
+ children: C("writeProposal.cancel", "Cancel")
424
429
  }),
425
- B && U ? /* @__PURE__ */ m("button", {
430
+ B && U ? /* @__PURE__ */ p("button", {
426
431
  type: "button",
427
- onClick: K,
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: T("writeProposal.review", "Review & confirm…")
436
+ children: C("writeProposal.review", "Review & confirm…")
432
437
  }) : null,
433
- B && !U ? /* @__PURE__ */ m("button", {
438
+ B && !U ? /* @__PURE__ */ p("button", {
434
439
  type: "button",
435
- onClick: ge,
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" ? T("writeProposal.confirming", "Confirming…") : g.description.confirmLabel.trim() || T("writeProposal.confirmFallback", "Confirm this change")
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 { w as AssistantWriteProposalCard, g as WRITE_PROPOSAL_DIALOG_KINDS, v as WRITE_PROPOSAL_PRESENTED_AFTER_MS, x as statusText, _ as writeProposalUsesDialog };
452
+ export { S as AssistantWriteProposalCard, h as WRITE_PROPOSAL_DIALOG_KINDS, _ as WRITE_PROPOSAL_PRESENTED_AFTER_MS, b as statusText, g as writeProposalUsesDialog };