@burdenoff/fe-libs 2026.930.1 → 2026.930.3
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/preview/AssistantPreviewOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/preview/AssistantPreviewOverlay.js +26 -25
- package/dist/shared/assistant/preview/types.d.ts +34 -4
- package/dist/shared/assistant/preview/types.d.ts.map +1 -1
- package/dist/shared/assistant/preview/types.js +6 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +5 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +67 -66
- 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/AssistantEmptyState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantEmptyState.js +24 -18
- package/dist/shared/assistant/ui/AssistantHeader.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantHeader.js +45 -44
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +14 -1
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantOverlay.js +105 -90
- 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/assistantOverlayState.d.ts +38 -0
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.js +14 -10
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +9 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +37 -33
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +2 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +16 -0
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +27 -24
- 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 +93 -92
- package/package.json +1 -1
|
@@ -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 ne, writeProposalSensitiveTexts as c, writeProposalVariableValues as l } from "./writeProposalPresentation.js";
|
|
3
|
+
import { useEffect as u, useId as re, useRef as d, useState as f } from "react";
|
|
4
|
+
import { ShieldAlert as p } 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([
|
|
@@ -27,19 +27,23 @@ var v = 500, ie = [
|
|
|
27
27
|
.8,
|
|
28
28
|
.9,
|
|
29
29
|
1
|
|
30
|
-
]
|
|
30
|
+
], y = new Set([
|
|
31
|
+
"FORBIDDEN",
|
|
32
|
+
"PERMISSION_DENIED",
|
|
33
|
+
"HTTP_403"
|
|
34
|
+
]);
|
|
35
|
+
function b(e) {
|
|
36
|
+
return (e.result?.errors ?? []).some((e) => e.code !== void 0 && y.has(e.code));
|
|
37
|
+
}
|
|
31
38
|
function ae(e, t) {
|
|
32
39
|
switch (e.status) {
|
|
33
40
|
case "pending": return t("writeProposal.status.pending", "Waiting for you");
|
|
34
41
|
case "executing": return t("writeProposal.status.executing", "Working…");
|
|
35
42
|
case "succeeded": {
|
|
36
|
-
let n = r((e.result?.summary || e.description.readbackPast).trim(),
|
|
43
|
+
let n = r((e.result?.summary || e.description.readbackPast).trim(), c(e));
|
|
37
44
|
return n ? t("writeProposal.status.succeeded", "Done — {{summary}}", { summary: n }) : t("writeProposal.status.succeededNoDetail", "Done");
|
|
38
45
|
}
|
|
39
|
-
case "failed":
|
|
40
|
-
let n = r((e.result?.errors?.find((e) => e.message.trim())?.message ?? e.result?.summary ?? "").trim(), l(e));
|
|
41
|
-
return n ? t("writeProposal.status.failed", "Didn't go through: {{error}}", { error: n }) : t("writeProposal.status.failedNoDetail", "Didn't go through");
|
|
42
|
-
}
|
|
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");
|
|
43
47
|
case "outcome_unknown": return t("writeProposal.status.outcomeUnknown", "Couldn't confirm — check before trying again");
|
|
44
48
|
case "declined": return t("writeProposal.status.declined", "Cancelled");
|
|
45
49
|
case "superseded": return t("writeProposal.status.superseded", "Replaced — the conversation moved on");
|
|
@@ -58,7 +62,7 @@ function oe(e) {
|
|
|
58
62
|
case "expired": return "border-border-subtle bg-bg-muted text-text-secondary";
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
|
-
function
|
|
65
|
+
function x(e, t) {
|
|
62
66
|
return [
|
|
63
67
|
{
|
|
64
68
|
key: "label",
|
|
@@ -76,11 +80,11 @@ function y(e, t) {
|
|
|
76
80
|
...t,
|
|
77
81
|
label: `${e.alias ?? e.field}.${t.label}`
|
|
78
82
|
}))),
|
|
79
|
-
...
|
|
83
|
+
...l(e)
|
|
80
84
|
];
|
|
81
85
|
}
|
|
82
86
|
function se(e, t, r) {
|
|
83
|
-
let i = new Map(
|
|
87
|
+
let i = new Map(x(e, r).map((e) => [e.key, e])), a = x(t, r), o = [];
|
|
84
88
|
for (let e of a) {
|
|
85
89
|
let t = i.get(e.key) ?? null;
|
|
86
90
|
i.delete(e.key), (!t || n(t.value) !== n(e.value)) && o.push({
|
|
@@ -98,45 +102,45 @@ function se(e, t, r) {
|
|
|
98
102
|
});
|
|
99
103
|
return o;
|
|
100
104
|
}
|
|
101
|
-
function
|
|
105
|
+
function S(e) {
|
|
102
106
|
return typeof e == "object" && !!e && typeof e.then == "function";
|
|
103
107
|
}
|
|
104
|
-
var
|
|
105
|
-
let
|
|
108
|
+
var C = ({ view: g, serverNow: v, arrivedAt: y, capabilities: b, inert: x = !1, turnInFlight: C, tr: w, onApprove: ce, onDecline: le, onReview: ue, onPresented: T, previous: E }) => {
|
|
109
|
+
let D = e(), O = re(), k = d(null), A = g.status === "pending", j = i(g.expiresAt, v, y, A), M = j <= 0, [N, de] = f({
|
|
106
110
|
proposalId: g.proposalId,
|
|
107
111
|
keys: /* @__PURE__ */ new Set()
|
|
108
|
-
}), fe =
|
|
112
|
+
}), fe = N.proposalId === g.proposalId ? N.keys : /* @__PURE__ */ new Set(), P = (e) => de((t) => {
|
|
109
113
|
let n = new Set(t.proposalId === g.proposalId ? t.keys : []);
|
|
110
114
|
return n.has(e) ? n.delete(e) : n.add(e), {
|
|
111
115
|
proposalId: g.proposalId,
|
|
112
116
|
keys: n
|
|
113
117
|
};
|
|
114
|
-
}),
|
|
118
|
+
}), F = d(null), [I, L] = f(null), R = I?.proposalId === g.proposalId ? I.action : null, z = (e, t) => {
|
|
115
119
|
let n = g.proposalId;
|
|
116
|
-
if (
|
|
120
|
+
if (F.current?.proposalId === n) return;
|
|
117
121
|
let r = {
|
|
118
122
|
proposalId: n,
|
|
119
123
|
action: e
|
|
120
124
|
};
|
|
121
|
-
|
|
125
|
+
F.current = r, L(r);
|
|
122
126
|
let i = () => {
|
|
123
|
-
|
|
127
|
+
F.current === r && (F.current = null, L((e) => e === r ? null : e));
|
|
124
128
|
}, a;
|
|
125
129
|
try {
|
|
126
130
|
a = t();
|
|
127
131
|
} catch (e) {
|
|
128
132
|
throw i(), e;
|
|
129
133
|
}
|
|
130
|
-
|
|
131
|
-
}, { available:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
S(a) && a.then(i, i);
|
|
135
|
+
}, { available: B, fenced: pe, showControls: V, offerConfirm: H } = o(g, x ? null : b), U = d(T);
|
|
136
|
+
u(() => {
|
|
137
|
+
U.current = T;
|
|
134
138
|
});
|
|
135
|
-
let
|
|
136
|
-
|
|
139
|
+
let W = d(null);
|
|
140
|
+
u(() => {
|
|
137
141
|
let e = g.proposalId;
|
|
138
|
-
if (!
|
|
139
|
-
let t =
|
|
142
|
+
if (!A || !B || W.current === e) return;
|
|
143
|
+
let t = k.current;
|
|
140
144
|
if (!t || typeof IntersectionObserver > "u") return;
|
|
141
145
|
let n = null, r = () => {
|
|
142
146
|
n !== null && clearTimeout(n), n = null;
|
|
@@ -148,7 +152,7 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
148
152
|
return;
|
|
149
153
|
}
|
|
150
154
|
n === null && (n = setTimeout(() => {
|
|
151
|
-
n = null,
|
|
155
|
+
n = null, W.current !== e && (W.current = e, i.disconnect(), U.current("card"));
|
|
152
156
|
}, 500));
|
|
153
157
|
}
|
|
154
158
|
}, { threshold: ie });
|
|
@@ -157,19 +161,19 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
157
161
|
};
|
|
158
162
|
}, [
|
|
159
163
|
g.proposalId,
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
A,
|
|
165
|
+
B
|
|
162
166
|
]);
|
|
163
|
-
let
|
|
164
|
-
e.isTrusted && (!
|
|
165
|
-
}, me = () => {
|
|
166
|
-
!B || G || L("decline", le);
|
|
167
|
+
let G = _(g), K = C || R !== null, q = K || M, me = (e) => {
|
|
168
|
+
e.isTrusted && (!H || G || q || z("approve", ce));
|
|
167
169
|
}, he = () => {
|
|
168
|
-
!V ||
|
|
169
|
-
}, ge =
|
|
170
|
+
!V || K || z("decline", le);
|
|
171
|
+
}, ge = () => {
|
|
172
|
+
!H || !G || q || ue();
|
|
173
|
+
}, _e = ae(g, w), J = [...new Set(g.risk.kinds)].map((e) => ({
|
|
170
174
|
kind: e,
|
|
171
|
-
text: te(e,
|
|
172
|
-
})).filter((e) => !!e.text), Y =
|
|
175
|
+
text: te(e, w)
|
|
176
|
+
})).filter((e) => !!e.text), Y = l(g), X = g.revision > 1 && E && E.proposalId === g.supersedes ? se(E, g, w) : null, Z = (e, r) => {
|
|
173
177
|
let i = e.sensitive && !fe.has(e.key);
|
|
174
178
|
return /* @__PURE__ */ h("span", {
|
|
175
179
|
className: "inline-flex min-w-0 flex-wrap items-baseline gap-x-2",
|
|
@@ -181,25 +185,25 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
181
185
|
children: t
|
|
182
186
|
}), /* @__PURE__ */ m("span", {
|
|
183
187
|
className: "sr-only",
|
|
184
|
-
children:
|
|
188
|
+
children: w("writeProposal.hiddenValue", "Hidden value")
|
|
185
189
|
})]
|
|
186
190
|
}) : /* @__PURE__ */ m("span", {
|
|
187
191
|
className: "min-w-0 whitespace-pre-wrap break-words font-medium text-text-primary",
|
|
188
192
|
children: n(e.value)
|
|
189
193
|
}), e.sensitive && r ? /* @__PURE__ */ m("button", {
|
|
190
194
|
type: "button",
|
|
191
|
-
onClick: () =>
|
|
195
|
+
onClick: () => P(e.key),
|
|
192
196
|
"aria-pressed": !i,
|
|
193
197
|
"aria-describedby": r,
|
|
194
198
|
className: "rounded text-[11px] font-medium text-text-link underline focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
195
199
|
"data-testid": "assistant-write-proposal-reveal",
|
|
196
|
-
children: i ?
|
|
200
|
+
children: i ? w("writeProposal.showValue", "Show") : w("writeProposal.hideValue", "Hide")
|
|
197
201
|
}) : null]
|
|
198
202
|
});
|
|
199
203
|
}, Q = (e, t) => /* @__PURE__ */ m("dl", {
|
|
200
204
|
className: "mt-1 grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",
|
|
201
205
|
children: e.map((e, n) => {
|
|
202
|
-
let r = `${
|
|
206
|
+
let r = `${O}-${t}-${n}`;
|
|
203
207
|
return /* @__PURE__ */ h("div", {
|
|
204
208
|
className: "contents",
|
|
205
209
|
children: [/* @__PURE__ */ m("dt", {
|
|
@@ -212,12 +216,12 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
212
216
|
})]
|
|
213
217
|
}, `${n}:${e.key}`);
|
|
214
218
|
})
|
|
215
|
-
}),
|
|
219
|
+
}), ve = c(g), $ = g.description.consequences.map((e) => r(e, ve));
|
|
216
220
|
return /* @__PURE__ */ h("div", {
|
|
217
|
-
ref:
|
|
221
|
+
ref: k,
|
|
218
222
|
role: "group",
|
|
219
|
-
"aria-label":
|
|
220
|
-
className: `my-2 overflow-hidden rounded-xl border ${
|
|
223
|
+
"aria-label": w("writeProposal.aria", "Proposed change: {{label}}", { label: g.description.label }),
|
|
224
|
+
className: `my-2 overflow-hidden rounded-xl border ${A ? "border-status-warning bg-status-warning/10" : "border-border-subtle bg-bg-surface"}`,
|
|
221
225
|
"data-testid": "assistant-write-proposal",
|
|
222
226
|
"data-status": g.status,
|
|
223
227
|
children: [
|
|
@@ -225,7 +229,7 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
225
229
|
className: "flex items-start justify-between gap-2 border-b border-border-subtle px-3 py-2",
|
|
226
230
|
children: [/* @__PURE__ */ h("div", {
|
|
227
231
|
className: "flex min-w-0 items-start gap-2",
|
|
228
|
-
children: [/* @__PURE__ */ m(
|
|
232
|
+
children: [/* @__PURE__ */ m(p, {
|
|
229
233
|
className: "mt-0.5 size-4 flex-shrink-0 text-status-warning",
|
|
230
234
|
"aria-hidden": "true"
|
|
231
235
|
}), /* @__PURE__ */ h("div", {
|
|
@@ -238,11 +242,11 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
238
242
|
}),
|
|
239
243
|
/* @__PURE__ */ m("p", {
|
|
240
244
|
className: "text-[11px] text-text-muted",
|
|
241
|
-
children: s(g,
|
|
245
|
+
children: s(g, w)
|
|
242
246
|
}),
|
|
243
|
-
|
|
247
|
+
H ? /* @__PURE__ */ m("p", {
|
|
244
248
|
className: "text-[11px] text-text-secondary",
|
|
245
|
-
children:
|
|
249
|
+
children: w("writeProposal.title", "Review and approve this change.")
|
|
246
250
|
}) : null
|
|
247
251
|
]
|
|
248
252
|
})]
|
|
@@ -252,7 +256,7 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
252
256
|
"aria-atomic": "true",
|
|
253
257
|
className: `max-w-[50%] flex-shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium break-words ${oe(g)}`,
|
|
254
258
|
"data-testid": "assistant-write-proposal-status",
|
|
255
|
-
children:
|
|
259
|
+
children: _e
|
|
256
260
|
})]
|
|
257
261
|
}),
|
|
258
262
|
/* @__PURE__ */ h("div", {
|
|
@@ -272,7 +276,7 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
272
276
|
"data-testid": "assistant-write-proposal-field",
|
|
273
277
|
children: [/* @__PURE__ */ m("p", {
|
|
274
278
|
className: "break-words font-mono text-xs text-text-primary",
|
|
275
|
-
children:
|
|
279
|
+
children: ne(e)
|
|
276
280
|
}), n.length > 0 ? Q(n, `field${t}`) : null]
|
|
277
281
|
}, `${t}:${e.alias ?? e.field}`);
|
|
278
282
|
}),
|
|
@@ -280,21 +284,21 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
280
284
|
"data-testid": "assistant-write-proposal-variables",
|
|
281
285
|
children: [/* @__PURE__ */ m("p", {
|
|
282
286
|
className: "text-[11px] font-medium text-text-secondary",
|
|
283
|
-
children:
|
|
287
|
+
children: w("writeProposal.values", "Values")
|
|
284
288
|
}), Q(Y, "vars")]
|
|
285
289
|
}) : null,
|
|
286
290
|
g.description.variablesOmitted ? /* @__PURE__ */ m("p", {
|
|
287
291
|
className: "text-[11px] text-text-muted",
|
|
288
|
-
children:
|
|
292
|
+
children: w("writeProposal.variablesOmitted", "{{count}} more values not shown", { count: g.description.variablesOmitted })
|
|
289
293
|
}) : null,
|
|
290
294
|
g.description.targetCount > 0 ? /* @__PURE__ */ m("p", {
|
|
291
295
|
className: "text-xs text-text-secondary",
|
|
292
296
|
"data-testid": "assistant-write-proposal-target-count",
|
|
293
|
-
children:
|
|
297
|
+
children: w("writeProposal.targetCount", "Items affected: {{count}}", { count: g.description.targetCount })
|
|
294
298
|
}) : null,
|
|
295
299
|
$.length > 0 ? /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
296
300
|
className: "text-[11px] font-medium text-text-secondary",
|
|
297
|
-
children:
|
|
301
|
+
children: w("writeProposal.consequences", "What this will do")
|
|
298
302
|
}), /* @__PURE__ */ m("ul", {
|
|
299
303
|
className: "list-disc pl-4 text-xs text-text-primary",
|
|
300
304
|
"data-testid": "assistant-write-proposal-consequences",
|
|
@@ -302,18 +306,18 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
302
306
|
})] }) : null,
|
|
303
307
|
g.repeatOf ? /* @__PURE__ */ m("p", {
|
|
304
308
|
className: "text-xs text-status-warning-text",
|
|
305
|
-
children:
|
|
309
|
+
children: w("writeProposal.repeat", "You made this same change recently. Confirming makes it again.")
|
|
306
310
|
}) : null,
|
|
307
311
|
g.revision > 1 ? /* @__PURE__ */ h("div", {
|
|
308
312
|
"data-testid": "assistant-write-proposal-revision",
|
|
309
313
|
children: [
|
|
310
314
|
/* @__PURE__ */ m("p", {
|
|
311
315
|
className: "text-[11px] font-medium text-text-secondary",
|
|
312
|
-
children:
|
|
316
|
+
children: w("writeProposal.revision", "Revised — version {{revision}}", { revision: g.revision })
|
|
313
317
|
}),
|
|
314
318
|
X && X.length === 0 ? /* @__PURE__ */ m("p", {
|
|
315
319
|
className: "text-[11px] text-text-muted",
|
|
316
|
-
children:
|
|
320
|
+
children: w("writeProposal.diff.none", "No values changed")
|
|
317
321
|
}) : null,
|
|
318
322
|
X && X.length > 0 ? /* @__PURE__ */ h("table", {
|
|
319
323
|
className: "mt-1 w-full table-fixed text-xs",
|
|
@@ -326,18 +330,18 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
326
330
|
className: "w-1/3 font-medium",
|
|
327
331
|
children: /* @__PURE__ */ m("span", {
|
|
328
332
|
className: "sr-only",
|
|
329
|
-
children:
|
|
333
|
+
children: w("writeProposal.diff.value", "Value")
|
|
330
334
|
})
|
|
331
335
|
}),
|
|
332
336
|
/* @__PURE__ */ m("th", {
|
|
333
337
|
scope: "col",
|
|
334
338
|
className: "font-medium",
|
|
335
|
-
children:
|
|
339
|
+
children: w("writeProposal.diff.before", "Before")
|
|
336
340
|
}),
|
|
337
341
|
/* @__PURE__ */ m("th", {
|
|
338
342
|
scope: "col",
|
|
339
343
|
className: "font-medium",
|
|
340
|
-
children:
|
|
344
|
+
children: w("writeProposal.diff.after", "After")
|
|
341
345
|
})
|
|
342
346
|
]
|
|
343
347
|
}) }), /* @__PURE__ */ m("tbody", { children: X.map((e) => /* @__PURE__ */ h("tr", {
|
|
@@ -355,14 +359,14 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
355
359
|
sensitive: e.before.sensitive || !!e.after?.sensitive
|
|
356
360
|
}, null) : /* @__PURE__ */ m("span", {
|
|
357
361
|
className: "text-text-muted",
|
|
358
|
-
children:
|
|
362
|
+
children: w("writeProposal.diff.absent", "(not set)")
|
|
359
363
|
})
|
|
360
364
|
}),
|
|
361
365
|
/* @__PURE__ */ m("td", {
|
|
362
366
|
className: "break-words",
|
|
363
367
|
children: e.after ? Z(e.after, null) : /* @__PURE__ */ m("span", {
|
|
364
368
|
className: "text-text-muted",
|
|
365
|
-
children:
|
|
369
|
+
children: w("writeProposal.diff.absent", "(not set)")
|
|
366
370
|
})
|
|
367
371
|
})
|
|
368
372
|
]
|
|
@@ -372,63 +376,63 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
372
376
|
}) : null
|
|
373
377
|
]
|
|
374
378
|
}),
|
|
375
|
-
|
|
379
|
+
A ? /* @__PURE__ */ h("div", {
|
|
376
380
|
className: "space-y-1 border-t border-border-subtle px-3 py-2 text-[11px]",
|
|
377
381
|
children: [
|
|
378
382
|
/* @__PURE__ */ m("p", {
|
|
379
383
|
className: "text-text-secondary",
|
|
380
384
|
"data-testid": "assistant-write-proposal-countdown",
|
|
381
|
-
children:
|
|
385
|
+
children: M ? w("writeProposal.timeUp", "Time's up — this can no longer be confirmed") : ee(j, D, w)
|
|
382
386
|
}),
|
|
383
387
|
x ? /* @__PURE__ */ m("p", {
|
|
384
388
|
className: "text-text-secondary",
|
|
385
389
|
"data-testid": "assistant-write-proposal-inert",
|
|
386
|
-
children:
|
|
387
|
-
}) :
|
|
390
|
+
children: w("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.")
|
|
391
|
+
}) : B ? g.approvable ? pe ? /* @__PURE__ */ m("p", {
|
|
388
392
|
className: "text-text-secondary",
|
|
389
393
|
"data-testid": "assistant-write-proposal-fenced",
|
|
390
|
-
children:
|
|
394
|
+
children: w("writeProposal.executionFenced", "You can review or cancel this change. Running it from the assistant becomes available once secure confirmation is enabled.")
|
|
391
395
|
}) : null : /* @__PURE__ */ m("p", {
|
|
392
396
|
className: "text-text-secondary",
|
|
393
397
|
"data-testid": "assistant-write-proposal-not-approvable",
|
|
394
|
-
children:
|
|
398
|
+
children: w("writeProposal.notApprovable", "This change isn't ready to confirm. If it stays this way, ask the assistant to prepare it again.")
|
|
395
399
|
}) : /* @__PURE__ */ m("p", {
|
|
396
400
|
className: "text-text-secondary",
|
|
397
401
|
"data-testid": "assistant-write-proposal-not-available",
|
|
398
|
-
children:
|
|
402
|
+
children: w("writeProposal.notAvailableYet", "Confirming changes from the assistant isn't available in this session yet.")
|
|
399
403
|
}),
|
|
400
|
-
|
|
404
|
+
V && C ? /* @__PURE__ */ m("p", {
|
|
401
405
|
className: "text-text-muted",
|
|
402
|
-
children:
|
|
406
|
+
children: w("writeProposal.waitForTurn", "You can confirm once the assistant finishes replying.")
|
|
403
407
|
}) : null
|
|
404
408
|
]
|
|
405
409
|
}) : null,
|
|
406
|
-
|
|
410
|
+
V ? /* @__PURE__ */ h("div", {
|
|
407
411
|
className: "flex flex-wrap justify-end gap-2 border-t border-border-subtle px-3 py-2",
|
|
408
412
|
children: [
|
|
409
413
|
/* @__PURE__ */ m("button", {
|
|
410
414
|
type: "button",
|
|
411
|
-
onClick:
|
|
412
|
-
disabled:
|
|
415
|
+
onClick: he,
|
|
416
|
+
disabled: K,
|
|
413
417
|
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",
|
|
414
418
|
"data-testid": "assistant-write-proposal-cancel",
|
|
415
|
-
children:
|
|
419
|
+
children: w("writeProposal.cancel", "Cancel")
|
|
416
420
|
}),
|
|
417
|
-
|
|
421
|
+
H && G ? /* @__PURE__ */ m("button", {
|
|
418
422
|
type: "button",
|
|
419
|
-
onClick:
|
|
420
|
-
disabled:
|
|
423
|
+
onClick: ge,
|
|
424
|
+
disabled: q,
|
|
421
425
|
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",
|
|
422
426
|
"data-testid": "assistant-write-proposal-review",
|
|
423
|
-
children:
|
|
427
|
+
children: w("writeProposal.review", "Review & confirm…")
|
|
424
428
|
}) : null,
|
|
425
|
-
|
|
429
|
+
H && !G ? /* @__PURE__ */ m("button", {
|
|
426
430
|
type: "button",
|
|
427
|
-
onClick:
|
|
428
|
-
disabled:
|
|
431
|
+
onClick: me,
|
|
432
|
+
disabled: q,
|
|
429
433
|
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
434
|
"data-testid": "assistant-write-proposal-confirm",
|
|
431
|
-
children:
|
|
435
|
+
children: R === "approve" ? w("writeProposal.confirming", "Confirming…") : g.description.confirmLabel.trim() || w("writeProposal.confirmFallback", "Confirm this change")
|
|
432
436
|
}) : null
|
|
433
437
|
]
|
|
434
438
|
}) : null
|
|
@@ -436,4 +440,4 @@ var x = ({ view: g, serverNow: v, capabilities: y, inert: x = !1, turnInFlight:
|
|
|
436
440
|
});
|
|
437
441
|
};
|
|
438
442
|
//#endregion
|
|
439
|
-
export {
|
|
443
|
+
export { C as AssistantWriteProposalCard, g as WRITE_PROPOSAL_DIALOG_KINDS, v as WRITE_PROPOSAL_PRESENTED_AFTER_MS, _ as writeProposalUsesDialog };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantWriteProposalSlot.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantWriteProposalSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACzC,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,+DAA+D;IAC/D,cAAc,EAAE,CACd,SAAS,EAAE,MAAM,KACd,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB,oDAAoD;IACpD,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"AssistantWriteProposalSlot.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantWriteProposalSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACzC,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,+DAA+D;IAC/D,cAAc,EAAE,CACd,SAAS,EAAE,MAAM,KACd,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,uEAAuE;IACvE,YAAY,EAAE,OAAO,CAAC;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB,oDAAoD;IACpD,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,CAqDhC,CAAC"}
|
|
@@ -15,10 +15,11 @@ var a = ({ refs: a, conversationId: o, panel: s, entries: c, capabilitiesOf: l,
|
|
|
15
15
|
]), /* @__PURE__ */ i(r, { children: a.map((t) => {
|
|
16
16
|
let n = c[t.proposalId];
|
|
17
17
|
if (!n) return null;
|
|
18
|
-
let { view: r, serverNow: a } = n,
|
|
18
|
+
let { view: r, serverNow: a, arrivedAt: o } = n, m = r.supersedes ? c[r.supersedes]?.view ?? null : null;
|
|
19
19
|
return /* @__PURE__ */ i(e, {
|
|
20
20
|
view: r,
|
|
21
21
|
serverNow: a,
|
|
22
|
+
arrivedAt: o,
|
|
22
23
|
capabilities: l(n.session.sandboxId),
|
|
23
24
|
inert: p?.has(n.session.sandboxId) ?? !1,
|
|
24
25
|
turnInFlight: u,
|
|
@@ -27,7 +28,7 @@ var a = ({ refs: a, conversationId: o, panel: s, entries: c, capabilitiesOf: l,
|
|
|
27
28
|
onDecline: () => s.decline(r, "user_declined", "card"),
|
|
28
29
|
onReview: () => f(r),
|
|
29
30
|
onPresented: (e) => void s.presented(r, e),
|
|
30
|
-
previous:
|
|
31
|
+
previous: m
|
|
31
32
|
}, t.proposalId);
|
|
32
33
|
}) });
|
|
33
34
|
};
|
|
@@ -136,6 +136,44 @@ export declare function publishedAssistantDockWidth(input: {
|
|
|
136
136
|
docked: boolean;
|
|
137
137
|
isDesktop: boolean;
|
|
138
138
|
}): number;
|
|
139
|
+
/** Width of the floating desktop window. Must match `sm:w-[520px]` below. */
|
|
140
|
+
export declare const ASSISTANT_FLOATING_WIDTH_PX = 520;
|
|
141
|
+
/**
|
|
142
|
+
* Gap between the floating window and the right edge of the viewport. Must
|
|
143
|
+
* match `sm:right-6` below: Tailwind's spacing unit is 0.25rem, so 6 is 1.5rem,
|
|
144
|
+
* which is 24px at the 16px root size every product ships with.
|
|
145
|
+
*/
|
|
146
|
+
export declare const ASSISTANT_FLOATING_RIGHT_PX = 24;
|
|
147
|
+
/**
|
|
148
|
+
* CSS custom property on `<html>` carrying how much of the page's RIGHT edge
|
|
149
|
+
* the open assistant covers: the docked width while docked, the floating
|
|
150
|
+
* window's width plus its right gap while floating, and `0px` while it is
|
|
151
|
+
* closed or on a phone (where it is a bottom sheet).
|
|
152
|
+
*
|
|
153
|
+
* ★★ WHY A SECOND VARIABLE (BOFF-7799). `--assistant-dock-width` is `0px`
|
|
154
|
+
* while the panel FLOATS, which is the default, because a floating window does
|
|
155
|
+
* not take width from the layout. But it still sits OVER the page: a product
|
|
156
|
+
* surface padded by the dock width kept its right 45 % (its close button,
|
|
157
|
+
* its status, its tab actions) under the open chat. A surface that must stay
|
|
158
|
+
* usable beside the chat pads by this instead, with the dock width as the
|
|
159
|
+
* fallback for an fe-libs that does not publish it:
|
|
160
|
+
* `var(--assistant-panel-inset, var(--assistant-dock-width, 0px))`.
|
|
161
|
+
*
|
|
162
|
+
* `--assistant-dock-width` is unchanged, so nothing that reads it moves.
|
|
163
|
+
*/
|
|
164
|
+
export declare const ASSISTANT_PANEL_INSET_VAR = "--assistant-panel-inset";
|
|
165
|
+
/**
|
|
166
|
+
* How far the open assistant reaches in from the right edge of the page, in px.
|
|
167
|
+
*
|
|
168
|
+
* ★ 544 while floating is exact at every desktop width. The window's
|
|
169
|
+
* `sm:max-w-[calc(100vw-2rem)]` clamp only bites below 552px, and the desktop
|
|
170
|
+
* layout starts at 640px.
|
|
171
|
+
*/
|
|
172
|
+
export declare function publishedAssistantPanelInset(input: {
|
|
173
|
+
isOpen: boolean;
|
|
174
|
+
docked: boolean;
|
|
175
|
+
isDesktop: boolean;
|
|
176
|
+
}): number;
|
|
139
177
|
/**
|
|
140
178
|
* Shared by every layout. On a phone: a full-width bottom sheet with a rounded
|
|
141
179
|
* top edge. ★ No height here — see the two below.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistantOverlayState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/assistantOverlayState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH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AC9C,qCAAqC;IACrC,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,sDAAsD;IACtD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gCAAgC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CASjG;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAS5D;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,GACV,OAAO,CAMT;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAMN"}
|
|
1
|
+
{"version":3,"file":"assistantOverlayState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/assistantOverlayState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAMzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KA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,MAAM,OAAO,CAAC;IACzB,sDAAsD;IACtD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gCAAgC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CASjG;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAS5D;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,GACV,OAAO,CAMT;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAMN"}
|
|
@@ -36,15 +36,19 @@ var d = 440, f = "--assistant-dock-width", p = "--assistant-overlay-top", m = 56
|
|
|
36
36
|
function g(e) {
|
|
37
37
|
return e.isOpen && e.docked && e.isDesktop ? 440 : 0;
|
|
38
38
|
}
|
|
39
|
-
var _ =
|
|
40
|
-
function
|
|
39
|
+
var _ = 520, v = 24, y = "--assistant-panel-inset";
|
|
40
|
+
function b(e) {
|
|
41
|
+
return !e.isOpen || !e.isDesktop ? 0 : e.docked ? 440 : 544;
|
|
42
|
+
}
|
|
43
|
+
var x = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-0 top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", S = "h-[60vh] max-h-[60vh]", C = "h-[88vh] max-h-[88vh]", w = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-8rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", T = "sm:left-auto sm:right-0 sm:top-[var(--assistant-overlay-top)] sm:bottom-0 sm:rounded-none sm:h-auto sm:max-h-none sm:w-[440px] sm:max-w-[calc(100vw-2rem)]";
|
|
44
|
+
function E(e) {
|
|
41
45
|
return [
|
|
42
|
-
|
|
43
|
-
e.expanded ?
|
|
44
|
-
e.docked ?
|
|
46
|
+
x,
|
|
47
|
+
e.expanded ? C : S,
|
|
48
|
+
e.docked ? T : w
|
|
45
49
|
].join(" ");
|
|
46
50
|
}
|
|
47
|
-
function
|
|
51
|
+
function D(e) {
|
|
48
52
|
return (t) => {
|
|
49
53
|
if (e.isShellLessTarget?.(t)) {
|
|
50
54
|
e.openInNewTab(t);
|
|
@@ -53,22 +57,22 @@ function C(e) {
|
|
|
53
57
|
e.navigate(t), e.isDesktop() || e.collapseSheet();
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
|
-
function
|
|
60
|
+
function O(e) {
|
|
57
61
|
if (typeof CustomEvent > "u" || !(e instanceof CustomEvent)) return "generic";
|
|
58
62
|
let t = e.detail;
|
|
59
63
|
return typeof t != "object" || !t || !("kind" in t) ? "generic" : t.kind === "sandbox" || t.kind === "ai-credits" ? t.kind : "generic";
|
|
60
64
|
}
|
|
61
|
-
function
|
|
65
|
+
function k(e, t) {
|
|
62
66
|
try {
|
|
63
67
|
return e()?.getItem(t) === "1";
|
|
64
68
|
} catch {
|
|
65
69
|
return !1;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
|
-
function
|
|
72
|
+
function A(e, t, n) {
|
|
69
73
|
try {
|
|
70
74
|
e()?.setItem(t, n ? "1" : "0");
|
|
71
75
|
} catch {}
|
|
72
76
|
}
|
|
73
77
|
//#endregion
|
|
74
|
-
export { l as ASSISTANT_BOTTOM_CHROME_CLEARANCE, a as ASSISTANT_DIALOG_SELECTOR,
|
|
78
|
+
export { l as ASSISTANT_BOTTOM_CHROME_CLEARANCE, a as ASSISTANT_DIALOG_SELECTOR, T as ASSISTANT_DOCKED_DESKTOP_CLASS, d as ASSISTANT_DOCK_WIDTH_PX, f as ASSISTANT_DOCK_WIDTH_VAR, w as ASSISTANT_FLOATING_DESKTOP_CLASS, v as ASSISTANT_FLOATING_RIGHT_PX, _ as ASSISTANT_FLOATING_WIDTH_PX, m as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, h as ASSISTANT_OVERLAY_DESKTOP_QUERY, p as ASSISTANT_OVERLAY_TOP_VAR, y as ASSISTANT_PANEL_INSET_VAR, x as ASSISTANT_SHEET_BASE_CLASS, S as ASSISTANT_SHEET_COMPACT_CLASS, C as ASSISTANT_SHEET_EXPANDED_CLASS, r as ASSISTANT_TOGGLE_SHORTCUT_LABEL, u as aboveAssistantBottomChrome, E as assistantOverlayClassName, c as assistantOverlayEscapeAction, e as assistantOverlayKeys, O as assistantQuotaKindOf, o as closestAround, D as createAssistantNavigate, i as isAssistantToggleShortcut, n as nextAssistantOpenState, g as publishedAssistantDockWidth, b as publishedAssistantPanelInset, k as readAssistantOverlayFlag, t as requestedAssistantOpenState, A as writeAssistantOverlayFlag };
|
|
@@ -23,6 +23,15 @@ interface Props {
|
|
|
23
23
|
/** False once MAX_ATTACHMENTS is reached — the control explains why. */
|
|
24
24
|
canAddMore: boolean;
|
|
25
25
|
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show "Connect a source" as visible text beside the "+" from `sm` up, when
|
|
28
|
+
* the menu holds that item (BOFF-8158).
|
|
29
|
+
*
|
|
30
|
+
* ★ Opt-in, and only the COMPOSER opts in. The voice session's copy sits in
|
|
31
|
+
* a corner between other absolutely placed controls, where text would run
|
|
32
|
+
* into them; and a product composing its own chrome keeps the icon it has.
|
|
33
|
+
*/
|
|
34
|
+
showLabel?: boolean;
|
|
26
35
|
}
|
|
27
36
|
/**
|
|
28
37
|
* Leading circular "+" attach control in the composer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantAttachmentButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAiBf,UAAU,KAAK;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wEAAwE;IACxE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantAttachmentButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAiBf,UAAU,KAAK;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wEAAwE;IACxE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAoBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,KAAK,CAuN/C,CAAC"}
|