@burdenoff/fe-libs 2026.1114.7 → 2026.1114.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/profileFollowingStorage.d.ts +28 -0
- package/dist/shared/assistant/profileFollowingStorage.js +44 -0
- package/dist/shared/assistant/store.d.ts +29 -0
- package/dist/shared/assistant/store.js +91 -81
- package/dist/shared/assistant/ui/AssistantChatArea.js +81 -78
- package/dist/shared/assistant/ui/transcriptAutoOpenSlot.d.ts +20 -0
- package/dist/shared/assistant/ui/transcriptAutoOpenSlot.js +27 -0
- package/dist/shared/utils/profileScopedStorage.d.ts +2 -13
- package/dist/shared/utils/profileScopedStorage.js +1 -1
- package/dist/shared-assistant.js +305 -303
- package/package.json +1 -1
|
@@ -99,7 +99,8 @@ import { toCaptionText as nr } from "../voice/captionText.js";
|
|
|
99
99
|
import { buildContinuedFromVoiceNote as rr, buildVoiceTranscriptMarkdown as ir, voiceTranscriptFilename as ar } from "../voice/voiceTranscript.js";
|
|
100
100
|
import { downloadFile as or } from "../exportConversation.js";
|
|
101
101
|
import { chatTurns as sr, isVoiceTurn as cr, voiceMarker as lr, voiceSessionIdOf as ur } from "../voice/turnVisibility.js";
|
|
102
|
-
import {
|
|
102
|
+
import { isAwaitingOwnConversation as dr, maySendSpokenTurn as fr, planTranscriptAutoOpen as pr, planVoiceSessionBinding as mr, planVoiceSessionStart as hr, planVoiceSpokenEntry as gr, voiceBindingAtStart as _r, voiceBindingConversationId as vr } from "../voice/voiceReopen.js";
|
|
103
|
+
import { transcriptAutoOpenSlot as yr } from "./transcriptAutoOpenSlot.js";
|
|
103
104
|
import { toVoiceReply as br } from "../voice/voiceReply.js";
|
|
104
105
|
import { beginApprovalInFlight as xr, endApprovalInFlight as Sr, getApprovalInFlight as Cr, markLiveTurn as wr, newestModelReplyId as Tr, resolveApprovablePendingWrite as Er, resolveRetryableMessageId as Dr, subscribeApprovalInFlight as Or } from "../liveTurns.js";
|
|
105
106
|
import { createReadinessTracker as kr, planAfterTransportFailure as Ar, planTrustedSandboxFailure as jr } from "../sandboxReadiness.js";
|
|
@@ -229,7 +230,11 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
229
230
|
O(() => {
|
|
230
231
|
Jo.current = Ko;
|
|
231
232
|
}, [Ko]);
|
|
232
|
-
let Yo = A(null), Xo = A(!1), [Zo, Qo] = j(!1), $o = gn(L), [es, ts] = j(null), [ns, rs] = j(
|
|
233
|
+
let Yo = A(null), Xo = A(!1), [Zo, Qo] = j(!1), $o = gn(L), [es, ts] = j(null), [ns, rs] = j(() => yr.openFor());
|
|
234
|
+
O(() => {
|
|
235
|
+
yr.setOpenFor(ns);
|
|
236
|
+
}, [ns]);
|
|
237
|
+
let is = ns !== null && ns === V, q = He(), as = Ue(), J = q.open && as !== null, os = q.close, ss = A(J);
|
|
233
238
|
ta(() => {
|
|
234
239
|
ss.current = J;
|
|
235
240
|
}, [J]);
|
|
@@ -240,7 +245,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
240
245
|
rs((e) => e !== null && e !== V ? null : e);
|
|
241
246
|
}, [V]);
|
|
242
247
|
let ls = A(void 0), [us, ds] = j(!1), [fs, ps] = j(!1), ms = D((e) => {
|
|
243
|
-
ls.current = e, ds(
|
|
248
|
+
ls.current = e, ds(dr(e));
|
|
244
249
|
}, []), hs = A(null), gs = A(!1), _s = D(() => {
|
|
245
250
|
let e = w.getState(), t = e.activeConversationId, n = t ? e.conversations.find((e) => e.id === t) : void 0;
|
|
246
251
|
return !t || !n ? null : {
|
|
@@ -1422,8 +1427,8 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
1422
1427
|
K
|
|
1423
1428
|
]), Q = D(async (n, r = [], i = {}) => {
|
|
1424
1429
|
let a = i.voiceSessionId !== void 0, o = w.getState(), s = !1, c = ls.current;
|
|
1425
|
-
if (a &&
|
|
1426
|
-
let e =
|
|
1430
|
+
if (a && dr(c)) {
|
|
1431
|
+
let e = gr(c, o.activeConversationId, _s());
|
|
1427
1432
|
if (e.kind === "gone") return;
|
|
1428
1433
|
let t = i.voiceEntry ?? e;
|
|
1429
1434
|
t.kind === "adopt" && ms(t.conversationId), s = t.kind === "own", i = {
|
|
@@ -2143,9 +2148,9 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2143
2148
|
return () => window.clearTimeout(e);
|
|
2144
2149
|
}, [ll]);
|
|
2145
2150
|
let fl = A(/* @__PURE__ */ new Set()), pl = A(() => !1), ml = D((e, t, n, r) => {
|
|
2146
|
-
let i = ls.current, a =
|
|
2151
|
+
let i = ls.current, a = vr(i), o = () => {
|
|
2147
2152
|
let e = w.getState();
|
|
2148
|
-
return
|
|
2153
|
+
return fr({
|
|
2149
2154
|
sessionLive: pl.current(t),
|
|
2150
2155
|
boundAtSubmit: i,
|
|
2151
2156
|
activeConversationId: e.activeConversationId,
|
|
@@ -2308,8 +2313,8 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2308
2313
|
return typeof t == "string" ? t === e : w.getState().activeConversationId === e;
|
|
2309
2314
|
}), []);
|
|
2310
2315
|
let Il = $.start, Ll = D(() => {
|
|
2311
|
-
let e = w.getState().activeConversationId, t =
|
|
2312
|
-
ms(
|
|
2316
|
+
let e = w.getState().activeConversationId, t = hr(_s());
|
|
2317
|
+
ms(_r(t, e)), ks(!0, t.kind === "own"), Il();
|
|
2313
2318
|
}, [
|
|
2314
2319
|
ms,
|
|
2315
2320
|
ks,
|
|
@@ -2381,14 +2386,14 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2381
2386
|
Jl.current = !0, Ca?.({ review: !0 });
|
|
2382
2387
|
}, [Ca]);
|
|
2383
2388
|
O(() => {
|
|
2384
|
-
!Aa && Jl.current && (Jl.current = !1, ke(
|
|
2389
|
+
!Aa && Jl.current && (Jl.current = !1, ke(Ru.current));
|
|
2385
2390
|
}, [Aa]);
|
|
2386
2391
|
let Xl = $.active;
|
|
2387
2392
|
O(() => {
|
|
2388
2393
|
if (!Xl) gs.current = !1, hs.current = null;
|
|
2389
2394
|
else if (us) {
|
|
2390
2395
|
let e = ls.current;
|
|
2391
|
-
|
|
2396
|
+
dr(e) && (hs.current = e.openAtStart), gs.current = !0;
|
|
2392
2397
|
} else gs.current && (gs.current = !1, F && De({
|
|
2393
2398
|
pending: "own",
|
|
2394
2399
|
openAtStart: hs.current
|
|
@@ -2520,7 +2525,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2520
2525
|
yu,
|
|
2521
2526
|
Gs
|
|
2522
2527
|
]), O(() => {
|
|
2523
|
-
let e = ls.current, t =
|
|
2528
|
+
let e = ls.current, t = vr(e), n = w.getState(), r = mr({
|
|
2524
2529
|
sessionLive: $.active,
|
|
2525
2530
|
bound: e,
|
|
2526
2531
|
activeConversationId: n.activeConversationId,
|
|
@@ -2532,10 +2537,8 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2532
2537
|
V,
|
|
2533
2538
|
Xa,
|
|
2534
2539
|
ms
|
|
2535
|
-
])
|
|
2536
|
-
|
|
2537
|
-
O(() => {
|
|
2538
|
-
let e = mr(bu.current, {
|
|
2540
|
+
]), O(() => {
|
|
2541
|
+
let e = pr(yr.read(), {
|
|
2539
2542
|
activeConversationId: V,
|
|
2540
2543
|
chatTurnCount: Yc.length,
|
|
2541
2544
|
voiceTurnCount: al.length,
|
|
@@ -2543,7 +2546,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2543
2546
|
sessionBoundTo: ls.current,
|
|
2544
2547
|
turnInFlight: yo
|
|
2545
2548
|
});
|
|
2546
|
-
|
|
2549
|
+
yr.write(e.state), e.open && cs(!0);
|
|
2547
2550
|
}, [
|
|
2548
2551
|
V,
|
|
2549
2552
|
Yc.length,
|
|
@@ -2572,7 +2575,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2572
2575
|
}
|
|
2573
2576
|
});
|
|
2574
2577
|
}, []);
|
|
2575
|
-
let
|
|
2578
|
+
let bu = D((e) => {
|
|
2576
2579
|
let t = V ? w.getState().conversations.find((e) => e.id === V) : void 0;
|
|
2577
2580
|
if (t && t.mode !== e && K.withdraw(t.id, "mode_switched"), t && Li(t)) {
|
|
2578
2581
|
if (t.mode !== e) {
|
|
@@ -2590,7 +2593,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2590
2593
|
$a,
|
|
2591
2594
|
Qa,
|
|
2592
2595
|
K
|
|
2593
|
-
]),
|
|
2596
|
+
]), xu = D(() => {
|
|
2594
2597
|
let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0;
|
|
2595
2598
|
if (!t) {
|
|
2596
2599
|
ho(!0), Qa(b);
|
|
@@ -2614,26 +2617,26 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2614
2617
|
ho,
|
|
2615
2618
|
Qa,
|
|
2616
2619
|
K
|
|
2617
|
-
]),
|
|
2618
|
-
L.find((t) => t.id === e)?.writeCapable && !Jn(w.getState().acknowledgedWriteModes, e) ? ts(e) :
|
|
2619
|
-
}, [
|
|
2620
|
+
]), Su = D((e) => {
|
|
2621
|
+
L.find((t) => t.id === e)?.writeCapable && !Jn(w.getState().acknowledgedWriteModes, e) ? ts(e) : bu(e);
|
|
2622
|
+
}, [bu, L]), Cu = D(() => {
|
|
2620
2623
|
let e = es;
|
|
2621
2624
|
if (ts(null), !e) return;
|
|
2622
2625
|
let t = Yo.current;
|
|
2623
|
-
Yo.current = null, t ? (po(e), Q(t.content, t.attachments, t.options)) : (po(e),
|
|
2626
|
+
Yo.current = null, t ? (po(e), Q(t.content, t.attachments, t.options)) : (po(e), bu(e));
|
|
2624
2627
|
}, [
|
|
2625
2628
|
es,
|
|
2626
2629
|
po,
|
|
2627
|
-
|
|
2630
|
+
bu,
|
|
2628
2631
|
Q
|
|
2629
|
-
]),
|
|
2632
|
+
]), wu = es === null ? void 0 : L.find((e) => e.id === es) ?? { id: es }, Tu = D(() => {
|
|
2630
2633
|
ts(null);
|
|
2631
2634
|
let e = Yo.current;
|
|
2632
2635
|
Yo.current = null, e && Q(e.content, e.attachments, {
|
|
2633
2636
|
...e.options,
|
|
2634
2637
|
autoIntent: "read"
|
|
2635
2638
|
});
|
|
2636
|
-
}, [Q]),
|
|
2639
|
+
}, [Q]), Eu = D(() => zs(), [zs]), [Du, Ou] = j(null), ku = D(() => {
|
|
2637
2640
|
let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0, n = js.current;
|
|
2638
2641
|
return {
|
|
2639
2642
|
state: e,
|
|
@@ -2645,9 +2648,9 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2645
2648
|
waitingCount: t ? K.liveFor(t.id).count : 0,
|
|
2646
2649
|
hasDraft: n !== null && (n.text.trim() !== "" || n.hasAttachments)
|
|
2647
2650
|
};
|
|
2648
|
-
}, [K]),
|
|
2651
|
+
}, [K]), Au = qo ? P("modeSelector.auto", "Auto") : void 0, ju = D((e) => {
|
|
2649
2652
|
if (es !== null) return;
|
|
2650
|
-
let { state: t, conversation: n, waitingCount: r, hasDraft: i } =
|
|
2653
|
+
let { state: t, conversation: n, waitingCount: r, hasDraft: i } = ku(), a = L.find((t) => t.id === e), o = Ae({
|
|
2651
2654
|
target: {
|
|
2652
2655
|
kind: "mode",
|
|
2653
2656
|
mode: e,
|
|
@@ -2657,7 +2660,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2657
2660
|
waitingCount: r,
|
|
2658
2661
|
hasDraft: i
|
|
2659
2662
|
});
|
|
2660
|
-
o.needsDialog ?
|
|
2663
|
+
o.needsDialog ? Ou({
|
|
2661
2664
|
open: !0,
|
|
2662
2665
|
target: {
|
|
2663
2666
|
kind: "mode",
|
|
@@ -2665,58 +2668,58 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2665
2668
|
},
|
|
2666
2669
|
plan: o,
|
|
2667
2670
|
targetName: we(P, a ?? { id: e }),
|
|
2668
|
-
currentName:
|
|
2669
|
-
}) :
|
|
2671
|
+
currentName: Au
|
|
2672
|
+
}) : bu(e);
|
|
2670
2673
|
}, [
|
|
2671
|
-
ju,
|
|
2672
2674
|
Au,
|
|
2675
|
+
ku,
|
|
2673
2676
|
es,
|
|
2674
|
-
|
|
2677
|
+
bu,
|
|
2675
2678
|
L,
|
|
2676
2679
|
P
|
|
2677
|
-
]),
|
|
2680
|
+
]), Mu = D(() => {
|
|
2678
2681
|
if (es !== null) return;
|
|
2679
|
-
let { conversation: e, waitingCount: t, hasDraft: n } =
|
|
2682
|
+
let { conversation: e, waitingCount: t, hasDraft: n } = ku(), r = Ae({
|
|
2680
2683
|
target: { kind: "auto" },
|
|
2681
2684
|
conversation: e,
|
|
2682
2685
|
waitingCount: t,
|
|
2683
2686
|
hasDraft: n
|
|
2684
2687
|
});
|
|
2685
|
-
r.needsDialog ?
|
|
2688
|
+
r.needsDialog ? Ou({
|
|
2686
2689
|
open: !0,
|
|
2687
2690
|
target: { kind: "auto" },
|
|
2688
2691
|
plan: r,
|
|
2689
2692
|
targetName: P("modeSelector.auto", "Auto")
|
|
2690
|
-
}) :
|
|
2693
|
+
}) : xu();
|
|
2691
2694
|
}, [
|
|
2692
|
-
|
|
2693
|
-
|
|
2695
|
+
xu,
|
|
2696
|
+
ku,
|
|
2694
2697
|
es,
|
|
2695
2698
|
P
|
|
2696
|
-
]),
|
|
2697
|
-
let e =
|
|
2698
|
-
e?.open && (
|
|
2699
|
+
]), Nu = D(() => {
|
|
2700
|
+
let e = Du;
|
|
2701
|
+
e?.open && (Ou({
|
|
2699
2702
|
...e,
|
|
2700
2703
|
open: !1
|
|
2701
|
-
}), e.target.kind === "auto" ?
|
|
2704
|
+
}), e.target.kind === "auto" ? xu() : (e.plan.consent && po(e.target.mode), bu(e.target.mode)));
|
|
2702
2705
|
}, [
|
|
2703
2706
|
po,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
]),
|
|
2708
|
-
|
|
2707
|
+
xu,
|
|
2708
|
+
Du,
|
|
2709
|
+
bu
|
|
2710
|
+
]), Pu = D(() => {
|
|
2711
|
+
Ou((e) => e && {
|
|
2709
2712
|
...e,
|
|
2710
2713
|
open: !1
|
|
2711
2714
|
});
|
|
2712
|
-
}, []),
|
|
2713
|
-
consent:
|
|
2714
|
-
withdrawnCount:
|
|
2715
|
-
movesToNewConversation:
|
|
2716
|
-
draftKept:
|
|
2717
|
-
targetName:
|
|
2718
|
-
...
|
|
2719
|
-
} : void 0,
|
|
2715
|
+
}, []), Fu = Du ? {
|
|
2716
|
+
consent: Du.plan.consent,
|
|
2717
|
+
withdrawnCount: Du.plan.withdrawnCount,
|
|
2718
|
+
movesToNewConversation: Du.plan.movesToNewConversation,
|
|
2719
|
+
draftKept: Du.plan.draftKept,
|
|
2720
|
+
targetName: Du.targetName,
|
|
2721
|
+
...Du.currentName === void 0 ? {} : { currentName: Du.currentName }
|
|
2722
|
+
} : void 0, Iu = Du?.target.kind === "mode" ? Du.target.mode : null, Lu = Iu === null ? void 0 : L.find((e) => e.id === Iu) ?? { id: Iu }, Ru = A(null), zu = k(() => {
|
|
2720
2723
|
if (!F) return 0;
|
|
2721
2724
|
let e = new Set(Yc.flatMap((e) => ae(e.metadata).map((e) => e.proposalId)));
|
|
2722
2725
|
return Oe(Co, V, wo, e);
|
|
@@ -2726,9 +2729,9 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2726
2729
|
V,
|
|
2727
2730
|
Co,
|
|
2728
2731
|
wo
|
|
2729
|
-
]),
|
|
2730
|
-
ke(
|
|
2731
|
-
}, []),
|
|
2732
|
+
]), Bu = D(() => {
|
|
2733
|
+
ke(Ru.current);
|
|
2734
|
+
}, []), Vu = Ea && Da && Yc.length === 0 && !Ao && !jo && !W?.sync?.hasOlder, Hu = Vu ? /* @__PURE__ */ M("div", {
|
|
2732
2735
|
ref: Oa,
|
|
2733
2736
|
className: "w-full shrink-0",
|
|
2734
2737
|
"data-testid": "assistant-page-start-above"
|
|
@@ -2764,14 +2767,14 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2764
2767
|
renderWriteProposals: el,
|
|
2765
2768
|
hidesLegacyWriteCard: $c,
|
|
2766
2769
|
renderUiOffers: nl,
|
|
2767
|
-
onStopTurn: F ? void 0 :
|
|
2770
|
+
onStopTurn: F ? void 0 : Eu,
|
|
2768
2771
|
stopTurnLabel: F ? void 0 : Ta
|
|
2769
2772
|
})]
|
|
2770
2773
|
});
|
|
2771
2774
|
return /* @__PURE__ */ ia("div", {
|
|
2772
|
-
ref:
|
|
2775
|
+
ref: Ru,
|
|
2773
2776
|
className: "relative flex flex-1 flex-col overflow-hidden",
|
|
2774
|
-
style:
|
|
2777
|
+
style: Vu ? ha : void 0,
|
|
2775
2778
|
children: [
|
|
2776
2779
|
/* @__PURE__ */ ia("div", {
|
|
2777
2780
|
className: "contents",
|
|
@@ -2787,7 +2790,7 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2787
2790
|
count: al.length,
|
|
2788
2791
|
onOpenTranscript: () => cs(!0)
|
|
2789
2792
|
}) : null,
|
|
2790
|
-
|
|
2793
|
+
Hu,
|
|
2791
2794
|
Oo ? /* @__PURE__ */ M(ve, { onStartNew: () => to() }) : null,
|
|
2792
2795
|
ko && V ? /* @__PURE__ */ M(x, { onUnarchive: () => Ii.updateConversation(V, { archived: !1 }) }) : null,
|
|
2793
2796
|
Lc === null ? null : /* @__PURE__ */ M(ye, {
|
|
@@ -2816,9 +2819,9 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2816
2819
|
ids: q.ids,
|
|
2817
2820
|
instance: "chat"
|
|
2818
2821
|
}) : void 0,
|
|
2819
|
-
aboveCard:
|
|
2820
|
-
count:
|
|
2821
|
-
onReview: Aa && Ca ? Yl :
|
|
2822
|
+
aboveCard: zu > 0 ? /* @__PURE__ */ M(Ee, {
|
|
2823
|
+
count: zu,
|
|
2824
|
+
onReview: Aa && Ca ? Yl : Bu,
|
|
2822
2825
|
opensFull: Aa && Ca !== void 0
|
|
2823
2826
|
}) : void 0,
|
|
2824
2827
|
disabled: yo || Ns !== null || Ao || cc,
|
|
@@ -2828,10 +2831,10 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2828
2831
|
writeAccessDenied: _a === "denied" && !!Ss?.writeCapable,
|
|
2829
2832
|
availableModes: Go,
|
|
2830
2833
|
attachmentCharsPerFile: $o,
|
|
2831
|
-
onModeChange: F ?
|
|
2834
|
+
onModeChange: F ? ju : Su,
|
|
2832
2835
|
auto: Ko ? {
|
|
2833
2836
|
active: qo,
|
|
2834
|
-
onSelect: F ?
|
|
2837
|
+
onSelect: F ? Mu : xu
|
|
2835
2838
|
} : void 0,
|
|
2836
2839
|
suspendDictation: J || F && !ga,
|
|
2837
2840
|
onVoiceStateChange: q.ids || Aa ? Gl : void 0,
|
|
@@ -2840,10 +2843,10 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2840
2843
|
presentation: va,
|
|
2841
2844
|
turnInFlight: yo,
|
|
2842
2845
|
turnId: yo ? G?.messageId ?? null : null,
|
|
2843
|
-
onStop: F ?
|
|
2846
|
+
onStop: F ? Eu : void 0,
|
|
2844
2847
|
modeDisabledReason: yo ? "replying" : "busy"
|
|
2845
2848
|
}),
|
|
2846
|
-
|
|
2849
|
+
Vu ? /* @__PURE__ */ M("div", {
|
|
2847
2850
|
ref: ka,
|
|
2848
2851
|
className: "w-full shrink-0",
|
|
2849
2852
|
"data-testid": "assistant-page-start-below"
|
|
@@ -2940,18 +2943,18 @@ var pa = () => () => {}, ma = () => "off", ha = { overflowY: "auto" }, ga = ({ v
|
|
|
2940
2943
|
}),
|
|
2941
2944
|
/* @__PURE__ */ M(l, {
|
|
2942
2945
|
open: es !== null,
|
|
2943
|
-
mode:
|
|
2946
|
+
mode: wu,
|
|
2944
2947
|
currentMode: Ss ?? { id: H },
|
|
2945
|
-
onConfirm:
|
|
2946
|
-
onCancel:
|
|
2948
|
+
onConfirm: Cu,
|
|
2949
|
+
onCancel: Tu
|
|
2947
2950
|
}),
|
|
2948
2951
|
F ? /* @__PURE__ */ M(l, {
|
|
2949
|
-
open:
|
|
2950
|
-
mode:
|
|
2952
|
+
open: Du?.open === !0,
|
|
2953
|
+
mode: Lu,
|
|
2951
2954
|
currentMode: Ss ?? { id: H },
|
|
2952
|
-
switchPlan:
|
|
2953
|
-
onConfirm:
|
|
2954
|
-
onCancel:
|
|
2955
|
+
switchPlan: Fu,
|
|
2956
|
+
onConfirm: Nu,
|
|
2957
|
+
onCancel: Pu
|
|
2955
2958
|
}) : null,
|
|
2956
2959
|
/* @__PURE__ */ M(u, {
|
|
2957
2960
|
...To.dialog,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TranscriptAutoOpenState } from '../voice/voiceReopen';
|
|
2
|
+
export interface TranscriptAutoOpenSlot {
|
|
3
|
+
/** Where the automatic opening stands for the active conversation. */
|
|
4
|
+
read(): TranscriptAutoOpenState;
|
|
5
|
+
write(next: TranscriptAutoOpenState): void;
|
|
6
|
+
/** The conversation the drawer is open for, or null when it is closed. */
|
|
7
|
+
openFor(): string | null;
|
|
8
|
+
setOpenFor(conversationId: string | null): void;
|
|
9
|
+
/** A conversation was activated (or none is): a new opening starts for it. */
|
|
10
|
+
activated(conversationId: string | null): void;
|
|
11
|
+
/** Stop following activations. */
|
|
12
|
+
dispose(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A slot following activations through `watch`, which calls back with the new
|
|
16
|
+
* active conversation each time it changes and returns its unsubscribe.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createTranscriptAutoOpenSlot(watch: (onActivated: (conversationId: string | null) => void) => () => void): TranscriptAutoOpenSlot;
|
|
19
|
+
/** The page's slot, following the assistant store. */
|
|
20
|
+
export declare const transcriptAutoOpenSlot: TranscriptAutoOpenSlot;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useAssistantStore as e } from "../store.js";
|
|
2
|
+
import { INITIAL_TRANSCRIPT_AUTO_OPEN as t } from "../voice/voiceReopen.js";
|
|
3
|
+
// src/shared/assistant/ui/transcriptAutoOpenSlot.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
let n = t, r = null, i = {
|
|
6
|
+
read: () => n,
|
|
7
|
+
write(e) {
|
|
8
|
+
n = e;
|
|
9
|
+
},
|
|
10
|
+
openFor: () => r,
|
|
11
|
+
setOpenFor(e) {
|
|
12
|
+
r = e;
|
|
13
|
+
},
|
|
14
|
+
activated(e) {
|
|
15
|
+
n.conversationId !== e && (n = {
|
|
16
|
+
conversationId: e,
|
|
17
|
+
settled: e === null
|
|
18
|
+
}), r !== null && r !== e && (r = null);
|
|
19
|
+
},
|
|
20
|
+
dispose: () => void 0
|
|
21
|
+
};
|
|
22
|
+
return i.dispose = e((e) => i.activated(e)), i;
|
|
23
|
+
}
|
|
24
|
+
var r = n((t) => e.subscribe((e, n) => {
|
|
25
|
+
e.activeConversationId !== n.activeConversationId && t(e.activeConversationId);
|
|
26
|
+
}));
|
|
27
|
+
export { n as createTranscriptAutoOpenSlot, r as transcriptAutoOpenSlot };
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Profile-Scoped Storage — Zustand persist adapter + helpers
|
|
3
|
-
*
|
|
4
|
-
* Dynamically prefixes localStorage keys with the active profile ID
|
|
5
|
-
* so that persisted UI state (tabs, filters, selections, etc.) is
|
|
6
|
-
* isolated per user account.
|
|
7
|
-
*
|
|
8
|
-
* Key format: bf-p-{profileId}-{baseName}
|
|
9
|
-
*
|
|
10
|
-
* Includes one-time migration: on first read, if the scoped key is
|
|
11
|
-
* missing but the legacy (un-prefixed) key exists, the value is
|
|
12
|
-
* copied to the scoped key and the legacy key is removed.
|
|
13
|
-
*/
|
|
1
|
+
import { StateStorage } from 'zustand/middleware';
|
|
14
2
|
/**
|
|
15
3
|
* Returns the profile-scoped localStorage key for the given base key.
|
|
16
4
|
* Falls back to the bare key if no profile is active.
|
|
@@ -19,6 +7,7 @@
|
|
|
19
7
|
* outside of zustand stores.
|
|
20
8
|
*/
|
|
21
9
|
export declare function getProfileScopedKey(key: string): string;
|
|
10
|
+
export declare const profileScopedStateStorage: StateStorage;
|
|
22
11
|
/**
|
|
23
12
|
* Creates a zustand persist-compatible storage that scopes localStorage
|
|
24
13
|
* keys by the active user profile.
|