@burdenoff/fe-libs 2026.1019.1 → 2026.1019.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/conversation.d.ts +8 -0
- package/dist/shared/assistant/history/historyMapping.js +1 -1
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +93 -89
- package/dist/shared/assistant/ui/useWriteProposals.js +122 -85
- package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -1
- package/dist/shared/assistant/writeProposalDiscovery.js +2 -2
- package/dist/shared-assistant.js +188 -188
- package/package.json +1 -1
|
@@ -179,6 +179,14 @@ export interface AssistantMessageMetadata {
|
|
|
179
179
|
* inert card, or nothing.
|
|
180
180
|
*/
|
|
181
181
|
writeProposalRefs?: readonly WriteProposalMessageRef[];
|
|
182
|
+
/**
|
|
183
|
+
* Device-only correlation for an uncertain approve answer. It survives a
|
|
184
|
+
* reload so the issuing record can replace this note when it settles. Never
|
|
185
|
+
* contains a payload or approval capability, and never leaves for history.
|
|
186
|
+
*/
|
|
187
|
+
writeProposalTransportNote?: WriteProposalMessageRef & {
|
|
188
|
+
status: "uncertain" | "succeeded" | "failed" | "declined" | "superseded" | "expired";
|
|
189
|
+
};
|
|
182
190
|
/**
|
|
183
191
|
* ★ BOFF-7802: this reply is a UI command the panel carried out ITSELF — a
|
|
184
192
|
* theme set, a page opened — with no model turn and no sandbox. A record of
|
|
@@ -18,7 +18,7 @@ var s = /^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/, c = 131072, l = 98304, u = 16384,
|
|
|
18
18
|
"failed",
|
|
19
19
|
"expired",
|
|
20
20
|
"cancelled"
|
|
21
|
-
], ie = /^(?:pending[-_]?write|write[-_]?proposal[-_]?refs?)$/i, y = "\n\n[…truncated in saved history]";
|
|
21
|
+
], ie = /^(?:pending[-_]?write|write[-_]?proposal[-_]?refs?|write[-_]?proposal[-_]?transport[-_]?note)$/i, y = "\n\n[…truncated in saved history]";
|
|
22
22
|
function b(e) {
|
|
23
23
|
return typeof e == "string" && s.test(e);
|
|
24
24
|
}
|
|
@@ -75,4 +75,6 @@ export interface AssistantWriteProposalCardProps {
|
|
|
75
75
|
}
|
|
76
76
|
/** How long the card must stay half visible before it counts as presented. */
|
|
77
77
|
export declare const WRITE_PROPOSAL_PRESENTED_AFTER_MS = 500;
|
|
78
|
+
/** The chip's words: from the record's status, and its result only. */
|
|
79
|
+
export declare function statusText(view: WriteProposalView, tr: AssistantTr): string;
|
|
78
80
|
export declare const AssistantWriteProposalCard: FC<AssistantWriteProposalCardProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { ShieldAlert as
|
|
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
5
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
6
6
|
//#region src/shared/assistant/ui/AssistantWriteProposalCard.tsx
|
|
7
7
|
var g = new Set([
|
|
@@ -35,12 +35,12 @@ var v = 500, ie = [
|
|
|
35
35
|
function b(e) {
|
|
36
36
|
return (e.result?.errors ?? []).some((e) => e.code !== void 0 && y.has(e.code));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function x(e, t) {
|
|
39
39
|
switch (e.status) {
|
|
40
40
|
case "pending": return t("writeProposal.status.pending", "Waiting for you");
|
|
41
41
|
case "executing": return t("writeProposal.status.executing", "Working…");
|
|
42
42
|
case "succeeded": {
|
|
43
|
-
let n = r((e.result?.summary || e.description.readbackPast).trim(),
|
|
43
|
+
let n = r((e.result?.summary || e.description.readbackPast).trim(), l(e));
|
|
44
44
|
return n ? t("writeProposal.status.succeeded", "Done — {{summary}}", { summary: n }) : t("writeProposal.status.succeededNoDetail", "Done");
|
|
45
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");
|
|
@@ -50,7 +50,7 @@ function ae(e, t) {
|
|
|
50
50
|
case "expired": return t("writeProposal.status.expired", "Expired — nothing was done");
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ae(e) {
|
|
54
54
|
switch (e.status) {
|
|
55
55
|
case "pending":
|
|
56
56
|
case "outcome_unknown": return "border-status-warning-border bg-status-warning-bg text-status-warning-text";
|
|
@@ -62,7 +62,7 @@ function oe(e) {
|
|
|
62
62
|
case "expired": return "border-border-subtle bg-bg-muted text-text-secondary";
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function S(e, t) {
|
|
66
66
|
return [
|
|
67
67
|
{
|
|
68
68
|
key: "label",
|
|
@@ -80,11 +80,11 @@ function x(e, t) {
|
|
|
80
80
|
...t,
|
|
81
81
|
label: `${e.alias ?? e.field}.${t.label}`
|
|
82
82
|
}))),
|
|
83
|
-
...
|
|
83
|
+
...u(e)
|
|
84
84
|
];
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
let i = new Map(
|
|
86
|
+
function oe(e, t, r) {
|
|
87
|
+
let i = new Map(S(e, r).map((e) => [e.key, e])), a = S(t, r), o = [];
|
|
88
88
|
for (let e of a) {
|
|
89
89
|
let t = i.get(e.key) ?? null;
|
|
90
90
|
i.delete(e.key), (!t || n(t.value) !== n(e.value)) && o.push({
|
|
@@ -102,45 +102,45 @@ function se(e, t, r) {
|
|
|
102
102
|
});
|
|
103
103
|
return o;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function C(e) {
|
|
106
106
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
107
107
|
}
|
|
108
|
-
var
|
|
109
|
-
let
|
|
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
110
|
proposalId: g.proposalId,
|
|
111
111
|
keys: /* @__PURE__ */ new Set()
|
|
112
|
-
}),
|
|
112
|
+
}), pe = M.proposalId === g.proposalId ? M.keys : /* @__PURE__ */ new Set(), me = (e) => fe((t) => {
|
|
113
113
|
let n = new Set(t.proposalId === g.proposalId ? t.keys : []);
|
|
114
114
|
return n.has(e) ? n.delete(e) : n.add(e), {
|
|
115
115
|
proposalId: g.proposalId,
|
|
116
116
|
keys: n
|
|
117
117
|
};
|
|
118
|
-
}),
|
|
118
|
+
}), N = f(null), [P, F] = p(null), I = P?.proposalId === g.proposalId ? P.action : null, L = (e, t) => {
|
|
119
119
|
let n = g.proposalId;
|
|
120
|
-
if (
|
|
120
|
+
if (N.current?.proposalId === n) return;
|
|
121
121
|
let r = {
|
|
122
122
|
proposalId: n,
|
|
123
123
|
action: e
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
N.current = r, F(r);
|
|
126
126
|
let i = () => {
|
|
127
|
-
|
|
127
|
+
N.current === r && (N.current = null, F((e) => e === r ? null : e));
|
|
128
128
|
}, a;
|
|
129
129
|
try {
|
|
130
130
|
a = t();
|
|
131
131
|
} catch (e) {
|
|
132
132
|
throw i(), e;
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
}, { available:
|
|
136
|
-
|
|
137
|
-
|
|
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(() => {
|
|
137
|
+
V.current = E;
|
|
138
138
|
});
|
|
139
|
-
let
|
|
140
|
-
|
|
139
|
+
let H = f(null);
|
|
140
|
+
d(() => {
|
|
141
141
|
let e = g.proposalId;
|
|
142
|
-
if (!
|
|
143
|
-
let t =
|
|
142
|
+
if (!k || !R || H.current === e) return;
|
|
143
|
+
let t = O.current;
|
|
144
144
|
if (!t || typeof IntersectionObserver > "u") return;
|
|
145
145
|
let n = null, r = () => {
|
|
146
146
|
n !== null && clearTimeout(n), n = null;
|
|
@@ -152,7 +152,7 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
n === null && (n = setTimeout(() => {
|
|
155
|
-
n = null,
|
|
155
|
+
n = null, H.current !== e && (H.current = e, i.disconnect(), V.current("card"));
|
|
156
156
|
}, 500));
|
|
157
157
|
}
|
|
158
158
|
}, { threshold: ie });
|
|
@@ -161,20 +161,24 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
161
161
|
};
|
|
162
162
|
}, [
|
|
163
163
|
g.proposalId,
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
k,
|
|
165
|
+
R
|
|
166
166
|
]);
|
|
167
|
-
let
|
|
168
|
-
e.isTrusted && (!
|
|
169
|
-
},
|
|
170
|
-
!
|
|
171
|
-
},
|
|
172
|
-
!
|
|
173
|
-
},
|
|
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) => ({
|
|
174
178
|
kind: e,
|
|
175
|
-
text: te(e,
|
|
176
|
-
})).filter((e) => !!e.text), Y =
|
|
177
|
-
let i = e.sensitive && !
|
|
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);
|
|
178
182
|
return /* @__PURE__ */ h("span", {
|
|
179
183
|
className: "inline-flex min-w-0 flex-wrap items-baseline gap-x-2",
|
|
180
184
|
children: [i ? /* @__PURE__ */ h("span", {
|
|
@@ -185,25 +189,25 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
185
189
|
children: t
|
|
186
190
|
}), /* @__PURE__ */ m("span", {
|
|
187
191
|
className: "sr-only",
|
|
188
|
-
children:
|
|
192
|
+
children: T("writeProposal.hiddenValue", "Hidden value")
|
|
189
193
|
})]
|
|
190
194
|
}) : /* @__PURE__ */ m("span", {
|
|
191
195
|
className: "min-w-0 whitespace-pre-wrap break-words font-medium text-text-primary",
|
|
192
196
|
children: n(e.value)
|
|
193
197
|
}), e.sensitive && r ? /* @__PURE__ */ m("button", {
|
|
194
198
|
type: "button",
|
|
195
|
-
onClick: () =>
|
|
199
|
+
onClick: () => me(e.key),
|
|
196
200
|
"aria-pressed": !i,
|
|
197
201
|
"aria-describedby": r,
|
|
198
202
|
className: "rounded text-[11px] font-medium text-text-link underline focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
199
203
|
"data-testid": "assistant-write-proposal-reveal",
|
|
200
|
-
children: i ?
|
|
204
|
+
children: i ? T("writeProposal.showValue", "Show") : T("writeProposal.hideValue", "Hide")
|
|
201
205
|
}) : null]
|
|
202
206
|
});
|
|
203
207
|
}, Q = (e, t) => /* @__PURE__ */ m("dl", {
|
|
204
208
|
className: "mt-1 grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",
|
|
205
209
|
children: e.map((e, n) => {
|
|
206
|
-
let r = `${
|
|
210
|
+
let r = `${de}-${t}-${n}`;
|
|
207
211
|
return /* @__PURE__ */ h("div", {
|
|
208
212
|
className: "contents",
|
|
209
213
|
children: [/* @__PURE__ */ m("dt", {
|
|
@@ -216,12 +220,12 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
216
220
|
})]
|
|
217
221
|
}, `${n}:${e.key}`);
|
|
218
222
|
})
|
|
219
|
-
}),
|
|
223
|
+
}), be = l(g), $ = g.description.consequences.map((e) => r(e, be));
|
|
220
224
|
return /* @__PURE__ */ h("div", {
|
|
221
|
-
ref:
|
|
225
|
+
ref: O,
|
|
222
226
|
role: "group",
|
|
223
|
-
"aria-label":
|
|
224
|
-
className: `my-2 overflow-hidden rounded-xl border ${
|
|
227
|
+
"aria-label": T("writeProposal.aria", "Proposed change: {{label}}", { label: g.description.label }),
|
|
228
|
+
className: `my-2 overflow-hidden rounded-xl border ${k ? "border-status-warning bg-status-warning/10" : "border-border-subtle bg-bg-surface"}`,
|
|
225
229
|
"data-testid": "assistant-write-proposal",
|
|
226
230
|
"data-status": g.status,
|
|
227
231
|
children: [
|
|
@@ -229,7 +233,7 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
229
233
|
className: "flex items-start justify-between gap-2 border-b border-border-subtle px-3 py-2",
|
|
230
234
|
children: [/* @__PURE__ */ h("div", {
|
|
231
235
|
className: "flex min-w-0 items-start gap-2",
|
|
232
|
-
children: [/* @__PURE__ */ m(
|
|
236
|
+
children: [/* @__PURE__ */ m(re, {
|
|
233
237
|
className: "mt-0.5 size-4 flex-shrink-0 text-status-warning",
|
|
234
238
|
"aria-hidden": "true"
|
|
235
239
|
}), /* @__PURE__ */ h("div", {
|
|
@@ -242,11 +246,11 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
242
246
|
}),
|
|
243
247
|
/* @__PURE__ */ m("p", {
|
|
244
248
|
className: "text-[11px] text-text-muted",
|
|
245
|
-
children: s(g,
|
|
249
|
+
children: s(g, T)
|
|
246
250
|
}),
|
|
247
|
-
|
|
251
|
+
B ? /* @__PURE__ */ m("p", {
|
|
248
252
|
className: "text-[11px] text-text-secondary",
|
|
249
|
-
children:
|
|
253
|
+
children: T("writeProposal.title", "Review and approve this change.")
|
|
250
254
|
}) : null
|
|
251
255
|
]
|
|
252
256
|
})]
|
|
@@ -254,9 +258,9 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
254
258
|
role: "status",
|
|
255
259
|
"aria-live": "polite",
|
|
256
260
|
"aria-atomic": "true",
|
|
257
|
-
className: `max-w-[50%] flex-shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium break-words ${
|
|
261
|
+
className: `max-w-[50%] flex-shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium break-words ${ae(g)}`,
|
|
258
262
|
"data-testid": "assistant-write-proposal-status",
|
|
259
|
-
children:
|
|
263
|
+
children: ve
|
|
260
264
|
})]
|
|
261
265
|
}),
|
|
262
266
|
/* @__PURE__ */ h("div", {
|
|
@@ -276,7 +280,7 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
276
280
|
"data-testid": "assistant-write-proposal-field",
|
|
277
281
|
children: [/* @__PURE__ */ m("p", {
|
|
278
282
|
className: "break-words font-mono text-xs text-text-primary",
|
|
279
|
-
children:
|
|
283
|
+
children: c(e)
|
|
280
284
|
}), n.length > 0 ? Q(n, `field${t}`) : null]
|
|
281
285
|
}, `${t}:${e.alias ?? e.field}`);
|
|
282
286
|
}),
|
|
@@ -284,21 +288,21 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
284
288
|
"data-testid": "assistant-write-proposal-variables",
|
|
285
289
|
children: [/* @__PURE__ */ m("p", {
|
|
286
290
|
className: "text-[11px] font-medium text-text-secondary",
|
|
287
|
-
children:
|
|
291
|
+
children: T("writeProposal.values", "Values")
|
|
288
292
|
}), Q(Y, "vars")]
|
|
289
293
|
}) : null,
|
|
290
294
|
g.description.variablesOmitted ? /* @__PURE__ */ m("p", {
|
|
291
295
|
className: "text-[11px] text-text-muted",
|
|
292
|
-
children:
|
|
296
|
+
children: T("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: g.description.variablesOmitted })
|
|
293
297
|
}) : null,
|
|
294
298
|
g.description.targetCount > 0 ? /* @__PURE__ */ m("p", {
|
|
295
299
|
className: "text-xs text-text-secondary",
|
|
296
300
|
"data-testid": "assistant-write-proposal-target-count",
|
|
297
|
-
children:
|
|
301
|
+
children: T("writeProposal.targetCount", "Items affected: {{count}}", { count: g.description.targetCount })
|
|
298
302
|
}) : null,
|
|
299
303
|
$.length > 0 ? /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
300
304
|
className: "text-[11px] font-medium text-text-secondary",
|
|
301
|
-
children:
|
|
305
|
+
children: T("writeProposal.consequences", "What this will do")
|
|
302
306
|
}), /* @__PURE__ */ m("ul", {
|
|
303
307
|
className: "list-disc pl-4 text-xs text-text-primary",
|
|
304
308
|
"data-testid": "assistant-write-proposal-consequences",
|
|
@@ -306,18 +310,18 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
306
310
|
})] }) : null,
|
|
307
311
|
g.repeatOf ? /* @__PURE__ */ m("p", {
|
|
308
312
|
className: "text-xs text-status-warning-text",
|
|
309
|
-
children:
|
|
313
|
+
children: T("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
|
|
310
314
|
}) : null,
|
|
311
315
|
g.revision > 1 ? /* @__PURE__ */ h("div", {
|
|
312
316
|
"data-testid": "assistant-write-proposal-revision",
|
|
313
317
|
children: [
|
|
314
318
|
/* @__PURE__ */ m("p", {
|
|
315
319
|
className: "text-[11px] font-medium text-text-secondary",
|
|
316
|
-
children:
|
|
320
|
+
children: T("writeProposal.revision", "Revised — version {{revision}}", { revision: g.revision })
|
|
317
321
|
}),
|
|
318
322
|
X && X.length === 0 ? /* @__PURE__ */ m("p", {
|
|
319
323
|
className: "text-[11px] text-text-muted",
|
|
320
|
-
children:
|
|
324
|
+
children: T("writeProposal.diff.none", "No values changed")
|
|
321
325
|
}) : null,
|
|
322
326
|
X && X.length > 0 ? /* @__PURE__ */ h("table", {
|
|
323
327
|
className: "mt-1 w-full table-fixed text-xs",
|
|
@@ -330,18 +334,18 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
330
334
|
className: "w-1/3 font-medium",
|
|
331
335
|
children: /* @__PURE__ */ m("span", {
|
|
332
336
|
className: "sr-only",
|
|
333
|
-
children:
|
|
337
|
+
children: T("writeProposal.diff.value", "Value")
|
|
334
338
|
})
|
|
335
339
|
}),
|
|
336
340
|
/* @__PURE__ */ m("th", {
|
|
337
341
|
scope: "col",
|
|
338
342
|
className: "font-medium",
|
|
339
|
-
children:
|
|
343
|
+
children: T("writeProposal.diff.before", "Before")
|
|
340
344
|
}),
|
|
341
345
|
/* @__PURE__ */ m("th", {
|
|
342
346
|
scope: "col",
|
|
343
347
|
className: "font-medium",
|
|
344
|
-
children:
|
|
348
|
+
children: T("writeProposal.diff.after", "After")
|
|
345
349
|
})
|
|
346
350
|
]
|
|
347
351
|
}) }), /* @__PURE__ */ m("tbody", { children: X.map((e) => /* @__PURE__ */ h("tr", {
|
|
@@ -359,14 +363,14 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
359
363
|
sensitive: e.before.sensitive || !!e.after?.sensitive
|
|
360
364
|
}, null) : /* @__PURE__ */ m("span", {
|
|
361
365
|
className: "text-text-muted",
|
|
362
|
-
children:
|
|
366
|
+
children: T("writeProposal.diff.absent", "(not set)")
|
|
363
367
|
})
|
|
364
368
|
}),
|
|
365
369
|
/* @__PURE__ */ m("td", {
|
|
366
370
|
className: "break-words",
|
|
367
371
|
children: e.after ? Z(e.after, null) : /* @__PURE__ */ m("span", {
|
|
368
372
|
className: "text-text-muted",
|
|
369
|
-
children:
|
|
373
|
+
children: T("writeProposal.diff.absent", "(not set)")
|
|
370
374
|
})
|
|
371
375
|
})
|
|
372
376
|
]
|
|
@@ -376,63 +380,63 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
376
380
|
}) : null
|
|
377
381
|
]
|
|
378
382
|
}),
|
|
379
|
-
|
|
383
|
+
k ? /* @__PURE__ */ h("div", {
|
|
380
384
|
className: "space-y-1 border-t border-border-subtle px-3 py-2 text-[11px]",
|
|
381
385
|
children: [
|
|
382
386
|
/* @__PURE__ */ m("p", {
|
|
383
387
|
className: "text-text-secondary",
|
|
384
388
|
"data-testid": "assistant-write-proposal-countdown",
|
|
385
|
-
children:
|
|
389
|
+
children: j ? T("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : ee(A, ue, T)
|
|
386
390
|
}),
|
|
387
|
-
|
|
391
|
+
S ? /* @__PURE__ */ m("p", {
|
|
388
392
|
className: "text-text-secondary",
|
|
389
393
|
"data-testid": "assistant-write-proposal-inert",
|
|
390
|
-
children:
|
|
391
|
-
}) :
|
|
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", {
|
|
392
396
|
className: "text-text-secondary",
|
|
393
397
|
"data-testid": "assistant-write-proposal-fenced",
|
|
394
|
-
children:
|
|
398
|
+
children: T("writeProposal.executionFenced", "You can review or cancel this change. Running it from the assistant becomes available once secure confirmation is enabled.")
|
|
395
399
|
}) : null : /* @__PURE__ */ m("p", {
|
|
396
400
|
className: "text-text-secondary",
|
|
397
401
|
"data-testid": "assistant-write-proposal-not-approvable",
|
|
398
|
-
children:
|
|
402
|
+
children: T("writeProposal.notApprovable", "This change isn't ready to confirm. If it stays this way, ask the assistant to prepare it again.")
|
|
399
403
|
}) : /* @__PURE__ */ m("p", {
|
|
400
404
|
className: "text-text-secondary",
|
|
401
405
|
"data-testid": "assistant-write-proposal-not-available",
|
|
402
|
-
children:
|
|
406
|
+
children: T("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
|
|
403
407
|
}),
|
|
404
|
-
|
|
408
|
+
z && w ? /* @__PURE__ */ m("p", {
|
|
405
409
|
className: "text-text-muted",
|
|
406
|
-
children:
|
|
410
|
+
children: T("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
|
|
407
411
|
}) : null
|
|
408
412
|
]
|
|
409
413
|
}) : null,
|
|
410
|
-
|
|
414
|
+
z ? /* @__PURE__ */ h("div", {
|
|
411
415
|
className: "flex flex-wrap justify-end gap-2 border-t border-border-subtle px-3 py-2",
|
|
412
416
|
children: [
|
|
413
417
|
/* @__PURE__ */ m("button", {
|
|
414
418
|
type: "button",
|
|
415
|
-
onClick:
|
|
416
|
-
disabled:
|
|
419
|
+
onClick: _e,
|
|
420
|
+
disabled: W,
|
|
417
421
|
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",
|
|
418
422
|
"data-testid": "assistant-write-proposal-cancel",
|
|
419
|
-
children:
|
|
423
|
+
children: T("writeProposal.cancel", "Cancel")
|
|
420
424
|
}),
|
|
421
|
-
|
|
425
|
+
B && U ? /* @__PURE__ */ m("button", {
|
|
422
426
|
type: "button",
|
|
423
|
-
onClick:
|
|
424
|
-
disabled:
|
|
427
|
+
onClick: K,
|
|
428
|
+
disabled: G,
|
|
425
429
|
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",
|
|
426
430
|
"data-testid": "assistant-write-proposal-review",
|
|
427
|
-
children:
|
|
431
|
+
children: T("writeProposal.review", "Review & confirm…")
|
|
428
432
|
}) : null,
|
|
429
|
-
|
|
433
|
+
B && !U ? /* @__PURE__ */ m("button", {
|
|
430
434
|
type: "button",
|
|
431
|
-
onClick:
|
|
432
|
-
disabled:
|
|
435
|
+
onClick: ge,
|
|
436
|
+
disabled: G,
|
|
433
437
|
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",
|
|
434
438
|
"data-testid": "assistant-write-proposal-confirm",
|
|
435
|
-
children:
|
|
439
|
+
children: I === "approve" ? T("writeProposal.confirming", "Confirming…") : g.description.confirmLabel.trim() || T("writeProposal.confirmFallback", "Confirm this change")
|
|
436
440
|
}) : null
|
|
437
441
|
]
|
|
438
442
|
}) : null
|
|
@@ -440,4 +444,4 @@ var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1,
|
|
|
440
444
|
});
|
|
441
445
|
};
|
|
442
446
|
//#endregion
|
|
443
|
-
export {
|
|
447
|
+
export { w as AssistantWriteProposalCard, g as WRITE_PROPOSAL_DIALOG_KINDS, v as WRITE_PROPOSAL_PRESENTED_AFTER_MS, x as statusText, _ as writeProposalUsesDialog };
|