@burdenoff/fe-libs 2026.1117.4 → 2026.1117.6

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.
Files changed (23) hide show
  1. package/dist/shared/assistant/liveDeltas.d.ts +6 -0
  2. package/dist/shared/assistant/liveDeltas.js +4 -3
  3. package/dist/shared/assistant/ui/AssistantChatArea.js +1159 -1158
  4. package/dist/shared/assistant/ui/useVoiceSession.js +312 -301
  5. package/dist/shared/assistant/voice/handsFree.d.ts +16 -0
  6. package/dist/shared/assistant/voice/handsFree.js +2 -2
  7. package/dist/shared/assistant/voice/handsfree/audioTrackTransport.js +1 -0
  8. package/dist/shared/assistant/voice/handsfree/backendStreamTransport.d.ts +11 -0
  9. package/dist/shared/assistant/voice/handsfree/backendStreamTransport.js +118 -63
  10. package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +20 -1
  11. package/dist/shared/assistant/voice/handsfree/bargeIn.js +3 -3
  12. package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +10 -1
  13. package/dist/shared/assistant/voice/handsfree/handsFreeController.js +103 -83
  14. package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +20 -0
  15. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +8 -0
  16. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.js +31 -26
  17. package/dist/shared/assistant/voice/handsfree/webSpeechTransport.js +1 -0
  18. package/dist/shared/assistant/voice/livePhraseSpeech.d.ts +29 -0
  19. package/dist/shared/assistant/voice/livePhraseSpeech.js +50 -39
  20. package/dist/shared/assistant/voice/phraseSpeechConfig.d.ts +44 -2
  21. package/dist/shared/assistant/voice/phraseSpeechConfig.js +9 -6
  22. package/dist/shared-assistant.js +399 -399
  23. package/package.json +1 -1
@@ -87,202 +87,202 @@ import { StaleSessionRestart as Bn, isStaleSessionRefusal as Vn } from "../stale
87
87
  import { noteAssistantTurnSent as Hn } from "../signInWarm.js";
88
88
  import { keepAssistantSandboxAlive as Un } from "../useAssistantHeartbeat.js";
89
89
  import { liveCoverage as Wn } from "../liveDeltas.js";
90
- import { phraseSpeechEnabled as Gn } from "../voice/phraseSpeechConfig.js";
91
- import { createLivePhraseSpeech as Kn } from "../voice/livePhraseSpeech.js";
92
- import { createLiveRender as qn } from "../liveOverlay.js";
93
- import { createSnapshotPoller as Jn } from "../snapshotPoller.js";
94
- import { openTurnStream as Yn, turnStreamAvailable as Xn } from "../turnStream.js";
95
- import { withIncompleteTurnNotice as Zn } from "../streamBudget.js";
96
- import { isWriteModeAcknowledged as Qn, writeModeSendRefusalReason as $n } from "../writeModeConsent.js";
97
- import { createAdminModeAccessGate as er, resolveAssistantSendModeAfterAccess as tr } from "../adminModeSendGate.js";
98
- import { getAssistantDisplayContent as nr } from "../displayContent.js";
99
- import { countSpokenTurns as rr, spokenMessagesSinceContinueNote as ir, spokenTurnText as ar } from "../spokenTurns.js";
100
- import { toCaptionText as or } from "../voice/captionText.js";
101
- import { buildContinuedFromVoiceNote as sr, buildVoiceTranscriptMarkdown as cr, voiceTranscriptFilename as lr } from "../voice/voiceTranscript.js";
102
- import { downloadFile as ur } from "../exportConversation.js";
103
- import { chatTurns as dr, isVoiceTurn as fr, voiceMarker as pr, voiceSessionIdOf as mr } from "../voice/turnVisibility.js";
104
- import { VoiceChatEnded as hr, VoiceTurnTag as gr } from "./voice/VoiceTurnMarks.js";
105
- import { revealSpokenMarkdown as _r } from "../voice/revealSpoken.js";
106
- import { isAwaitingOwnConversation as vr, maySendSpokenTurn as yr, planTranscriptAutoOpen as br, planVoiceSessionBinding as xr, planVoiceSessionStart as Sr, planVoiceSpokenEntry as Cr, voiceBindingAtStart as wr, voiceBindingConversationId as Tr } from "../voice/voiceReopen.js";
107
- import { transcriptAutoOpenSlot as Er } from "./transcriptAutoOpenSlot.js";
108
- import { toVoiceReply as Dr } from "../voice/voiceReply.js";
109
- import { beginApprovalInFlight as Or, endApprovalInFlight as kr, getApprovalInFlight as Ar, markLiveTurn as jr, newestModelReplyId as Mr, resolveApprovablePendingWrite as Nr, resolveRetryableMessageId as Pr, subscribeApprovalInFlight as Fr } from "../liveTurns.js";
110
- import { createReadinessTracker as Ir, planAfterTransportFailure as Lr, planTrustedSandboxFailure as Rr } from "../sandboxReadiness.js";
111
- import { couldBeLocalUiCommand as zr, isAlreadyThere as Br, matchLocalUiCommand as Vr, mayBeNavigationFollowUp as Hr, navDestinations as Ur, planThemeChange as Wr } from "../localUiCommands.js";
112
- import { backDoneCopy as Gr, chooseDestinationCopy as Kr, chooseLinkedCopy as qr, entityNounText as Jr, linkNotOpenableCopy as Yr, navigationCommandCopy as Xr, navigationOutcomeCopy as Zr, offerExpiredCopy as Qr, offerKeptForUnsavedCopy as $r, offerNotAvailableCopy as ei, pickFromListCopy as ti, recordChoiceCopy as ni, recordKindsCopy as ri, themeCommandCopy as ii } from "../localUiCommandCopy.js";
113
- import { offerAssentFor as ai } from "../localeCommands/assent.js";
114
- import { appControlCopy as oi } from "../appControls/copy.js";
115
- import { LANGUAGE_REPLY_DEADLINE_MS as si, languageConfirmationCopy as ci, languageReplyStep as li } from "../appControls/languageReply.js";
116
- import { planAppControl as ui } from "../appControls/plan.js";
117
- import { readControlSnapshot as di } from "../appControls/snapshot.js";
118
- import { subscribeAssistantControls as fi } from "../appControls/registry.js";
119
- import { useAssistantControl as pi } from "../appControls/useAssistantControl.js";
120
- import { useControlConfirmDialog as mi } from "./controlConfirmDialog.js";
121
- import { useLeaveConfirmAsking as hi } from "./leaveConfirm.js";
122
- import { startFocusReturnAfterKeep as gi } from "./leaveConfirmFocus.js";
123
- import { buildNavigationContext as _i, latestReplyOnSurface as vi, rememberPresentedList as yi } from "../uiActions/linkContext.js";
124
- import { lookupNamedRecords as bi } from "../uiActions/recordNames.js";
125
- import { navEntryIds as xi } from "../uiActions/resolveTarget.js";
126
- import { buildUiCatalogue as Si, markUiCatalogueSent as Ci, uiCatalogueSent as wi, uiCatalogueSessionKey as Ti } from "../uiActions/uiCatalogue.js";
127
- import { offerYesOnSurface as Ei } from "../uiActions/offerYesOnSurface.js";
128
- import { UiOfferSession as Di, sandboxServesUiOffers as Oi, uiOfferHintKind as ki, uiOfferInTime as Ai } from "../uiActions/uiOffers.js";
129
- import { parseNavIntent as ji } from "../uiActions/navIntent.js";
130
- import { decideActOnResolve as Mi, n4LeaveGuard as Ni } from "../uiActions/actOnResolve.js";
131
- import { AssistantUiOfferLinks as Pi } from "./AssistantUiOfferLink.js";
132
- import { assistantBackStack as Fi, isBackRunnable as Ii } from "../uiActions/backStack.js";
133
- import { subscribeDraftPathname as Li } from "../uiActions/draftPathname.js";
134
- import { buildNavigateAction as Ri, destinationForPath as zi, labelForPath as Bi, newestAssistantOnSurface as Vi } from "../uiActions/navigateAction.js";
135
- import { runNavigation as Hi } from "../uiActions/navigationOutcome.js";
136
- import { assistantHistory as Ui } from "../history/historyEngine.js";
137
- import { conversationHasHistory as Wi, isOtherScopeHistoryConversation as Gi, isReadOnlyHistoryConversation as Ki, isReusableHistoryDraft as qi } from "../history/historyList.js";
138
- import { resumeContextFor as Ji } from "../history/historyResume.js";
139
- import { useAssistantHistoryStatus as Yi } from "../history/historyStatus.js";
140
- import { useHistoryRowControlsFor as Xi } from "../history/useHistoryRowControls.js";
141
- import { getHistoryStamp as Zi, setHistoryBusyProbe as Qi } from "../history/stampRegistry.js";
142
- import { resolveConversationDeleteTarget as $i } from "../conversationDeleteCommand.js";
143
- import { useAssistantNavigate as ea } from "./AssistantMarkdownRenderer.js";
144
- import { useAssistantSpeech as ta } from "./AssistantSpeechProvider.js";
145
- import { useAssistantStopTurnLabel as na } from "../../providers/shell/useAssistantShellLabels.js";
146
- import { useThemeOrNull as ra } from "../../providers/shell/ThemeProvider.js";
147
- import { useVisibleNavItems as ia } from "../../../chrome/mobileTabBar/useVisibleNavItems.js";
148
- import { useAskAboutStore as aa } from "../askAbout/askAboutStore.js";
149
- import { readMessageFocus as oa, withFocusNote as sa } from "../askAbout/focus.js";
150
- import { useCallback as D, useEffect as O, useLayoutEffect as ca, useMemo as k, useRef as A, useState as j, useSyncExternalStore as la } from "react";
151
- import { Fragment as ua, jsx as M, jsxs as da } from "react/jsx-runtime";
90
+ import { phraseSpeechEnabled as Gn, phraseSpeechEnvironment as Kn } from "../voice/phraseSpeechConfig.js";
91
+ import { createLivePhraseSpeech as qn } from "../voice/livePhraseSpeech.js";
92
+ import { createLiveRender as Jn } from "../liveOverlay.js";
93
+ import { createSnapshotPoller as Yn } from "../snapshotPoller.js";
94
+ import { openTurnStream as Xn, turnStreamAvailable as Zn } from "../turnStream.js";
95
+ import { withIncompleteTurnNotice as Qn } from "../streamBudget.js";
96
+ import { isWriteModeAcknowledged as $n, writeModeSendRefusalReason as er } from "../writeModeConsent.js";
97
+ import { createAdminModeAccessGate as tr, resolveAssistantSendModeAfterAccess as nr } from "../adminModeSendGate.js";
98
+ import { getAssistantDisplayContent as rr } from "../displayContent.js";
99
+ import { countSpokenTurns as ir, spokenMessagesSinceContinueNote as ar, spokenTurnText as or } from "../spokenTurns.js";
100
+ import { toCaptionText as sr } from "../voice/captionText.js";
101
+ import { buildContinuedFromVoiceNote as cr, buildVoiceTranscriptMarkdown as lr, voiceTranscriptFilename as ur } from "../voice/voiceTranscript.js";
102
+ import { downloadFile as dr } from "../exportConversation.js";
103
+ import { chatTurns as fr, isVoiceTurn as pr, voiceMarker as mr, voiceSessionIdOf as hr } from "../voice/turnVisibility.js";
104
+ import { VoiceChatEnded as gr, VoiceTurnTag as _r } from "./voice/VoiceTurnMarks.js";
105
+ import { revealSpokenMarkdown as vr } from "../voice/revealSpoken.js";
106
+ import { isAwaitingOwnConversation as yr, maySendSpokenTurn as br, planTranscriptAutoOpen as xr, planVoiceSessionBinding as Sr, planVoiceSessionStart as Cr, planVoiceSpokenEntry as wr, voiceBindingAtStart as Tr, voiceBindingConversationId as Er } from "../voice/voiceReopen.js";
107
+ import { transcriptAutoOpenSlot as Dr } from "./transcriptAutoOpenSlot.js";
108
+ import { toVoiceReply as Or } from "../voice/voiceReply.js";
109
+ import { beginApprovalInFlight as kr, endApprovalInFlight as Ar, getApprovalInFlight as jr, markLiveTurn as Mr, newestModelReplyId as Nr, resolveApprovablePendingWrite as Pr, resolveRetryableMessageId as Fr, subscribeApprovalInFlight as Ir } from "../liveTurns.js";
110
+ import { createReadinessTracker as Lr, planAfterTransportFailure as Rr, planTrustedSandboxFailure as zr } from "../sandboxReadiness.js";
111
+ import { couldBeLocalUiCommand as Br, isAlreadyThere as Vr, matchLocalUiCommand as Hr, mayBeNavigationFollowUp as Ur, navDestinations as Wr, planThemeChange as Gr } from "../localUiCommands.js";
112
+ import { backDoneCopy as Kr, chooseDestinationCopy as qr, chooseLinkedCopy as Jr, entityNounText as Yr, linkNotOpenableCopy as Xr, navigationCommandCopy as Zr, navigationOutcomeCopy as Qr, offerExpiredCopy as $r, offerKeptForUnsavedCopy as ei, offerNotAvailableCopy as ti, pickFromListCopy as ni, recordChoiceCopy as ri, recordKindsCopy as ii, themeCommandCopy as ai } from "../localUiCommandCopy.js";
113
+ import { offerAssentFor as oi } from "../localeCommands/assent.js";
114
+ import { appControlCopy as si } from "../appControls/copy.js";
115
+ import { LANGUAGE_REPLY_DEADLINE_MS as ci, languageConfirmationCopy as li, languageReplyStep as ui } from "../appControls/languageReply.js";
116
+ import { planAppControl as di } from "../appControls/plan.js";
117
+ import { readControlSnapshot as fi } from "../appControls/snapshot.js";
118
+ import { subscribeAssistantControls as pi } from "../appControls/registry.js";
119
+ import { useAssistantControl as mi } from "../appControls/useAssistantControl.js";
120
+ import { useControlConfirmDialog as hi } from "./controlConfirmDialog.js";
121
+ import { useLeaveConfirmAsking as gi } from "./leaveConfirm.js";
122
+ import { startFocusReturnAfterKeep as _i } from "./leaveConfirmFocus.js";
123
+ import { buildNavigationContext as vi, latestReplyOnSurface as yi, rememberPresentedList as bi } from "../uiActions/linkContext.js";
124
+ import { lookupNamedRecords as xi } from "../uiActions/recordNames.js";
125
+ import { navEntryIds as Si } from "../uiActions/resolveTarget.js";
126
+ import { buildUiCatalogue as Ci, markUiCatalogueSent as wi, uiCatalogueSent as Ti, uiCatalogueSessionKey as Ei } from "../uiActions/uiCatalogue.js";
127
+ import { offerYesOnSurface as Di } from "../uiActions/offerYesOnSurface.js";
128
+ import { UiOfferSession as Oi, sandboxServesUiOffers as ki, uiOfferHintKind as Ai, uiOfferInTime as ji } from "../uiActions/uiOffers.js";
129
+ import { parseNavIntent as Mi } from "../uiActions/navIntent.js";
130
+ import { decideActOnResolve as Ni, n4LeaveGuard as Pi } from "../uiActions/actOnResolve.js";
131
+ import { AssistantUiOfferLinks as Fi } from "./AssistantUiOfferLink.js";
132
+ import { assistantBackStack as Ii, isBackRunnable as Li } from "../uiActions/backStack.js";
133
+ import { subscribeDraftPathname as Ri } from "../uiActions/draftPathname.js";
134
+ import { buildNavigateAction as zi, destinationForPath as Bi, labelForPath as Vi, newestAssistantOnSurface as Hi } from "../uiActions/navigateAction.js";
135
+ import { runNavigation as Ui } from "../uiActions/navigationOutcome.js";
136
+ import { assistantHistory as Wi } from "../history/historyEngine.js";
137
+ import { conversationHasHistory as Gi, isOtherScopeHistoryConversation as Ki, isReadOnlyHistoryConversation as qi, isReusableHistoryDraft as Ji } from "../history/historyList.js";
138
+ import { resumeContextFor as Yi } from "../history/historyResume.js";
139
+ import { useAssistantHistoryStatus as Xi } from "../history/historyStatus.js";
140
+ import { useHistoryRowControlsFor as Zi } from "../history/useHistoryRowControls.js";
141
+ import { getHistoryStamp as Qi, setHistoryBusyProbe as $i } from "../history/stampRegistry.js";
142
+ import { resolveConversationDeleteTarget as ea } from "../conversationDeleteCommand.js";
143
+ import { useAssistantNavigate as ta } from "./AssistantMarkdownRenderer.js";
144
+ import { useAssistantSpeech as na } from "./AssistantSpeechProvider.js";
145
+ import { useAssistantStopTurnLabel as ra } from "../../providers/shell/useAssistantShellLabels.js";
146
+ import { useThemeOrNull as ia } from "../../providers/shell/ThemeProvider.js";
147
+ import { useVisibleNavItems as aa } from "../../../chrome/mobileTabBar/useVisibleNavItems.js";
148
+ import { useAskAboutStore as oa } from "../askAbout/askAboutStore.js";
149
+ import { readMessageFocus as sa, withFocusNote as ca } from "../askAbout/focus.js";
150
+ import { useCallback as D, useEffect as O, useLayoutEffect as la, useMemo as k, useRef as A, useState as j, useSyncExternalStore as ua } from "react";
151
+ import { Fragment as da, jsx as M, jsxs as fa } from "react/jsx-runtime";
152
152
  // src/shared/assistant/ui/AssistantChatArea.tsx
153
- var fa = 2500, pa = 300, ma = 2e4, ha = 1e4, ga = 1e4, _a = !1, va = {
153
+ var pa = 2500, ma = 300, ha = 2e4, ga = 1e4, _a = 1e4, va = !1, ya = {
154
154
  committing: !1,
155
155
  dictating: !1
156
- }, ya = 6e3;
156
+ }, ba = 6e3;
157
157
  function N() {
158
158
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
159
159
  }
160
- var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ visible: Ca = !0, writeAccess: wa = "unknown", presentation: Ta = "classic", inputRef: Ea, onDraftDirtyChange: Da, surface: Oa, onWindowVoiceChange: ka, onOpenFull: Aa, onContinuedInChat: ja }) => {
161
- let P = Fn(), Ma = na(), F = Ta === "compact", I = He(), Na = Ge(), Pa = D((e) => We("above", e), []), Fa = D((e) => We("below", e), []), Ia = F && Oa === "window", { product: L, modes: R, gatherPageContext: La, buildPrompt: Ra, reportTurnTimings: za, reportTokenUsage: Ba, localUiCommands: Va } = Ln(), z = Dt(Ln().writeApproval), Ha = D((e, t) => {
160
+ var xa = () => () => {}, Sa = () => "off", Ca = { overflowY: "auto" }, wa = ({ visible: wa = !0, writeAccess: Ta = "unknown", presentation: Ea = "classic", inputRef: Da, onDraftDirtyChange: Oa, surface: ka, onWindowVoiceChange: Aa, onOpenFull: ja, onContinuedInChat: Ma }) => {
161
+ let P = Fn(), Na = ra(), F = Ea === "compact", I = He(), Pa = Ge(), Fa = D((e) => We("above", e), []), Ia = D((e) => We("below", e), []), La = F && ka === "window", { product: L, modes: R, gatherPageContext: Ra, buildPrompt: za, reportTurnTimings: Ba, reportTokenUsage: Va, localUiCommands: Ha } = Ln(), z = Dt(Ln().writeApproval), Ua = D((e, t) => {
162
162
  let n = w.getState(), r = t ?? n.sandboxesByMode[e]?.sandboxId ?? null;
163
163
  return g({
164
164
  mode: e,
165
165
  productWriteApproval: z,
166
166
  capabilities: r ? n.sandboxWriteCapabilities[r] : null
167
167
  });
168
- }, [z]), { getAccessToken: Ua, getWorkspaceToken: Wa, userId: B } = r(), { locale: V, isLocaleLoading: Ga } = n(), Ka = w((e) => e.voiceGraceMs), qa = w((e) => e.handsFreeInterrupt), Ja = w((e) => e.handsFreeStreamNoticeAccepted), Ya = w((e) => e.acceptHandsFreeStreamNotice), Xa = w((e) => e.assistantLanguage), Za = w((e) => e.replyLanguage), Qa = k(() => s(Xa, Za, V), [
169
- Xa,
168
+ }, [z]), { getAccessToken: Wa, getWorkspaceToken: Ga, userId: B } = r(), { locale: V, isLocaleLoading: Ka } = n(), qa = w((e) => e.voiceGraceMs), Ja = w((e) => e.handsFreeInterrupt), Ya = w((e) => e.handsFreeStreamNoticeAccepted), Xa = w((e) => e.acceptHandsFreeStreamNotice), Za = w((e) => e.assistantLanguage), Qa = w((e) => e.replyLanguage), $a = k(() => s(Za, Qa, V), [
170
169
  Za,
170
+ Qa,
171
171
  V
172
- ]), $a = Qa.reply.english, eo = Qa.replyIsExplicit, to = Qa.reply.code, { conversations: no, activeConversationId: H, mode: U, processingByConversationId: ro, setMode: io, setConversationMode: ao, setActiveConversation: oo, createConversation: so, addMessage: W, updateMessage: co, patchMessage: lo, mergeMessageMetadata: uo, setConversationProcessing: fo, clearConversationProcessing: po, setBackendSessionId: mo, clearBackendSessionId: ho, setSandbox: go, clearSandbox: _o, acknowledgedWriteModes: vo, acknowledgeWriteMode: yo, autoRouting: bo, setAutoRouting: xo, routeConversation: So } = w(), G = no.find((e) => e.id === H), Co = lt(G), wo = Co.all, To = H ? ro[H] : void 0, Eo = Mn(To?.status), Do = Eo ? To?.messageId ?? null : null, Oo = To?.status === "error" ? To.messageId : null, ko = w((e) => e.sandboxWriteCapabilities), { panel: K, entries: Ao, retiredSandboxes: jo } = ee({
172
+ ]), eo = $a.reply.english, to = $a.replyIsExplicit, no = $a.reply.code, { conversations: ro, activeConversationId: H, mode: U, processingByConversationId: io, setMode: ao, setConversationMode: oo, setActiveConversation: so, createConversation: co, addMessage: W, updateMessage: lo, patchMessage: uo, mergeMessageMetadata: fo, setConversationProcessing: po, clearConversationProcessing: mo, setBackendSessionId: ho, clearBackendSessionId: go, setSandbox: _o, clearSandbox: vo, acknowledgedWriteModes: yo, acknowledgeWriteMode: bo, autoRouting: xo, setAutoRouting: So, routeConversation: Co } = w(), G = ro.find((e) => e.id === H), wo = lt(G), To = wo.all, Eo = H ? io[H] : void 0, Do = Mn(Eo?.status), Oo = Do ? Eo?.messageId ?? null : null, ko = Eo?.status === "error" ? Eo.messageId : null, Ao = w((e) => e.sandboxWriteCapabilities), { panel: K, entries: jo, retiredSandboxes: Mo } = ee({
173
173
  tr: P,
174
174
  productWriteApproval: z
175
- }), Mo = p({
175
+ }), No = p({
176
176
  approve: (e, t) => K.approve(e, t),
177
177
  decline: (e, t, n) => K.decline(e, t, n),
178
178
  presented: (e, t) => K.presented(e, t)
179
- }), No = Mo.dismiss, Po = A(null);
179
+ }), Po = No.dismiss, Fo = A(null);
180
180
  O(() => {
181
- No();
182
- let e = Po.current;
183
- Po.current = H, e && e !== H && K.withdraw(e, "conversation_closed"), H && K.openConversation(H);
181
+ Po();
182
+ let e = Fo.current;
183
+ Fo.current = H, e && e !== H && K.withdraw(e, "conversation_closed"), H && K.openConversation(H);
184
184
  }, [
185
185
  H,
186
186
  K,
187
- No
187
+ Po
188
188
  ]);
189
- let Fo = Ki(G), Io = Xi(G)?.archivedAt != null, Lo = Yi((e) => H !== null && H in e.loadingIds), Ro = Yi((e) => H !== null && H in e.loadErrorIds), zo = Yi((e) => e.remoteDelete), [Bo, Vo] = j(() => Yi.getState().remoteDelete?.at ?? null), Ho = zo?.wasActive === !0 && zo.at !== Bo ? zo.at : null;
189
+ let Io = qi(G), Lo = Zi(G)?.archivedAt != null, Ro = Xi((e) => H !== null && H in e.loadingIds), zo = Xi((e) => H !== null && H in e.loadErrorIds), Bo = Xi((e) => e.remoteDelete), [Vo, Ho] = j(() => Xi.getState().remoteDelete?.at ?? null), Uo = Bo?.wasActive === !0 && Bo.at !== Vo ? Bo.at : null;
190
190
  O(() => {
191
- if (Ho === null) return;
192
- let e = window.setTimeout(() => Vo(Ho), ga);
191
+ if (Uo === null) return;
192
+ let e = window.setTimeout(() => Ho(Uo), _a);
193
193
  return () => window.clearTimeout(e);
194
- }, [Ho]);
195
- let Uo = xe(), Wo = Yi((e) => e.pinLimit), Go = I && Uo && Wo !== void 0 && Wo.conversationId === H ? Wo : null, Ko = T(), { canUseApiCalls: qo, loading: Jo } = nt(Ko, B), Yo = A(er({
196
- loading: Jo,
197
- canUseAdminModes: qo
198
- })).current, Xo = A(R);
194
+ }, [Uo]);
195
+ let Wo = xe(), Go = Xi((e) => e.pinLimit), Ko = I && Wo && Go !== void 0 && Go.conversationId === H ? Go : null, qo = T(), { canUseApiCalls: Jo, loading: Yo } = nt(qo, B), Xo = A(tr({
196
+ loading: Yo,
197
+ canUseAdminModes: Jo
198
+ })).current, Zo = A(R);
199
199
  O(() => {
200
- Xo.current = R;
200
+ Zo.current = R;
201
201
  }, [R]);
202
- let Zo = () => {
202
+ let Qo = () => {
203
203
  let e = w.getState().activeConversationId;
204
- e && Ui.openConversation(e, { modes: Xo.current });
205
- }, Qo = () => {
204
+ e && Wi.openConversation(e, { modes: Zo.current });
205
+ }, $o = () => {
206
206
  let e = w.getState().activeConversationId;
207
- e && Ui.loadEarlier(e);
208
- }, $o = A(Ua);
207
+ e && Wi.loadEarlier(e);
208
+ }, es = A(Wa);
209
209
  O(() => {
210
- $o.current = Ua;
211
- }, [Ua]);
212
- let es = !!L && za !== !1;
210
+ es.current = Wa;
211
+ }, [Wa]);
212
+ let ts = !!L && Ba !== !1;
213
213
  O(() => {
214
- if (es) return _n({ send: (e) => gn(e, {
214
+ if (ts) return _n({ send: (e) => gn(e, {
215
215
  workspaceId: T(),
216
216
  authContext: {
217
- accessToken: $o.current(),
217
+ accessToken: es.current(),
218
218
  organizationId: Gt()
219
219
  }
220
220
  }) });
221
- }, [es]), O(() => {
222
- Yo.update({
223
- loading: Jo,
224
- canUseAdminModes: qo
221
+ }, [ts]), O(() => {
222
+ Xo.update({
223
+ loading: Yo,
224
+ canUseAdminModes: Jo
225
225
  });
226
226
  }, [
227
+ Xo,
227
228
  Yo,
228
- Jo,
229
- qo
229
+ Jo
230
230
  ]), O(() => () => {
231
- Yo.abandon();
232
- }, [Yo]);
233
- let ts = k(() => R.filter((e) => !e.requiresAdmin || qo), [R, qo]), ns = fe(ts), rs = bo && ns, is = A(ns);
231
+ Xo.abandon();
232
+ }, [Xo]);
233
+ let ns = k(() => R.filter((e) => !e.requiresAdmin || Jo), [R, Jo]), rs = fe(ns), is = xo && rs, as = A(rs);
234
234
  O(() => {
235
- is.current = ns;
236
- }, [ns]);
237
- let as = A(null), os = A(!1), [ss, cs] = j(!1), ls = bn(R), [us, ds] = j(null), [fs, ps] = j(() => Er.openFor());
235
+ as.current = rs;
236
+ }, [rs]);
237
+ let os = A(null), ss = A(!1), [cs, ls] = j(!1), us = bn(R), [ds, fs] = j(null), [ps, ms] = j(() => Dr.openFor());
238
238
  O(() => {
239
- Er.setOpenFor(fs);
240
- }, [fs]);
241
- let ms = fs !== null && fs === H, q = Ke(), hs = C(), J = q.open && hs !== null, gs = q.close, _s = A(J);
242
- ca(() => {
243
- _s.current = J;
239
+ Dr.setOpenFor(ps);
240
+ }, [ps]);
241
+ let hs = ps !== null && ps === H, q = Ke(), gs = C(), J = q.open && gs !== null, _s = q.close, vs = A(J);
242
+ la(() => {
243
+ vs.current = J;
244
244
  }, [J]);
245
- let vs = D((e) => {
246
- e && _s.current || e && I || ps(e ? w.getState().activeConversationId : null);
245
+ let ys = D((e) => {
246
+ e && vs.current || e && I || ms(e ? w.getState().activeConversationId : null);
247
247
  }, [I]);
248
248
  O(() => {
249
- ps((e) => e !== null && e !== H ? null : e);
249
+ ms((e) => e !== null && e !== H ? null : e);
250
250
  }, [H]);
251
- let ys = A(void 0), [bs, xs] = j(!1), [Ss, Cs] = j(!1), ws = D((e) => {
252
- ys.current = e, xs(vr(e));
253
- }, []), Ts = A(null), Es = A(!1), Ds = D(() => {
251
+ let bs = A(void 0), [xs, Ss] = j(!1), [Cs, ws] = j(!1), Ts = D((e) => {
252
+ bs.current = e, Ss(yr(e));
253
+ }, []), Es = A(null), Ds = A(!1), Os = D(() => {
254
254
  let e = w.getState(), t = e.activeConversationId, n = t ? e.conversations.find((e) => e.id === t) : void 0;
255
255
  return !t || !n ? null : {
256
256
  id: t,
257
- reusableDraft: qi(n, Zi()),
257
+ reusableDraft: Ji(n, Qi()),
258
258
  liveProposals: K.liveFor(t).count,
259
259
  turnInFlight: Mn(e.processingByConversationId[t]?.status)
260
260
  };
261
- }, [K]), Os = A({}), ks = A(un(Ir())), As = A(new Qt()), js = A(/* @__PURE__ */ new Set()), Ms = k(() => R.find((e) => e.id === U), [R, U]), Ns = w((e) => {
261
+ }, [K]), ks = A({}), As = A(un(Lr())), js = A(new Qt()), Ms = A(/* @__PURE__ */ new Set()), Ns = k(() => R.find((e) => e.id === U), [R, U]), Ps = w((e) => {
262
262
  let t = e.sandboxesByMode[U]?.sandboxId;
263
263
  return t ? e.sandboxWriteCapabilities[t] : void 0;
264
- }), Ps = Ms !== void 0 && g({
264
+ }), Fs = Ns !== void 0 && g({
265
265
  mode: U,
266
266
  productWriteApproval: z,
267
- capabilities: Ns
268
- }), Fs = U === "assistant" || Ms !== void 0 && !Ms.writeCapable && !bt(U) || Ps;
267
+ capabilities: Ps
268
+ }), Is = U === "assistant" || Ns !== void 0 && !Ns.writeCapable && !bt(U) || Fs;
269
269
  O(() => {
270
- let e = R.find((e) => e.id === "assistant" || !e.requiresAdmin || qo)?.id ?? R[0]?.id ?? "assistant";
271
- U !== "assistant" && Ms?.writeCapable && !Qn(vo, U) ? io(e) : Jo || (!Ms || Ms.requiresAdmin && !qo) && U !== e && io(e);
270
+ let e = R.find((e) => e.id === "assistant" || !e.requiresAdmin || Jo)?.id ?? R[0]?.id ?? "assistant";
271
+ U !== "assistant" && Ns?.writeCapable && !$n(yo, U) ? ao(e) : Yo || (!Ns || Ns.requiresAdmin && !Jo) && U !== e && ao(e);
272
272
  }, [
273
273
  U,
274
- Ms,
275
- qo,
274
+ Ns,
276
275
  Jo,
277
- io,
278
- vo,
276
+ Yo,
277
+ ao,
278
+ yo,
279
279
  R
280
280
  ]);
281
- let Is = D((e, t, n, r) => {
282
- fo(e, n, t, null, r);
283
- }, [fo]), Ls = D(async (e, t, n, r, i, a = null) => {
281
+ let Ls = D((e, t, n, r) => {
282
+ po(e, n, t, null, r);
283
+ }, [po]), Rs = D(async (e, t, n, r, i, a = null) => {
284
284
  let o = (e, t) => {
285
- r && Is(r.conversationId, r.assistantMessageId, e, t), a && (a.step = t, a.onStep?.(t));
285
+ r && Ls(r.conversationId, r.assistantMessageId, e, t), a && (a.step = t, a.onStep?.(t));
286
286
  }, s = (e) => {
287
287
  r && E(r.assistantMessageId, e);
288
288
  }, c = () => {
@@ -290,7 +290,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
290
290
  }, l = () => a !== null && (a.signal.aborted || T() !== t), u = () => {
291
291
  if (l()) throw new $t("cancelled");
292
292
  }, d = w.getState().sandboxesByMode[e]?.sandboxId ?? null, f = !1, p = !1, ee = !1, m = !1, h = !1, g = async (r) => {
293
- if (i && !As.current.has(r) && ks.current.isFresh(r)) return f = !0, !0;
293
+ if (i && !js.current.has(r) && As.current.isFresh(r)) return f = !0, !0;
294
294
  ee = !0;
295
295
  let o = !1;
296
296
  try {
@@ -299,42 +299,42 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
299
299
  });
300
300
  } catch {
301
301
  if (l()) throw new $t("cancelled");
302
- return ks.current.invalidate(r), As.current.add(r), a?.dead.push(r), h = !0, !1;
302
+ return As.current.invalidate(r), js.current.add(r), a?.dead.push(r), h = !0, !1;
303
303
  }
304
- return u(), ks.current.markVerified(r), o && (m = !0), !0;
304
+ return u(), As.current.markVerified(r), o && (m = !0), !0;
305
305
  };
306
- if (d && (go(e, d, "provisioning"), o("provisioning", "reusingEnvironment"), await g(d) || (go(e, null, "provisioning"), d = null)), !d) {
306
+ if (d && (_o(e, d, "provisioning"), o("provisioning", "reusingEnvironment"), await g(d) || (_o(e, null, "provisioning"), d = null)), !d) {
307
307
  o("provisioning", "lookingForEnvironment");
308
- let r = await ht(t, L, e, In(), n, As.current, z);
308
+ let r = await ht(t, L, e, In(), n, js.current, z);
309
309
  u();
310
310
  let i = r?.id ?? null;
311
311
  if (i) {
312
- go(e, i, "provisioning"), o("provisioning", "reusingEnvironment");
312
+ _o(e, i, "provisioning"), o("provisioning", "reusingEnvironment");
313
313
  let t = r?.status === "PROVISIONING" || r?.status === "PENDING";
314
- t && c(), await g(i) ? (d = i, t && (m = !0)) : go(e, null, "provisioning");
314
+ t && c(), await g(i) ? (d = i, t && (m = !0)) : _o(e, null, "provisioning");
315
315
  }
316
316
  }
317
317
  if (!d) {
318
318
  if (a && !a.mayCreate) throw new $t("no-create");
319
- if (s("provisionStarted"), e === "api-calls" && !Ua()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
320
- o("provisioning", "startingEnvironment"), go(e, null, "provisioning");
321
- let r = a ? [] : await Ct(t, L, e, In(), n, As.current, z);
319
+ if (s("provisionStarted"), e === "api-calls" && !Wa()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
320
+ o("provisioning", "startingEnvironment"), _o(e, null, "provisioning");
321
+ let r = a ? [] : await Ct(t, L, e, In(), n, js.current, z);
322
322
  if (r.length > 0) {
323
323
  let e = new Set(r);
324
- for (let e of r) ks.current.invalidate(e), As.current.add(e);
324
+ for (let e of r) As.current.invalidate(e), js.current.add(e);
325
325
  let t = w.getState().sandboxesByMode;
326
- for (let [n, r] of Object.entries(t)) y(n) && r?.sandboxId && e.has(r.sandboxId) && _o(n);
326
+ for (let [n, r] of Object.entries(t)) y(n) && r?.sandboxId && e.has(r.sandboxId) && vo(n);
327
327
  }
328
328
  s("createRequested");
329
329
  let i = a?.beginCreate();
330
330
  try {
331
- d = await pt(L, e, t, In(), pa, n, { writeApproval: z });
331
+ d = await pt(L, e, t, In(), ma, n, { writeApproval: z });
332
332
  } finally {
333
333
  i?.();
334
334
  }
335
- p = !0, u(), go(e, d, "provisioning"), await Et(d, t, n, 3e5), u(), s("sandboxRunning"), await Tt(d, t, e, n, 9e4), u(), s("serviceReady"), ks.current.markVerified(d);
335
+ p = !0, u(), _o(e, d, "provisioning"), await Et(d, t, n, 3e5), u(), s("sandboxRunning"), await Tt(d, t, e, n, 9e4), u(), s("serviceReady"), As.current.markVerified(d);
336
336
  }
337
- return go(e, d, "running"), {
337
+ return _o(e, d, "running"), {
338
338
  sandboxId: d,
339
339
  sandboxIsNew: p,
340
340
  sandboxProbed: ee,
@@ -343,17 +343,17 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
343
343
  trustedFromCache: f
344
344
  };
345
345
  }, [
346
- _o,
347
- Ua,
346
+ vo,
347
+ Wa,
348
348
  L,
349
349
  z,
350
- go,
351
- Is
352
- ]), Rs = D(async function e(t, n, r, i, a, o = {}) {
353
- let s = await on(i, r, (e) => Is(t, n, "provisioning", e), () => E(n, "prewarmJoined"));
354
- for (let e of s.dead) ks.current.invalidate(e), As.current.add(e);
355
- s.verified && !As.current.has(s.verified) && ks.current.markVerified(s.verified), s.joined && fn(n, { prewarm: s.joined });
356
- let { sandboxId: c, sandboxIsNew: l, sandboxProbed: u, sandboxAdopted: d, deadSandboxProbe: f, trustedFromCache: p } = await Ls(r, i, a, {
350
+ _o,
351
+ Ls
352
+ ]), zs = D(async function e(t, n, r, i, a, o = {}) {
353
+ let s = await on(i, r, (e) => Ls(t, n, "provisioning", e), () => E(n, "prewarmJoined"));
354
+ for (let e of s.dead) As.current.invalidate(e), js.current.add(e);
355
+ s.verified && !js.current.has(s.verified) && As.current.markVerified(s.verified), s.joined && fn(n, { prewarm: s.joined });
356
+ let { sandboxId: c, sandboxIsNew: l, sandboxProbed: u, sandboxAdopted: d, deadSandboxProbe: f, trustedFromCache: p } = await Rs(r, i, a, {
357
357
  conversationId: t,
358
358
  assistantMessageId: n
359
359
  }, o.trustCache !== !1), ee = tn(i, r, c);
@@ -366,7 +366,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
366
366
  if (t.mode !== r) throw Error(`Session mode mismatch: expected ${r}, received ${t.mode}`);
367
367
  g = e;
368
368
  } catch {
369
- ho(t), m = null;
369
+ go(t), m = null;
370
370
  }
371
371
  }
372
372
  let te = !1;
@@ -378,24 +378,24 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
378
378
  userId: B
379
379
  }), Date.now());
380
380
  if (e) {
381
- "pending" in e && Is(t, n, "connecting", "preparingSession");
381
+ "pending" in e && Ls(t, n, "connecting", "preparingSession");
382
382
  let o = "sessionId" in e ? e.sessionId : await e.pending;
383
- if (o && !As.current.has(c)) try {
384
- (await vt(c, i, o, r, a)).mode === r && (m = o, te = !0, mo(t, m), h = !0);
383
+ if (o && !js.current.has(c)) try {
384
+ (await vt(c, i, o, r, a)).mode === r && (m = o, te = !0, ho(t, m), h = !0);
385
385
  } catch {}
386
386
  }
387
387
  }
388
388
  if (!m) {
389
- Is(t, n, "connecting", "preparingSession");
389
+ Ls(t, n, "connecting", "preparingSession");
390
390
  let s;
391
391
  try {
392
392
  s = await mt(c, i, r, a);
393
393
  } catch (s) {
394
394
  if (p) {
395
- ks.current.invalidate(c);
396
- let l = Rr(s, o.isAbandoned?.() ?? !1), p = l === "check-network";
397
- if (l === "check-network" && (l = await Lr(() => ht(i, L, r, In(), a, As.current, z))), l !== "rethrow" && o.isAbandoned?.() && (l = "rethrow"), l !== "rethrow") {
398
- p || fn(n, { cacheProofFailed: !0 }), l === "replace" && (As.current.add(c), ho(t), _o(r), K.retireSandbox(c));
395
+ As.current.invalidate(c);
396
+ let l = zr(s, o.isAbandoned?.() ?? !1), p = l === "check-network";
397
+ if (l === "check-network" && (l = await Rr(() => ht(i, L, r, In(), a, js.current, z))), l !== "rethrow" && o.isAbandoned?.() && (l = "rethrow"), l !== "rethrow") {
398
+ p || fn(n, { cacheProofFailed: !0 }), l === "replace" && (js.current.add(c), go(t), vo(r), K.retireSandbox(c));
399
399
  let s = await e(t, n, r, i, a, {
400
400
  ...o,
401
401
  trustCache: !1
@@ -410,7 +410,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
410
410
  }
411
411
  throw s;
412
412
  }
413
- m = s.sessionId, mo(t, m), h = !0;
413
+ m = s.sessionId, ho(t, m), h = !0;
414
414
  }
415
415
  return {
416
416
  sandboxId: c,
@@ -425,55 +425,55 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
425
425
  knownFloor: _
426
426
  };
427
427
  }, [
428
- Ls,
429
- ho,
430
- _o,
428
+ Rs,
429
+ go,
430
+ vo,
431
431
  L,
432
432
  z,
433
- mo,
434
- Is,
433
+ ho,
434
+ Ls,
435
435
  B,
436
436
  K
437
- ]), zs = D((e, t = !1) => {
437
+ ]), Bs = D((e, t = !1) => {
438
438
  let n = T();
439
439
  if (!n) return;
440
440
  let r = w.getState(), i = Date.now(), a = an({
441
441
  autoRouting: r.autoRouting,
442
- autoOffered: is.current,
442
+ autoOffered: as.current,
443
443
  active: !t && r.activeConversationId ? r.conversations.find((e) => e.id === r.activeConversationId) : void 0,
444
444
  selectedMode: r.mode,
445
445
  autoReadMode: b,
446
- modes: Xo.current,
446
+ modes: Zo.current,
447
447
  acknowledgedWriteModes: r.acknowledgedWriteModes,
448
- adminAccess: Yo.read(),
448
+ adminAccess: Xo.read(),
449
449
  dictated: e,
450
- voiceProposalBound: (e) => Ha(e),
450
+ voiceProposalBound: (e) => Ua(e),
451
451
  turnInFlight: Object.values(r.processingByConversationId).some((e) => Mn(e?.status)),
452
452
  ...ln(n),
453
453
  now: i
454
454
  });
455
455
  if (!a) return;
456
456
  let o = cn(n, a, i), s = {
457
- accessToken: Ua(),
458
- workspaceToken: Wa(),
457
+ accessToken: Wa(),
458
+ workspaceToken: Ga(),
459
459
  userId: B,
460
460
  organizationId: Gt()
461
461
  };
462
- Ls(a.mode, n, s, null, !0, o).then((e) => {
462
+ Rs(a.mode, n, s, null, !0, o).then((e) => {
463
463
  if (o.finish({
464
464
  ok: !0,
465
465
  sandboxId: e.sandboxId,
466
466
  didWork: !e.trustedFromCache && (e.sandboxIsNew || e.sandboxProbed || e.sandboxAdopted),
467
467
  booted: e.sandboxIsNew || e.sandboxAdopted,
468
468
  dead: o.dead
469
- }), o.signal.aborted || T() !== n || As.current.has(e.sandboxId)) return;
470
- let r = w.getState(), i = !t && r.activeConversationId ? r.conversations.find((e) => e.id === r.activeConversationId) : void 0, c = Zi();
469
+ }), o.signal.aborted || T() !== n || js.current.has(e.sandboxId)) return;
470
+ let r = w.getState(), i = !t && r.activeConversationId ? r.conversations.find((e) => e.id === r.activeConversationId) : void 0, c = Qi();
471
471
  rn({
472
472
  active: i ? {
473
473
  mode: i.mode,
474
474
  backendSessionId: i.backendSessionId,
475
- continuable: !Ki(i) && !Gi(i, c),
476
- hasHistory: Wi(i)
475
+ continuable: !qi(i) && !Ki(i, c),
476
+ hasHistory: Gi(i)
477
477
  } : void 0,
478
478
  mode: a.mode
479
479
  }) && sn(nn({
@@ -485,7 +485,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
485
485
  }, (e) => {
486
486
  if (!(e instanceof $t) && !o.signal.aborted && T() === n) {
487
487
  let e = w.getState().sandboxesByMode[a.mode]?.sandboxId ?? null;
488
- e && (ks.current.invalidate(e), As.current.add(e), o.dead.push(e), _o(a.mode));
488
+ e && (As.current.invalidate(e), js.current.add(e), o.dead.push(e), vo(a.mode));
489
489
  }
490
490
  o.finish({
491
491
  ok: !1,
@@ -495,68 +495,68 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
495
495
  });
496
496
  });
497
497
  }, [
498
- Ls,
499
- Yo,
500
- _o,
501
- Ua,
498
+ Rs,
499
+ Xo,
500
+ vo,
502
501
  Wa,
502
+ Ga,
503
503
  B,
504
- Ha
505
- ]), Bs = A(!1), Vs = A(null), Hs = k(() => a(), []);
506
- O(() => () => Hs.cancel(), [Hs]);
507
- let Us = la(Fr, Ar, Ar)?.reference ?? null, [Ws, Gs] = j(0), Ks = A(/* @__PURE__ */ new Set()), qs = A(null), Js = D(() => {
504
+ Ua
505
+ ]), Vs = A(!1), Hs = A(null), Us = k(() => a(), []);
506
+ O(() => () => Us.cancel(), [Us]);
507
+ let Ws = ua(Ir, jr, jr)?.reference ?? null, [Gs, Ks] = j(0), qs = A(/* @__PURE__ */ new Set()), Js = A(null), Ys = D(() => {
508
508
  let e = w.getState(), t = e.activeConversationId;
509
509
  if (!t) return null;
510
510
  let n = e.processingByConversationId[t], r = Mn(n?.status) ? n?.messageId ?? null : null;
511
511
  if (!Pn({
512
512
  interruptedTurnId: r,
513
513
  activeTurnId: r,
514
- alreadyRequested: r ? Ks.current.has(r) : !1
514
+ alreadyRequested: r ? qs.current.has(r) : !1
515
515
  }).send || !r) return null;
516
- Ks.current.add(r);
516
+ qs.current.add(r);
517
517
  let i = ut(e), a = T(), o = e.conversations.find((e) => e.id === t)?.backendSessionId;
518
518
  return i && a && o && dt(i.sandboxId, a, o, i.mode, {
519
- accessToken: Ua(),
520
- workspaceToken: Wa(),
519
+ accessToken: Wa(),
520
+ workspaceToken: Ga(),
521
521
  userId: B,
522
522
  organizationId: Gt()
523
523
  }), r;
524
524
  }, [
525
525
  B,
526
- Ua,
527
- Wa
528
- ]), Ys = D(() => {
529
- let e = Js();
526
+ Wa,
527
+ Ga
528
+ ]), Xs = D(() => {
529
+ let e = Ys();
530
530
  return e && (It(e), Nt.abort(e)), e;
531
- }, [Js]), Xs = D(() => {
531
+ }, [Ys]), Zs = D(() => {
532
532
  let e = w.getState().activeConversationId;
533
- Ys(), e && K.declineForReply(e, "corrected", "spoken");
534
- }, [Ys, K]), Zs = D(async (e) => {
533
+ Xs(), e && K.declineForReply(e, "corrected", "spoken");
534
+ }, [Xs, K]), Qs = D(async (e) => {
535
535
  let t = w.getState(), n = ut(t), r = T(), i = t.activeConversationId;
536
536
  if (!n || !r || !i || oe(t.sandboxWriteCapabilities[n.sandboxId])) return;
537
- let a = t.conversations.find((e) => e.id === i), o = a ? Nr(dr(a.messages), {
537
+ let a = t.conversations.find((e) => e.id === i), o = a ? Pr(fr(a.messages), {
538
538
  sessionId: a.backendSessionId,
539
539
  sandboxId: n.sandboxId,
540
540
  nowMs: Date.now()
541
541
  }) : null;
542
542
  if (o?.reference !== e) {
543
- Gs((e) => e + 1);
543
+ Ks((e) => e + 1);
544
544
  return;
545
545
  }
546
546
  let s = {
547
547
  conversationId: i,
548
548
  reference: e
549
549
  };
550
- if (!Or(s)) return;
550
+ if (!kr(s)) return;
551
551
  try {
552
552
  await ft(n.sandboxId, r, e, n.mode, {
553
- accessToken: Ua(),
554
- workspaceToken: Wa(),
553
+ accessToken: Wa(),
554
+ workspaceToken: Ga(),
555
555
  userId: B,
556
556
  organizationId: Gt()
557
557
  });
558
558
  } catch (e) {
559
- kr(s), W(i, {
559
+ Ar(s), W(i, {
560
560
  id: N(),
561
561
  role: "system",
562
562
  content: e instanceof Error ? e.message : "The change could not be approved.",
@@ -564,69 +564,69 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
564
564
  });
565
565
  return;
566
566
  }
567
- kr(s), uo(i, o.messageId, { pendingWriteApprovedAt: (/* @__PURE__ */ new Date()).toISOString() });
567
+ Ar(s), fo(i, o.messageId, { pendingWriteApprovedAt: (/* @__PURE__ */ new Date()).toISOString() });
568
568
  let c = w.getState(), l = c.conversations.find((e) => e.id === i);
569
- c.activeConversationId === i && l && c.mode === n.mode && l.backendSessionId === a?.backendSessionId && ut(c)?.sandboxId === n.sandboxId && !Mn(c.processingByConversationId[i]?.status) && Mr(dr(l.messages)) === o.messageId && nl.current(P("pendingWrite.approvedPrompt", "I approved that change — go ahead."), [], {
569
+ c.activeConversationId === i && l && c.mode === n.mode && l.backendSessionId === a?.backendSessionId && ut(c)?.sandboxId === n.sandboxId && !Mn(c.processingByConversationId[i]?.status) && Nr(fr(l.messages)) === o.messageId && rl.current(P("pendingWrite.approvedPrompt", "I approved that change — go ahead."), [], {
570
570
  approvalFollowUp: { approvedReplyId: o.messageId },
571
571
  targetConversationId: i
572
572
  });
573
573
  }, [
574
574
  B,
575
575
  W,
576
- uo,
576
+ fo,
577
577
  P
578
- ]), Qs = ra(), { speakFinishedReply: $s, speakingMessageId: ec, stop: tc } = ta(), nc = A(null), rc = D((e, t) => {
579
- let n = nc.current;
578
+ ]), $s = ia(), { speakFinishedReply: ec, speakingMessageId: tc, stop: nc } = na(), rc = A(null), ic = D((e, t) => {
579
+ let n = rc.current;
580
580
  n?.token === e && n.exchange === null && (n.exchange = t);
581
- }, []), ic = D((e) => {
582
- let t = nc.current;
581
+ }, []), ac = D((e) => {
582
+ let t = rc.current;
583
583
  e !== void 0 && t?.token === e && (t.handled = !0);
584
- }, []), ac = D((e, t) => {
585
- rc(e, t), _s.current && Pt(t);
586
- }, [rc]), oc = ea(), { items: sc, permissionsSettled: cc, simulating: lc } = ia(), Y = A({
587
- theme: Qs,
588
- navigate: oc,
589
- navItems: sc,
590
- options: Va ?? {},
591
- navPermissionsSettled: cc,
592
- navSimulating: lc
584
+ }, []), oc = D((e, t) => {
585
+ ic(e, t), vs.current && Pt(t);
586
+ }, [ic]), sc = ta(), { items: cc, permissionsSettled: lc, simulating: uc } = aa(), Y = A({
587
+ theme: $s,
588
+ navigate: sc,
589
+ navItems: cc,
590
+ options: Ha ?? {},
591
+ navPermissionsSettled: lc,
592
+ navSimulating: uc
593
593
  });
594
594
  O(() => {
595
595
  Y.current = {
596
- theme: Qs,
597
- navigate: oc,
598
- navItems: sc,
599
- options: Va ?? {},
600
- navPermissionsSettled: cc,
601
- navSimulating: lc
596
+ theme: $s,
597
+ navigate: sc,
598
+ navItems: cc,
599
+ options: Ha ?? {},
600
+ navPermissionsSettled: lc,
601
+ navSimulating: uc
602
602
  };
603
603
  }, [
604
- Qs,
605
- oc,
604
+ $s,
606
605
  sc,
607
- Va,
608
606
  cc,
609
- lc
607
+ Ha,
608
+ lc,
609
+ uc
610
610
  ]);
611
611
  let X = A(!0);
612
612
  O(() => (X.current = !0, () => {
613
613
  X.current = !1;
614
614
  }), []);
615
- let uc = A({
615
+ let dc = A({
616
616
  tr: P,
617
617
  locale: V
618
- }), dc = A(null), [fc, pc] = j(null), mc = A(null), hc = D((e) => {
619
- mc.current !== null && (window.clearTimeout(mc.current), mc.current = null);
620
- let t = dc.current;
621
- t && (dc.current = null, window.clearTimeout(t.deadline), X.current && pc(null), e && X.current && (mc.current = window.setTimeout(() => {
622
- if (mc.current = null, !X.current) return;
618
+ }), fc = A(null), [pc, mc] = j(null), hc = A(null), gc = D((e) => {
619
+ hc.current !== null && (window.clearTimeout(hc.current), hc.current = null);
620
+ let t = fc.current;
621
+ t && (fc.current = null, window.clearTimeout(t.deadline), X.current && mc(null), e && X.current && (hc.current = window.setTimeout(() => {
622
+ if (hc.current = null, !X.current) return;
623
623
  let e = w.getState();
624
624
  if (e.activeConversationId !== t.conversationId) return;
625
625
  let n = e.conversations.find((e) => e.id === t.conversationId)?.messages.find((e) => e.id === t.messageId);
626
626
  if (!n) return;
627
- let r = uc.current, i = nr(n, null, r.tr);
627
+ let r = dc.current, i = rr(n, null, r.tr);
628
628
  if (i.kind !== "output") return;
629
- let a = ci(n, r.tr);
629
+ let a = li(n, r.tr);
630
630
  Nt.publish(n.id, {
631
631
  conversationId: t.conversationId,
632
632
  channel: n.metadata?.voice === !0 ? "voice" : "chat",
@@ -636,44 +636,44 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
636
636
  final: !0
637
637
  });
638
638
  }, 0)));
639
- }, []), gc = D(() => hc(!0), [hc]);
639
+ }, []), _c = D(() => gc(!0), [gc]);
640
640
  O(() => {
641
- uc.current = {
641
+ dc.current = {
642
642
  tr: P,
643
643
  locale: V
644
644
  };
645
- let e = dc.current;
645
+ let e = fc.current;
646
646
  if (!e) return;
647
- let t = li({
647
+ let t = ui({
648
648
  wanted: e.wanted,
649
649
  locale: V,
650
- isLoading: Ga(e.wanted),
651
- translatedNow: oi(P, e.reply).translated
650
+ isLoading: Ka(e.wanted),
651
+ translatedNow: si(P, e.reply).translated
652
652
  });
653
- if (t === "write") gc();
653
+ if (t === "write") _c();
654
654
  else if (t === "grace") {
655
- let e = window.setTimeout(gc, 400);
655
+ let e = window.setTimeout(_c, 400);
656
656
  return () => window.clearTimeout(e);
657
657
  }
658
658
  }, [
659
659
  P,
660
660
  V,
661
- Ga,
662
- fc,
663
- gc
664
- ]), O(() => () => hc(!1), [hc]);
665
- let _c = A(null), [vc, yc] = j(!1), [bc, xc] = j(null), [Z] = j(() => new Di()), [Sc, Cc] = j(0), wc = D(() => Cc((e) => e + 1), []), Tc = D(() => {
661
+ Ka,
662
+ pc,
663
+ _c
664
+ ]), O(() => () => gc(!1), [gc]);
665
+ let vc = A(null), [yc, bc] = j(!1), [xc, Sc] = j(null), [Z] = j(() => new Oi()), [Cc, wc] = j(0), Tc = D(() => wc((e) => e + 1), []), Ec = D(() => {
666
666
  let e = Y.current;
667
667
  return {
668
- destinations: Ur(e.navItems),
668
+ destinations: Wr(e.navItems),
669
669
  permissionsSettled: e.navPermissionsSettled,
670
670
  simulating: e.navSimulating
671
671
  };
672
- }, []), Ec = A(B);
672
+ }, []), Dc = A(B);
673
673
  O(() => {
674
- Ec.current = B;
674
+ Dc.current = B;
675
675
  }, [B]);
676
- let Dc = D((e, t) => {
676
+ let Oc = D((e, t) => {
677
677
  let n = Z.replyIdOf(e), r = n ? Z.turnFor(n) : void 0, i = Z.offer(e), a = {
678
678
  ok: !1,
679
679
  reason: "gone",
@@ -685,22 +685,22 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
685
685
  let o = r.conversationId, s = w.getState().conversations.find((e) => e.id === o);
686
686
  if (!s) return a;
687
687
  let c = s.messages.find((e) => e.id === n), l = c?.metadata?.voice === !0 ? c.metadata.voiceSessionId : void 0, u = Z.liveOffersFor(n, {
688
- registry: Tc(),
689
- actorId: Ec.current,
688
+ registry: Ec(),
689
+ actorId: Dc.current,
690
690
  conversationId: o,
691
691
  perfNow: performance.now()
692
692
  }).find((t) => t.offer.offerId === e);
693
693
  if (!u) {
694
- let e = Ai(i, performance.now());
694
+ let e = ji(i, performance.now());
695
695
  return {
696
696
  ok: !1,
697
697
  reason: e ? "unavailable" : "expired",
698
- copy: e ? ei(P, t || null) : Qr(P),
698
+ copy: e ? ti(P, t || null) : $r(P),
699
699
  conversationId: o,
700
700
  voiceSessionId: l
701
701
  };
702
702
  }
703
- return Z.markUsed(e) ? (wc(), {
703
+ return Z.markUsed(e) ? (Tc(), {
704
704
  ok: !0,
705
705
  target: u.target,
706
706
  conversationId: o,
@@ -708,10 +708,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
708
708
  }) : a;
709
709
  }, [
710
710
  Z,
711
- Tc,
711
+ Ec,
712
712
  P,
713
- wc
714
- ]), Oc = D((e, t, n, r, i) => {
713
+ Tc
714
+ ]), kc = D((e, t, n, r, i) => {
715
715
  let a = N();
716
716
  W(e, {
717
717
  id: a,
@@ -721,20 +721,20 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
721
721
  metadata: {
722
722
  lang: n.translated ? V : "en",
723
723
  ...i ? { localAction: i } : {},
724
- ...pr(t)
724
+ ...mr(t)
725
725
  }
726
- }), i && Ui.recordCommittedEntries(e, [a], "NOTE", r);
727
- }, [W, V]), kc = D((e, t) => (t.status === "kept" || t.status === "refused" && t.reason === "unsaved-changes") && Z.release(e), [Z]), Ac = A(null);
726
+ }), i && Wi.recordCommittedEntries(e, [a], "NOTE", r);
727
+ }, [W, V]), Ac = D((e, t) => (t.status === "kept" || t.status === "refused" && t.reason === "unsaved-changes") && Z.release(e), [Z]), jc = A(null);
728
728
  O(() => () => {
729
- Ac.current?.(), Ac.current = null;
729
+ jc.current?.(), jc.current = null;
730
730
  }, []);
731
- let jc = D((e) => {
732
- Ac.current?.(), Ac.current = X.current ? gi(document, e) : null;
733
- }, []), Mc = D((e, t, n, r = !1) => {
734
- if (_c.current !== null) return;
735
- let i = Dc(e, n), a = T(), o = (e, t, n, r) => Oc(e, t, n, a, r);
731
+ let Mc = D((e) => {
732
+ jc.current?.(), jc.current = X.current ? _i(document, e) : null;
733
+ }, []), Nc = D((e, t, n, r = !1) => {
734
+ if (vc.current !== null) return;
735
+ let i = Oc(e, n), a = T(), o = (e, t, n, r) => kc(e, t, n, a, r);
736
736
  if (!i.ok) {
737
- i.copy && i.conversationId && o(i.conversationId, i.voiceSessionId, i.copy), wc();
737
+ i.copy && i.conversationId && o(i.conversationId, i.voiceSessionId, i.copy), Tc();
738
738
  return;
739
739
  }
740
740
  let { target: s, conversationId: c, voiceSessionId: l } = i, u = {
@@ -742,7 +742,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
742
742
  offerId: e
743
743
  };
744
744
  if (r) {
745
- o(c, l, Xr(P, s.label, !0), Ri({
745
+ o(c, l, Zr(P, s.label, !0), zi({
746
746
  destinationId: s.id,
747
747
  path: s.path,
748
748
  alreadyHere: !0,
@@ -752,16 +752,16 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
752
752
  return;
753
753
  }
754
754
  let d = N();
755
- _c.current = d, yc(!0);
755
+ vc.current = d, bc(!0);
756
756
  let f = (t) => {
757
757
  try {
758
- if (kc(e, t) && (wc(), t.status === "kept" && jc(e)), t.status === "kept" || !w.getState().conversations.some((e) => e.id === c)) return;
758
+ if (Ac(e, t) && (Tc(), t.status === "kept" && Mc(e)), t.status === "kept" || !w.getState().conversations.some((e) => e.id === c)) return;
759
759
  let n = t.status === "arrived" || t.status === "redirected" ? t.landedPath : null;
760
- o(c, l, Zr(P, t, {
760
+ o(c, l, Qr(P, t, {
761
761
  page: s.label,
762
- landed: n === null ? null : Bi(Ur(Y.current.navItems), n),
762
+ landed: n === null ? null : Vi(Wr(Y.current.navItems), n),
763
763
  path: s.path
764
- }), Ri({
764
+ }), zi({
765
765
  destinationId: s.id,
766
766
  path: s.path,
767
767
  alreadyHere: !1,
@@ -770,10 +770,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
770
770
  offer: u
771
771
  }));
772
772
  } finally {
773
- _c.current === d && (_c.current = null, X.current && yc(!1));
773
+ vc.current === d && (vc.current = null, X.current && bc(!1));
774
774
  }
775
775
  };
776
- Hi(Y.current.navigate, s.path, {
776
+ Ui(Y.current.navigate, s.path, {
777
777
  readPath: () => window.location.pathname + window.location.search,
778
778
  now: () => Date.now(),
779
779
  schedule: (e, t) => {
@@ -784,20 +784,20 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
784
784
  surface: "offer"
785
785
  }).then(f, () => f({ status: "unconfirmed" }));
786
786
  }, [
787
- Dc,
788
787
  Oc,
789
- P,
790
- wc,
791
788
  kc,
792
- jc
793
- ]), Nc = D((e, t) => Mc(e, "tap", t || null), [Mc]), Pc = D((e) => {
789
+ P,
790
+ Tc,
791
+ Ac,
792
+ Mc
793
+ ]), Pc = D((e, t) => Nc(e, "tap", t || null), [Nc]), Fc = D((e) => {
794
794
  let { replyId: t, conversationId: n } = e, r = Z.turnFor(t);
795
795
  if (!r) return;
796
- let i = window.location.pathname + window.location.search, a = Ur(Y.current.navItems), o = Mi({
796
+ let i = window.location.pathname + window.location.search, a = Wr(Y.current.navItems), o = Ni({
797
797
  intent: e.intent,
798
798
  live: Z.liveOffersFor(t, {
799
- registry: Tc(),
800
- actorId: Ec.current,
799
+ registry: Ec(),
800
+ actorId: Dc.current,
801
801
  conversationId: n,
802
802
  perfNow: performance.now()
803
803
  }),
@@ -809,50 +809,50 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
809
809
  location: i,
810
810
  conversationId: w.getState().activeConversationId,
811
811
  workspaceId: T(),
812
- actorId: Ec.current ?? null
812
+ actorId: Dc.current ?? null
813
813
  },
814
814
  mounted: X.current,
815
815
  visible: document.visibilityState === "visible",
816
- unsavedChanges: Ni(Y.current.options),
816
+ unsavedChanges: Pi(Y.current.options),
817
817
  alreadyThere: ({ target: e }) => {
818
818
  let t = a.find((t) => t.id === e.id);
819
- return t ? Br(t, i, a) : !1;
819
+ return t ? Vr(t, i, a) : !1;
820
820
  }
821
821
  });
822
822
  if (o.act === "navigate" || o.act === "already-here") {
823
- Mc(o.offer.offer.offerId, "resolve", o.offer.target.label, o.act === "already-here");
823
+ Nc(o.offer.offer.offerId, "resolve", o.offer.target.label, o.act === "already-here");
824
824
  return;
825
825
  }
826
826
  let [s] = o.unsaved ?? [], [c] = Z.liveOffersFor(t, {
827
- registry: Tc(),
828
- actorId: Ec.current,
827
+ registry: Ec(),
828
+ actorId: Dc.current,
829
829
  conversationId: n,
830
830
  perfNow: performance.now()
831
831
  });
832
- o.hold === "R5-unsaved" && s && c && Oc(n, e.voiceSessionId, $r(P, s.label, c.target.label), T());
832
+ o.hold === "R5-unsaved" && s && c && kc(n, e.voiceSessionId, ei(P, s.label, c.target.label), T());
833
833
  }, [
834
834
  Z,
835
- Tc,
835
+ Ec,
836
836
  K,
837
- Mc,
838
- Oc,
837
+ Nc,
838
+ kc,
839
839
  P
840
- ]), Fc = D((e) => {
840
+ ]), Ic = D((e) => {
841
841
  let t = w.getState(), n = t.conversations.find((e) => e.id === t.activeConversationId);
842
- return n ? Ii(Fi, window.location.pathname, Vi(n.messages, e)) : !1;
843
- }, []), Ic = Ce(), Lc = mi(), Rc = Ic?.request ?? null, zc = D((e, t, n = !1, r = !1) => {
844
- let { navItems: i, options: a, theme: o, navigate: s } = Y.current, c = Ur(i), l = null, u = {
842
+ return n ? Li(Ii, window.location.pathname, Hi(n.messages, e)) : !1;
843
+ }, []), Lc = Ce(), Rc = hi(), zc = Lc?.request ?? null, Bc = D((e, t, n = !1, r = !1) => {
844
+ let { navItems: i, options: a, theme: o, navigate: s } = Y.current, c = Wr(i), l = null, u = {
845
845
  ...a,
846
- locale: t === void 0 ? V : Qa.input.code,
846
+ locale: t === void 0 ? V : $a.input.code,
847
847
  uiLocale: V,
848
- inputLocale: Qa.input.code
848
+ inputLocale: $a.input.code
849
849
  };
850
- if (r || Hr(e, u)) {
851
- let e = w.getState(), n = e.conversations.find((t) => t.id === e.activeConversationId), r = n ? vi(n.messages, t, { lookThroughRefusedOffers: { ownsOffer: (e, t) => Z.offersFor(e.id).some((e) => e.offerId === t) } }) : null, o = n ? e.processingByConversationId[n.id] ?? null : null, s = o !== null && o.messageId === r?.id && Mn(o.status);
850
+ if (r || Ur(e, u)) {
851
+ let e = w.getState(), n = e.conversations.find((t) => t.id === e.activeConversationId), r = n ? yi(n.messages, t, { lookThroughRefusedOffers: { ownsOffer: (e, t) => Z.offersFor(e.id).some((e) => e.offerId === t) } }) : null, o = n ? e.processingByConversationId[n.id] ?? null : null, s = o !== null && o.messageId === r?.id && Mn(o.status);
852
852
  if (n && r && !s) {
853
853
  let e = Z.liveOffersFor(r.id, {
854
- registry: Tc(),
855
- actorId: Ec.current,
854
+ registry: Ec(),
855
+ actorId: Dc.current,
856
856
  conversationId: n.id,
857
857
  perfNow: performance.now()
858
858
  }).flatMap(({ offer: e, target: t }) => {
@@ -862,14 +862,14 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
862
862
  target: n
863
863
  }] : [];
864
864
  });
865
- l = _i({
865
+ l = vi({
866
866
  reply: r,
867
- text: ar(r, o, P),
867
+ text: or(r, o, P),
868
868
  resolve: {
869
869
  destinations: c,
870
870
  entityRoutes: a.entityRoutes,
871
- visibleNavIds: xi(i),
872
- nounLabel: (e) => Jr(P, e)
871
+ visibleNavIds: Si(i),
872
+ nounLabel: (e) => Yr(P, e)
873
873
  },
874
874
  offers: e
875
875
  });
@@ -879,18 +879,18 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
879
879
  destinations: c,
880
880
  sentenceOptions: u,
881
881
  context: {
882
- backRunnable: Fc(t),
882
+ backRunnable: Ic(t),
883
883
  navigation: l,
884
884
  skipRecords: n,
885
- controls: di(),
885
+ controls: fi(),
886
886
  executors: {
887
887
  theme: o !== null,
888
888
  navigation: s !== null,
889
- conversationDelete: Rc !== null,
889
+ conversationDelete: zc !== null,
890
890
  appControl: (e) => {
891
891
  try {
892
- let n = ui(e, { voiceLive: t !== void 0 || Yl.current });
893
- return n !== null && (n.kind !== "confirm" || Lc !== null);
892
+ let n = di(e, { voiceLive: t !== void 0 || Xl.current });
893
+ return n !== null && (n.kind !== "confirm" || Rc !== null);
894
894
  } catch {
895
895
  return !1;
896
896
  }
@@ -899,34 +899,34 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
899
899
  }
900
900
  };
901
901
  }, [
902
- Fc,
903
- Qa,
902
+ Ic,
903
+ $a,
904
904
  V,
905
905
  P,
906
906
  Z,
907
- Tc,
908
- Rc,
909
- Lc
910
- ]), Bc = D((e, t, n = !1) => {
911
- let { destinations: r, sentenceOptions: i, context: a } = zc(e, t, n);
912
- return Vr(e, r, i, a);
913
- }, [zc]), Vc = D((e) => {
914
- if (Vs.current = e, Da?.(Oe(e)), Hs.cancel(), !e.text.trim() && !e.hasAttachments) {
915
- Bs.current = !1;
907
+ Ec,
908
+ zc,
909
+ Rc
910
+ ]), Vc = D((e, t, n = !1) => {
911
+ let { destinations: r, sentenceOptions: i, context: a } = Bc(e, t, n);
912
+ return Hr(e, r, i, a);
913
+ }, [Bc]), Hc = D((e) => {
914
+ if (Hs.current = e, Oa?.(Oe(e)), Us.cancel(), !e.text.trim() && !e.hasAttachments) {
915
+ Vs.current = !1;
916
916
  return;
917
917
  }
918
- if (Bs.current) return;
918
+ if (Vs.current) return;
919
919
  let t = () => {
920
- Bs.current = !0, zs(!1);
920
+ Vs.current = !0, Bs(!1);
921
921
  };
922
- e.hasAttachments || e.dictated ? t() : Hs.schedule(() => {
923
- if (!Bs.current) {
922
+ e.hasAttachments || e.dictated ? t() : Us.schedule(() => {
923
+ if (!Vs.current) {
924
924
  try {
925
- let { destinations: t, sentenceOptions: n, context: r } = zc(e.text, void 0, !1, !0);
926
- if (zr(e.text, t, n, r)) return;
925
+ let { destinations: t, sentenceOptions: n, context: r } = Bc(e.text, void 0, !1, !0);
926
+ if (Br(e.text, t, n, r)) return;
927
927
  } catch {
928
- if (!_a) {
929
- _a = !0;
928
+ if (!va) {
929
+ va = !0;
930
930
  try {
931
931
  i.getLogger("assistant").warn("Draft command classification failed; using standard warm-up.");
932
932
  } catch {}
@@ -936,36 +936,36 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
936
936
  }
937
937
  });
938
938
  }, [
939
- Hs,
940
- Da,
941
- zs,
942
- zc
939
+ Us,
940
+ Oa,
941
+ Bs,
942
+ Bc
943
943
  ]);
944
944
  O(() => {
945
945
  let e = () => {
946
- Vs.current && Vc(Vs.current);
947
- }, t = fi(e), n = Li(window, e), r = Fi.subscribe(e);
946
+ Hs.current && Hc(Hs.current);
947
+ }, t = pi(e), n = Ri(window, e), r = Ii.subscribe(e);
948
948
  return () => {
949
- t(), n(), r(), Hs.cancel();
949
+ t(), n(), r(), Us.cancel();
950
950
  };
951
- }, [Hs, Vc]), O(() => {
952
- Vs.current && Vc(Vs.current);
951
+ }, [Us, Hc]), O(() => {
952
+ Hs.current && Hc(Hs.current);
953
953
  }, [
954
- Vc,
955
- sc,
956
- Va,
954
+ Hc,
957
955
  cc,
956
+ Ha,
958
957
  lc,
959
- Qs,
960
- oc,
958
+ uc,
959
+ $s,
960
+ sc,
961
961
  U,
962
- Sc,
962
+ Cc,
963
963
  H,
964
964
  G?.messages,
965
- To
965
+ Eo
966
966
  ]);
967
- let Hc = D((e, t) => {
968
- let n = Bc(e, t);
967
+ let Uc = D((e, t) => {
968
+ let n = Vc(e, t);
969
969
  if (!n) return !1;
970
970
  let { theme: r, navigate: i } = Y.current;
971
971
  switch (n.kind) {
@@ -977,14 +977,14 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
977
977
  case "link-not-openable":
978
978
  case "back": return i !== null;
979
979
  case "conversation-delete": return !1;
980
- case "app-control": return ui(n.request, { voiceLive: t !== void 0 || Yl.current }) !== null;
980
+ case "app-control": return di(n.request, { voiceLive: t !== void 0 || Xl.current }) !== null;
981
981
  case "open-record": return !1;
982
982
  }
983
- }, [Bc]), Uc = A(Hc);
983
+ }, [Vc]), Wc = A(Uc);
984
984
  O(() => {
985
- Uc.current = Hc;
986
- }, [Hc]);
987
- let Wc = D((e, t) => {
985
+ Wc.current = Uc;
986
+ }, [Uc]);
987
+ let Gc = D((e, t) => {
988
988
  let n = {
989
989
  state: "none",
990
990
  accept: null
@@ -993,16 +993,16 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
993
993
  let o = w.getState(), s = o.conversations.find((t) => t.id === e);
994
994
  if (!s) return n;
995
995
  let c = o.processingByConversationId[s.id] ?? null, l = {
996
- registry: Tc(),
997
- actorId: Ec.current,
996
+ registry: Ec(),
997
+ actorId: Dc.current,
998
998
  conversationId: s.id,
999
999
  perfNow: performance.now()
1000
- }, { state: u, reply: d } = Ei(Z, {
1000
+ }, { state: u, reply: d } = Di(Z, {
1001
1001
  ...l,
1002
1002
  messages: s.messages,
1003
1003
  voiceSessionId: t,
1004
1004
  processing: c,
1005
- displayedText: (e) => ar(e, c, P),
1005
+ displayedText: (e) => or(e, c, P),
1006
1006
  productWriteApproval: z,
1007
1007
  capabilitiesOf: (e) => w.getState().sandboxWriteCapabilities[e]
1008
1008
  });
@@ -1010,7 +1010,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1010
1010
  state: u,
1011
1011
  accept: null
1012
1012
  };
1013
- let [f] = Z.liveOffersFor(d.id, l), p = f ? Ur(a).find((e) => e.id === f.target.id) : void 0;
1013
+ let [f] = Z.liveOffersFor(d.id, l), p = f ? Wr(a).find((e) => e.id === f.target.id) : void 0;
1014
1014
  return !f || !p ? n : {
1015
1015
  state: u,
1016
1016
  accept: {
@@ -1020,10 +1020,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1020
1020
  };
1021
1021
  }, [
1022
1022
  Z,
1023
- Tc,
1023
+ Ec,
1024
1024
  z,
1025
1025
  P
1026
- ]), Gc = D((e, t, n, r, i, a) => {
1026
+ ]), Kc = D((e, t, n, r, i, a) => {
1027
1027
  let o = P(n.key, n.fallback, r), s = n.fallback.replace(/\{\{\s*count\s*\}\}/g, String(r.count)), c = {
1028
1028
  kind: "write-reply",
1029
1029
  line: n.key
@@ -1035,7 +1035,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1035
1035
  timestamp: l,
1036
1036
  metadata: {
1037
1037
  localAction: c,
1038
- ...pr(i)
1038
+ ...mr(i)
1039
1039
  }
1040
1040
  });
1041
1041
  let d = N();
@@ -1047,55 +1047,55 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1047
1047
  metadata: {
1048
1048
  lang: o === s ? "en" : V,
1049
1049
  localAction: c,
1050
- ...pr(i)
1050
+ ...mr(i)
1051
1051
  }
1052
- }), Ui.recordCommittedEntries(e, [u, d], "LOCAL_COMMAND", T()), a !== void 0 && ac(a, {
1052
+ }), Wi.recordCommittedEntries(e, [u, d], "LOCAL_COMMAND", T()), a !== void 0 && oc(a, {
1053
1053
  conversationId: e,
1054
1054
  questionId: u,
1055
1055
  replyId: d
1056
- }), $s(e, d);
1056
+ }), ec(e, d);
1057
1057
  }, [
1058
1058
  W,
1059
1059
  V,
1060
- ac,
1061
- $s,
1060
+ oc,
1061
+ ec,
1062
1062
  P
1063
- ]), Kc = A(() => void 0), [qc, Jc] = j(null);
1063
+ ]), qc = A(() => void 0), [Jc, Yc] = j(null);
1064
1064
  O(() => {
1065
- if (qc === null) return;
1066
- let e = window.setTimeout(() => Jc(null), ya);
1065
+ if (Jc === null) return;
1066
+ let e = window.setTimeout(() => Yc(null), ba);
1067
1067
  return () => window.clearTimeout(e);
1068
- }, [qc]);
1069
- let Yc = D(() => {
1068
+ }, [Jc]);
1069
+ let Xc = D(() => {
1070
1070
  let e = w.getState();
1071
- return so(void 0, e.autoRouting && is.current ? b : e.mode, e.autoRouting ? { routedBy: "auto" } : void 0);
1072
- }, [so]), Xc = D((e) => {
1073
- if (!Rc) return !1;
1074
- let t = e !== void 0, n = w.getState(), r = $i({
1071
+ return co(void 0, e.autoRouting && as.current ? b : e.mode, e.autoRouting ? { routedBy: "auto" } : void 0);
1072
+ }, [co]), Zc = D((e) => {
1073
+ if (!zc) return !1;
1074
+ let t = e !== void 0, n = w.getState(), r = ea({
1075
1075
  spoken: t,
1076
- bound: ys.current,
1076
+ bound: bs.current,
1077
1077
  activeConversationId: n.activeConversationId,
1078
1078
  conversations: n.conversations,
1079
1079
  historyOn: we()
1080
1080
  });
1081
- if (r && Rc(r), t) {
1081
+ if (r && zc(r), t) {
1082
1082
  let e = r ? "Opened the delete confirmation. Choose Delete or Cancel on screen." : "There is no conversation to delete.", t = r ? P("deleteConversation.opened", "Opened the delete confirmation. Choose Delete or Cancel on screen.") : P("deleteConversation.nothing", "There is no conversation to delete.");
1083
- Kc.current({
1083
+ qc.current({
1084
1084
  id: `conversation-delete:${N()}`,
1085
1085
  text: t,
1086
1086
  lang: t === e ? "en" : V
1087
1087
  });
1088
- } else r || Jc(Date.now());
1088
+ } else r || Yc(Date.now());
1089
1089
  return !0;
1090
1090
  }, [
1091
- Rc,
1091
+ zc,
1092
1092
  V,
1093
1093
  P
1094
- ]), Zc = D((e, t, n, r = !1, i) => {
1095
- if (e.kind === "conversation-delete") return Xc(n);
1094
+ ]), Qc = D((e, t, n, r = !1, i) => {
1095
+ if (e.kind === "conversation-delete") return Zc(n);
1096
1096
  let { theme: a, navigate: o } = Y.current, s = null, c = () => {
1097
- let e = (r ? null : s ?? w.getState().activeConversationId) ?? Yc();
1098
- return r && ws(e), e;
1097
+ let e = (r ? null : s ?? w.getState().activeConversationId) ?? Xc();
1098
+ return r && Ts(e), e;
1099
1099
  }, l = (e, r) => {
1100
1100
  let i = N();
1101
1101
  return W(e, {
@@ -1105,7 +1105,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1105
1105
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1106
1106
  metadata: {
1107
1107
  localAction: r,
1108
- ...pr(n)
1108
+ ...mr(n)
1109
1109
  }
1110
1110
  }), i;
1111
1111
  }, u = (e, t, r, a, o, s, c) => {
@@ -1118,35 +1118,35 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1118
1118
  metadata: {
1119
1119
  lang: r.translated ? V : "en",
1120
1120
  localAction: a,
1121
- ...pr(n)
1121
+ ...mr(n)
1122
1122
  }
1123
- }), Ui.recordCommittedEntries(e, [t, l], "LOCAL_COMMAND", o), i !== void 0 && ac(i, {
1123
+ }), Wi.recordCommittedEntries(e, [t, l], "LOCAL_COMMAND", o), i !== void 0 && oc(i, {
1124
1124
  conversationId: e,
1125
1125
  questionId: t,
1126
1126
  replyId: l
1127
- }), s && $s(e, l), l;
1127
+ }), s && ec(e, l), l;
1128
1128
  }, d = (e, t, n) => {
1129
1129
  let r = c(), i = l(r, t), a = u(r, i, e, t, T(), !0);
1130
1130
  return n?.(a), !0;
1131
1131
  }, f = (e) => {
1132
- let t = c(), n = T(), r = window.location.pathname, a = Ri({
1132
+ let t = c(), n = T(), r = window.location.pathname, a = zi({
1133
1133
  destinationId: e.destinationId,
1134
1134
  path: e.registryPath,
1135
1135
  alreadyHere: !1,
1136
1136
  via: e.via,
1137
1137
  offer: e.offer
1138
1138
  }), s = l(t, a), d = i === void 0 ? void 0 : N();
1139
- i !== void 0 && d !== void 0 && (rc(i, {
1139
+ i !== void 0 && d !== void 0 && (ic(i, {
1140
1140
  conversationId: t,
1141
1141
  questionId: s,
1142
1142
  replyId: d
1143
- }), xc(d));
1143
+ }), Sc(d));
1144
1144
  let f = N();
1145
- _c.current = f, yc(!0);
1145
+ vc.current = f, bc(!0);
1146
1146
  let p = (i) => {
1147
1147
  try {
1148
- if (e.offer && kc(e.offer.offerId, i) && wc(), i.status === "kept" || !w.getState().conversations.some((e) => e.id === t)) return;
1149
- let a = Ur(Y.current.navItems), o = i.status === "arrived" || i.status === "redirected" ? i.landedPath : null, c = Ri({
1148
+ if (e.offer && Ac(e.offer.offerId, i) && Tc(), i.status === "kept" || !w.getState().conversations.some((e) => e.id === t)) return;
1149
+ let a = Wr(Y.current.navItems), o = i.status === "arrived" || i.status === "redirected" ? i.landedPath : null, c = zi({
1150
1150
  destinationId: e.destinationId,
1151
1151
  path: e.registryPath,
1152
1152
  alreadyHere: !1,
@@ -1154,10 +1154,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1154
1154
  outcome: i,
1155
1155
  offer: e.offer
1156
1156
  });
1157
- uo(t, s, { localAction: c });
1158
- let l = e.via === "back" && i.status === "arrived" ? Gr(P, e.pageLabel()) : Zr(P, i, {
1157
+ fo(t, s, { localAction: c });
1158
+ let l = e.via === "back" && i.status === "arrived" ? Kr(P, e.pageLabel()) : Qr(P, i, {
1159
1159
  page: e.pageLabel(),
1160
- landed: o === null ? null : Bi(a, o),
1160
+ landed: o === null ? null : Vi(a, o),
1161
1161
  path: e.target
1162
1162
  }), f = u(t, s, l, c, n, X.current, d);
1163
1163
  i.status === "arrived" && e.onArrived?.({
@@ -1166,10 +1166,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1166
1166
  landedPath: i.landedPath
1167
1167
  });
1168
1168
  } finally {
1169
- _c.current === f && (_c.current = null, X.current && yc(!1)), d !== void 0 && X.current && xc((e) => e === d ? null : e);
1169
+ vc.current === f && (vc.current = null, X.current && bc(!1)), d !== void 0 && X.current && Sc((e) => e === d ? null : e);
1170
1170
  }
1171
1171
  };
1172
- return Hi(o, e.target, {
1172
+ return Ui(o, e.target, {
1173
1173
  readPath: () => window.location.pathname + window.location.search,
1174
1174
  now: () => Date.now(),
1175
1175
  schedule: (e, t) => {
@@ -1177,7 +1177,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1177
1177
  },
1178
1178
  isShellLess: () => !X.current
1179
1179
  }).then(p, () => p({ status: "unconfirmed" })), !0;
1180
- }, p = ({ replyId: e, fromPath: t, landedPath: n }) => Fi.push({
1180
+ }, p = ({ replyId: e, fromPath: t, landedPath: n }) => Ii.push({
1181
1181
  fromPath: t,
1182
1182
  toPath: n,
1183
1183
  replyMessageId: e,
@@ -1185,21 +1185,21 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1185
1185
  });
1186
1186
  if (e.kind === "theme") {
1187
1187
  if (!a) return !1;
1188
- let t = Wr(e.request, {
1188
+ let t = Gr(e.request, {
1189
1189
  mode: a.mode,
1190
1190
  resolvedTheme: a.resolvedTheme
1191
1191
  });
1192
1192
  if (!t.alreadyApplied) try {
1193
1193
  a.setMode(t.mode);
1194
1194
  } catch {}
1195
- return d(ii(P, t, e.request.kind === "family"), {
1195
+ return d(ai(P, t, e.request.kind === "family"), {
1196
1196
  kind: "theme",
1197
1197
  mode: t.mode,
1198
1198
  alreadyApplied: t.alreadyApplied
1199
1199
  });
1200
1200
  }
1201
1201
  if (e.kind === "app-control") {
1202
- let t = ui(e.request, { voiceLive: n !== void 0 || Yl.current });
1202
+ let t = di(e.request, { voiceLive: n !== void 0 || Xl.current });
1203
1203
  if (!t) return !1;
1204
1204
  let r = (e) => ({
1205
1205
  kind: "app-control",
@@ -1207,34 +1207,34 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1207
1207
  outcome: e.outcome,
1208
1208
  ...e.reply.code === "language" ? { languageLabel: e.reply.label } : {}
1209
1209
  }), i = (t) => {
1210
- if (e.request.control === "language" && hc(!1), e.request.control === "language" && t.reply.code === "language" && !t.reply.already && t.outcome === "done") {
1211
- let n = c(), i = r(t), a = l(n, i), o = u(n, a, oi((e, t) => t, t.reply), i, T(), !1);
1212
- return dc.current = {
1210
+ if (e.request.control === "language" && gc(!1), e.request.control === "language" && t.reply.code === "language" && !t.reply.already && t.outcome === "done") {
1211
+ let n = c(), i = r(t), a = l(n, i), o = u(n, a, si((e, t) => t, t.reply), i, T(), !1);
1212
+ return fc.current = {
1213
1213
  wanted: e.request.code,
1214
1214
  reply: t.reply,
1215
1215
  conversationId: n,
1216
1216
  messageId: o,
1217
- deadline: window.setTimeout(gc, si)
1218
- }, pc(o), !0;
1217
+ deadline: window.setTimeout(_c, ci)
1218
+ }, mc(o), !0;
1219
1219
  }
1220
- return d(oi(P, t.reply), r(t));
1220
+ return d(si(P, t.reply), r(t));
1221
1221
  };
1222
1222
  if (t.kind === "reply") return i(t.run);
1223
1223
  if (t.kind === "run") {
1224
1224
  let e = t.run();
1225
1225
  return t.silent && (e.outcome === "done" || e.outcome === "already") ? !0 : i(e);
1226
1226
  }
1227
- let a = Lc;
1227
+ let a = Rc;
1228
1228
  if (!a) return !1;
1229
1229
  let o = null;
1230
- return d(oi(P, t.ask.reply), r(t.ask), (e) => {
1230
+ return d(si(P, t.ask.reply), r(t.ask), (e) => {
1231
1231
  o = w.getState().conversations.find((t) => t.messages.some((t) => t.id === e))?.id ?? null;
1232
1232
  }), a.request({
1233
1233
  prompt: t.prompt,
1234
1234
  onConfirm: () => {
1235
1235
  let e = t.confirmed(), i = o, a = i !== null && w.getState().conversations.some((e) => e.id === i);
1236
1236
  if (!i || !a) return;
1237
- let s = oi(P, e.reply);
1237
+ let s = si(P, e.reply);
1238
1238
  W(i, {
1239
1239
  id: N(),
1240
1240
  role: "assistant",
@@ -1243,30 +1243,30 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1243
1243
  metadata: {
1244
1244
  lang: s.translated ? V : "en",
1245
1245
  localAction: r(e),
1246
- ...pr(n)
1246
+ ...mr(n)
1247
1247
  }
1248
1248
  });
1249
1249
  }
1250
1250
  }), !0;
1251
1251
  }
1252
1252
  if (!o) return !1;
1253
- if (e.kind === "choose-destination") return d(Kr(P, e.candidates[0]?.label ?? e.query, e.candidates), {
1253
+ if (e.kind === "choose-destination") return d(qr(P, e.candidates[0]?.label ?? e.query, e.candidates), {
1254
1254
  kind: "choose-destination",
1255
1255
  candidateIds: e.candidates.map((e) => e.id)
1256
- }, (t) => yi(t, e.candidates));
1257
- if (e.kind === "choose-linked") return d(qr(P, e.candidates), {
1256
+ }, (t) => bi(t, e.candidates));
1257
+ if (e.kind === "choose-linked") return d(Jr(P, e.candidates), {
1258
1258
  kind: "choose-destination",
1259
1259
  candidateIds: e.candidates.map((e) => e.id)
1260
- }, (t) => yi(t, e.candidates));
1260
+ }, (t) => bi(t, e.candidates));
1261
1261
  if (e.kind === "pick-from-list") {
1262
1262
  let t = e.candidates !== null && e.candidates.every((e) => e !== null) ? e.candidates : null;
1263
- return d(ti(P), t ? {
1263
+ return d(ni(P), t ? {
1264
1264
  kind: "choose-destination",
1265
1265
  candidateIds: t.map((e) => e.id)
1266
1266
  } : e.candidateIds.length > 0 ? {
1267
1267
  kind: "choose-destination",
1268
1268
  candidateIds: [...e.candidateIds]
1269
- } : Ri({
1269
+ } : zi({
1270
1270
  destinationId: "",
1271
1271
  path: "",
1272
1272
  alreadyHere: !1,
@@ -1275,9 +1275,9 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1275
1275
  status: "refused",
1276
1276
  reason: "not-routable"
1277
1277
  }
1278
- }), t ? (e) => yi(e, t) : void 0);
1278
+ }), t ? (e) => bi(e, t) : void 0);
1279
1279
  }
1280
- if (e.kind === "link-not-openable") return d(Yr(P), Ri({
1280
+ if (e.kind === "link-not-openable") return d(Xr(P), zi({
1281
1281
  destinationId: "",
1282
1282
  path: "",
1283
1283
  alreadyHere: !1,
@@ -1290,7 +1290,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1290
1290
  if (e.kind === "open-record") {
1291
1291
  let r;
1292
1292
  try {
1293
- let { options: t, navItems: n } = Y.current, i = t.entityRoutes ?? [], a = xi(n);
1293
+ let { options: t, navItems: n } = Y.current, i = t.entityRoutes ?? [], a = Si(n);
1294
1294
  r = (t.records ?? []).flatMap((t) => {
1295
1295
  let n = i.find((e) => e.id === t.entityRouteId), r = e.request.adapterIds.length === 0 || e.request.adapterIds.includes(t.id);
1296
1296
  return n && r && (n.visibleWith === void 0 || a.has(n.visibleWith)) ? [{
@@ -1303,18 +1303,18 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1303
1303
  }
1304
1304
  if (r.length === 0) return !1;
1305
1305
  let i = w.getState().activeConversationId, a = N();
1306
- _c.current = a, yc(!0);
1306
+ vc.current = a, bc(!0);
1307
1307
  let o = () => {
1308
- _c.current === a && (_c.current = null, X.current && yc(!1));
1308
+ vc.current === a && (vc.current = null, X.current && bc(!1));
1309
1309
  };
1310
1310
  return (async () => {
1311
1311
  let a = { kind: "none" }, c = !0;
1312
1312
  try {
1313
- a = await bi({
1313
+ a = await xi({
1314
1314
  name: e.request.name,
1315
1315
  usable: r,
1316
- nounOf: (e) => Jr(P, e.noun),
1317
- timeoutMs: fa
1316
+ nounOf: (e) => Yr(P, e.noun),
1317
+ timeoutMs: pa
1318
1318
  }), c = w.getState().conversations.some((e) => e.id === i);
1319
1319
  } catch {
1320
1320
  a = { kind: "none" };
@@ -1323,7 +1323,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1323
1323
  }
1324
1324
  if (!X.current) return;
1325
1325
  if (a.kind === "none") {
1326
- nl.current(t, [], {
1326
+ rl.current(t, [], {
1327
1327
  fromPerson: !0,
1328
1328
  ...n === void 0 ? {} : { voiceSessionId: n },
1329
1329
  localRecordsChecked: !0
@@ -1344,16 +1344,16 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1344
1344
  return;
1345
1345
  }
1346
1346
  let l = a.candidates[0];
1347
- d(a.why === "kinds" ? ri(P, a.nouns, a.candidates) : ni(P, a.nouns[0] ?? "", l?.label ?? e.request.name, a.candidates), {
1347
+ d(a.why === "kinds" ? ii(P, a.nouns, a.candidates) : ri(P, a.nouns[0] ?? "", l?.label ?? e.request.name, a.candidates), {
1348
1348
  kind: "choose-destination",
1349
1349
  candidateIds: a.candidates.map((e) => e.id)
1350
- }, (e) => yi(e, a.candidates));
1350
+ }, (e) => bi(e, a.candidates));
1351
1351
  })().catch(() => void 0), !0;
1352
1352
  }
1353
1353
  if (e.kind === "back") {
1354
- let e = Fi.top();
1354
+ let e = Ii.top();
1355
1355
  if (!e) return !1;
1356
- let t = Ur(Y.current.navItems), n = zi(t, e.fromPath);
1356
+ let t = Wr(Y.current.navItems), n = Bi(t, e.fromPath);
1357
1357
  return f({
1358
1358
  target: e.fromPath,
1359
1359
  destinationId: n?.id ?? "",
@@ -1361,27 +1361,27 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1361
1361
  via: "back",
1362
1362
  pageLabel: () => n?.label ?? null,
1363
1363
  onArrived: () => {
1364
- Fi.top() === e && Fi.pop();
1364
+ Ii.top() === e && Ii.pop();
1365
1365
  }
1366
1366
  });
1367
1367
  }
1368
1368
  let ee, m = e.destination;
1369
1369
  if (e.via === "offer") {
1370
- let t = Dc(e.offerId, e.destination.label);
1371
- if (!t.ok) return d(t.copy ?? Qr(P), {
1370
+ let t = Oc(e.offerId, e.destination.label);
1371
+ if (!t.ok) return d(t.copy ?? $r(P), {
1372
1372
  kind: "write-reply",
1373
1373
  line: t.reason === "unavailable" ? "offer.notAvailable" : "offer.expired"
1374
1374
  });
1375
1375
  ee = {
1376
1376
  trigger: e.trigger,
1377
1377
  offerId: e.offerId
1378
- }, m = Ur(Y.current.navItems).find((e) => e.id === t.target.id) ?? {
1378
+ }, m = Wr(Y.current.navItems).find((e) => e.id === t.target.id) ?? {
1379
1379
  id: t.target.id,
1380
1380
  label: t.target.label,
1381
1381
  path: t.target.path
1382
1382
  };
1383
1383
  }
1384
- return Br(m, window.location.pathname + window.location.search, Ur(Y.current.navItems)) ? d(Xr(P, m.label, !0), Ri({
1384
+ return Vr(m, window.location.pathname + window.location.search, Wr(Y.current.navItems)) ? d(Zr(P, m.label, !0), zi({
1385
1385
  destinationId: m.id,
1386
1386
  path: m.path,
1387
1387
  alreadyHere: !0,
@@ -1398,44 +1398,44 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1398
1398
  });
1399
1399
  }, [
1400
1400
  W,
1401
- ws,
1402
- Lc,
1403
- Yc,
1404
- gc,
1405
- V,
1406
- uo,
1407
- rc,
1401
+ Ts,
1402
+ Rc,
1408
1403
  Xc,
1409
- ac,
1410
- hc,
1411
- $s,
1404
+ _c,
1405
+ V,
1406
+ fo,
1407
+ ic,
1408
+ Zc,
1409
+ oc,
1410
+ gc,
1411
+ ec,
1412
1412
  P,
1413
- Dc,
1414
- kc,
1415
- wc
1416
- ]), Qc = D(async (e) => {
1417
- os.current = !0, cs(!0);
1413
+ Oc,
1414
+ Ac,
1415
+ Tc
1416
+ ]), $c = D(async (e) => {
1417
+ ss.current = !0, ls(!0);
1418
1418
  try {
1419
1419
  await K.declineForReply(e.conversationId, e.reason, e.origin);
1420
1420
  } finally {
1421
- os.current = !1, X.current && cs(!1);
1421
+ ss.current = !1, X.current && ls(!1);
1422
1422
  }
1423
1423
  if (e.commandText !== null) {
1424
- let t = Bc(e.commandText, e.options.voiceSessionId);
1425
- if (t && Zc(t, e.content, e.options.voiceSessionId)) return;
1424
+ let t = Vc(e.commandText, e.options.voiceSessionId);
1425
+ if (t && Qc(t, e.content, e.options.voiceSessionId)) return;
1426
1426
  }
1427
- await nl.current(e.content, e.attachments, e.options);
1427
+ await rl.current(e.content, e.attachments, e.options);
1428
1428
  }, [
1429
- Bc,
1430
- Zc,
1429
+ Vc,
1430
+ Qc,
1431
1431
  K
1432
1432
  ]), Q = D(async (n, r = [], i = {}) => {
1433
- let a = i.voiceSessionId !== void 0, o = w.getState(), s = !1, c = ys.current;
1434
- if (a && vr(c)) {
1435
- let e = Cr(c, o.activeConversationId, Ds());
1433
+ let a = i.voiceSessionId !== void 0, o = w.getState(), s = !1, c = bs.current;
1434
+ if (a && yr(c)) {
1435
+ let e = wr(c, o.activeConversationId, Os());
1436
1436
  if (e.kind === "gone") return;
1437
1437
  let t = i.voiceEntry ?? e;
1438
- t.kind === "adopt" && ws(t.conversationId), s = t.kind === "own", i = {
1438
+ t.kind === "adopt" && Ts(t.conversationId), s = t.kind === "own", i = {
1439
1439
  ...i,
1440
1440
  voiceEntry: t
1441
1441
  };
@@ -1445,7 +1445,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1445
1445
  if (Mn(o.processingByConversationId[u]?.status)) {
1446
1446
  if (i.avatarTabAsk !== void 0) return;
1447
1447
  let e = o.processingByConversationId[u]?.messageId ?? null;
1448
- e && i.correctsInFlightTurn === !0 && !Ks.current.has(e) && Ys(), e && Ks.current.has(e) && (qs.current = {
1448
+ e && i.correctsInFlightTurn === !0 && !qs.current.has(e) && Xs(), e && qs.current.has(e) && (Js.current = {
1449
1449
  conversationId: u,
1450
1450
  content: n,
1451
1451
  attachments: r,
@@ -1453,10 +1453,10 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1453
1453
  });
1454
1454
  return;
1455
1455
  }
1456
- if (js.current.has(u)) return;
1456
+ if (Ms.current.has(u)) return;
1457
1457
  }
1458
- if (as.current || Ar() !== null || os.current || _c.current !== null) return;
1459
- let d = i.targetConversationId, f = Zi(), p = (e) => Ki(e) || Gi(e, f);
1458
+ if (os.current || jr() !== null || ss.current || vc.current !== null) return;
1459
+ let d = i.targetConversationId, f = Qi(), p = (e) => qi(e) || Ki(e, f);
1460
1460
  if (d !== void 0) {
1461
1461
  let e = o.conversations.find((e) => e.id === d);
1462
1462
  if (o.activeConversationId !== d || !e || e.mode !== o.mode || p(e)) return;
@@ -1464,29 +1464,29 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1464
1464
  if (i.avatarTabAsk !== void 0) {
1465
1465
  let e = l ? o.conversations.find((e) => e.id === l) : void 0, t = e && !p(e) ? e : void 0;
1466
1466
  if (Ze({
1467
- auto: o.autoRouting && is.current && d === void 0,
1467
+ auto: o.autoRouting && as.current && d === void 0,
1468
1468
  selectedMode: o.mode,
1469
1469
  conversation: t ? {
1470
1470
  mode: t.mode,
1471
1471
  routedBy: t.routedBy,
1472
- hasHistory: Wi(t)
1472
+ hasHistory: Gi(t)
1473
1473
  } : null,
1474
- modeWrites: (e) => Xo.current.find((t) => t.id === e)?.writeCapable === !0 || bt(e)
1474
+ modeWrites: (e) => Zo.current.find((t) => t.id === e)?.writeCapable === !0 || bt(e)
1475
1475
  }) !== null) return;
1476
1476
  }
1477
1477
  if (i.fromPerson && i.writeReplyBound === void 0) {
1478
- let e = d ?? l ?? null, t = i.voiceSessionId === void 0 ? "typed" : "spoken", a = Wc(e, i.voiceSessionId), o = se({
1478
+ let e = d ?? l ?? null, t = i.voiceSessionId === void 0 ? "typed" : "spoken", a = Gc(e, i.voiceSessionId), o = se({
1479
1479
  text: n,
1480
- locale: t === "spoken" ? Qa.input.code : V,
1480
+ locale: t === "spoken" ? $a.input.code : V,
1481
1481
  origin: t,
1482
1482
  hasAttachments: r.length > 0 || i.focus !== void 0,
1483
1483
  live: K.liveFor(e),
1484
- matchesLocalCommand: (e) => Bc(e, i.voiceSessionId) !== null,
1484
+ matchesLocalCommand: (e) => Vc(e, i.voiceSessionId) !== null,
1485
1485
  offer: a.state,
1486
- offerAssent: a.state !== "none" && ai({
1486
+ offerAssent: a.state !== "none" && oi({
1487
1487
  text: n,
1488
1488
  uiLocale: V,
1489
- inputLocale: Qa.input.code,
1489
+ inputLocale: $a.input.code,
1490
1490
  commandLocales: Y.current.options.commandLocales,
1491
1491
  manifest: Y.current.options.commandManifest,
1492
1492
  leaveGuard: Y.current.options.leaveGuard
@@ -1494,14 +1494,14 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1494
1494
  });
1495
1495
  if (o.kind === "accept_offer") {
1496
1496
  let e = a.accept;
1497
- if (e && Zc({
1497
+ if (e && Qc({
1498
1498
  kind: "navigate",
1499
1499
  destination: e.destination,
1500
1500
  via: "offer",
1501
1501
  offerId: e.offerId,
1502
1502
  trigger: "yes"
1503
1503
  }, n, i.voiceSessionId, s, i.avatarTabAsk)) {
1504
- ic(i.avatarTabAsk);
1504
+ ac(i.avatarTabAsk);
1505
1505
  return;
1506
1506
  }
1507
1507
  o = {
@@ -1518,11 +1518,11 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1518
1518
  };
1519
1519
  }
1520
1520
  if (o.kind === "local_reply") {
1521
- e && Gc(e, n, o.line, o.values, i.voiceSessionId, i.avatarTabAsk);
1521
+ e && Kc(e, n, o.line, o.values, i.voiceSessionId, i.avatarTabAsk);
1522
1522
  return;
1523
1523
  }
1524
1524
  let c = o.kind === "local" ? o.fallback : o.bound, u = o.declineAll;
1525
- if (u !== null && e) return i.avatarTabAsk === void 0 ? Qc({
1525
+ if (u !== null && e) return i.avatarTabAsk === void 0 ? $c({
1526
1526
  conversationId: e,
1527
1527
  reason: u,
1528
1528
  origin: t,
@@ -1541,50 +1541,50 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1541
1541
  }
1542
1542
  let ee = i.writeReplyBound?.promptText ?? n;
1543
1543
  if (i.fromPerson && r.length === 0 && i.focus === void 0 && i.writeReplyBound?.localCommands !== !1) {
1544
- let e = Bc(n, i.voiceSessionId, i.localRecordsChecked === !0);
1545
- if (e && Zc(e, n, i.voiceSessionId, s, i.avatarTabAsk)) {
1546
- ic(i.avatarTabAsk);
1544
+ let e = Vc(n, i.voiceSessionId, i.localRecordsChecked === !0);
1545
+ if (e && Qc(e, n, i.voiceSessionId, s, i.avatarTabAsk)) {
1546
+ ac(i.avatarTabAsk);
1547
1547
  return;
1548
1548
  }
1549
1549
  }
1550
- let m = l ? o.conversations.find((e) => e.id === l) : void 0, h = p(m) ? void 0 : m, g = o.autoRouting && is.current && d === void 0 ? pe({
1550
+ let m = l ? o.conversations.find((e) => e.id === l) : void 0, h = p(m) ? void 0 : m, g = o.autoRouting && as.current && d === void 0 ? pe({
1551
1551
  intent: i.avatarTabAsk === void 0 ? i.autoIntent ?? ue(n) : "read",
1552
1552
  dictated: a,
1553
- voiceProposalBound: a && Ha("api-calls") && Qn(o.acknowledgedWriteModes, "api-calls"),
1553
+ voiceProposalBound: a && Ua("api-calls") && $n(o.acknowledgedWriteModes, "api-calls"),
1554
1554
  conversation: h ? {
1555
1555
  mode: h.mode,
1556
1556
  routedBy: h.routedBy,
1557
- hasHistory: Wi(h)
1557
+ hasHistory: Gi(h)
1558
1558
  } : null
1559
1559
  }) : null;
1560
- if (g && Xo.current.find((e) => e.id === g.mode)?.writeCapable && !Qn(o.acknowledgedWriteModes, g.mode)) {
1561
- as.current = {
1560
+ if (g && Zo.current.find((e) => e.id === g.mode)?.writeCapable && !$n(o.acknowledgedWriteModes, g.mode)) {
1561
+ os.current = {
1562
1562
  content: n,
1563
1563
  attachments: r,
1564
1564
  options: i
1565
- }, ds(g.mode);
1565
+ }, fs(g.mode);
1566
1566
  return;
1567
1567
  }
1568
1568
  let _ = g ? g.mode : o.mode, te, ne, v = d ?? (s ? null : H), re = v ? w.getState().conversations.find((e) => e.id === v) : void 0, ie = g?.action === "escalate" && h ? {
1569
1569
  mode: h.mode,
1570
1570
  backendSessionId: h.backendSessionId ?? null
1571
1571
  } : null;
1572
- if (g) g.action === "new" || !h ? v = so(void 0, _, { routedBy: "auto" }) : (v = h.id, So(v, _));
1572
+ if (g) g.action === "new" || !h ? v = co(void 0, _, { routedBy: "auto" }) : (v = h.id, Co(v, _));
1573
1573
  else {
1574
1574
  let e = o.autoRouting ? { routedBy: "auto" } : void 0;
1575
- !v || p(re) || re && re.mode !== _ && Wi(re) ? v = so(void 0, _, e) : re && re.mode !== _ && (e ? So(v, _) : ao(v, _));
1575
+ !v || p(re) || re && re.mode !== _ && Gi(re) ? v = co(void 0, _, e) : re && re.mode !== _ && (e ? Co(v, _) : oo(v, _));
1576
1576
  }
1577
1577
  if (!v) return;
1578
- a && ys.current !== void 0 && v !== o.activeConversationId && ws(v), i.approvalFollowUp || (Os.current[v] = r);
1578
+ a && bs.current !== void 0 && v !== o.activeConversationId && Ts(v), i.approvalFollowUp || (ks.current[v] = r);
1579
1579
  let ae = () => w.getState().conversations.some((e) => e.id === v), y = T(), b = {
1580
- accessToken: Ua(),
1581
- workspaceToken: Wa(),
1580
+ accessToken: Wa(),
1581
+ workspaceToken: Ga(),
1582
1582
  userId: B,
1583
1583
  organizationId: Gt()
1584
1584
  }, le = (e, t) => {
1585
1585
  !ae() && y && dt(e, y, t, _, {
1586
- accessToken: Ua(),
1587
- workspaceToken: Wa(),
1586
+ accessToken: Wa(),
1587
+ workspaceToken: Ga(),
1588
1588
  userId: B,
1589
1589
  organizationId: Gt()
1590
1590
  });
@@ -1600,11 +1600,11 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1600
1600
  approvalFollowUp: !0,
1601
1601
  approvedReplyId: i.approvalFollowUp.approvedReplyId
1602
1602
  } : {},
1603
- ...pr(i.voiceSessionId)
1603
+ ...mr(i.voiceSessionId)
1604
1604
  }
1605
1605
  };
1606
1606
  W(v, fe);
1607
- let me = i.fromPerson === !0 && r.length === 0 && i.focus === void 0 && i.approvalFollowUp === void 0 && ee === n ? ji(n, a ? Qa.input.code : V) : null, he = {
1607
+ let me = i.fromPerson === !0 && r.length === 0 && i.focus === void 0 && i.approvalFollowUp === void 0 && ee === n ? Mi(n, a ? $a.input.code : V) : null, he = {
1608
1608
  location: window.location.pathname + window.location.search,
1609
1609
  conversationId: w.getState().activeConversationId,
1610
1610
  workspaceId: T(),
@@ -1616,17 +1616,17 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1616
1616
  content: "",
1617
1617
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1618
1618
  metadata: {
1619
- lang: to,
1620
- ...pr(i.voiceSessionId)
1619
+ lang: no,
1620
+ ...mr(i.voiceSessionId)
1621
1621
  }
1622
1622
  }), dn(x, {
1623
1623
  channel: a ? "voice" : "chat",
1624
1624
  mode: _,
1625
1625
  product: L,
1626
- language: to,
1626
+ language: no,
1627
1627
  device: pn(),
1628
1628
  routedByAuto: !!g
1629
- }, i.voiceTiming), E(x, "accepted"), fo(v, "provisioning", x, null), jr(x), i.avatarTabAsk !== void 0 && ac(i.avatarTabAsk, {
1629
+ }, i.voiceTiming), E(x, "accepted"), po(v, "provisioning", x, null), Mr(x), i.avatarTabAsk !== void 0 && oc(i.avatarTabAsk, {
1630
1630
  conversationId: v,
1631
1631
  questionId: fe.id,
1632
1632
  replyId: x
@@ -1634,20 +1634,20 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1634
1634
  let ge = () => {
1635
1635
  let e = Nn({
1636
1636
  turnId: x,
1637
- abortRequested: Ks.current.has(x),
1637
+ abortRequested: qs.current.has(x),
1638
1638
  activeTurnId: w.getState().processingByConversationId[v]?.messageId ?? null,
1639
1639
  conversationExists: ae()
1640
1640
  });
1641
1641
  return e.abandon && ye(), e;
1642
- }, _e = (e, t, n, r, a = !1, o = to) => {
1643
- lo(v, x, { content: At(e) }), uo(v, x, {
1642
+ }, _e = (e, t, n, r, a = !1, o = no) => {
1643
+ uo(v, x, { content: At(e) }), fo(v, x, {
1644
1644
  lang: o,
1645
1645
  ...t?.length ? { artifacts: t } : {},
1646
1646
  ...t?.length || n || r ? { mode: _ } : {},
1647
1647
  ...n ? { sessionId: n } : {},
1648
1648
  ...r ? { sandboxId: r } : {},
1649
1649
  ...a ? { incomplete: !0 } : {},
1650
- ...pr(i.voiceSessionId)
1650
+ ...mr(i.voiceSessionId)
1651
1651
  });
1652
1652
  }, ve = { session: null }, S = {
1653
1653
  speech: null,
@@ -1663,17 +1663,17 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1663
1663
  E(x, "attemptStarted");
1664
1664
  let s = null, c = null, l = !1;
1665
1665
  try {
1666
- let { sandboxId: e, sessionId: u, sessionIsNew: d, readAhead: f, sandboxIsNew: p, sandboxProbed: m, sandboxAdopted: h, deadSandboxProbe: g, sessionPreopened: re, knownFloor: ie } = await Rs(v, x, _, y, b, {
1666
+ let { sandboxId: e, sessionId: u, sessionIsNew: d, readAhead: f, sandboxIsNew: p, sandboxProbed: m, sandboxAdopted: h, deadSandboxProbe: g, sessionPreopened: re, knownFloor: ie } = await zs(v, x, _, y, b, {
1667
1667
  isAbandoned: () => Nn({
1668
1668
  turnId: x,
1669
- abortRequested: Ks.current.has(x),
1669
+ abortRequested: qs.current.has(x),
1670
1670
  activeTurnId: w.getState().processingByConversationId[v]?.messageId ?? null,
1671
1671
  conversationExists: ae()
1672
1672
  }).abandon,
1673
1673
  ...o ? { verifySession: !0 } : {}
1674
1674
  });
1675
1675
  if (s = e, we(), we = t(e, () => {
1676
- Ks.current.add(x), It(x), Nt.abort(x);
1676
+ qs.current.add(x), It(x), Nt.abort(x);
1677
1677
  }), E(x, "runtimeReady"), fn(x, {
1678
1678
  runtime: p ? "cold" : h ? "adopted" : m ? "probed" : re ? "preopened" : d ? "new-session" : "warm",
1679
1679
  deadSandboxProbe: g
@@ -1683,42 +1683,43 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1683
1683
  }, F) {
1684
1684
  let e = ge();
1685
1685
  if (e.abandon) {
1686
- e.clearProcessing && po(v);
1686
+ e.clearProcessing && mo(v);
1687
1687
  return;
1688
1688
  }
1689
1689
  }
1690
- if ($n(_, te, w.getState().acknowledgedWriteModes, {
1690
+ if (er(_, te, w.getState().acknowledgedWriteModes, {
1691
1691
  dictated: a,
1692
1692
  confirmsWrites: bt(_),
1693
- proposalBound: Ha(_, e)
1693
+ proposalBound: Ua(_, e)
1694
1694
  }) === "voice-in-write-mode") throw new Jt("voice-in-write-mode", "Voice in a write mode");
1695
- let se = Ji({
1695
+ let se = Yi({
1696
1696
  conversation: w.getState().conversations.find((e) => e.id === v),
1697
1697
  content: n,
1698
1698
  sessionIsNew: d,
1699
1699
  sendingMode: _,
1700
1700
  sendingModeConfig: te,
1701
- modes: Xo.current,
1701
+ modes: Zo.current,
1702
1702
  answerText: (e) => et(e).text
1703
1703
  });
1704
- if (be(), Xn()) {
1705
- let t = Yn({
1704
+ if (be(), Zn()) {
1705
+ let t = Xn({
1706
1706
  mint: () => yt(e, y, u, _, b),
1707
1707
  mark: (e) => E(x, e)
1708
1708
  });
1709
- S.stream = t, Gn() && i.voiceSessionId !== void 0 && !ne.accumulatesNarration && (S.speech = Kn({
1709
+ S.stream = t, Gn() && i.voiceSessionId !== void 0 && !ne.accumulatesNarration && (S.speech = qn({
1710
+ holdForFinalAnswer: Kn() === "production",
1710
1711
  append: (e, t) => {
1711
1712
  ge().abandon || (E(x, "speechQueued"), xe = !0, Nt.append(x, {
1712
1713
  conversationId: v,
1713
1714
  channel: "voice",
1714
1715
  voiceSessionId: i.voiceSessionId,
1715
1716
  text: t,
1716
- lang: to,
1717
+ lang: no,
1717
1718
  final: !1
1718
1719
  }, e));
1719
1720
  },
1720
1721
  retract: () => Nt.retract(x)
1721
- })), S.render = qn({
1722
+ })), S.render = Jn({
1722
1723
  onLiveState: (e, t) => S.speech?.invalidate(e, t),
1723
1724
  onRendered: (e, t, n) => S.speech?.update(e, t, n),
1724
1725
  stream: t,
@@ -1730,21 +1731,21 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1730
1731
  });
1731
1732
  }
1732
1733
  let ue = ie ?? await Vt(() => _t(e, y, u, _, b, { limit: 50 }), d, zt(f, e, u));
1733
- Is(v, x, "streaming", "thinking");
1734
- let de = La?.(), pe = ce(w.getState().sandboxWriteCapabilities[e]), Se = Y.current, Te = Ti(e, u), Ee = Se.options.uiCatalogue ? Si(Ur(Se.navItems), {
1734
+ Ls(v, x, "streaming", "thinking");
1735
+ let de = Ra?.(), pe = ce(w.getState().sandboxWriteCapabilities[e]), Se = Y.current, Te = Ei(e, u), Ee = Se.options.uiCatalogue ? Ci(Wr(Se.navItems), {
1735
1736
  permissionsSettled: Se.navPermissionsSettled,
1736
1737
  simulating: Se.navSimulating,
1737
- sentBefore: wi(Te)
1738
+ sentBefore: Ti(Te)
1738
1739
  }) : null, De = w.getState().sandboxWriteCapabilities[e]?.clientTools === !0 ? kt({ writeCapable: te?.writeCapable === !0 || _ === "api-calls" }) : null, Oe = De?.manifest ?? [], ke = {
1739
1740
  conversationId: v,
1740
1741
  writeReply: pe === "proposal-v1" ? i.writeReplyBound?.writeReply ?? null : null,
1741
1742
  ...Ee ? { uiCatalogue: Ee } : {},
1742
1743
  ...Oe.length > 0 ? { clientTools: Oe } : {}
1743
1744
  }, { prompt: Ae, parts: je } = Cn({
1744
- content: sa(se ? `${se}${ee}` : ee, i.focus),
1745
+ content: ca(se ? `${se}${ee}` : ee, i.focus),
1745
1746
  attachments: r,
1746
1747
  limits: xn(te),
1747
- wrapPrompt: (e) => Ra?.(_, e, $a, eo, a, { writeApproval: pe }) ?? e,
1748
+ wrapPrompt: (e) => za?.(_, e, eo, to, a, { writeApproval: pe }) ?? e,
1748
1749
  requestBytes: (t, n) => St({
1749
1750
  sandboxId: e,
1750
1751
  workspaceId: y,
@@ -1760,7 +1761,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1760
1761
  l = vn(r) > Me;
1761
1762
  let Pe = ge();
1762
1763
  if (Pe.abandon) {
1763
- Pe.clearProcessing && po(v);
1764
+ Pe.clearProcessing && mo(v);
1764
1765
  return;
1765
1766
  }
1766
1767
  let Fe = (t) => Ce.dispatch({
@@ -1779,8 +1780,8 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1779
1780
  if (!Ce.canFailover() || !je || !An(e)) throw e;
1780
1781
  await Fe(void 0), l ||= Ne;
1781
1782
  }
1782
- Ee && Ci(Te);
1783
- let Ie = w.getState().sandboxWriteCapabilities[e], Le = Se.options.uiOffers === !0 && Oi(Ie) ? B : null, Re = !!Le;
1783
+ Ee && wi(Te);
1784
+ let Ie = w.getState().sandboxWriteCapabilities[e], Le = Se.options.uiOffers === !0 && ki(Ie) ? B : null, Re = !!Le;
1784
1785
  Le && Z.recordTurn({
1785
1786
  replyId: x,
1786
1787
  conversationId: v,
@@ -1795,14 +1796,14 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1795
1796
  tools: De.tools,
1796
1797
  post: (t, n) => xt(e, y, u, t, n, _, b)
1797
1798
  }) : null, Be = ze ? (e) => ze.receive(e) : void 0, Ve = Re ? (e, t) => {
1798
- Z.receive(x, e, t, performance.now()) && wc();
1799
- } : void 0, He = (e) => lo(v, x, { content: e }), Ue = (e) => l ? `${e}\n\n${P("attachments.imagesNotSent", "_Your photo was too large to include with this message, so the answer above is from the text and the file link only. Try a smaller or more tightly cropped photo._")}` : e;
1799
+ Z.receive(x, e, t, performance.now()) && Tc();
1800
+ } : void 0, He = (e) => uo(v, x, { content: e }), Ue = (e) => l ? `${e}\n\n${P("attachments.imagesNotSent", "_Your photo was too large to include with this message, so the answer above is from the text and the file link only. Try a smaller or more tightly cropped photo._")}` : e;
1800
1801
  E(x, "promptSent");
1801
1802
  let We = null, Ge = !1, Ke = Lt, C = Rt([], ue);
1802
1803
  S.render?.arm(ue);
1803
1804
  let qe = Date.now() + ne.streamBudgetMs, Je = Date.now(), Ye = Date.now(), Xe, Ze = jt(), Qe = (e) => {
1804
1805
  Xe = e;
1805
- }, $e = Jn(() => _t(e, y, u, _, b, {
1806
+ }, $e = Yn(() => _t(e, y, u, _, b, {
1806
1807
  limit: 50,
1807
1808
  sinceMs: ue,
1808
1809
  surfaceTurnTerminal: !0,
@@ -1815,28 +1816,28 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1815
1816
  le(e, u);
1816
1817
  let t = ge();
1817
1818
  if (t.abandon) {
1818
- t.clearProcessing && po(v);
1819
+ t.clearProcessing && mo(v);
1819
1820
  return;
1820
1821
  }
1821
1822
  let n = Date.now(), r = await $e.next();
1822
- Re && Z.observeMessages(x, r) && wc(), C = Rt(r, ue, { accumulateNarration: ne.accumulatesNarration });
1823
+ Re && Z.observeMessages(x, r) && Tc(), C = Rt(r, ue, { accumulateNarration: ne.accumulatesNarration });
1823
1824
  let i = Mt(Ze, C.done, Xe, Date.now());
1824
1825
  if (i !== C.done && (C = {
1825
1826
  ...C,
1826
1827
  done: i
1827
- }), lo(v, x, { content: At(C.content) }), C.hasRenderableOutput ? Ge || (Ge = !0, We !== null && E(x, "lastQuietPoll", We), E(x, "firstOutput")) : We = hn(), ne.accumulatesNarration) C.hasText && E(x, "firstText");
1828
+ }), uo(v, x, { content: At(C.content) }), C.hasRenderableOutput ? Ge || (Ge = !0, We !== null && E(x, "lastQuietPoll", We), E(x, "firstOutput")) : We = hn(), ne.accumulatesNarration) C.hasText && E(x, "firstText");
1828
1829
  else {
1829
1830
  let e = Wt(Ke, C, hn());
1830
1831
  Ke = e.tracker, e.confirmedAt !== null && E(x, "firstText", e.confirmedAt);
1831
1832
  }
1832
- if (C.pendingWrite && !oe(w.getState().sandboxWriteCapabilities[e]) && uo(v, x, { pendingWrite: C.pendingWrite }), C.done && (S.stream ? fn(x, {
1833
+ if (C.pendingWrite && !oe(w.getState().sandboxWriteCapabilities[e]) && fo(v, x, { pendingWrite: C.pendingWrite }), C.done && (S.stream ? fn(x, {
1833
1834
  transport: S.stream.reachedOpen ? "sse" : "poll",
1834
1835
  live: Wn(S.stream.live)
1835
1836
  }) : fn(x, {
1836
1837
  transport: "poll",
1837
1838
  live: "none"
1838
1839
  }), ye()), C.done) {
1839
- E(x, "answerDone"), ks.current.markVerified(e), ne.continuesInBackground || Bt(e, u, r);
1840
+ E(x, "answerDone"), As.current.markVerified(e), ne.continuesInBackground || Bt(e, u, r);
1840
1841
  break;
1841
1842
  }
1842
1843
  if (S.render?.refresh(r), Date.now() - Je > 3e4 && (Un(e, y, b), Je = Date.now()), !$e.hasPending()) {
@@ -1849,7 +1850,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1849
1850
  }
1850
1851
  if (tt?.(), be(), C.done || (fn(x, { outcome: "timedOut" }), C = {
1851
1852
  ...C,
1852
- content: Zn(C.content, _, P, te)
1853
+ content: Qn(C.content, _, P, te)
1853
1854
  }), (C.done || xe) && i.voiceSessionId !== void 0 && !ge().abandon) {
1854
1855
  let e = At(Ue(C.content));
1855
1856
  (e.trim() || xe) && ((l || !C.done) && He(e), E(x, "speechQueued"), xe = !0, Nt.publish(x, {
@@ -1857,7 +1858,7 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1857
1858
  channel: "voice",
1858
1859
  voiceSessionId: i.voiceSessionId,
1859
1860
  text: e,
1860
- lang: to,
1861
+ lang: no,
1861
1862
  final: !0
1862
1863
  }));
1863
1864
  }
@@ -1867,21 +1868,21 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1867
1868
  content: Ue(C.content)
1868
1869
  });
1869
1870
  let rt = !C.done;
1870
- _e(C.content, nt, u, e, rt), C.tokens && (lo(v, x, { tokens: C.tokens }), Ba && En({
1871
+ _e(C.content, nt, u, e, rt), C.tokens && (uo(v, x, { tokens: C.tokens }), Va && En({
1871
1872
  workspaceId: y,
1872
1873
  sessionId: u,
1873
1874
  messageId: C.messageId,
1874
1875
  model: C.model,
1875
1876
  tokens: C.tokens
1876
- }, Ba, { ledger: wn("panel", L) }).then((e) => {
1877
+ }, Va, { ledger: wn("panel", L) }).then((e) => {
1877
1878
  e.ok && qt(L);
1878
1879
  })), C.done || le(e, u);
1879
1880
  let it = ge();
1880
1881
  if (it.abandon) {
1881
- it.clearProcessing && po(v);
1882
+ it.clearProcessing && mo(v);
1882
1883
  return;
1883
1884
  }
1884
- E(x, "complete"), fn(x, { outcome: "answered" }), fo(v, "complete", x, null), Ui.recordCommittedEntries(v, [fe.id, x], "TURN", y), xe = !1, Re && me && C.done && Pc({
1885
+ E(x, "complete"), fn(x, { outcome: "answered" }), po(v, "complete", x, null), Wi.recordCommittedEntries(v, [fe.id, x], "TURN", y), xe = !1, Re && me && C.done && Fc({
1885
1886
  replyId: x,
1886
1887
  conversationId: v,
1887
1888
  voiceSessionId: i.voiceSessionId,
@@ -1890,27 +1891,27 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1890
1891
  });
1891
1892
  } catch (t) {
1892
1893
  let n = t instanceof Bn;
1893
- n || ks.current.invalidate(s ?? w.getState().sandboxesByMode[_]?.sandboxId ?? null);
1894
+ n || As.current.invalidate(s ?? w.getState().sandboxesByMode[_]?.sandboxId ?? null);
1894
1895
  let r = Nn({
1895
1896
  turnId: x,
1896
- abortRequested: Ks.current.has(x),
1897
+ abortRequested: qs.current.has(x),
1897
1898
  activeTurnId: w.getState().processingByConversationId[v]?.messageId ?? null,
1898
1899
  conversationExists: ae()
1899
1900
  });
1900
1901
  if (ye(), s && c && le(s, c), r.abandon) {
1901
- r.clearProcessing && po(v);
1902
+ r.clearProcessing && mo(v);
1902
1903
  return;
1903
1904
  }
1904
- if (n) return we(), ho(v), be(), mn(x), Te(e, !0);
1905
+ if (n) return we(), go(v), be(), mn(x), Te(e, !0);
1905
1906
  if (e === 1 && Ce.canFailover() && jn(t)) {
1906
1907
  we();
1907
1908
  let e = s ?? w.getState().sandboxesByMode[_]?.sandboxId ?? null;
1908
- return e && (As.current.add(e), ks.current.invalidate(e)), ho(v), _o(_), co(v, x, ""), uo(v, x, { pendingWrite: void 0 }), e && K.retireSandbox(e), be(), Se(!0), mn(x), Te(2);
1909
+ return e && (js.current.add(e), As.current.invalidate(e)), go(v), vo(_), lo(v, x, ""), fo(v, x, { pendingWrite: void 0 }), e && K.retireSandbox(e), be(), Se(!0), mn(x), Te(2);
1909
1910
  }
1910
1911
  throw t;
1911
1912
  }
1912
1913
  }, Ee = v;
1913
- js.current.add(Ee);
1914
+ Ms.current.add(Ee);
1914
1915
  let De = zn();
1915
1916
  Hn();
1916
1917
  try {
@@ -1918,33 +1919,33 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1918
1919
  code: "UNAUTHENTICATED",
1919
1920
  authFailure: "WORKSPACE_CONTEXT_MISSING"
1920
1921
  } });
1921
- let e = await tr(_, () => Xo.current.find((e) => e.id === _), Yo);
1922
+ let e = await nr(_, () => Zo.current.find((e) => e.id === _), Xo);
1922
1923
  te = e.config, ne = e.capabilities;
1923
1924
  let t = te, n = ge();
1924
1925
  if (n.abandon) {
1925
- n.clearProcessing && po(v);
1926
+ n.clearProcessing && mo(v);
1926
1927
  return;
1927
1928
  }
1928
- let r = $n(_, t, w.getState().acknowledgedWriteModes, {
1929
+ let r = er(_, t, w.getState().acknowledgedWriteModes, {
1929
1930
  dictated: a,
1930
1931
  confirmsWrites: bt(_),
1931
- proposalBound: Ha(_)
1932
+ proposalBound: Ua(_)
1932
1933
  });
1933
1934
  if (r) throw new Jt(r, r === "confirm-write-mode" ? "Write mode not confirmed" : "Voice in a write mode");
1934
1935
  let i = wn("panel", L);
1935
- if (Ba && await On(i, y), Ba && Tn(i, y)) {
1936
- let e = await Dn(i, y, Ba);
1936
+ if (Va && await On(i, y), Va && Tn(i, y)) {
1937
+ let e = await Dn(i, y, Va);
1937
1938
  if (!e.ok) throw kn(e.kind);
1938
1939
  let t = ge();
1939
1940
  if (t.abandon) {
1940
- t.clearProcessing && po(v);
1941
+ t.clearProcessing && mo(v);
1941
1942
  return;
1942
1943
  }
1943
1944
  }
1944
1945
  E(x, "cleared"), await Te();
1945
1946
  } catch (e) {
1946
- if (ks.current.invalidate(w.getState().sandboxesByMode[_]?.sandboxId ?? null), !ae()) {
1947
- po(v);
1947
+ if (As.current.invalidate(w.getState().sandboxesByMode[_]?.sandboxId ?? null), !ae()) {
1948
+ mo(v);
1948
1949
  return;
1949
1950
  }
1950
1951
  let t = ve.session?.sandboxId ?? null, n = Yt(e, { confirmsNoAction: Xt({
@@ -1953,76 +1954,76 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
1953
1954
  }) });
1954
1955
  fn(x, { outcome: n.kind === "temporary" ? "failed" : "refused" }), n.offersUpgrade && Kt(L, "sandbox");
1955
1956
  let r = Zt(n, P, { locale: V });
1956
- fo(v, "error", x, r.headline), lo(v, x, { content: r.text }), uo(v, x, {
1957
+ po(v, "error", x, r.headline), uo(v, x, { content: r.text }), fo(v, x, {
1957
1958
  lang: r.translated ? V : "en",
1958
- ...pr(i.voiceSessionId)
1959
+ ...mr(i.voiceSessionId)
1959
1960
  });
1960
1961
  } finally {
1961
- we(), js.current.delete(Ee), fn(x, { outcome: "stopped" }), E(x, "complete"), Se(), be();
1962
+ we(), Ms.current.delete(Ee), fn(x, { outcome: "stopped" }), E(x, "complete"), Se(), be();
1962
1963
  let e = w.getState(), t = de(ie, _, e.conversations.find((e) => e.id === Ee), (t) => !!e.sandboxesByMode[t]?.sandboxId);
1963
- t && (So(Ee, t.mode), t.backendSessionId && mo(Ee, t.backendSessionId)), ve.session && ae() && K.afterTurn({
1964
+ t && (Co(Ee, t.mode), t.backendSessionId && ho(Ee, t.backendSessionId)), ve.session && ae() && K.afterTurn({
1964
1965
  ...ve.session,
1965
1966
  conversationId: Ee
1966
1967
  }, x);
1967
- let n = qs.current;
1968
- qs.current = null, n && n.conversationId === Ee && ae() && nl.current(n.content, n.attachments, n.options), De();
1968
+ let n = Js.current;
1969
+ Js.current = null, n && n.conversationId === Ee && ae() && rl.current(n.content, n.attachments, n.options), De();
1969
1970
  }
1970
1971
  }, [
1971
1972
  H,
1972
1973
  W,
1973
- Ra,
1974
- ho,
1975
- _o,
1976
- no,
1977
- so,
1978
- Rs,
1974
+ za,
1975
+ go,
1976
+ vo,
1977
+ ro,
1978
+ co,
1979
+ zs,
1979
1980
  K,
1980
- Ys,
1981
- Gc,
1982
- Qc,
1981
+ Xs,
1982
+ Kc,
1983
+ $c,
1983
1984
  V,
1984
- Qa,
1985
- Ha,
1986
- La,
1985
+ $a,
1987
1986
  Ua,
1987
+ Ra,
1988
1988
  Wa,
1989
- lo,
1989
+ Ga,
1990
+ uo,
1990
1991
  L,
1991
- Yo,
1992
- Ba,
1993
- eo,
1994
- V,
1992
+ Xo,
1993
+ Va,
1995
1994
  to,
1996
- $a,
1997
- So,
1998
- Zc,
1999
- Bc,
2000
- ws,
2001
- Ds,
2002
- mo,
2003
- ao,
2004
- fo,
1995
+ V,
1996
+ no,
1997
+ eo,
1998
+ Co,
1999
+ Qc,
2000
+ Vc,
2001
+ Ts,
2002
+ Os,
2003
+ ho,
2004
+ oo,
2005
2005
  po,
2006
+ mo,
2006
2007
  P,
2007
- Is,
2008
- co,
2008
+ Ls,
2009
+ lo,
2009
2010
  B,
2010
2011
  Z,
2011
- wc,
2012
- Wc,
2013
- Pc,
2012
+ Tc,
2013
+ Gc,
2014
+ Fc,
2015
+ oc,
2014
2016
  ac,
2015
- ic,
2016
2017
  F
2017
- ]), $c = D((e, t) => {
2018
+ ]), el = D((e, t) => {
2018
2019
  Q(e, [], t ? { autoIntent: t } : {});
2019
- }, [Q]), el = it(), tl = D(() => {
2020
- let e = [...Co.chat].reverse().find((e) => e.role === "user" && !e.metadata?.localAction);
2020
+ }, [Q]), tl = it(), nl = D(() => {
2021
+ let e = [...wo.chat].reverse().find((e) => e.role === "user" && !e.metadata?.localAction);
2021
2022
  if (!e || e.metadata?.approvalFollowUp) return;
2022
- let t = H ? Os.current[H] ?? [] : [], n = oa(e.metadata?.askAbout) ?? void 0, r = n ? { focus: n } : {};
2023
+ let t = H ? ks.current[H] ?? [] : [], n = sa(e.metadata?.askAbout) ?? void 0, r = n ? { focus: n } : {};
2023
2024
  if (t.some((e) => st(e, Date.now()))) {
2024
2025
  let n = H ?? void 0;
2025
- ct(t, el).then((t) => {
2026
+ ct(t, tl).then((t) => {
2026
2027
  Q(e.content, t, {
2027
2028
  ...n === void 0 ? {} : { targetConversationId: n },
2028
2029
  ...r
@@ -2030,143 +2031,143 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2030
2031
  });
2031
2032
  } else Q(e.content, t, r);
2032
2033
  }, [
2033
- wo,
2034
+ To,
2034
2035
  Q,
2035
2036
  H,
2036
- el
2037
- ]), nl = A(Q);
2037
+ tl
2038
+ ]), rl = A(Q);
2038
2039
  O(() => {
2039
- nl.current = Q;
2040
+ rl.current = Q;
2040
2041
  }, [Q]);
2041
- let rl = k(() => {
2042
- if (Eo) return null;
2043
- for (let e = wo.length - 1; e >= 0; --e) {
2044
- let t = wo[e];
2042
+ let il = k(() => {
2043
+ if (Do) return null;
2044
+ for (let e = To.length - 1; e >= 0; --e) {
2045
+ let t = To[e];
2045
2046
  if (t?.role !== "assistant") continue;
2046
- if (t.id === fc) return null;
2047
- if (!fr(t) || Ks.current.has(t.id) || Ft(t.id)) continue;
2048
- let n = nr(t, To, P);
2047
+ if (t.id === pc) return null;
2048
+ if (!pr(t) || qs.current.has(t.id) || Ft(t.id)) continue;
2049
+ let n = rr(t, Eo, P);
2049
2050
  if (n.kind !== "output") return null;
2050
2051
  let r = et(n.text).text.trim();
2051
- return r ? Dr(t, r, To) : null;
2052
+ return r ? Or(t, r, Eo) : null;
2052
2053
  }
2053
2054
  return null;
2054
2055
  }, [
2055
- wo,
2056
- Eo,
2057
2056
  To,
2058
- fc,
2057
+ Do,
2058
+ Eo,
2059
+ pc,
2059
2060
  P
2060
- ]), il = k(() => rl ? or(rl.text) : null, [rl]), al = k(() => Co.chat.filter((e) => e.id !== fc), [Co.chat, fc]), ol = k(() => I ? Co.all.filter((e) => e.id !== fc) : al, [
2061
+ ]), al = k(() => il ? sr(il.text) : null, [il]), ol = k(() => wo.chat.filter((e) => e.id !== pc), [wo.chat, pc]), sl = k(() => I ? wo.all.filter((e) => e.id !== pc) : ol, [
2061
2062
  I,
2062
- Co.all,
2063
- fc,
2064
- al
2065
- ]), [sl, cl] = j(null), ll = w((e) => ut(e)?.sandboxId ?? null), ul = Nr(al, {
2063
+ wo.all,
2064
+ pc,
2065
+ ol
2066
+ ]), [cl, ll] = j(null), ul = w((e) => ut(e)?.sandboxId ?? null), dl = Pr(ol, {
2066
2067
  sessionId: G?.backendSessionId,
2067
- sandboxId: ll,
2068
+ sandboxId: ul,
2068
2069
  nowMs: Date.now()
2069
- }), dl = Pr(al), fl = (e) => {
2070
+ }), fl = Fr(ol), pl = (e) => {
2070
2071
  if (ae(e.metadata).length > 0) return !0;
2071
2072
  let t = e.metadata?.sandboxId;
2072
- return oe(t ? ko[t] : null);
2073
- }, pl = (e) => {
2073
+ return oe(t ? Ao[t] : null);
2074
+ }, ml = (e) => {
2074
2075
  let t = ae(e.metadata);
2075
2076
  return t.length === 0 || !H ? null : /* @__PURE__ */ M(d, {
2076
2077
  refs: t,
2077
2078
  conversationId: H,
2078
2079
  panel: K,
2079
- entries: Ao,
2080
- capabilitiesOf: (e) => ko[e],
2081
- turnInFlight: Eo,
2080
+ entries: jo,
2081
+ capabilitiesOf: (e) => Ao[e],
2082
+ turnInFlight: Do,
2082
2083
  tr: P,
2083
- onReview: Mo.review,
2084
- retiredSandboxes: jo,
2084
+ onReview: No.review,
2085
+ retiredSandboxes: Mo,
2085
2086
  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."))
2086
2087
  });
2087
- }, ml = (e) => {
2088
+ }, hl = (e) => {
2088
2089
  if (!H) return null;
2089
2090
  let t = Z.liveOffersFor(e, {
2090
2091
  registry: {
2091
- destinations: Ur(sc),
2092
- permissionsSettled: cc,
2093
- simulating: lc
2092
+ destinations: Wr(cc),
2093
+ permissionsSettled: lc,
2094
+ simulating: uc
2094
2095
  },
2095
2096
  actorId: B,
2096
2097
  conversationId: H,
2097
2098
  perfNow: performance.now()
2098
2099
  }), n = t[0];
2099
- return n ? /* @__PURE__ */ M(Pi, {
2100
+ return n ? /* @__PURE__ */ M(Fi, {
2100
2101
  offers: t.map(({ offer: e, target: t }) => ({
2101
2102
  offerId: e.offerId,
2102
2103
  label: t.label,
2103
2104
  path: t.path
2104
2105
  })),
2105
- hint: t.length === 1 && z === "proposal-v1" ? ki(n.offer, Z.turnFor(e)) : "link",
2106
- onOpen: Nc
2106
+ hint: t.length === 1 && z === "proposal-v1" ? Ai(n.offer, Z.turnFor(e)) : "link",
2107
+ onOpen: Pc
2107
2108
  }, n.offer.offerId) : null;
2108
- }, hl = (e) => e.role === "assistant" ? ml(e.id) : null;
2109
+ }, gl = (e) => e.role === "assistant" ? hl(e.id) : null;
2109
2110
  O(() => {
2110
2111
  let e = Z.nextExpiryInMs(performance.now());
2111
2112
  if (e === null) return;
2112
- let t = window.setTimeout(wc, e + 1);
2113
+ let t = window.setTimeout(Tc, e + 1);
2113
2114
  return () => window.clearTimeout(t);
2114
2115
  }, [
2115
2116
  Z,
2116
- Sc,
2117
- wc
2117
+ Cc,
2118
+ Tc
2118
2119
  ]);
2119
- let gl = Mo.dialog.view ? Ao[Mo.dialog.view.proposalId] : void 0, _l = ul?.expiresAtMs ?? null;
2120
+ let _l = No.dialog.view ? jo[No.dialog.view.proposalId] : void 0, vl = dl?.expiresAtMs ?? null;
2120
2121
  O(() => {
2121
- if (_l === null) return;
2122
- let e = window.setTimeout(() => Gs((e) => e + 1), Math.max(0, _l - Date.now()));
2122
+ if (vl === null) return;
2123
+ let e = window.setTimeout(() => Ks((e) => e + 1), Math.max(0, vl - Date.now()));
2123
2124
  return () => window.clearTimeout(e);
2124
- }, [_l, Ws]);
2125
- let vl = k(() => Co.voice.filter((e) => e.id !== fc && (e.role === "user" || e.role === "assistant")).map((e) => ({
2125
+ }, [vl, Gs]);
2126
+ let yl = k(() => wo.voice.filter((e) => e.id !== pc && (e.role === "user" || e.role === "assistant")).map((e) => ({
2126
2127
  id: e.id,
2127
2128
  role: e.role,
2128
- text: ar(e, To, P),
2129
- sessionId: mr(e),
2129
+ text: or(e, Eo, P),
2130
+ sessionId: hr(e),
2130
2131
  timestamp: e.timestamp
2131
2132
  })).filter((e) => e.text.length > 0), [
2132
- Co.voice,
2133
- To,
2134
- fc,
2133
+ wo.voice,
2134
+ Eo,
2135
+ pc,
2135
2136
  P
2136
- ]), yl = D(() => {
2137
- if (vl.length === 0) return;
2137
+ ]), bl = D(() => {
2138
+ if (yl.length === 0) return;
2138
2139
  let e = /* @__PURE__ */ new Date();
2139
- ur(cr(vl, {
2140
+ dr(lr(yl, {
2140
2141
  title: P("voiceSession.transcript", "Voice conversation"),
2141
2142
  savedAt: P("voiceSession.savedAt", "Saved"),
2142
2143
  session: P("voiceSession.sessionLabel", "Session"),
2143
2144
  earlier: P("voiceSession.earlierLabel", "Earlier"),
2144
2145
  you: P("voiceSession.speakerYou", "You"),
2145
2146
  assistant: P("voiceSession.speakerAssistant", "Assistant")
2146
- }, e), lr(L, e), "text/markdown");
2147
+ }, e), ur(L, e), "text/markdown");
2147
2148
  }, [
2148
2149
  L,
2149
- vl,
2150
+ yl,
2150
2151
  P
2151
- ]), bl = rt({ perFileChars: ls }), xl = A(bl);
2152
- xl.current = bl;
2153
- let [Sl, Cl] = j(null), wl = Sl === null ? null : P("attachments.voiceDropped", "{{count}} attachment(s) couldn't be saved and weren't sent.", { count: Sl });
2152
+ ]), xl = rt({ perFileChars: us }), Sl = A(xl);
2153
+ Sl.current = xl;
2154
+ let [Cl, wl] = j(null), Tl = Cl === null ? null : P("attachments.voiceDropped", "{{count}} attachment(s) couldn't be saved and weren't sent.", { count: Cl });
2154
2155
  O(() => {
2155
- if (Sl === null) return;
2156
- let e = window.setTimeout(() => Cl(null), ha);
2156
+ if (Cl === null) return;
2157
+ let e = window.setTimeout(() => wl(null), ga);
2157
2158
  return () => window.clearTimeout(e);
2158
- }, [Sl]);
2159
- let Tl = A(/* @__PURE__ */ new Set()), El = A(() => !1), Dl = D((e, t, n, r) => {
2160
- let i = ys.current, a = Tr(i), o = () => {
2159
+ }, [Cl]);
2160
+ let El = A(/* @__PURE__ */ new Set()), Dl = A(() => !1), Ol = D((e, t, n, r) => {
2161
+ let i = bs.current, a = Er(i), o = () => {
2161
2162
  let e = w.getState();
2162
- return yr({
2163
- sessionLive: El.current(t),
2163
+ return br({
2164
+ sessionLive: Dl.current(t),
2164
2165
  boundAtSubmit: i,
2165
2166
  activeConversationId: e.activeConversationId,
2166
2167
  boundConversationExists: e.conversations.some((e) => e.id === a)
2167
2168
  });
2168
2169
  }, s = () => {
2169
- let i = xl.current;
2170
+ let i = Sl.current;
2170
2171
  ot({
2171
2172
  draft: i,
2172
2173
  maySend: o,
@@ -2176,18 +2177,18 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2176
2177
  ...n,
2177
2178
  handedOver: hn()
2178
2179
  };
2179
- nl.current(e, i, {
2180
+ rl.current(e, i, {
2180
2181
  fromPerson: !0,
2181
2182
  voiceSessionId: t,
2182
2183
  voiceTiming: a,
2183
2184
  ...r.correction ? { correctsInFlightTurn: !0 } : {}
2184
2185
  });
2185
2186
  },
2186
- announceDropped: (e) => Cl(e)
2187
+ announceDropped: (e) => wl(e)
2187
2188
  });
2188
2189
  };
2189
- if (o() && Uc.current(e, t)) {
2190
- nl.current(e, [], {
2190
+ if (o() && Wc.current(e, t)) {
2191
+ rl.current(e, [], {
2191
2192
  fromPerson: !0,
2192
2193
  voiceSessionId: t,
2193
2194
  voiceTiming: {
@@ -2197,107 +2198,107 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2197
2198
  });
2198
2199
  return;
2199
2200
  }
2200
- if (!xl.current.isBusy) {
2201
+ if (!Sl.current.isBusy) {
2201
2202
  s();
2202
2203
  return;
2203
2204
  }
2204
- let c = Date.now(), l = Tl.current, u = window.setInterval(() => {
2205
- let e = xl.current.isBusy;
2206
- xl.current.isCommitting || e && Date.now() - c < ma || (window.clearInterval(u), l.delete(u), s());
2205
+ let c = Date.now(), l = El.current, u = window.setInterval(() => {
2206
+ let e = Sl.current.isBusy;
2207
+ Sl.current.isCommitting || e && Date.now() - c < ha || (window.clearInterval(u), l.delete(u), s());
2207
2208
  }, 200);
2208
2209
  l.add(u);
2209
- }, []), Ol = A(() => void 0), $ = tt({
2210
- onSubmit: Dl,
2211
- latestReply: rl,
2212
- language: o(Xa, V).tag,
2213
- graceMs: Ka,
2214
- onSupersede: Xs,
2215
- handsFreeStreamNoticeAccepted: Ja,
2216
- onAcceptHandsFreeStreamNotice: Ya,
2217
- handsFreeInterrupt: qa,
2210
+ }, []), kl = A(() => void 0), $ = tt({
2211
+ onSubmit: Ol,
2212
+ latestReply: il,
2213
+ language: o(Za, V).tag,
2214
+ graceMs: qa,
2215
+ onSupersede: Zs,
2216
+ handsFreeStreamNoticeAccepted: Ya,
2217
+ onAcceptHandsFreeStreamNotice: Xa,
2218
+ handsFreeInterrupt: Ja,
2218
2219
  onBargeIn: () => {
2219
- Ol.current(), Ys();
2220
+ kl.current(), Xs();
2220
2221
  }
2221
2222
  });
2222
- El.current = $.isCurrentSession;
2223
- let kl = bs ? vl.filter((e) => e.sessionId !== void 0 && $.isCurrentSession(e.sessionId)) : vl, Al = $.answerLocally;
2223
+ Dl.current = $.isCurrentSession;
2224
+ let Al = xs ? yl.filter((e) => e.sessionId !== void 0 && $.isCurrentSession(e.sessionId)) : yl, jl = $.answerLocally;
2224
2225
  O(() => {
2225
- Kc.current = Al;
2226
- }, [Al]);
2227
- let jl = $.active, Ml = k(() => v(Object.values(Ao), H, jo), [
2228
- Ao,
2226
+ qc.current = jl;
2227
+ }, [jl]);
2228
+ let Ml = $.active, Nl = k(() => v(Object.values(jo), H, Mo), [
2229
+ jo,
2229
2230
  H,
2230
- jo
2231
- ]), [Nl, Pl] = j(null);
2231
+ Mo
2232
+ ]), [Pl, Fl] = j(null);
2232
2233
  O(() => {
2233
- jl || Pl(null);
2234
- }, [jl]);
2235
- let Fl = Mo.review, Il = D(() => {
2236
- let e = Ml[Ml.length - 1];
2234
+ Ml || Fl(null);
2235
+ }, [Ml]);
2236
+ let Il = No.review, Ll = D(() => {
2237
+ let e = Nl[Nl.length - 1];
2237
2238
  if (!e) return;
2238
2239
  let { view: t } = e;
2239
- f(t) && m(t, ko[e.session.sandboxId]).offerConfirm ? Fl(t) : Pl(t.proposalId);
2240
+ f(t) && m(t, Ao[e.session.sandboxId]).offerConfirm ? Il(t) : Fl(t.proposalId);
2240
2241
  }, [
2241
- Ml,
2242
- ko,
2243
- Fl
2244
- ]), Ll = jl ? _(Ml) : null, Rl = Nl ? Ao[Nl] : void 0, zl = jl && Rl && Rl.session.conversationId === H ? {
2242
+ Nl,
2243
+ Ao,
2244
+ Il
2245
+ ]), Rl = Ml ? _(Nl) : null, zl = Pl ? jo[Pl] : void 0, Bl = Ml && zl && zl.session.conversationId === H ? {
2245
2246
  content: /* @__PURE__ */ M(d, {
2246
2247
  refs: [{
2247
- proposalId: Rl.view.proposalId,
2248
- sandboxId: Rl.session.sandboxId,
2249
- sessionId: Rl.session.sessionId
2248
+ proposalId: zl.view.proposalId,
2249
+ sandboxId: zl.session.sandboxId,
2250
+ sessionId: zl.session.sessionId
2250
2251
  }],
2251
- conversationId: Rl.session.conversationId,
2252
+ conversationId: zl.session.conversationId,
2252
2253
  panel: K,
2253
- entries: Ao,
2254
- capabilitiesOf: (e) => ko[e],
2255
- turnInFlight: Eo,
2254
+ entries: jo,
2255
+ capabilitiesOf: (e) => Ao[e],
2256
+ turnInFlight: Do,
2256
2257
  tr: P,
2257
- onReview: Fl,
2258
- retiredSandboxes: jo
2258
+ onReview: Il,
2259
+ retiredSandboxes: Mo
2259
2260
  }),
2260
2261
  closeLabel: re(P, h.trayClose),
2261
- onClose: () => Pl(null)
2262
- } : null, Bl = Mo.asking, Vl = Ic?.asking === !0, Hl = Lc?.asking === !0, Ul = hi(), Wl = $.holdListening, Gl = k(() => jl || J ? null : { run: () => ms ? { status: "already" } : (vs(!0), { status: "done" }) }, [
2263
- jl,
2262
+ onClose: () => Fl(null)
2263
+ } : null, Vl = No.asking, Hl = Lc?.asking === !0, Ul = Rc?.asking === !0, Wl = gi(), Gl = $.holdListening, Kl = k(() => Ml || J ? null : { run: () => hs ? { status: "already" } : (ys(!0), { status: "done" }) }, [
2264
+ Ml,
2264
2265
  J,
2265
- ms,
2266
- vs
2266
+ hs,
2267
+ ys
2267
2268
  ]);
2268
- pi("assistant.transcript", Gl);
2269
- let Kl = k(() => jl ? null : { run: () => {
2269
+ mi("assistant.transcript", Kl);
2270
+ let ql = k(() => Ml ? null : { run: () => {
2270
2271
  let e = w.getState(), t = e.conversations.find((t) => t.id === e.activeConversationId);
2271
2272
  return t && t.messages.length === 0 ? { status: "already" } : (e.createConversation(), { status: "done" });
2272
- } }, [jl]);
2273
- pi("assistant.conversation.new", Kl), O(() => {
2274
- Wl(jl && (Bl || Vl || Hl || Ul));
2273
+ } }, [Ml]);
2274
+ mi("assistant.conversation.new", ql), O(() => {
2275
+ Gl(Ml && (Vl || Hl || Ul || Wl));
2275
2276
  }, [
2276
- jl,
2277
- Bl,
2277
+ Ml,
2278
2278
  Vl,
2279
2279
  Hl,
2280
2280
  Ul,
2281
- Wl
2281
+ Wl,
2282
+ Gl
2282
2283
  ]);
2283
- let ql = A(null), Jl = $.announce;
2284
+ let Jl = A(null), Yl = $.announce;
2284
2285
  O(() => {
2285
- if (!jl) {
2286
- ql.current = null;
2286
+ if (!Ml) {
2287
+ Jl.current = null;
2287
2288
  return;
2288
2289
  }
2289
- let e = ql.current;
2290
- if (e === null) ql.current = new Set(Object.keys(Ao));
2291
- else for (let { view: t, session: n } of ne(Ml, e)) {
2290
+ let e = Jl.current;
2291
+ if (e === null) Jl.current = new Set(Object.keys(jo));
2292
+ else for (let { view: t, session: n } of ne(Nl, e)) {
2292
2293
  e.add(t.proposalId);
2293
- let r = ko[n.sandboxId];
2294
+ let r = Ao[n.sandboxId];
2294
2295
  if (!g({
2295
2296
  mode: "api-calls",
2296
2297
  productWriteApproval: z,
2297
2298
  capabilities: r
2298
2299
  })) continue;
2299
2300
  let i = ie(t, m(t, r).offerConfirm, P), a = t.proposalId;
2300
- Jl({
2301
+ Yl({
2301
2302
  id: `write-readback:${a}`,
2302
2303
  text: i.text,
2303
2304
  lang: i.translated ? V : "en",
@@ -2305,449 +2306,449 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2305
2306
  });
2306
2307
  }
2307
2308
  }, [
2308
- jl,
2309
2309
  Ml,
2310
+ Nl,
2311
+ jo,
2310
2312
  Ao,
2311
- ko,
2312
2313
  z,
2313
2314
  P,
2314
2315
  V,
2315
- Jl,
2316
+ Yl,
2316
2317
  K
2317
2318
  ]);
2318
- let Yl = A(!1);
2319
+ let Xl = A(!1);
2319
2320
  O(() => {
2320
- Yl.current = $.active;
2321
- }, [$.active]), O(() => Qi((e) => {
2322
- if (!Yl.current) return !1;
2323
- let t = ys.current;
2321
+ Xl.current = $.active;
2322
+ }, [$.active]), O(() => $i((e) => {
2323
+ if (!Xl.current) return !1;
2324
+ let t = bs.current;
2324
2325
  return typeof t == "string" ? t === e : w.getState().activeConversationId === e;
2325
2326
  }), []);
2326
- let Xl = $.start, Zl = D(() => {
2327
- let e = w.getState().activeConversationId, t = Sr(Ds());
2328
- ws(wr(t, e)), zs(!0, t.kind === "own"), Xl();
2327
+ let Zl = $.start, Ql = D(() => {
2328
+ let e = w.getState().activeConversationId, t = Cr(Os());
2329
+ Ts(Tr(t, e)), Bs(!0, t.kind === "own"), Zl();
2329
2330
  }, [
2330
- ws,
2331
- zs,
2332
- Ds,
2333
- Xl
2334
- ]), Ql = k(() => ir(G?.messages ?? []), [G?.messages]), $l = rr(Co.voice, To, P), eu = rr(Ql, To, P) > 0, tu = D(() => {
2331
+ Ts,
2332
+ Bs,
2333
+ Os,
2334
+ Zl
2335
+ ]), $l = k(() => ar(G?.messages ?? []), [G?.messages]), eu = ir(wo.voice, Eo, P), tu = ir($l, Eo, P) > 0, nu = D(() => {
2335
2336
  let e = w.getState().activeConversationId;
2336
- if (!e || vl.length === 0) return;
2337
- let t = new Set(Ql.map((e) => e.id)), n = N();
2337
+ if (!e || yl.length === 0) return;
2338
+ let t = new Set($l.map((e) => e.id)), n = N();
2338
2339
  W(e, {
2339
2340
  id: n,
2340
2341
  role: "system",
2341
- content: sr(vl.filter((e) => t.has(e.id)), {
2342
+ content: cr(yl.filter((e) => t.has(e.id)), {
2342
2343
  intro: P("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
2343
2344
  nothing: P("voiceSession.continuedNothing", "Continued from a voice conversation."),
2344
2345
  more: (e) => P("voiceSession.continuedMore", "…and {{count}} more", { count: e })
2345
2346
  }),
2346
2347
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2347
- metadata: { continuedVoiceTurns: $l }
2348
- }), Ui.recordCommittedEntries(e, [n], "NOTE", T()), vs(!1), $.end(), gs(), ja?.();
2348
+ metadata: { continuedVoiceTurns: eu }
2349
+ }), Wi.recordCommittedEntries(e, [n], "NOTE", T()), ys(!1), $.end(), _s(), Ma?.();
2349
2350
  }, [
2350
- vl,
2351
+ yl,
2352
+ eu,
2351
2353
  $l,
2352
- Ql,
2353
2354
  W,
2354
2355
  P,
2355
2356
  $,
2356
- vs,
2357
- gs,
2358
- ja
2359
- ]), nu = A({
2357
+ ys,
2358
+ _s,
2359
+ Ma
2360
+ ]), ru = A({
2360
2361
  conversationId: null,
2361
2362
  count: 0
2362
2363
  });
2363
2364
  O(() => {
2364
- $.active && (nu.current = {
2365
+ $.active && (ru.current = {
2365
2366
  conversationId: H,
2366
- count: $l
2367
+ count: eu
2367
2368
  });
2368
2369
  }, [$.active]);
2369
- let [ru, iu] = j({}), [au, ou] = j({}), su = A(null), cu = $.active;
2370
+ let [iu, au] = j({}), [ou, su] = j({}), cu = A(null), lu = $.active;
2370
2371
  O(() => {
2371
2372
  if (!I) return;
2372
- if (cu) {
2373
- su.current ??= {
2373
+ if (lu) {
2374
+ cu.current ??= {
2374
2375
  startedAt: Date.now(),
2375
2376
  sessionId: null
2376
2377
  };
2377
2378
  return;
2378
2379
  }
2379
- let e = su.current;
2380
- su.current = null;
2380
+ let e = cu.current;
2381
+ cu.current = null;
2381
2382
  let t = e?.sessionId;
2382
2383
  if (e && t) {
2383
2384
  let n = Math.max(1, Math.round((Date.now() - e.startedAt) / 1e3));
2384
- ou((e) => ({
2385
+ su((e) => ({
2385
2386
  ...e,
2386
2387
  [t]: n
2387
2388
  }));
2388
2389
  }
2389
- }, [I, cu]);
2390
- let lu = $.isCurrentSession;
2390
+ }, [I, lu]);
2391
+ let uu = $.isCurrentSession;
2391
2392
  O(() => {
2392
- let e = su.current;
2393
+ let e = cu.current;
2393
2394
  if (!I || !e || e.sessionId) return;
2394
- let t = vl.find((e) => e.sessionId !== void 0 && lu(e.sessionId));
2395
+ let t = yl.find((e) => e.sessionId !== void 0 && uu(e.sessionId));
2395
2396
  t?.sessionId && (e.sessionId = t.sessionId);
2396
2397
  }, [
2397
2398
  I,
2398
- vl,
2399
- lu
2399
+ yl,
2400
+ uu
2400
2401
  ]);
2401
- let uu = $.session.phase, du = ol[ol.length - 1], fu = I && $.active && (uu === "thinking" || uu === "speaking") && du?.role === "assistant" && fr(du) ? du.id : null, pu = $.spokenChunks, mu = fu !== null && ec === fu && pu ? _r(du?.content ?? "", pu.chunks.slice(0, pu.index + 1).join(" ").length) : null, [hu, gu] = j({});
2402
- fu !== null && mu !== null && mu.length > (hu[fu]?.length ?? 0) && gu({
2403
- ...hu,
2404
- [fu]: mu
2402
+ let du = $.session.phase, fu = sl[sl.length - 1], pu = I && $.active && (du === "thinking" || du === "speaking") && fu?.role === "assistant" && pr(fu) ? fu.id : null, mu = $.spokenChunks, hu = pu !== null && tc === pu && mu ? vr(fu?.content ?? "", mu.chunks.slice(0, mu.index + 1).join(" ").length) : null, [gu, _u] = j({});
2403
+ pu !== null && hu !== null && hu.length > (gu[pu]?.length ?? 0) && _u({
2404
+ ...gu,
2405
+ [pu]: hu
2405
2406
  });
2406
- let _u = fu === null ? null : hu[fu] ?? "", vu = D(() => {
2407
- if (fu === null || _u === null || !H) return;
2407
+ let vu = pu === null ? null : gu[pu] ?? "", yu = D(() => {
2408
+ if (pu === null || vu === null || !H) return;
2408
2409
  let e = w.getState();
2409
- if (_u === "") {
2410
- e.mergeMessageMetadata(H, fu, { voiceNotSpoken: !0 });
2410
+ if (vu === "") {
2411
+ e.mergeMessageMetadata(H, pu, { voiceNotSpoken: !0 });
2411
2412
  return;
2412
2413
  }
2413
- if (ec !== fu) return;
2414
- let t = _u;
2415
- iu((e) => ({
2414
+ if (tc !== pu) return;
2415
+ let t = vu;
2416
+ au((e) => ({
2416
2417
  ...e,
2417
- [fu]: t
2418
- })), e.mergeMessageMetadata(H, fu, {
2418
+ [pu]: t
2419
+ })), e.mergeMessageMetadata(H, pu, {
2419
2420
  voiceInterrupted: !0,
2420
2421
  voiceSpokenText: t
2421
2422
  });
2422
2423
  }, [
2423
- fu,
2424
- _u,
2424
+ pu,
2425
+ vu,
2425
2426
  H,
2426
- ec
2427
+ tc
2427
2428
  ]);
2428
2429
  O(() => {
2429
- Ol.current = vu;
2430
- }, [vu]);
2431
- let yu = (e, t, n) => {
2432
- if (!fr(e)) return;
2433
- let r = mr(e), i = n[t + 1], a = $.active && r !== void 0 && lu(r), o = (!i || !fr(i) || mr(i) !== r) && !a ? /* @__PURE__ */ M(hr, { seconds: r ? au[r] : void 0 }) : null;
2434
- if (e.role === "user") return { below: /* @__PURE__ */ da(ua, { children: [/* @__PURE__ */ M(gr, { mark: "spoken" }), o] }) };
2430
+ kl.current = yu;
2431
+ }, [yu]);
2432
+ let bu = (e, t, n) => {
2433
+ if (!pr(e)) return;
2434
+ let r = hr(e), i = n[t + 1], a = $.active && r !== void 0 && uu(r), o = (!i || !pr(i) || hr(i) !== r) && !a ? /* @__PURE__ */ M(gr, { seconds: r ? ou[r] : void 0 }) : null;
2435
+ if (e.role === "user") return { below: /* @__PURE__ */ fa(da, { children: [/* @__PURE__ */ M(_r, { mark: "spoken" }), o] }) };
2435
2436
  if (e.role !== "assistant") return o ? { below: o } : void 0;
2436
- let s = ru[e.id] ?? (e.metadata?.voiceInterrupted ? e.metadata.voiceSpokenText : void 0);
2437
+ let s = iu[e.id] ?? (e.metadata?.voiceInterrupted ? e.metadata.voiceSpokenText : void 0);
2437
2438
  if (s !== void 0) return {
2438
2439
  content: s,
2439
- below: /* @__PURE__ */ da(ua, { children: [/* @__PURE__ */ M(gr, { mark: "interrupted" }), o] })
2440
+ below: /* @__PURE__ */ fa(da, { children: [/* @__PURE__ */ M(_r, { mark: "interrupted" }), o] })
2440
2441
  };
2441
- if (e.id === fu && _u !== null) return { content: _u };
2442
- let c = a || r !== void 0 && au[r] !== void 0;
2443
- return e.content.trim() !== "" && (c ? hu[e.id] !== void 0 : !e.metadata?.voiceNotSpoken) ? { below: /* @__PURE__ */ da(ua, { children: [/* @__PURE__ */ M(gr, { mark: "spokenAloud" }), o] }) } : o ? { below: o } : void 0;
2444
- }, bu = D(() => {
2445
- let e = nu.current, t = e.conversationId === H ? e.count : 0, n = $l > t;
2446
- $.end(), n && vs(!0), vu();
2442
+ if (e.id === pu && vu !== null) return { content: vu };
2443
+ let c = a || r !== void 0 && ou[r] !== void 0;
2444
+ return e.content.trim() !== "" && (c ? gu[e.id] !== void 0 : !e.metadata?.voiceNotSpoken) ? { below: /* @__PURE__ */ fa(da, { children: [/* @__PURE__ */ M(_r, { mark: "spokenAloud" }), o] }) } : o ? { below: o } : void 0;
2445
+ }, xu = D(() => {
2446
+ let e = ru.current, t = e.conversationId === H ? e.count : 0, n = eu > t;
2447
+ $.end(), n && ys(!0), yu();
2447
2448
  }, [
2448
2449
  H,
2449
- $l,
2450
+ eu,
2450
2451
  $,
2451
- vs,
2452
- vu
2452
+ ys,
2453
+ yu
2453
2454
  ]);
2454
2455
  O(() => {
2455
- Ca && Fs || !$.active || $.end();
2456
+ wa && Is || !$.active || $.end();
2456
2457
  }, [
2457
- Ca,
2458
- Fs,
2458
+ wa,
2459
+ Is,
2459
2460
  $
2460
2461
  ]);
2461
- let [xu, Su] = j(va), Cu = Je({
2462
+ let [Su, Cu] = j(ya), wu = Je({
2462
2463
  available: $.available,
2463
- allowedInMode: Fs,
2464
- readOnly: Fo,
2465
- busy: Eo || Us !== null || Lo || vc,
2466
- committing: xu.committing,
2467
- dictating: xu.dictating
2468
- }), wu = qe();
2469
- ca(() => {
2470
- ka?.({ live: $.active });
2471
- }, [ka, $.active]);
2472
- let Tu = A(!1), Eu = D(() => {
2473
- Tu.current = !0, Aa?.({ review: !0 });
2474
- }, [Aa]);
2464
+ allowedInMode: Is,
2465
+ readOnly: Io,
2466
+ busy: Do || Ws !== null || Ro || yc,
2467
+ committing: Su.committing,
2468
+ dictating: Su.dictating
2469
+ }), Tu = qe();
2470
+ la(() => {
2471
+ Aa?.({ live: $.active });
2472
+ }, [Aa, $.active]);
2473
+ let Eu = A(!1), Du = D(() => {
2474
+ Eu.current = !0, ja?.({ review: !0 });
2475
+ }, [ja]);
2475
2476
  O(() => {
2476
- !Ia && Tu.current && (Tu.current = !1, Me(hd.current));
2477
- }, [Ia]);
2478
- let Du = $.active;
2477
+ !La && Eu.current && (Eu.current = !1, Me(gd.current));
2478
+ }, [La]);
2479
+ let Ou = $.active;
2479
2480
  O(() => {
2480
- if (!Du) Es.current = !1, Ts.current = null;
2481
- else if (bs) {
2482
- let e = ys.current;
2483
- vr(e) && (Ts.current = e.openAtStart), Es.current = !0;
2484
- } else Es.current && (Es.current = !1, F && Ae({
2481
+ if (!Ou) Ds.current = !1, Es.current = null;
2482
+ else if (xs) {
2483
+ let e = bs.current;
2484
+ yr(e) && (Es.current = e.openAtStart), Ds.current = !0;
2485
+ } else Ds.current && (Ds.current = !1, F && Ae({
2485
2486
  pending: "own",
2486
- openAtStart: Ts.current
2487
- }, ys.current) && Cs(!0));
2487
+ openAtStart: Es.current
2488
+ }, bs.current) && ws(!0));
2488
2489
  }, [
2489
- bs,
2490
- Du,
2490
+ xs,
2491
+ Ou,
2491
2492
  F
2492
- ]), Ss && !$.active && Cs(!1);
2493
- let [Ou, ku] = j(null);
2493
+ ]), Cs && !$.active && ws(!1);
2494
+ let [ku, Au] = j(null);
2494
2495
  O(() => {
2495
- Ou !== null && (J && Ou.conversationId === H || ku(null));
2496
+ ku !== null && (J && ku.conversationId === H || Au(null));
2496
2497
  }, [
2497
2498
  J,
2498
2499
  H,
2499
- Ou
2500
+ ku
2500
2501
  ]);
2501
- let Au = Ou !== null && ec === Ou.replyId, ju = A(!1), Mu = D(() => {
2502
- ju.current = !0, Au && tc(), Zl();
2502
+ let ju = ku !== null && tc === ku.replyId, Mu = A(!1), Nu = D(() => {
2503
+ Mu.current = !0, ju && nc(), Ql();
2503
2504
  }, [
2504
- Zl,
2505
- Au,
2506
- tc
2507
- ]), Nu = D(() => {
2508
- Au && tc(), Zl();
2505
+ Ql,
2506
+ ju,
2507
+ nc
2508
+ ]), Pu = D(() => {
2509
+ ju && nc(), Ql();
2509
2510
  }, [
2510
- Zl,
2511
- Au,
2512
- tc
2511
+ Ql,
2512
+ ju,
2513
+ nc
2513
2514
  ]);
2514
2515
  O(() => {
2515
- $.active || (ju.current = !1);
2516
+ $.active || (Mu.current = !1);
2516
2517
  }, [$.active]), O(() => {
2517
- !J && ju.current && (ju.current = !1, $.active && bu());
2518
+ !J && Mu.current && (Mu.current = !1, $.active && xu());
2518
2519
  }, [
2519
2520
  J,
2520
2521
  $.active,
2521
- bu
2522
+ xu
2522
2523
  ]), O(() => {
2523
- J && vs(!1);
2524
- }, [J, vs]);
2525
- let Pu = k(() => ({
2524
+ J && ys(!1);
2525
+ }, [J, ys]);
2526
+ let Fu = k(() => ({
2526
2527
  live: $.active,
2527
- blocked: Cu === null ? null : wu.voiceStartBlocked(Cu),
2528
- impossible: Ye(Cu),
2529
- start: F ? Nu : Mu
2528
+ blocked: wu === null ? null : Tu.voiceStartBlocked(wu),
2529
+ impossible: Ye(wu),
2530
+ start: F ? Pu : Nu
2530
2531
  }), [
2531
2532
  $.active,
2532
- Cu,
2533
2533
  wu,
2534
+ Tu,
2534
2535
  F,
2535
- Nu,
2536
- Mu
2537
- ]), [Fu, Iu] = j("mini"), [Lu, Ru] = j(!1), zu = Ia && $.active && (Lu || J);
2538
- zu !== Lu && Ru(zu);
2539
- let Bu = F && !I && $.active && !J && (!Ia || Lu), Vu = Ca && q.covered !== !0 && !($.active && Fu !== "mini") && !(ms && !$.active) && !(Bl || Vl || Hl || Ul), Hu = hs?.ask, Uu = la(Hu?.subscribe ?? ba, Hu?.getSnapshot ?? xa, Hu?.getSnapshot ?? xa), Wu = Xe({
2536
+ Pu,
2537
+ Nu
2538
+ ]), [Iu, Lu] = j("mini"), [Ru, zu] = j(!1), Bu = La && $.active && (Ru || J);
2539
+ Bu !== Ru && zu(Bu);
2540
+ let Vu = F && !I && $.active && !J && (!La || Ru), Hu = wa && q.covered !== !0 && !($.active && Iu !== "mini") && !(hs && !$.active) && !(Vl || Hl || Ul || Wl), Uu = gs?.ask, Wu = ua(Uu?.subscribe ?? xa, Uu?.getSnapshot ?? Sa, Uu?.getSnapshot ?? Sa), Gu = Xe({
2540
2541
  voiceLive: $.active,
2541
- readOnly: Fo,
2542
+ readOnly: Io,
2542
2543
  writes: Ze({
2543
- auto: rs,
2544
+ auto: is,
2544
2545
  selectedMode: U,
2545
- conversation: G && !Fo ? {
2546
+ conversation: G && !Io ? {
2546
2547
  mode: G.mode,
2547
2548
  routedBy: G.routedBy,
2548
- hasHistory: Wi(G)
2549
+ hasHistory: Gi(G)
2549
2550
  } : null,
2550
2551
  modeWrites: (e) => R.find((t) => t.id === e)?.writeCapable === !0 || bt(e)
2551
2552
  }),
2552
- avatar: Uu,
2553
- busy: Eo || Us !== null || Lo || vc || us !== null || ss,
2554
- committing: xu.committing
2555
- }), Gu = A(Wu);
2556
- ca(() => {
2557
- Gu.current = Wu;
2558
- }, [Wu]);
2559
- let Ku = D((e) => {
2553
+ avatar: Wu,
2554
+ busy: Do || Ws !== null || Ro || yc || ds !== null || cs,
2555
+ committing: Su.committing
2556
+ }), Ku = A(Gu);
2557
+ la(() => {
2558
+ Ku.current = Gu;
2559
+ }, [Gu]);
2560
+ let qu = D((e) => {
2560
2561
  let t = e.trim();
2561
- if (t === "" || Gu.current !== null) return { accepted: !1 };
2562
- Au && tc();
2562
+ if (t === "" || Ku.current !== null) return { accepted: !1 };
2563
+ ju && nc();
2563
2564
  let n = {
2564
2565
  token: N(),
2565
2566
  exchange: null,
2566
2567
  handled: !1
2567
2568
  };
2568
- nc.current = n;
2569
+ rc.current = n;
2569
2570
  try {
2570
2571
  Q(t, [], {
2571
2572
  fromPerson: !0,
2572
2573
  avatarTabAsk: n.token,
2573
2574
  localRecordsChecked: !0,
2574
- ...rs ? { autoIntent: "read" } : {}
2575
+ ...is ? { autoIntent: "read" } : {}
2575
2576
  });
2576
2577
  } finally {
2577
- nc.current = null;
2578
+ rc.current = null;
2578
2579
  }
2579
2580
  let r = n.exchange;
2580
2581
  return r === null ? n.handled ? {
2581
2582
  accepted: !0,
2582
2583
  recorded: !1
2583
- } : { accepted: !1 } : (ku(r), {
2584
+ } : { accepted: !1 } : (Au(r), {
2584
2585
  accepted: !0,
2585
2586
  recorded: !0,
2586
2587
  ...r
2587
2588
  });
2588
2589
  }, [
2589
- rs,
2590
+ is,
2590
2591
  Q,
2591
- tc,
2592
- Au
2593
- ]), [qu] = j(() => $e()), Ju = k(() => ({
2594
- blocker: Wu,
2595
- line: Qe(Wu, Cu),
2596
- send: Ku,
2597
- last: Ou,
2598
- navigatingReplyId: bc,
2599
- draft: qu
2592
+ nc,
2593
+ ju
2594
+ ]), [Ju] = j(() => $e()), Yu = k(() => ({
2595
+ blocker: Gu,
2596
+ line: Qe(Gu, wu),
2597
+ send: qu,
2598
+ last: ku,
2599
+ navigatingReplyId: xc,
2600
+ draft: Ju
2600
2601
  }), [
2601
- Wu,
2602
- Cu,
2603
- Ku,
2604
- Ou,
2605
- bc,
2606
- qu
2607
- ]), Yu = q.setReplyEscape, Xu = J && Vu && Au;
2602
+ Gu,
2603
+ wu,
2604
+ qu,
2605
+ ku,
2606
+ xc,
2607
+ Ju
2608
+ ]), Xu = q.setReplyEscape, Zu = J && Hu && ju;
2608
2609
  O(() => {
2609
- if (Yu && Xu) return Yu(tc), () => Yu(null);
2610
+ if (Xu && Zu) return Xu(nc), () => Xu(null);
2610
2611
  }, [
2611
- Yu,
2612
2612
  Xu,
2613
- tc
2613
+ Zu,
2614
+ nc
2614
2615
  ]), O(() => {
2615
- let e = ys.current, t = Tr(e), n = w.getState(), r = xr({
2616
+ let e = bs.current, t = Er(e), n = w.getState(), r = Sr({
2616
2617
  sessionLive: $.active,
2617
2618
  bound: e,
2618
2619
  activeConversationId: n.activeConversationId,
2619
2620
  boundConversationExists: n.conversations.some((e) => e.id === t)
2620
2621
  });
2621
- ws(r.bound), r.end && $.end();
2622
+ Ts(r.bound), r.end && $.end();
2622
2623
  }, [
2623
2624
  $,
2624
2625
  H,
2625
- no,
2626
- ws
2626
+ ro,
2627
+ Ts
2627
2628
  ]), O(() => {
2628
- let e = br(Er.read(), {
2629
+ let e = xr(Dr.read(), {
2629
2630
  activeConversationId: H,
2630
- chatTurnCount: al.length,
2631
- voiceTurnCount: vl.length,
2631
+ chatTurnCount: ol.length,
2632
+ voiceTurnCount: yl.length,
2632
2633
  sessionLive: $.active,
2633
- sessionBoundTo: ys.current,
2634
- turnInFlight: Eo
2634
+ sessionBoundTo: bs.current,
2635
+ turnInFlight: Do
2635
2636
  });
2636
- Er.write(e.state), e.open && vs(!0);
2637
+ Dr.write(e.state), e.open && ys(!0);
2637
2638
  }, [
2638
2639
  H,
2639
- al.length,
2640
- vl.length,
2640
+ ol.length,
2641
+ yl.length,
2641
2642
  $.active,
2642
- Eo,
2643
- vs
2643
+ Do,
2644
+ ys
2644
2645
  ]), O(() => {
2645
2646
  if (!$.active) {
2646
- xl.current.clear(), Cl(null), qs.current = null;
2647
- for (let e of Tl.current) window.clearInterval(e);
2648
- Tl.current.clear();
2647
+ Sl.current.clear(), wl(null), Js.current = null;
2648
+ for (let e of El.current) window.clearInterval(e);
2649
+ El.current.clear();
2649
2650
  }
2650
2651
  }, [$.active]), O(() => {
2651
- let e = Tl.current;
2652
+ let e = El.current;
2652
2653
  return () => {
2653
2654
  for (let t of e) window.clearInterval(t);
2654
2655
  e.clear();
2655
2656
  };
2656
2657
  }, []), O(() => {
2657
2658
  let e = w.getState().consumePendingPrompt();
2658
- return e && nl.current(e), w.subscribe((e, t) => {
2659
+ return e && rl.current(e), w.subscribe((e, t) => {
2659
2660
  if (e.pendingPrompt && e.pendingPrompt !== t.pendingPrompt) {
2660
2661
  let e = w.getState().consumePendingPrompt();
2661
- e && nl.current(e);
2662
+ e && rl.current(e);
2662
2663
  }
2663
2664
  });
2664
2665
  }, []);
2665
- let Zu = D((e) => {
2666
+ let Qu = D((e) => {
2666
2667
  let t = H ? w.getState().conversations.find((e) => e.id === H) : void 0;
2667
- if (t && t.mode !== e && K.withdraw(t.id, "mode_switched"), t && Wi(t)) {
2668
+ if (t && t.mode !== e && K.withdraw(t.id, "mode_switched"), t && Gi(t)) {
2668
2669
  if (t.mode !== e) {
2669
- let t = Zi(), n = w.getState().conversations.find((n) => n.mode === e && qi(n, t) && !w.getState().processingByConversationId[n.id]);
2670
- n ? oo(n.id) : so(void 0, e);
2670
+ let t = Qi(), n = w.getState().conversations.find((n) => n.mode === e && Ji(n, t) && !w.getState().processingByConversationId[n.id]);
2671
+ n ? so(n.id) : co(void 0, e);
2671
2672
  }
2672
- } else H && ao(H, e);
2673
+ } else H && oo(H, e);
2673
2674
  let n = w.getState().activeConversationId;
2674
- n ? ao(n, e) : xo(!1), io(e);
2675
+ n ? oo(n, e) : So(!1), ao(e);
2675
2676
  }, [
2676
2677
  H,
2678
+ co,
2677
2679
  so,
2680
+ So,
2678
2681
  oo,
2679
- xo,
2680
2682
  ao,
2681
- io,
2682
2683
  K
2683
- ]), Qu = D(() => {
2684
+ ]), $u = D(() => {
2684
2685
  let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0;
2685
2686
  if (!t) {
2686
- xo(!0), io(b);
2687
+ So(!0), ao(b);
2687
2688
  return;
2688
2689
  }
2689
2690
  if (t.routedBy === "auto") {
2690
- xo(!0);
2691
+ So(!0);
2691
2692
  return;
2692
2693
  }
2693
- if (!Wi(t)) {
2694
- So(t.id, b);
2694
+ if (!Gi(t)) {
2695
+ Co(t.id, b);
2695
2696
  return;
2696
2697
  }
2697
2698
  K.withdraw(t.id, "mode_switched");
2698
- let n = Zi(), r = e.conversations.find((t) => t.routedBy === "auto" && qi(t, n) && !e.processingByConversationId[t.id]);
2699
- r ? (oo(r.id), So(r.id, b)) : so(void 0, b, { routedBy: "auto" });
2699
+ let n = Qi(), r = e.conversations.find((t) => t.routedBy === "auto" && Ji(t, n) && !e.processingByConversationId[t.id]);
2700
+ r ? (so(r.id), Co(r.id, b)) : co(void 0, b, { routedBy: "auto" });
2700
2701
  }, [
2702
+ co,
2703
+ Co,
2701
2704
  so,
2702
2705
  So,
2703
- oo,
2704
- xo,
2705
- io,
2706
+ ao,
2706
2707
  K
2707
- ]), $u = D((e) => {
2708
- R.find((t) => t.id === e)?.writeCapable && !Qn(w.getState().acknowledgedWriteModes, e) ? ds(e) : Zu(e);
2709
- }, [Zu, R]), ed = D(() => {
2710
- let e = us;
2711
- if (ds(null), !e) return;
2712
- let t = as.current;
2713
- as.current = null, t ? (yo(e), Q(t.content, t.attachments, t.options)) : (yo(e), Zu(e));
2708
+ ]), ed = D((e) => {
2709
+ R.find((t) => t.id === e)?.writeCapable && !$n(w.getState().acknowledgedWriteModes, e) ? fs(e) : Qu(e);
2710
+ }, [Qu, R]), td = D(() => {
2711
+ let e = ds;
2712
+ if (fs(null), !e) return;
2713
+ let t = os.current;
2714
+ os.current = null, t ? (bo(e), Q(t.content, t.attachments, t.options)) : (bo(e), Qu(e));
2714
2715
  }, [
2715
- us,
2716
- yo,
2717
- Zu,
2716
+ ds,
2717
+ bo,
2718
+ Qu,
2718
2719
  Q
2719
- ]), td = us === null ? void 0 : R.find((e) => e.id === us) ?? { id: us }, nd = D(() => {
2720
- ds(null);
2721
- let e = as.current;
2722
- as.current = null, e && Q(e.content, e.attachments, {
2720
+ ]), nd = ds === null ? void 0 : R.find((e) => e.id === ds) ?? { id: ds }, rd = D(() => {
2721
+ fs(null);
2722
+ let e = os.current;
2723
+ os.current = null, e && Q(e.content, e.attachments, {
2723
2724
  ...e.options,
2724
2725
  autoIntent: "read"
2725
2726
  });
2726
- }, [Q]), rd = D(() => Ys(), [Ys]), [id, ad] = j(null), od = D(() => {
2727
- let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0, n = Vs.current;
2727
+ }, [Q]), id = D(() => Xs(), [Xs]), [ad, od] = j(null), sd = D(() => {
2728
+ let e = w.getState(), t = e.activeConversationId ? e.conversations.find((t) => t.id === e.activeConversationId) : void 0, n = Hs.current;
2728
2729
  return {
2729
2730
  state: e,
2730
2731
  conversation: t ? {
2731
2732
  mode: t.mode,
2732
- hasHistory: Wi(t),
2733
+ hasHistory: Gi(t),
2733
2734
  routedByAuto: t.routedBy === "auto"
2734
2735
  } : null,
2735
2736
  waitingCount: t ? K.liveFor(t.id).count : 0,
2736
2737
  hasDraft: n !== null && (n.text.trim() !== "" || n.hasAttachments)
2737
2738
  };
2738
- }, [K]), sd = rs ? P("modeSelector.auto", "Auto") : void 0, cd = D((e) => {
2739
- if (us !== null) return;
2740
- let { state: t, conversation: n, waitingCount: r, hasDraft: i } = od(), a = R.find((t) => t.id === e), o = Ne({
2739
+ }, [K]), cd = is ? P("modeSelector.auto", "Auto") : void 0, ld = D((e) => {
2740
+ if (ds !== null) return;
2741
+ let { state: t, conversation: n, waitingCount: r, hasDraft: i } = sd(), a = R.find((t) => t.id === e), o = Ne({
2741
2742
  target: {
2742
2743
  kind: "mode",
2743
2744
  mode: e,
2744
- consentRequired: !!a?.writeCapable && !Qn(t.acknowledgedWriteModes, e)
2745
+ consentRequired: !!a?.writeCapable && !$n(t.acknowledgedWriteModes, e)
2745
2746
  },
2746
2747
  conversation: n,
2747
2748
  waitingCount: r,
2748
2749
  hasDraft: i
2749
2750
  });
2750
- o.needsDialog ? ad({
2751
+ o.needsDialog ? od({
2751
2752
  open: !0,
2752
2753
  target: {
2753
2754
  kind: "mode",
@@ -2755,126 +2756,126 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2755
2756
  },
2756
2757
  plan: o,
2757
2758
  targetName: De(P, a ?? { id: e }),
2758
- currentName: sd
2759
- }) : Zu(e);
2759
+ currentName: cd
2760
+ }) : Qu(e);
2760
2761
  }, [
2762
+ cd,
2761
2763
  sd,
2762
- od,
2763
- us,
2764
- Zu,
2764
+ ds,
2765
+ Qu,
2765
2766
  R,
2766
2767
  P
2767
- ]), ld = D(() => {
2768
- if (us !== null) return;
2769
- let { conversation: e, waitingCount: t, hasDraft: n } = od(), r = Ne({
2768
+ ]), ud = D(() => {
2769
+ if (ds !== null) return;
2770
+ let { conversation: e, waitingCount: t, hasDraft: n } = sd(), r = Ne({
2770
2771
  target: { kind: "auto" },
2771
2772
  conversation: e,
2772
2773
  waitingCount: t,
2773
2774
  hasDraft: n
2774
2775
  });
2775
- r.needsDialog ? ad({
2776
+ r.needsDialog ? od({
2776
2777
  open: !0,
2777
2778
  target: { kind: "auto" },
2778
2779
  plan: r,
2779
2780
  targetName: P("modeSelector.auto", "Auto")
2780
- }) : Qu();
2781
+ }) : $u();
2781
2782
  }, [
2782
- Qu,
2783
- od,
2784
- us,
2783
+ $u,
2784
+ sd,
2785
+ ds,
2785
2786
  P
2786
- ]), ud = D(() => {
2787
- let e = id;
2788
- e?.open && (ad({
2787
+ ]), dd = D(() => {
2788
+ let e = ad;
2789
+ e?.open && (od({
2789
2790
  ...e,
2790
2791
  open: !1
2791
- }), e.target.kind === "auto" ? Qu() : (e.plan.consent && yo(e.target.mode), Zu(e.target.mode)));
2792
+ }), e.target.kind === "auto" ? $u() : (e.plan.consent && bo(e.target.mode), Qu(e.target.mode)));
2792
2793
  }, [
2793
- yo,
2794
- Qu,
2795
- id,
2796
- Zu
2797
- ]), dd = D(() => {
2798
- ad((e) => e && {
2794
+ bo,
2795
+ $u,
2796
+ ad,
2797
+ Qu
2798
+ ]), fd = D(() => {
2799
+ od((e) => e && {
2799
2800
  ...e,
2800
2801
  open: !1
2801
2802
  });
2802
- }, []), fd = id ? {
2803
- consent: id.plan.consent,
2804
- withdrawnCount: id.plan.withdrawnCount,
2805
- movesToNewConversation: id.plan.movesToNewConversation,
2806
- draftKept: id.plan.draftKept,
2807
- targetName: id.targetName,
2808
- ...id.currentName === void 0 ? {} : { currentName: id.currentName }
2809
- } : void 0, pd = id?.target.kind === "mode" ? id.target.mode : null, md = pd === null ? void 0 : R.find((e) => e.id === pd) ?? { id: pd }, hd = A(null), gd = k(() => {
2803
+ }, []), pd = ad ? {
2804
+ consent: ad.plan.consent,
2805
+ withdrawnCount: ad.plan.withdrawnCount,
2806
+ movesToNewConversation: ad.plan.movesToNewConversation,
2807
+ draftKept: ad.plan.draftKept,
2808
+ targetName: ad.targetName,
2809
+ ...ad.currentName === void 0 ? {} : { currentName: ad.currentName }
2810
+ } : void 0, md = ad?.target.kind === "mode" ? ad.target.mode : null, hd = md === null ? void 0 : R.find((e) => e.id === md) ?? { id: md }, gd = A(null), _d = k(() => {
2810
2811
  if (!F) return 0;
2811
- let e = new Set(ol.flatMap((e) => ae(e.metadata).map((e) => e.proposalId)));
2812
- return je(Ao, H, jo, e);
2812
+ let e = new Set(sl.flatMap((e) => ae(e.metadata).map((e) => e.proposalId)));
2813
+ return je(jo, H, Mo, e);
2813
2814
  }, [
2814
2815
  F,
2815
- ol,
2816
+ sl,
2816
2817
  H,
2817
- Ao,
2818
- jo
2819
- ]), _d = D(() => {
2820
- Me(hd.current);
2821
- }, []), vd = I && Na && Ue({
2822
- empty: ol.length === 0,
2823
- historyPending: Lo || Ro,
2818
+ jo,
2819
+ Mo
2820
+ ]), vd = D(() => {
2821
+ Me(gd.current);
2822
+ }, []), yd = I && Pa && Ue({
2823
+ empty: sl.length === 0,
2824
+ historyPending: Ro || zo,
2824
2825
  hasOlder: G?.sync?.hasOlder === !0
2825
- }), yd = vd ? /* @__PURE__ */ M("div", {
2826
- ref: Pa,
2826
+ }), bd = yd ? /* @__PURE__ */ M("div", {
2827
+ ref: Fa,
2827
2828
  className: "w-full shrink-0",
2828
2829
  "data-testid": "assistant-page-start-above"
2829
- }) : ol.length === 0 && (Lo || Ro) ? /* @__PURE__ */ M(ve, {
2830
- state: Lo ? "loading" : "failed",
2831
- onRetry: Zo
2832
- }) : ol.length === 0 && G?.sync?.hasOlder ? /* @__PURE__ */ M("div", {
2830
+ }) : sl.length === 0 && (Ro || zo) ? /* @__PURE__ */ M(ve, {
2831
+ state: Ro ? "loading" : "failed",
2832
+ onRetry: Qo
2833
+ }) : sl.length === 0 && G?.sync?.hasOlder ? /* @__PURE__ */ M("div", {
2833
2834
  className: "flex min-h-0 flex-1 flex-col",
2834
2835
  children: /* @__PURE__ */ M(be, {
2835
- onShowEarlier: Qo,
2836
- disabled: Lo
2836
+ onShowEarlier: $o,
2837
+ disabled: Ro
2837
2838
  })
2838
- }) : ol.length === 0 && F && !I ? /* @__PURE__ */ M(he, {
2839
+ }) : sl.length === 0 && F && !I ? /* @__PURE__ */ M(he, {
2839
2840
  mode: U,
2840
- auto: rs && U === "assistant",
2841
- voiceOffered: $.available && Fs,
2841
+ auto: is && U === "assistant",
2842
+ voiceOffered: $.available && Is,
2842
2843
  avatarOffered: !!(q.ids && q.compact),
2843
- onSuggestionClick: $c
2844
- }) : ol.length === 0 ? /* @__PURE__ */ M(me, {
2844
+ onSuggestionClick: el
2845
+ }) : sl.length === 0 ? /* @__PURE__ */ M(me, {
2845
2846
  mode: U,
2846
- onSuggestionClick: $c,
2847
- explainsAuto: rs,
2848
- suggestions: rs && U === "assistant" ? le(R.find((e) => e.id === "assistant")?.suggestions ?? [], R.find((e) => e.id === "api-calls")?.suggestions ?? []) : void 0
2849
- }) : /* @__PURE__ */ da("div", {
2847
+ onSuggestionClick: el,
2848
+ explainsAuto: is,
2849
+ suggestions: is && U === "assistant" ? le(R.find((e) => e.id === "assistant")?.suggestions ?? [], R.find((e) => e.id === "api-calls")?.suggestions ?? []) : void 0
2850
+ }) : /* @__PURE__ */ fa("div", {
2850
2851
  className: "flex min-h-0 flex-1 flex-col",
2851
2852
  children: [G?.sync?.hasOlder ? /* @__PURE__ */ M(be, {
2852
- onShowEarlier: Qo,
2853
- disabled: Lo
2853
+ onShowEarlier: $o,
2854
+ disabled: Ro
2854
2855
  }) : null, /* @__PURE__ */ M(c, {
2855
- onApprovePendingWrite: Zs,
2856
- approvingWriteRef: Us,
2857
- approvableMessageId: ul?.messageId ?? null,
2858
- retryableMessageId: dl,
2859
- messages: ol,
2860
- decorate: I ? yu : void 0,
2861
- processing: To ?? null,
2862
- streamingMessageId: Do,
2863
- failedMessageId: Oo,
2864
- onRetry: Us === null ? tl : void 0,
2865
- renderWriteProposals: pl,
2866
- hidesLegacyWriteCard: fl,
2867
- renderUiOffers: hl,
2868
- onStopTurn: F ? void 0 : rd,
2869
- stopTurnLabel: F ? void 0 : Ma
2856
+ onApprovePendingWrite: Qs,
2857
+ approvingWriteRef: Ws,
2858
+ approvableMessageId: dl?.messageId ?? null,
2859
+ retryableMessageId: fl,
2860
+ messages: sl,
2861
+ decorate: I ? bu : void 0,
2862
+ processing: Eo ?? null,
2863
+ streamingMessageId: Oo,
2864
+ failedMessageId: ko,
2865
+ onRetry: Ws === null ? nl : void 0,
2866
+ renderWriteProposals: ml,
2867
+ hidesLegacyWriteCard: pl,
2868
+ renderUiOffers: gl,
2869
+ onStopTurn: F ? void 0 : id,
2870
+ stopTurnLabel: F ? void 0 : Na
2870
2871
  })]
2871
2872
  });
2872
- return /* @__PURE__ */ da("div", {
2873
- ref: hd,
2873
+ return /* @__PURE__ */ fa("div", {
2874
+ ref: gd,
2874
2875
  className: "relative flex flex-1 flex-col overflow-hidden",
2875
- style: vd ? Sa : void 0,
2876
+ style: yd ? Ca : void 0,
2876
2877
  children: [
2877
- /* @__PURE__ */ da("div", {
2878
+ /* @__PURE__ */ fa("div", {
2878
2879
  className: "contents",
2879
2880
  inert: $.active && !I || J || void 0,
2880
2881
  ...q.ids ? F ? { id: q.ids.chatPanel } : {
@@ -2883,127 +2884,127 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
2883
2884
  "aria-labelledby": q.ids.chatTab
2884
2885
  } : {},
2885
2886
  children: [
2886
- Ho === null ? Go === null ? null : /* @__PURE__ */ M(S, {
2887
- limit: Go.limit,
2888
- onDismiss: () => Yi.getState().notePinLimit(void 0)
2889
- }) : /* @__PURE__ */ M(_e, { onDismiss: () => Vo(Ho) }),
2890
- vl.length > 0 && !$.active && !I ? /* @__PURE__ */ M(x, {
2891
- count: vl.length,
2892
- onOpenTranscript: () => vs(!0)
2887
+ Uo === null ? Ko === null ? null : /* @__PURE__ */ M(S, {
2888
+ limit: Ko.limit,
2889
+ onDismiss: () => Xi.getState().notePinLimit(void 0)
2890
+ }) : /* @__PURE__ */ M(_e, { onDismiss: () => Ho(Uo) }),
2891
+ yl.length > 0 && !$.active && !I ? /* @__PURE__ */ M(x, {
2892
+ count: yl.length,
2893
+ onOpenTranscript: () => ys(!0)
2893
2894
  }) : null,
2894
- yd,
2895
- Fo ? /* @__PURE__ */ M(ye, { onStartNew: () => so() }) : null,
2896
- Io && H ? /* @__PURE__ */ M(ge, { onUnarchive: () => Ui.updateConversation(H, { archived: !1 }) }) : null,
2897
- qc === null ? null : /* @__PURE__ */ M(Se, {
2895
+ bd,
2896
+ Io ? /* @__PURE__ */ M(ye, { onStartNew: () => co() }) : null,
2897
+ Lo && H ? /* @__PURE__ */ M(ge, { onUnarchive: () => Wi.updateConversation(H, { archived: !1 }) }) : null,
2898
+ Jc === null ? null : /* @__PURE__ */ M(Se, {
2898
2899
  tr: P,
2899
- onDismiss: () => Jc(null)
2900
+ onDismiss: () => Yc(null)
2900
2901
  }),
2901
- ol.length > 0 && (Lo || Ro) ? /* @__PURE__ */ M(ve, {
2902
- state: Lo ? "loading" : "failed",
2903
- onRetry: Zo,
2902
+ sl.length > 0 && (Ro || zo) ? /* @__PURE__ */ M(ve, {
2903
+ state: Ro ? "loading" : "failed",
2904
+ onRetry: Qo,
2904
2905
  compact: !0
2905
2906
  }) : null,
2906
2907
  /* @__PURE__ */ M(Ee, {
2907
- onStartVoiceSession: $.available && Fs ? Zl : void 0,
2908
+ onStartVoiceSession: $.available && Is ? Ql : void 0,
2908
2909
  onSend: (e, t) => {
2909
- let n = aa.getState().actions.take();
2910
+ let n = oa.getState().actions.take();
2910
2911
  Q(e, t, {
2911
2912
  fromPerson: !0,
2912
2913
  ...n ? { focus: n } : {}
2913
2914
  });
2914
2915
  },
2915
- onDraftChange: Vc,
2916
- inputRef: F ? Ea : void 0,
2917
- viewSwitch: F && !I && q.ids && q.compact && !Bu ? /* @__PURE__ */ M(Be, {
2916
+ onDraftChange: Hc,
2917
+ inputRef: F ? Da : void 0,
2918
+ viewSwitch: F && !I && q.ids && q.compact && !Vu ? /* @__PURE__ */ M(Be, {
2918
2919
  selected: q.compact.view,
2919
2920
  onSelect: q.compact.selectView,
2920
2921
  ids: q.ids,
2921
2922
  instance: "chat"
2922
2923
  }) : void 0,
2923
- aboveCard: gd > 0 ? /* @__PURE__ */ M(ke, {
2924
- count: gd,
2925
- onReview: Ia && Aa ? Eu : _d,
2926
- opensFull: Ia && Aa !== void 0
2924
+ aboveCard: _d > 0 ? /* @__PURE__ */ M(ke, {
2925
+ count: _d,
2926
+ onReview: La && ja ? Du : vd,
2927
+ opensFull: La && ja !== void 0
2927
2928
  }) : void 0,
2928
- disabled: Eo || Us !== null || Lo || vc,
2929
- readOnly: Fo,
2929
+ disabled: Do || Ws !== null || Ro || yc,
2930
+ readOnly: Io,
2930
2931
  placeholder: U === "api-calls" ? P("chatArea.placeholderActions", "What would you like me to do?") : P("chatArea.placeholderGeneral", "Ask me anything…"),
2931
2932
  mode: U,
2932
- writeAccessDenied: wa === "denied" && !!Ms?.writeCapable,
2933
- availableModes: ts,
2934
- attachmentCharsPerFile: ls,
2935
- onModeChange: F ? cd : $u,
2936
- auto: ns ? {
2937
- active: rs,
2938
- onSelect: F ? ld : Qu
2933
+ writeAccessDenied: Ta === "denied" && !!Ns?.writeCapable,
2934
+ availableModes: ns,
2935
+ attachmentCharsPerFile: us,
2936
+ onModeChange: F ? ld : ed,
2937
+ auto: rs ? {
2938
+ active: is,
2939
+ onSelect: F ? ud : $u
2939
2940
  } : void 0,
2940
- suspendDictation: J || F && !Ca,
2941
- entrance: I && vd,
2942
- onVoiceStateChange: q.ids || Ia ? Su : void 0,
2943
- modeReadOnly: Ia || void 0,
2941
+ suspendDictation: J || F && !wa,
2942
+ entrance: I && yd,
2943
+ onVoiceStateChange: q.ids || La ? Cu : void 0,
2944
+ modeReadOnly: La || void 0,
2944
2945
  voiceSessionActive: F ? $.active : void 0,
2945
2946
  concealed: I && $.active,
2946
- presentation: Ta,
2947
- turnInFlight: Eo,
2948
- turnId: Eo ? To?.messageId ?? null : null,
2949
- onStop: F ? rd : void 0,
2950
- modeDisabledReason: Eo ? "replying" : "busy"
2947
+ presentation: Ea,
2948
+ turnInFlight: Do,
2949
+ turnId: Do ? Eo?.messageId ?? null : null,
2950
+ onStop: F ? id : void 0,
2951
+ modeDisabledReason: Do ? "replying" : "busy"
2951
2952
  }),
2952
- I ? /* @__PURE__ */ da(ua, { children: [vd && !$.active ? /* @__PURE__ */ M("div", {
2953
- ref: Fa,
2953
+ I ? /* @__PURE__ */ fa(da, { children: [yd && !$.active ? /* @__PURE__ */ M("div", {
2954
+ ref: Ia,
2954
2955
  className: "w-full shrink-0",
2955
2956
  "data-testid": "assistant-page-start-below"
2956
2957
  }) : null, /* @__PURE__ */ M("div", {
2957
- ref: cl,
2958
+ ref: ll,
2958
2959
  className: "contents",
2959
2960
  "data-testid": "assistant-page-voice-slot"
2960
2961
  })] }) : null,
2961
2962
  F ? /* @__PURE__ */ M(Fe, { children: /* @__PURE__ */ M(Ie, {
2962
2963
  productKey: L,
2963
- enabled: !!Ba,
2964
+ enabled: !!Va,
2964
2965
  testId: "assistant-ai-credit-balance"
2965
- }) }) : /* @__PURE__ */ da(ua, { children: [/* @__PURE__ */ M(Ie, {
2966
+ }) }) : /* @__PURE__ */ fa(da, { children: [/* @__PURE__ */ M(Ie, {
2966
2967
  productKey: L,
2967
- enabled: !!Ba,
2968
+ enabled: !!Va,
2968
2969
  className: "px-3 pt-1 text-center",
2969
2970
  testId: "assistant-ai-credit-balance"
2970
2971
  }), /* @__PURE__ */ M(Pe, { className: "px-3 pb-2 pt-1" })] })
2971
2972
  ]
2972
2973
  }),
2973
- ms && !$.active ? /* @__PURE__ */ M(Te, {
2974
- turns: vl,
2975
- onClose: () => vs(!1),
2976
- onSave: yl,
2977
- onContinueInChat: eu ? tu : void 0,
2974
+ hs && !$.active ? /* @__PURE__ */ M(Te, {
2975
+ turns: yl,
2976
+ onClose: () => ys(!1),
2977
+ onSave: bl,
2978
+ onContinueInChat: tu ? nu : void 0,
2978
2979
  closeOnEscape: !0,
2979
- onShowEarlier: G?.sync?.hasOlder ? Qo : void 0,
2980
- showEarlierDisabled: Lo,
2981
- renderAfterTurn: ml
2980
+ onShowEarlier: G?.sync?.hasOlder ? $o : void 0,
2981
+ showEarlierDisabled: Ro,
2982
+ renderAfterTurn: hl
2982
2983
  }) : null,
2983
- Bu && q.ids && q.compact ? /* @__PURE__ */ M(Ve, {
2984
+ Vu && q.ids && q.compact ? /* @__PURE__ */ M(Ve, {
2984
2985
  ids: q.ids,
2985
2986
  compact: q.compact
2986
- }) : J && hs && q.ids ? F && q.compact && hs.CompactView ? /* @__PURE__ */ M(ze, {
2987
- tab: hs,
2988
- CompactView: hs.CompactView,
2987
+ }) : J && gs && q.ids ? F && q.compact && gs.CompactView ? /* @__PURE__ */ M(ze, {
2988
+ tab: gs,
2989
+ CompactView: gs.CompactView,
2989
2990
  ids: q.ids,
2990
2991
  compact: q.compact,
2991
- shown: Vu,
2992
- voice: Pu,
2992
+ shown: Hu,
2993
+ voice: Fu,
2993
2994
  ...$.active ? { mute: {
2994
2995
  muted: $.session.muted,
2995
2996
  toggle: $.toggleMute
2996
2997
  } } : {},
2997
- ...Hu ? { ask: Ju } : {},
2998
+ ...Uu ? { ask: Yu } : {},
2998
2999
  footer: /* @__PURE__ */ M(Fe, {})
2999
3000
  }) : /* @__PURE__ */ M(Re, {
3000
- tab: hs,
3001
+ tab: gs,
3001
3002
  id: q.ids.avatarPanel,
3002
3003
  labelledBy: q.ids.avatarTab,
3003
3004
  leaveHintId: q.ids.leaveHint,
3004
- shown: Vu,
3005
- voice: Pu,
3006
- ...Hu ? { ask: Ju } : {}
3005
+ shown: Hu,
3006
+ voice: Fu,
3007
+ ...Uu ? { ask: Yu } : {}
3007
3008
  }) : null,
3008
3009
  $.active && /* @__PURE__ */ M(Le, {
3009
3010
  session: $.session,
@@ -3017,66 +3018,66 @@ var ba = () => () => {}, xa = () => "off", Sa = { overflowY: "auto" }, Ca = ({ v
3017
3018
  correcting: $.correcting,
3018
3019
  onLetMeFinish: $.letMeFinish,
3019
3020
  onImDone: $.imDone,
3020
- turns: kl,
3021
+ turns: Al,
3021
3022
  spokenChunks: $.spokenChunks,
3022
- attachments: bl.attachments,
3023
- onAttachFiles: bl.addFiles,
3024
- onRemoveAttachment: bl.remove,
3025
- onRetryAttachment: bl.retry,
3026
- canAttachMore: bl.canAddMore,
3027
- preparingAttachments: bl.preparingCount,
3028
- attachmentsLocked: bl.isCommitting,
3029
- attachmentNotice: wl,
3030
- onSaveTranscript: yl,
3031
- onContinueInChat: tu,
3023
+ attachments: xl.attachments,
3024
+ onAttachFiles: xl.addFiles,
3025
+ onRemoveAttachment: xl.remove,
3026
+ onRetryAttachment: xl.retry,
3027
+ canAttachMore: xl.canAddMore,
3028
+ preparingAttachments: xl.preparingCount,
3029
+ attachmentsLocked: xl.isCommitting,
3030
+ attachmentNotice: Tl,
3031
+ onSaveTranscript: bl,
3032
+ onContinueInChat: nu,
3032
3033
  onInterrupt: () => {
3033
- vu(), $.interrupt(), Ys();
3034
+ yu(), $.interrupt(), Xs();
3034
3035
  },
3035
- spoken: il,
3036
+ spoken: al,
3036
3037
  onToggleMute: $.toggleMute,
3037
- onEnd: bu,
3038
- proposalChip: Ll ? Ia && Aa ? {
3038
+ onEnd: xu,
3039
+ proposalChip: Rl ? La && ja ? {
3039
3040
  label: P("waitingChange.reviewInFull", "Review in full assistant"),
3040
- status: te(Ll, P),
3041
- onOpen: Aa
3041
+ status: te(Rl, P),
3042
+ onOpen: ja
3042
3043
  } : {
3043
- label: te(Ll, P),
3044
- onOpen: Il
3044
+ label: te(Rl, P),
3045
+ onOpen: Ll
3045
3046
  } : null,
3046
- proposalTray: Ia ? null : zl,
3047
- renderAfterTurn: ml,
3048
- onViewChange: q.ids ? Iu : void 0,
3049
- ...Ia ? { view: J || Lu ? "mini" : "compact" } : I ? {
3047
+ proposalTray: La ? null : Bl,
3048
+ renderAfterTurn: hl,
3049
+ onViewChange: q.ids ? Lu : void 0,
3050
+ ...La ? { view: J || Ru ? "mini" : "compact" } : I ? {
3050
3051
  view: "page",
3051
- pageSlot: sl
3052
+ pageSlot: cl
3052
3053
  } : {},
3053
- startedCue: F ? Ss ? P("window.voiceStartedCue", "Started a voice conversation. Your chat is in History.") : null : void 0
3054
+ startedCue: F ? Cs ? P("window.voiceStartedCue", "Started a voice conversation. Your chat is in History.") : null : void 0
3054
3055
  }),
3055
3056
  /* @__PURE__ */ M(l, {
3056
- open: us !== null,
3057
- mode: td,
3058
- currentMode: Ms ?? { id: U },
3059
- onConfirm: ed,
3060
- onCancel: nd
3057
+ open: ds !== null,
3058
+ mode: nd,
3059
+ currentMode: Ns ?? { id: U },
3060
+ onConfirm: td,
3061
+ onCancel: rd
3061
3062
  }),
3062
3063
  F ? /* @__PURE__ */ M(l, {
3063
- open: id?.open === !0,
3064
- mode: md,
3065
- currentMode: Ms ?? { id: U },
3066
- switchPlan: fd,
3067
- onConfirm: ud,
3068
- onCancel: dd
3064
+ open: ad?.open === !0,
3065
+ mode: hd,
3066
+ currentMode: Ns ?? { id: U },
3067
+ switchPlan: pd,
3068
+ onConfirm: dd,
3069
+ onCancel: fd
3069
3070
  }) : null,
3070
3071
  /* @__PURE__ */ M(u, {
3071
- ...Mo.dialog,
3072
- view: gl?.view ?? Mo.dialog.view,
3073
- serverNow: gl?.serverNow ?? NaN,
3074
- arrivedAt: gl?.arrivedAt ?? NaN,
3075
- capabilities: gl ? ko[gl.session.sandboxId] : null,
3076
- turnInFlight: Eo,
3072
+ ...No.dialog,
3073
+ view: _l?.view ?? No.dialog.view,
3074
+ serverNow: _l?.serverNow ?? NaN,
3075
+ arrivedAt: _l?.arrivedAt ?? NaN,
3076
+ capabilities: _l ? Ao[_l.session.sandboxId] : null,
3077
+ turnInFlight: Do,
3077
3078
  tr: P
3078
3079
  })
3079
3080
  ]
3080
3081
  });
3081
3082
  };
3082
- export { Ca as AssistantChatArea };
3083
+ export { wa as AssistantChatArea };