@burdenoff/fe-libs 2026.1114.11 → 2026.1114.13
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 +2 -0
- package/dist/shared/assistant/i18nManifest.js +2 -0
- package/dist/shared/assistant/index.d.ts +4 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +290 -277
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +425 -328
- package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.d.ts +64 -0
- package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.js +183 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +9 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +233 -187
- package/dist/shared/assistant/ui/voice/LiveWaveform.d.ts +31 -0
- package/dist/shared/assistant/ui/voice/LiveWaveform.js +52 -0
- package/dist/shared/assistant/ui/voice/useLiveLevel.d.ts +21 -0
- package/dist/shared/assistant/ui/voice/useLiveLevel.js +52 -0
- package/dist/shared/assistant/voice/liveLevel.d.ts +84 -0
- package/dist/shared/assistant/voice/liveLevel.js +75 -0
- package/dist/shared/proactive/transport.js +4 -0
- package/dist/shared-assistant.js +387 -383
- package/package.json +1 -1
|
@@ -885,7 +885,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
885
885
|
conversationDelete: Oc !== null,
|
|
886
886
|
appControl: (e) => {
|
|
887
887
|
try {
|
|
888
|
-
let n = ri(e, { voiceLive: t !== void 0 ||
|
|
888
|
+
let n = ri(e, { voiceLive: t !== void 0 || Rl.current });
|
|
889
889
|
return n !== null && (n.kind !== "confirm" || Dc !== null);
|
|
890
890
|
} catch {
|
|
891
891
|
return !1;
|
|
@@ -973,7 +973,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
973
973
|
case "link-not-openable":
|
|
974
974
|
case "back": return i !== null;
|
|
975
975
|
case "conversation-delete": return !1;
|
|
976
|
-
case "app-control": return ri(n.request, { voiceLive: t !== void 0 ||
|
|
976
|
+
case "app-control": return ri(n.request, { voiceLive: t !== void 0 || Rl.current }) !== null;
|
|
977
977
|
case "open-record": return !1;
|
|
978
978
|
}
|
|
979
979
|
}, [Ac]), Nc = A(Mc);
|
|
@@ -1195,7 +1195,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
if (e.kind === "app-control") {
|
|
1198
|
-
let t = ri(e.request, { voiceLive: n !== void 0 ||
|
|
1198
|
+
let t = ri(e.request, { voiceLive: n !== void 0 || Rl.current });
|
|
1199
1199
|
if (!t) return !1;
|
|
1200
1200
|
let r = (e) => ({
|
|
1201
1201
|
kind: "app-control",
|
|
@@ -2053,15 +2053,20 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2053
2053
|
G,
|
|
2054
2054
|
nc,
|
|
2055
2055
|
P
|
|
2056
|
-
]), Jc = k(() => qc ? nr(qc.text) : null, [qc]), Yc = k(() => _o.chat.filter((e) => e.id !== nc), [_o.chat, nc]), Xc =
|
|
2056
|
+
]), Jc = k(() => qc ? nr(qc.text) : null, [qc]), Yc = k(() => _o.chat.filter((e) => e.id !== nc), [_o.chat, nc]), Xc = k(() => Ea ? _o.all.filter((e) => e.id !== nc) : Yc, [
|
|
2057
|
+
Ea,
|
|
2058
|
+
_o.all,
|
|
2059
|
+
nc,
|
|
2060
|
+
Yc
|
|
2061
|
+
]), [Zc, Qc] = j(null), $c = w((e) => ot(e)?.sandboxId ?? null), el = Er(Yc, {
|
|
2057
2062
|
sessionId: W?.backendSessionId,
|
|
2058
|
-
sandboxId:
|
|
2063
|
+
sandboxId: $c,
|
|
2059
2064
|
nowMs: Date.now()
|
|
2060
|
-
}),
|
|
2065
|
+
}), tl = Dr(Yc), nl = (e) => {
|
|
2061
2066
|
if (ae(e.metadata).length > 0) return !0;
|
|
2062
2067
|
let t = e.metadata?.sandboxId;
|
|
2063
2068
|
return oe(t ? So[t] : null);
|
|
2064
|
-
},
|
|
2069
|
+
}, rl = (e) => {
|
|
2065
2070
|
let t = ae(e.metadata);
|
|
2066
2071
|
return t.length === 0 || !V ? null : /* @__PURE__ */ M(d, {
|
|
2067
2072
|
refs: t,
|
|
@@ -2075,7 +2080,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2075
2080
|
retiredSandboxes: wo,
|
|
2076
2081
|
onReapply: () => void Q(P("writeProposal.reapplyPrompt", "That change wasn't saved because it changed after you read it. Fetch the latest version and reapply only your change on top of it."))
|
|
2077
2082
|
});
|
|
2078
|
-
},
|
|
2083
|
+
}, il = (e) => {
|
|
2079
2084
|
if (!V) return null;
|
|
2080
2085
|
let t = Z.liveOffersFor(e, {
|
|
2081
2086
|
registry: {
|
|
@@ -2096,7 +2101,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2096
2101
|
hint: t.length === 1 && R === "proposal-v1" ? Si(n.offer, Z.turnFor(e)) : "link",
|
|
2097
2102
|
onOpen: Cc
|
|
2098
2103
|
}, n.offer.offerId) : null;
|
|
2099
|
-
},
|
|
2104
|
+
}, al = (e) => e.role === "assistant" ? il(e.id) : null;
|
|
2100
2105
|
O(() => {
|
|
2101
2106
|
let e = Z.nextExpiryInMs(performance.now());
|
|
2102
2107
|
if (e === null) return;
|
|
@@ -2107,13 +2112,13 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2107
2112
|
fc,
|
|
2108
2113
|
mc
|
|
2109
2114
|
]);
|
|
2110
|
-
let
|
|
2115
|
+
let ol = To.dialog.view ? Co[To.dialog.view.proposalId] : void 0, sl = el?.expiresAtMs ?? null;
|
|
2111
2116
|
O(() => {
|
|
2112
|
-
if (
|
|
2113
|
-
let e = window.setTimeout(() => Fs((e) => e + 1), Math.max(0,
|
|
2117
|
+
if (sl === null) return;
|
|
2118
|
+
let e = window.setTimeout(() => Fs((e) => e + 1), Math.max(0, sl - Date.now()));
|
|
2114
2119
|
return () => window.clearTimeout(e);
|
|
2115
|
-
}, [
|
|
2116
|
-
let
|
|
2120
|
+
}, [sl, Ps]);
|
|
2121
|
+
let cl = k(() => _o.voice.filter((e) => e.id !== nc && (e.role === "user" || e.role === "assistant")).map((e) => ({
|
|
2117
2122
|
id: e.id,
|
|
2118
2123
|
role: e.role,
|
|
2119
2124
|
text: tr(e, G, P),
|
|
@@ -2124,10 +2129,10 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2124
2129
|
G,
|
|
2125
2130
|
nc,
|
|
2126
2131
|
P
|
|
2127
|
-
]),
|
|
2128
|
-
if (
|
|
2132
|
+
]), ll = D(() => {
|
|
2133
|
+
if (cl.length === 0) return;
|
|
2129
2134
|
let e = /* @__PURE__ */ new Date();
|
|
2130
|
-
or(ir(
|
|
2135
|
+
or(ir(cl, {
|
|
2131
2136
|
title: P("voiceSession.transcript", "Voice conversation"),
|
|
2132
2137
|
savedAt: P("voiceSession.savedAt", "Saved"),
|
|
2133
2138
|
session: P("voiceSession.sessionLabel", "Session"),
|
|
@@ -2137,27 +2142,27 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2137
2142
|
}, e), ar(I, e), "text/markdown");
|
|
2138
2143
|
}, [
|
|
2139
2144
|
I,
|
|
2140
|
-
|
|
2145
|
+
cl,
|
|
2141
2146
|
P
|
|
2142
|
-
]),
|
|
2143
|
-
|
|
2144
|
-
let [
|
|
2147
|
+
]), ul = $e({ perFileChars: $o }), dl = A(ul);
|
|
2148
|
+
dl.current = ul;
|
|
2149
|
+
let [fl, pl] = j(null), ml = fl === null ? null : P("attachments.voiceDropped", "{{count}} attachment(s) couldn't be saved and weren't sent.", { count: fl });
|
|
2145
2150
|
O(() => {
|
|
2146
|
-
if (
|
|
2147
|
-
let e = window.setTimeout(() =>
|
|
2151
|
+
if (fl === null) return;
|
|
2152
|
+
let e = window.setTimeout(() => pl(null), ca);
|
|
2148
2153
|
return () => window.clearTimeout(e);
|
|
2149
|
-
}, [
|
|
2150
|
-
let
|
|
2154
|
+
}, [fl]);
|
|
2155
|
+
let hl = A(/* @__PURE__ */ new Set()), gl = A(() => !1), _l = D((e, t, n, r) => {
|
|
2151
2156
|
let i = ls.current, a = vr(i), o = () => {
|
|
2152
2157
|
let e = w.getState();
|
|
2153
2158
|
return fr({
|
|
2154
|
-
sessionLive:
|
|
2159
|
+
sessionLive: gl.current(t),
|
|
2155
2160
|
boundAtSubmit: i,
|
|
2156
2161
|
activeConversationId: e.activeConversationId,
|
|
2157
2162
|
boundConversationExists: e.conversations.some((e) => e.id === a)
|
|
2158
2163
|
});
|
|
2159
2164
|
}, s = () => {
|
|
2160
|
-
let i =
|
|
2165
|
+
let i = dl.current;
|
|
2161
2166
|
nt({
|
|
2162
2167
|
draft: i,
|
|
2163
2168
|
maySend: o,
|
|
@@ -2174,7 +2179,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2174
2179
|
...r.correction ? { correctsInFlightTurn: !0 } : {}
|
|
2175
2180
|
});
|
|
2176
2181
|
},
|
|
2177
|
-
announceDropped: (e) =>
|
|
2182
|
+
announceDropped: (e) => pl(e)
|
|
2178
2183
|
});
|
|
2179
2184
|
};
|
|
2180
2185
|
if (o() && Nc.current(e, t)) {
|
|
@@ -2188,17 +2193,17 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2188
2193
|
});
|
|
2189
2194
|
return;
|
|
2190
2195
|
}
|
|
2191
|
-
if (!
|
|
2196
|
+
if (!dl.current.isBusy) {
|
|
2192
2197
|
s();
|
|
2193
2198
|
return;
|
|
2194
2199
|
}
|
|
2195
|
-
let c = Date.now(), l =
|
|
2196
|
-
let e =
|
|
2197
|
-
|
|
2200
|
+
let c = Date.now(), l = hl.current, u = window.setInterval(() => {
|
|
2201
|
+
let e = dl.current.isBusy;
|
|
2202
|
+
dl.current.isCommitting || e && Date.now() - c < sa || (window.clearInterval(u), l.delete(u), s());
|
|
2198
2203
|
}, 200);
|
|
2199
2204
|
l.add(u);
|
|
2200
2205
|
}, []), $ = Ze({
|
|
2201
|
-
onSubmit:
|
|
2206
|
+
onSubmit: _l,
|
|
2202
2207
|
latestReply: qc,
|
|
2203
2208
|
language: o(Wa, B).tag,
|
|
2204
2209
|
graceMs: Ba,
|
|
@@ -2208,76 +2213,76 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2208
2213
|
handsFreeInterrupt: Va,
|
|
2209
2214
|
onBargeIn: zs
|
|
2210
2215
|
});
|
|
2211
|
-
|
|
2212
|
-
let
|
|
2216
|
+
gl.current = $.isCurrentSession;
|
|
2217
|
+
let vl = us ? cl.filter((e) => e.sessionId !== void 0 && $.isCurrentSession(e.sessionId)) : cl, yl = $.answerLocally;
|
|
2213
2218
|
O(() => {
|
|
2214
|
-
Ic.current =
|
|
2215
|
-
}, [
|
|
2216
|
-
let
|
|
2219
|
+
Ic.current = yl;
|
|
2220
|
+
}, [yl]);
|
|
2221
|
+
let bl = $.active, xl = k(() => v(Object.values(Co), V, wo), [
|
|
2217
2222
|
Co,
|
|
2218
2223
|
V,
|
|
2219
2224
|
wo
|
|
2220
|
-
]), [
|
|
2225
|
+
]), [Sl, Cl] = j(null);
|
|
2221
2226
|
O(() => {
|
|
2222
|
-
|
|
2223
|
-
}, [
|
|
2224
|
-
let
|
|
2225
|
-
let e =
|
|
2227
|
+
bl || Cl(null);
|
|
2228
|
+
}, [bl]);
|
|
2229
|
+
let wl = To.review, Tl = D(() => {
|
|
2230
|
+
let e = xl[xl.length - 1];
|
|
2226
2231
|
if (!e) return;
|
|
2227
2232
|
let { view: t } = e;
|
|
2228
|
-
f(t) && m(t, So[e.session.sandboxId]).offerConfirm ?
|
|
2233
|
+
f(t) && m(t, So[e.session.sandboxId]).offerConfirm ? wl(t) : Cl(t.proposalId);
|
|
2229
2234
|
}, [
|
|
2230
|
-
|
|
2235
|
+
xl,
|
|
2231
2236
|
So,
|
|
2232
|
-
|
|
2233
|
-
]),
|
|
2237
|
+
wl
|
|
2238
|
+
]), El = bl ? _(xl) : null, Dl = Sl ? Co[Sl] : void 0, Ol = bl && Dl && Dl.session.conversationId === V ? {
|
|
2234
2239
|
content: /* @__PURE__ */ M(d, {
|
|
2235
2240
|
refs: [{
|
|
2236
|
-
proposalId:
|
|
2237
|
-
sandboxId:
|
|
2238
|
-
sessionId:
|
|
2241
|
+
proposalId: Dl.view.proposalId,
|
|
2242
|
+
sandboxId: Dl.session.sandboxId,
|
|
2243
|
+
sessionId: Dl.session.sessionId
|
|
2239
2244
|
}],
|
|
2240
|
-
conversationId:
|
|
2245
|
+
conversationId: Dl.session.conversationId,
|
|
2241
2246
|
panel: K,
|
|
2242
2247
|
entries: Co,
|
|
2243
2248
|
capabilitiesOf: (e) => So[e],
|
|
2244
2249
|
turnInFlight: yo,
|
|
2245
2250
|
tr: P,
|
|
2246
|
-
onReview:
|
|
2251
|
+
onReview: wl,
|
|
2247
2252
|
retiredSandboxes: wo
|
|
2248
2253
|
}),
|
|
2249
2254
|
closeLabel: re(P, h.trayClose),
|
|
2250
|
-
onClose: () =>
|
|
2251
|
-
} : null,
|
|
2252
|
-
|
|
2255
|
+
onClose: () => Cl(null)
|
|
2256
|
+
} : null, kl = To.asking, Al = Ec?.asking === !0, jl = Dc?.asking === !0, Ml = ci(), Nl = $.holdListening, Pl = k(() => bl || J ? null : { run: () => is ? { status: "already" } : (cs(!0), { status: "done" }) }, [
|
|
2257
|
+
bl,
|
|
2253
2258
|
J,
|
|
2254
2259
|
is,
|
|
2255
2260
|
cs
|
|
2256
2261
|
]);
|
|
2257
|
-
oi("assistant.transcript",
|
|
2258
|
-
let
|
|
2262
|
+
oi("assistant.transcript", Pl);
|
|
2263
|
+
let Fl = k(() => bl ? null : { run: () => {
|
|
2259
2264
|
let e = w.getState(), t = e.conversations.find((t) => t.id === e.activeConversationId);
|
|
2260
2265
|
return t && t.messages.length === 0 ? { status: "already" } : (e.createConversation(), { status: "done" });
|
|
2261
|
-
} }, [
|
|
2262
|
-
oi("assistant.conversation.new",
|
|
2263
|
-
|
|
2266
|
+
} }, [bl]);
|
|
2267
|
+
oi("assistant.conversation.new", Fl), O(() => {
|
|
2268
|
+
Nl(bl && (kl || Al || jl || Ml));
|
|
2264
2269
|
}, [
|
|
2265
|
-
|
|
2266
|
-
El,
|
|
2267
|
-
Dl,
|
|
2268
|
-
Ol,
|
|
2270
|
+
bl,
|
|
2269
2271
|
kl,
|
|
2270
|
-
Al
|
|
2272
|
+
Al,
|
|
2273
|
+
jl,
|
|
2274
|
+
Ml,
|
|
2275
|
+
Nl
|
|
2271
2276
|
]);
|
|
2272
|
-
let
|
|
2277
|
+
let Il = A(null), Ll = $.announce;
|
|
2273
2278
|
O(() => {
|
|
2274
|
-
if (!
|
|
2275
|
-
|
|
2279
|
+
if (!bl) {
|
|
2280
|
+
Il.current = null;
|
|
2276
2281
|
return;
|
|
2277
2282
|
}
|
|
2278
|
-
let e =
|
|
2279
|
-
if (e === null)
|
|
2280
|
-
else for (let { view: t, session: n } of ne(
|
|
2283
|
+
let e = Il.current;
|
|
2284
|
+
if (e === null) Il.current = new Set(Object.keys(Co));
|
|
2285
|
+
else for (let { view: t, session: n } of ne(xl, e)) {
|
|
2281
2286
|
e.add(t.proposalId);
|
|
2282
2287
|
let r = So[n.sandboxId];
|
|
2283
2288
|
if (!g({
|
|
@@ -2286,7 +2291,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2286
2291
|
capabilities: r
|
|
2287
2292
|
})) continue;
|
|
2288
2293
|
let i = ie(t, m(t, r).offerConfirm, P), a = t.proposalId;
|
|
2289
|
-
|
|
2294
|
+
Ll({
|
|
2290
2295
|
id: `write-readback:${a}`,
|
|
2291
2296
|
text: i.text,
|
|
2292
2297
|
lang: i.translated ? B : "en",
|
|
@@ -2294,73 +2299,73 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2294
2299
|
});
|
|
2295
2300
|
}
|
|
2296
2301
|
}, [
|
|
2297
|
-
|
|
2298
|
-
|
|
2302
|
+
bl,
|
|
2303
|
+
xl,
|
|
2299
2304
|
Co,
|
|
2300
2305
|
So,
|
|
2301
2306
|
R,
|
|
2302
2307
|
P,
|
|
2303
2308
|
B,
|
|
2304
|
-
|
|
2309
|
+
Ll,
|
|
2305
2310
|
K
|
|
2306
2311
|
]);
|
|
2307
|
-
let
|
|
2312
|
+
let Rl = A(!1);
|
|
2308
2313
|
O(() => {
|
|
2309
|
-
|
|
2314
|
+
Rl.current = $.active;
|
|
2310
2315
|
}, [$.active]), O(() => Gi((e) => {
|
|
2311
|
-
if (!
|
|
2316
|
+
if (!Rl.current) return !1;
|
|
2312
2317
|
let t = ls.current;
|
|
2313
2318
|
return typeof t == "string" ? t === e : w.getState().activeConversationId === e;
|
|
2314
2319
|
}), []);
|
|
2315
|
-
let
|
|
2320
|
+
let zl = $.start, Bl = D(() => {
|
|
2316
2321
|
let e = w.getState().activeConversationId, t = hr(_s());
|
|
2317
|
-
ms(_r(t, e)), ks(!0, t.kind === "own"),
|
|
2322
|
+
ms(_r(t, e)), ks(!0, t.kind === "own"), zl();
|
|
2318
2323
|
}, [
|
|
2319
2324
|
ms,
|
|
2320
2325
|
ks,
|
|
2321
2326
|
_s,
|
|
2322
|
-
|
|
2323
|
-
]),
|
|
2327
|
+
zl
|
|
2328
|
+
]), Vl = k(() => er(W?.messages ?? []), [W?.messages]), Hl = $n(_o.voice, G, P), Ul = $n(Vl, G, P) > 0, Wl = D(() => {
|
|
2324
2329
|
let e = w.getState().activeConversationId;
|
|
2325
|
-
if (!e ||
|
|
2326
|
-
let t = new Set(
|
|
2330
|
+
if (!e || cl.length === 0) return;
|
|
2331
|
+
let t = new Set(Vl.map((e) => e.id)), n = N();
|
|
2327
2332
|
U(e, {
|
|
2328
2333
|
id: n,
|
|
2329
2334
|
role: "system",
|
|
2330
|
-
content: rr(
|
|
2335
|
+
content: rr(cl.filter((e) => t.has(e.id)), {
|
|
2331
2336
|
intro: P("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
|
|
2332
2337
|
nothing: P("voiceSession.continuedNothing", "Continued from a voice conversation."),
|
|
2333
2338
|
more: (e) => P("voiceSession.continuedMore", "…and {{count}} more", { count: e })
|
|
2334
2339
|
}),
|
|
2335
2340
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2336
|
-
metadata: { continuedVoiceTurns:
|
|
2341
|
+
metadata: { continuedVoiceTurns: Hl }
|
|
2337
2342
|
}), Ii.recordCommittedEntries(e, [n], "NOTE", T()), cs(!1), $.end(), os(), wa?.();
|
|
2338
2343
|
}, [
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2344
|
+
cl,
|
|
2345
|
+
Hl,
|
|
2346
|
+
Vl,
|
|
2342
2347
|
U,
|
|
2343
2348
|
P,
|
|
2344
2349
|
$,
|
|
2345
2350
|
cs,
|
|
2346
2351
|
os,
|
|
2347
2352
|
wa
|
|
2348
|
-
]),
|
|
2353
|
+
]), Gl = A({
|
|
2349
2354
|
conversationId: null,
|
|
2350
2355
|
count: 0
|
|
2351
2356
|
});
|
|
2352
2357
|
O(() => {
|
|
2353
|
-
$.active && (
|
|
2358
|
+
$.active && (Gl.current = {
|
|
2354
2359
|
conversationId: V,
|
|
2355
|
-
count:
|
|
2360
|
+
count: Hl
|
|
2356
2361
|
});
|
|
2357
2362
|
}, [$.active]);
|
|
2358
|
-
let
|
|
2359
|
-
let e =
|
|
2363
|
+
let Kl = D(() => {
|
|
2364
|
+
let e = Gl.current, t = e.conversationId === V ? e.count : 0, n = Hl > t;
|
|
2360
2365
|
$.end(), n && cs(!0);
|
|
2361
2366
|
}, [
|
|
2362
2367
|
V,
|
|
2363
|
-
|
|
2368
|
+
Hl,
|
|
2364
2369
|
$,
|
|
2365
2370
|
cs
|
|
2366
2371
|
]);
|
|
@@ -2371,26 +2376,26 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2371
2376
|
Ts,
|
|
2372
2377
|
$
|
|
2373
2378
|
]);
|
|
2374
|
-
let [
|
|
2379
|
+
let [ql, Jl] = j(da), Yl = Ge({
|
|
2375
2380
|
available: $.available,
|
|
2376
2381
|
allowedInMode: Ts,
|
|
2377
2382
|
readOnly: Oo,
|
|
2378
2383
|
busy: yo || Ns !== null || Ao || cc,
|
|
2379
|
-
committing:
|
|
2380
|
-
dictating:
|
|
2381
|
-
}),
|
|
2384
|
+
committing: ql.committing,
|
|
2385
|
+
dictating: ql.dictating
|
|
2386
|
+
}), Xl = We();
|
|
2382
2387
|
ta(() => {
|
|
2383
2388
|
Sa?.({ live: $.active });
|
|
2384
2389
|
}, [Sa, $.active]);
|
|
2385
|
-
let
|
|
2386
|
-
|
|
2390
|
+
let Zl = A(!1), Ql = D(() => {
|
|
2391
|
+
Zl.current = !0, Ca?.({ review: !0 });
|
|
2387
2392
|
}, [Ca]);
|
|
2388
2393
|
O(() => {
|
|
2389
|
-
!Aa &&
|
|
2394
|
+
!Aa && Zl.current && (Zl.current = !1, ke(Vu.current));
|
|
2390
2395
|
}, [Aa]);
|
|
2391
|
-
let
|
|
2396
|
+
let $l = $.active;
|
|
2392
2397
|
O(() => {
|
|
2393
|
-
if (
|
|
2398
|
+
if (!$l) gs.current = !1, hs.current = null;
|
|
2394
2399
|
else if (us) {
|
|
2395
2400
|
let e = ls.current;
|
|
2396
2401
|
dr(e) && (hs.current = e.openAtStart), gs.current = !0;
|
|
@@ -2400,56 +2405,56 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2400
2405
|
}, ls.current) && ps(!0));
|
|
2401
2406
|
}, [
|
|
2402
2407
|
us,
|
|
2403
|
-
|
|
2408
|
+
$l,
|
|
2404
2409
|
F
|
|
2405
2410
|
]), fs && !$.active && ps(!1);
|
|
2406
|
-
let [
|
|
2411
|
+
let [eu, tu] = j(null);
|
|
2407
2412
|
O(() => {
|
|
2408
|
-
|
|
2413
|
+
eu !== null && (J && eu.conversationId === V || tu(null));
|
|
2409
2414
|
}, [
|
|
2410
2415
|
J,
|
|
2411
2416
|
V,
|
|
2412
|
-
|
|
2417
|
+
eu
|
|
2413
2418
|
]);
|
|
2414
|
-
let
|
|
2415
|
-
|
|
2419
|
+
let nu = eu !== null && Ws === eu.replyId, ru = A(!1), iu = D(() => {
|
|
2420
|
+
ru.current = !0, nu && Gs(), Bl();
|
|
2416
2421
|
}, [
|
|
2417
|
-
|
|
2418
|
-
|
|
2422
|
+
Bl,
|
|
2423
|
+
nu,
|
|
2419
2424
|
Gs
|
|
2420
|
-
]),
|
|
2421
|
-
|
|
2425
|
+
]), au = D(() => {
|
|
2426
|
+
nu && Gs(), Bl();
|
|
2422
2427
|
}, [
|
|
2423
|
-
|
|
2424
|
-
|
|
2428
|
+
Bl,
|
|
2429
|
+
nu,
|
|
2425
2430
|
Gs
|
|
2426
2431
|
]);
|
|
2427
2432
|
O(() => {
|
|
2428
|
-
$.active || (
|
|
2433
|
+
$.active || (ru.current = !1);
|
|
2429
2434
|
}, [$.active]), O(() => {
|
|
2430
|
-
!J &&
|
|
2435
|
+
!J && ru.current && (ru.current = !1, $.active && Kl());
|
|
2431
2436
|
}, [
|
|
2432
2437
|
J,
|
|
2433
2438
|
$.active,
|
|
2434
|
-
|
|
2439
|
+
Kl
|
|
2435
2440
|
]), O(() => {
|
|
2436
2441
|
J && cs(!1);
|
|
2437
2442
|
}, [J, cs]);
|
|
2438
|
-
let
|
|
2443
|
+
let ou = k(() => ({
|
|
2439
2444
|
live: $.active,
|
|
2440
|
-
blocked:
|
|
2441
|
-
impossible: Ke(
|
|
2442
|
-
start: F ?
|
|
2445
|
+
blocked: Yl === null ? null : Xl.voiceStartBlocked(Yl),
|
|
2446
|
+
impossible: Ke(Yl),
|
|
2447
|
+
start: F ? au : iu
|
|
2443
2448
|
}), [
|
|
2444
2449
|
$.active,
|
|
2445
|
-
|
|
2446
|
-
|
|
2450
|
+
Yl,
|
|
2451
|
+
Xl,
|
|
2447
2452
|
F,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
]), [
|
|
2451
|
-
|
|
2452
|
-
let
|
|
2453
|
+
au,
|
|
2454
|
+
iu
|
|
2455
|
+
]), [su, cu] = j("mini"), [lu, uu] = j(!1), du = Aa && $.active && (lu || J);
|
|
2456
|
+
du !== lu && uu(du);
|
|
2457
|
+
let fu = F && !Ea && $.active && !J && (!Aa || lu), pu = ga && q.covered !== !0 && !($.active && su !== "mini") && !(is && !$.active) && !(kl || Al || jl || Ml), mu = as?.ask, hu = na(mu?.subscribe ?? pa, mu?.getSnapshot ?? ma, mu?.getSnapshot ?? ma), gu = C({
|
|
2453
2458
|
voiceLive: $.active,
|
|
2454
2459
|
readOnly: Oo,
|
|
2455
2460
|
writes: qe({
|
|
@@ -2462,17 +2467,17 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2462
2467
|
} : null,
|
|
2463
2468
|
modeWrites: (e) => L.find((t) => t.id === e)?.writeCapable === !0 || gt(e)
|
|
2464
2469
|
}),
|
|
2465
|
-
avatar:
|
|
2470
|
+
avatar: hu,
|
|
2466
2471
|
busy: yo || Ns !== null || Ao || cc || es !== null || Zo,
|
|
2467
|
-
committing:
|
|
2468
|
-
}),
|
|
2472
|
+
committing: ql.committing
|
|
2473
|
+
}), _u = A(gu);
|
|
2469
2474
|
ta(() => {
|
|
2470
|
-
|
|
2471
|
-
}, [
|
|
2472
|
-
let
|
|
2475
|
+
_u.current = gu;
|
|
2476
|
+
}, [gu]);
|
|
2477
|
+
let vu = D((e) => {
|
|
2473
2478
|
let t = e.trim();
|
|
2474
|
-
if (t === "" ||
|
|
2475
|
-
|
|
2479
|
+
if (t === "" || _u.current !== null) return { accepted: !1 };
|
|
2480
|
+
nu && Gs();
|
|
2476
2481
|
let n = {
|
|
2477
2482
|
token: N(),
|
|
2478
2483
|
exchange: null,
|
|
@@ -2493,7 +2498,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2493
2498
|
return r === null ? n.handled ? {
|
|
2494
2499
|
accepted: !0,
|
|
2495
2500
|
recorded: !1
|
|
2496
|
-
} : { accepted: !1 } : (
|
|
2501
|
+
} : { accepted: !1 } : (tu(r), {
|
|
2497
2502
|
accepted: !0,
|
|
2498
2503
|
recorded: !0,
|
|
2499
2504
|
...r
|
|
@@ -2502,27 +2507,27 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2502
2507
|
qo,
|
|
2503
2508
|
Q,
|
|
2504
2509
|
Gs,
|
|
2505
|
-
|
|
2506
|
-
]), [
|
|
2507
|
-
blocker:
|
|
2508
|
-
line: Je(
|
|
2509
|
-
send:
|
|
2510
|
-
last:
|
|
2510
|
+
nu
|
|
2511
|
+
]), [yu] = j(() => Ye()), bu = k(() => ({
|
|
2512
|
+
blocker: gu,
|
|
2513
|
+
line: Je(gu, Yl),
|
|
2514
|
+
send: vu,
|
|
2515
|
+
last: eu,
|
|
2511
2516
|
navigatingReplyId: uc,
|
|
2512
|
-
draft:
|
|
2517
|
+
draft: yu
|
|
2513
2518
|
}), [
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2519
|
+
gu,
|
|
2520
|
+
Yl,
|
|
2521
|
+
vu,
|
|
2522
|
+
eu,
|
|
2518
2523
|
uc,
|
|
2519
|
-
|
|
2520
|
-
]),
|
|
2524
|
+
yu
|
|
2525
|
+
]), xu = q.setReplyEscape, Su = J && pu && nu;
|
|
2521
2526
|
O(() => {
|
|
2522
|
-
if (
|
|
2527
|
+
if (xu && Su) return xu(Gs), () => xu(null);
|
|
2523
2528
|
}, [
|
|
2524
|
-
|
|
2525
|
-
|
|
2529
|
+
xu,
|
|
2530
|
+
Su,
|
|
2526
2531
|
Gs
|
|
2527
2532
|
]), O(() => {
|
|
2528
2533
|
let e = ls.current, t = vr(e), n = w.getState(), r = mr({
|
|
@@ -2541,7 +2546,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2541
2546
|
let e = pr(yr.read(), {
|
|
2542
2547
|
activeConversationId: V,
|
|
2543
2548
|
chatTurnCount: Yc.length,
|
|
2544
|
-
voiceTurnCount:
|
|
2549
|
+
voiceTurnCount: cl.length,
|
|
2545
2550
|
sessionLive: $.active,
|
|
2546
2551
|
sessionBoundTo: ls.current,
|
|
2547
2552
|
turnInFlight: yo
|
|
@@ -2550,18 +2555,18 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2550
2555
|
}, [
|
|
2551
2556
|
V,
|
|
2552
2557
|
Yc.length,
|
|
2553
|
-
|
|
2558
|
+
cl.length,
|
|
2554
2559
|
$.active,
|
|
2555
2560
|
yo,
|
|
2556
2561
|
cs
|
|
2557
2562
|
]), O(() => {
|
|
2558
2563
|
if (!$.active) {
|
|
2559
|
-
|
|
2560
|
-
for (let e of
|
|
2561
|
-
|
|
2564
|
+
dl.current.clear(), pl(null), Ls.current = null;
|
|
2565
|
+
for (let e of hl.current) window.clearInterval(e);
|
|
2566
|
+
hl.current.clear();
|
|
2562
2567
|
}
|
|
2563
2568
|
}, [$.active]), O(() => {
|
|
2564
|
-
let e =
|
|
2569
|
+
let e = hl.current;
|
|
2565
2570
|
return () => {
|
|
2566
2571
|
for (let t of e) window.clearInterval(t);
|
|
2567
2572
|
e.clear();
|
|
@@ -2575,7 +2580,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2575
2580
|
}
|
|
2576
2581
|
});
|
|
2577
2582
|
}, []);
|
|
2578
|
-
let
|
|
2583
|
+
let Cu = D((e) => {
|
|
2579
2584
|
let t = V ? w.getState().conversations.find((e) => e.id === V) : void 0;
|
|
2580
2585
|
if (t && t.mode !== e && K.withdraw(t.id, "mode_switched"), t && Li(t)) {
|
|
2581
2586
|
if (t.mode !== e) {
|
|
@@ -2593,7 +2598,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2593
2598
|
$a,
|
|
2594
2599
|
Qa,
|
|
2595
2600
|
K
|
|
2596
|
-
]),
|
|
2601
|
+
]), wu = D(() => {
|
|
2597
2602
|
let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0;
|
|
2598
2603
|
if (!t) {
|
|
2599
2604
|
ho(!0), Qa(b);
|
|
@@ -2617,26 +2622,26 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2617
2622
|
ho,
|
|
2618
2623
|
Qa,
|
|
2619
2624
|
K
|
|
2620
|
-
]),
|
|
2621
|
-
L.find((t) => t.id === e)?.writeCapable && !Jn(w.getState().acknowledgedWriteModes, e) ? ts(e) :
|
|
2622
|
-
}, [
|
|
2625
|
+
]), Tu = D((e) => {
|
|
2626
|
+
L.find((t) => t.id === e)?.writeCapable && !Jn(w.getState().acknowledgedWriteModes, e) ? ts(e) : Cu(e);
|
|
2627
|
+
}, [Cu, L]), Eu = D(() => {
|
|
2623
2628
|
let e = es;
|
|
2624
2629
|
if (ts(null), !e) return;
|
|
2625
2630
|
let t = Yo.current;
|
|
2626
|
-
Yo.current = null, t ? (po(e), Q(t.content, t.attachments, t.options)) : (po(e),
|
|
2631
|
+
Yo.current = null, t ? (po(e), Q(t.content, t.attachments, t.options)) : (po(e), Cu(e));
|
|
2627
2632
|
}, [
|
|
2628
2633
|
es,
|
|
2629
2634
|
po,
|
|
2630
|
-
|
|
2635
|
+
Cu,
|
|
2631
2636
|
Q
|
|
2632
|
-
]),
|
|
2637
|
+
]), Du = es === null ? void 0 : L.find((e) => e.id === es) ?? { id: es }, Ou = D(() => {
|
|
2633
2638
|
ts(null);
|
|
2634
2639
|
let e = Yo.current;
|
|
2635
2640
|
Yo.current = null, e && Q(e.content, e.attachments, {
|
|
2636
2641
|
...e.options,
|
|
2637
2642
|
autoIntent: "read"
|
|
2638
2643
|
});
|
|
2639
|
-
}, [Q]),
|
|
2644
|
+
}, [Q]), ku = D(() => zs(), [zs]), [Au, ju] = j(null), Mu = D(() => {
|
|
2640
2645
|
let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0, n = js.current;
|
|
2641
2646
|
return {
|
|
2642
2647
|
state: e,
|
|
@@ -2648,9 +2653,9 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2648
2653
|
waitingCount: t ? K.liveFor(t.id).count : 0,
|
|
2649
2654
|
hasDraft: n !== null && (n.text.trim() !== "" || n.hasAttachments)
|
|
2650
2655
|
};
|
|
2651
|
-
}, [K]),
|
|
2656
|
+
}, [K]), Nu = qo ? P("modeSelector.auto", "Auto") : void 0, Pu = D((e) => {
|
|
2652
2657
|
if (es !== null) return;
|
|
2653
|
-
let { state: t, conversation: n, waitingCount: r, hasDraft: i } =
|
|
2658
|
+
let { state: t, conversation: n, waitingCount: r, hasDraft: i } = Mu(), a = L.find((t) => t.id === e), o = Ae({
|
|
2654
2659
|
target: {
|
|
2655
2660
|
kind: "mode",
|
|
2656
2661
|
mode: e,
|
|
@@ -2660,7 +2665,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2660
2665
|
waitingCount: r,
|
|
2661
2666
|
hasDraft: i
|
|
2662
2667
|
});
|
|
2663
|
-
o.needsDialog ?
|
|
2668
|
+
o.needsDialog ? ju({
|
|
2664
2669
|
open: !0,
|
|
2665
2670
|
target: {
|
|
2666
2671
|
kind: "mode",
|
|
@@ -2668,83 +2673,83 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2668
2673
|
},
|
|
2669
2674
|
plan: o,
|
|
2670
2675
|
targetName: we(P, a ?? { id: e }),
|
|
2671
|
-
currentName:
|
|
2672
|
-
}) :
|
|
2676
|
+
currentName: Nu
|
|
2677
|
+
}) : Cu(e);
|
|
2673
2678
|
}, [
|
|
2674
|
-
|
|
2675
|
-
|
|
2679
|
+
Nu,
|
|
2680
|
+
Mu,
|
|
2676
2681
|
es,
|
|
2677
|
-
|
|
2682
|
+
Cu,
|
|
2678
2683
|
L,
|
|
2679
2684
|
P
|
|
2680
|
-
]),
|
|
2685
|
+
]), Fu = D(() => {
|
|
2681
2686
|
if (es !== null) return;
|
|
2682
|
-
let { conversation: e, waitingCount: t, hasDraft: n } =
|
|
2687
|
+
let { conversation: e, waitingCount: t, hasDraft: n } = Mu(), r = Ae({
|
|
2683
2688
|
target: { kind: "auto" },
|
|
2684
2689
|
conversation: e,
|
|
2685
2690
|
waitingCount: t,
|
|
2686
2691
|
hasDraft: n
|
|
2687
2692
|
});
|
|
2688
|
-
r.needsDialog ?
|
|
2693
|
+
r.needsDialog ? ju({
|
|
2689
2694
|
open: !0,
|
|
2690
2695
|
target: { kind: "auto" },
|
|
2691
2696
|
plan: r,
|
|
2692
2697
|
targetName: P("modeSelector.auto", "Auto")
|
|
2693
|
-
}) :
|
|
2698
|
+
}) : wu();
|
|
2694
2699
|
}, [
|
|
2695
|
-
|
|
2696
|
-
|
|
2700
|
+
wu,
|
|
2701
|
+
Mu,
|
|
2697
2702
|
es,
|
|
2698
2703
|
P
|
|
2699
|
-
]),
|
|
2700
|
-
let e =
|
|
2701
|
-
e?.open && (
|
|
2704
|
+
]), Iu = D(() => {
|
|
2705
|
+
let e = Au;
|
|
2706
|
+
e?.open && (ju({
|
|
2702
2707
|
...e,
|
|
2703
2708
|
open: !1
|
|
2704
|
-
}), e.target.kind === "auto" ?
|
|
2709
|
+
}), e.target.kind === "auto" ? wu() : (e.plan.consent && po(e.target.mode), Cu(e.target.mode)));
|
|
2705
2710
|
}, [
|
|
2706
2711
|
po,
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
]),
|
|
2711
|
-
|
|
2712
|
+
wu,
|
|
2713
|
+
Au,
|
|
2714
|
+
Cu
|
|
2715
|
+
]), Lu = D(() => {
|
|
2716
|
+
ju((e) => e && {
|
|
2712
2717
|
...e,
|
|
2713
2718
|
open: !1
|
|
2714
2719
|
});
|
|
2715
|
-
}, []),
|
|
2716
|
-
consent:
|
|
2717
|
-
withdrawnCount:
|
|
2718
|
-
movesToNewConversation:
|
|
2719
|
-
draftKept:
|
|
2720
|
-
targetName:
|
|
2721
|
-
...
|
|
2722
|
-
} : void 0,
|
|
2720
|
+
}, []), Ru = Au ? {
|
|
2721
|
+
consent: Au.plan.consent,
|
|
2722
|
+
withdrawnCount: Au.plan.withdrawnCount,
|
|
2723
|
+
movesToNewConversation: Au.plan.movesToNewConversation,
|
|
2724
|
+
draftKept: Au.plan.draftKept,
|
|
2725
|
+
targetName: Au.targetName,
|
|
2726
|
+
...Au.currentName === void 0 ? {} : { currentName: Au.currentName }
|
|
2727
|
+
} : void 0, zu = Au?.target.kind === "mode" ? Au.target.mode : null, Bu = zu === null ? void 0 : L.find((e) => e.id === zu) ?? { id: zu }, Vu = A(null), Hu = k(() => {
|
|
2723
2728
|
if (!F) return 0;
|
|
2724
|
-
let e = new Set(
|
|
2729
|
+
let e = new Set(Xc.flatMap((e) => ae(e.metadata).map((e) => e.proposalId)));
|
|
2725
2730
|
return Oe(Co, V, wo, e);
|
|
2726
2731
|
}, [
|
|
2727
2732
|
F,
|
|
2728
|
-
|
|
2733
|
+
Xc,
|
|
2729
2734
|
V,
|
|
2730
2735
|
Co,
|
|
2731
2736
|
wo
|
|
2732
|
-
]),
|
|
2733
|
-
ke(
|
|
2734
|
-
}, []),
|
|
2737
|
+
]), Uu = D(() => {
|
|
2738
|
+
ke(Vu.current);
|
|
2739
|
+
}, []), Wu = Ea && Da && Xc.length === 0 && !Ao && !jo && !W?.sync?.hasOlder, Gu = Wu ? /* @__PURE__ */ M("div", {
|
|
2735
2740
|
ref: Oa,
|
|
2736
2741
|
className: "w-full shrink-0",
|
|
2737
2742
|
"data-testid": "assistant-page-start-above"
|
|
2738
|
-
}) :
|
|
2743
|
+
}) : Xc.length === 0 && (Ao || jo) ? /* @__PURE__ */ M(_e, {
|
|
2739
2744
|
state: Ao ? "loading" : "failed",
|
|
2740
2745
|
onRetry: Vo
|
|
2741
|
-
}) :
|
|
2746
|
+
}) : Xc.length === 0 && W?.sync?.hasOlder ? /* @__PURE__ */ M("div", {
|
|
2742
2747
|
className: "flex min-h-0 flex-1 flex-col",
|
|
2743
2748
|
children: /* @__PURE__ */ M(S, {
|
|
2744
2749
|
onShowEarlier: Ho,
|
|
2745
2750
|
disabled: Ao
|
|
2746
2751
|
})
|
|
2747
|
-
}) :
|
|
2752
|
+
}) : Xc.length === 0 ? /* @__PURE__ */ M(me, {
|
|
2748
2753
|
mode: H,
|
|
2749
2754
|
onSuggestionClick: Uc,
|
|
2750
2755
|
explainsAuto: qo,
|
|
@@ -2757,28 +2762,28 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2757
2762
|
}) : null, /* @__PURE__ */ M(c, {
|
|
2758
2763
|
onApprovePendingWrite: Vs,
|
|
2759
2764
|
approvingWriteRef: Ns,
|
|
2760
|
-
approvableMessageId:
|
|
2761
|
-
retryableMessageId:
|
|
2762
|
-
messages:
|
|
2765
|
+
approvableMessageId: el?.messageId ?? null,
|
|
2766
|
+
retryableMessageId: tl,
|
|
2767
|
+
messages: Xc,
|
|
2763
2768
|
processing: G ?? null,
|
|
2764
2769
|
streamingMessageId: bo,
|
|
2765
2770
|
failedMessageId: xo,
|
|
2766
2771
|
onRetry: Ns === null ? Gc : void 0,
|
|
2767
|
-
renderWriteProposals:
|
|
2768
|
-
hidesLegacyWriteCard:
|
|
2769
|
-
renderUiOffers:
|
|
2770
|
-
onStopTurn: F ? void 0 :
|
|
2772
|
+
renderWriteProposals: rl,
|
|
2773
|
+
hidesLegacyWriteCard: nl,
|
|
2774
|
+
renderUiOffers: al,
|
|
2775
|
+
onStopTurn: F ? void 0 : ku,
|
|
2771
2776
|
stopTurnLabel: F ? void 0 : Ta
|
|
2772
2777
|
})]
|
|
2773
2778
|
});
|
|
2774
2779
|
return /* @__PURE__ */ ia("div", {
|
|
2775
|
-
ref:
|
|
2780
|
+
ref: Vu,
|
|
2776
2781
|
className: "relative flex flex-1 flex-col overflow-hidden",
|
|
2777
|
-
style:
|
|
2782
|
+
style: Wu ? ha : void 0,
|
|
2778
2783
|
children: [
|
|
2779
2784
|
/* @__PURE__ */ ia("div", {
|
|
2780
2785
|
className: "contents",
|
|
2781
|
-
inert: $.active || J || void 0,
|
|
2786
|
+
inert: $.active && !Ea || J || void 0,
|
|
2782
2787
|
...q.ids ? F ? { id: q.ids.chatPanel } : {
|
|
2783
2788
|
role: "tabpanel",
|
|
2784
2789
|
id: q.ids.chatPanel,
|
|
@@ -2786,24 +2791,24 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2786
2791
|
} : {},
|
|
2787
2792
|
children: [
|
|
2788
2793
|
Fo === null ? null : /* @__PURE__ */ M(ge, { onDismiss: () => Po(Fo) }),
|
|
2789
|
-
|
|
2790
|
-
count:
|
|
2794
|
+
cl.length > 0 && !$.active ? /* @__PURE__ */ M(he, {
|
|
2795
|
+
count: cl.length,
|
|
2791
2796
|
onOpenTranscript: () => cs(!0)
|
|
2792
2797
|
}) : null,
|
|
2793
|
-
|
|
2798
|
+
Gu,
|
|
2794
2799
|
Oo ? /* @__PURE__ */ M(ve, { onStartNew: () => to() }) : null,
|
|
2795
2800
|
ko && V ? /* @__PURE__ */ M(x, { onUnarchive: () => Ii.updateConversation(V, { archived: !1 }) }) : null,
|
|
2796
2801
|
Lc === null ? null : /* @__PURE__ */ M(ye, {
|
|
2797
2802
|
tr: P,
|
|
2798
2803
|
onDismiss: () => Rc(null)
|
|
2799
2804
|
}),
|
|
2800
|
-
|
|
2805
|
+
Xc.length > 0 && (Ao || jo) ? /* @__PURE__ */ M(_e, {
|
|
2801
2806
|
state: Ao ? "loading" : "failed",
|
|
2802
2807
|
onRetry: Vo,
|
|
2803
2808
|
compact: !0
|
|
2804
2809
|
}) : null,
|
|
2805
2810
|
/* @__PURE__ */ M(Ce, {
|
|
2806
|
-
onStartVoiceSession: $.available && Ts ?
|
|
2811
|
+
onStartVoiceSession: $.available && Ts ? Bl : void 0,
|
|
2807
2812
|
onSend: (e, t) => {
|
|
2808
2813
|
let n = Qi.getState().actions.take();
|
|
2809
2814
|
Q(e, t, {
|
|
@@ -2813,15 +2818,15 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2813
2818
|
},
|
|
2814
2819
|
onDraftChange: jc,
|
|
2815
2820
|
inputRef: F ? ya : void 0,
|
|
2816
|
-
viewSwitch: F && !Ea && q.ids && q.compact && !
|
|
2821
|
+
viewSwitch: F && !Ea && q.ids && q.compact && !fu ? /* @__PURE__ */ M(Le, {
|
|
2817
2822
|
selected: q.compact.view,
|
|
2818
2823
|
onSelect: q.compact.selectView,
|
|
2819
2824
|
ids: q.ids,
|
|
2820
2825
|
instance: "chat"
|
|
2821
2826
|
}) : void 0,
|
|
2822
|
-
aboveCard:
|
|
2823
|
-
count:
|
|
2824
|
-
onReview: Aa && Ca ?
|
|
2827
|
+
aboveCard: Hu > 0 ? /* @__PURE__ */ M(Ee, {
|
|
2828
|
+
count: Hu,
|
|
2829
|
+
onReview: Aa && Ca ? Ql : Uu,
|
|
2825
2830
|
opensFull: Aa && Ca !== void 0
|
|
2826
2831
|
}) : void 0,
|
|
2827
2832
|
disabled: yo || Ns !== null || Ao || cc,
|
|
@@ -2831,26 +2836,31 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2831
2836
|
writeAccessDenied: _a === "denied" && !!Ss?.writeCapable,
|
|
2832
2837
|
availableModes: Go,
|
|
2833
2838
|
attachmentCharsPerFile: $o,
|
|
2834
|
-
onModeChange: F ?
|
|
2839
|
+
onModeChange: F ? Pu : Tu,
|
|
2835
2840
|
auto: Ko ? {
|
|
2836
2841
|
active: qo,
|
|
2837
|
-
onSelect: F ?
|
|
2842
|
+
onSelect: F ? Fu : wu
|
|
2838
2843
|
} : void 0,
|
|
2839
2844
|
suspendDictation: J || F && !ga,
|
|
2840
|
-
onVoiceStateChange: q.ids || Aa ?
|
|
2845
|
+
onVoiceStateChange: q.ids || Aa ? Jl : void 0,
|
|
2841
2846
|
modeReadOnly: Aa || void 0,
|
|
2842
2847
|
voiceSessionActive: F ? $.active : void 0,
|
|
2848
|
+
concealed: Ea && $.active,
|
|
2843
2849
|
presentation: va,
|
|
2844
2850
|
turnInFlight: yo,
|
|
2845
2851
|
turnId: yo ? G?.messageId ?? null : null,
|
|
2846
|
-
onStop: F ?
|
|
2852
|
+
onStop: F ? ku : void 0,
|
|
2847
2853
|
modeDisabledReason: yo ? "replying" : "busy"
|
|
2848
2854
|
}),
|
|
2849
|
-
|
|
2855
|
+
Ea ? /* @__PURE__ */ ia(ra, { children: [Wu && !$.active ? /* @__PURE__ */ M("div", {
|
|
2850
2856
|
ref: ka,
|
|
2851
2857
|
className: "w-full shrink-0",
|
|
2852
2858
|
"data-testid": "assistant-page-start-below"
|
|
2853
|
-
}) : null,
|
|
2859
|
+
}) : null, /* @__PURE__ */ M("div", {
|
|
2860
|
+
ref: Qc,
|
|
2861
|
+
className: "contents",
|
|
2862
|
+
"data-testid": "assistant-page-voice-slot"
|
|
2863
|
+
})] }) : null,
|
|
2854
2864
|
F ? /* @__PURE__ */ M(Me, { children: /* @__PURE__ */ M(Ne, {
|
|
2855
2865
|
productKey: I,
|
|
2856
2866
|
enabled: !!Pa,
|
|
@@ -2864,16 +2874,16 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2864
2874
|
]
|
|
2865
2875
|
}),
|
|
2866
2876
|
is && !$.active ? /* @__PURE__ */ M(Se, {
|
|
2867
|
-
turns:
|
|
2877
|
+
turns: cl,
|
|
2868
2878
|
onClose: () => cs(!1),
|
|
2869
|
-
onSave:
|
|
2870
|
-
onContinueInChat:
|
|
2879
|
+
onSave: ll,
|
|
2880
|
+
onContinueInChat: Ul ? Wl : void 0,
|
|
2871
2881
|
closeOnEscape: !0,
|
|
2872
2882
|
onShowEarlier: W?.sync?.hasOlder ? Ho : void 0,
|
|
2873
2883
|
showEarlierDisabled: Ao,
|
|
2874
|
-
renderAfterTurn:
|
|
2884
|
+
renderAfterTurn: il
|
|
2875
2885
|
}) : null,
|
|
2876
|
-
|
|
2886
|
+
fu && q.ids && q.compact ? /* @__PURE__ */ M(Re, {
|
|
2877
2887
|
ids: q.ids,
|
|
2878
2888
|
compact: q.compact
|
|
2879
2889
|
}) : J && as && q.ids ? F && q.compact && as.CompactView ? /* @__PURE__ */ M(Ie, {
|
|
@@ -2881,22 +2891,22 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2881
2891
|
CompactView: as.CompactView,
|
|
2882
2892
|
ids: q.ids,
|
|
2883
2893
|
compact: q.compact,
|
|
2884
|
-
shown:
|
|
2885
|
-
voice:
|
|
2894
|
+
shown: pu,
|
|
2895
|
+
voice: ou,
|
|
2886
2896
|
...$.active ? { mute: {
|
|
2887
2897
|
muted: $.session.muted,
|
|
2888
2898
|
toggle: $.toggleMute
|
|
2889
2899
|
} } : {},
|
|
2890
|
-
...
|
|
2900
|
+
...mu ? { ask: bu } : {},
|
|
2891
2901
|
footer: /* @__PURE__ */ M(Me, {})
|
|
2892
2902
|
}) : /* @__PURE__ */ M(Fe, {
|
|
2893
2903
|
tab: as,
|
|
2894
2904
|
id: q.ids.avatarPanel,
|
|
2895
2905
|
labelledBy: q.ids.avatarTab,
|
|
2896
2906
|
leaveHintId: q.ids.leaveHint,
|
|
2897
|
-
shown:
|
|
2898
|
-
voice:
|
|
2899
|
-
...
|
|
2907
|
+
shown: pu,
|
|
2908
|
+
voice: ou,
|
|
2909
|
+
...mu ? { ask: bu } : {}
|
|
2900
2910
|
}) : null,
|
|
2901
2911
|
$.active && /* @__PURE__ */ M(Pe, {
|
|
2902
2912
|
session: $.session,
|
|
@@ -2909,59 +2919,62 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2909
2919
|
correcting: $.correcting,
|
|
2910
2920
|
onLetMeFinish: $.letMeFinish,
|
|
2911
2921
|
onImDone: $.imDone,
|
|
2912
|
-
turns:
|
|
2922
|
+
turns: vl,
|
|
2913
2923
|
spokenChunks: $.spokenChunks,
|
|
2914
|
-
attachments:
|
|
2915
|
-
onAttachFiles:
|
|
2916
|
-
onRemoveAttachment:
|
|
2917
|
-
onRetryAttachment:
|
|
2918
|
-
canAttachMore:
|
|
2919
|
-
preparingAttachments:
|
|
2920
|
-
attachmentsLocked:
|
|
2921
|
-
attachmentNotice:
|
|
2922
|
-
onSaveTranscript:
|
|
2923
|
-
onContinueInChat:
|
|
2924
|
+
attachments: ul.attachments,
|
|
2925
|
+
onAttachFiles: ul.addFiles,
|
|
2926
|
+
onRemoveAttachment: ul.remove,
|
|
2927
|
+
onRetryAttachment: ul.retry,
|
|
2928
|
+
canAttachMore: ul.canAddMore,
|
|
2929
|
+
preparingAttachments: ul.preparingCount,
|
|
2930
|
+
attachmentsLocked: ul.isCommitting,
|
|
2931
|
+
attachmentNotice: ml,
|
|
2932
|
+
onSaveTranscript: ll,
|
|
2933
|
+
onContinueInChat: Wl,
|
|
2924
2934
|
onInterrupt: () => {
|
|
2925
2935
|
$.interrupt(), zs();
|
|
2926
2936
|
},
|
|
2927
2937
|
spoken: Jc,
|
|
2928
2938
|
onToggleMute: $.toggleMute,
|
|
2929
|
-
onEnd:
|
|
2930
|
-
proposalChip:
|
|
2939
|
+
onEnd: Kl,
|
|
2940
|
+
proposalChip: El ? Aa && Ca ? {
|
|
2931
2941
|
label: P("waitingChange.reviewInFull", "Review in full assistant"),
|
|
2932
|
-
status: te(
|
|
2942
|
+
status: te(El, P),
|
|
2933
2943
|
onOpen: Ca
|
|
2934
2944
|
} : {
|
|
2935
|
-
label: te(
|
|
2936
|
-
onOpen:
|
|
2945
|
+
label: te(El, P),
|
|
2946
|
+
onOpen: Tl
|
|
2937
2947
|
} : null,
|
|
2938
|
-
proposalTray: Aa ? null :
|
|
2939
|
-
renderAfterTurn:
|
|
2940
|
-
onViewChange: q.ids ?
|
|
2941
|
-
...Aa ? { view: J ||
|
|
2948
|
+
proposalTray: Aa ? null : Ol,
|
|
2949
|
+
renderAfterTurn: il,
|
|
2950
|
+
onViewChange: q.ids ? cu : void 0,
|
|
2951
|
+
...Aa ? { view: J || lu ? "mini" : "compact" } : Ea ? {
|
|
2952
|
+
view: "page",
|
|
2953
|
+
pageSlot: Zc
|
|
2954
|
+
} : {},
|
|
2942
2955
|
startedCue: F ? fs ? P("window.voiceStartedCue", "Started a voice conversation. Your chat is in History.") : null : void 0
|
|
2943
2956
|
}),
|
|
2944
2957
|
/* @__PURE__ */ M(l, {
|
|
2945
2958
|
open: es !== null,
|
|
2946
|
-
mode:
|
|
2959
|
+
mode: Du,
|
|
2947
2960
|
currentMode: Ss ?? { id: H },
|
|
2948
|
-
onConfirm:
|
|
2949
|
-
onCancel:
|
|
2961
|
+
onConfirm: Eu,
|
|
2962
|
+
onCancel: Ou
|
|
2950
2963
|
}),
|
|
2951
2964
|
F ? /* @__PURE__ */ M(l, {
|
|
2952
|
-
open:
|
|
2953
|
-
mode:
|
|
2965
|
+
open: Au?.open === !0,
|
|
2966
|
+
mode: Bu,
|
|
2954
2967
|
currentMode: Ss ?? { id: H },
|
|
2955
|
-
switchPlan:
|
|
2956
|
-
onConfirm:
|
|
2957
|
-
onCancel:
|
|
2968
|
+
switchPlan: Ru,
|
|
2969
|
+
onConfirm: Iu,
|
|
2970
|
+
onCancel: Lu
|
|
2958
2971
|
}) : null,
|
|
2959
2972
|
/* @__PURE__ */ M(u, {
|
|
2960
2973
|
...To.dialog,
|
|
2961
|
-
view:
|
|
2962
|
-
serverNow:
|
|
2963
|
-
arrivedAt:
|
|
2964
|
-
capabilities:
|
|
2974
|
+
view: ol?.view ?? To.dialog.view,
|
|
2975
|
+
serverNow: ol?.serverNow ?? NaN,
|
|
2976
|
+
arrivedAt: ol?.arrivedAt ?? NaN,
|
|
2977
|
+
capabilities: ol ? So[ol.session.sandboxId] : null,
|
|
2965
2978
|
turnInFlight: yo,
|
|
2966
2979
|
tr: P
|
|
2967
2980
|
})
|