@burdenoff/microfe-healthybowl 2026.904.6 → 2026.904.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/assistant/AssistantChatArea.js +214 -212
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/components/assistant/AssistantMessageItem.js +15 -15
- package/dist/components/assistant/AssistantSpeechProvider.js +2 -295
- package/dist/components/assistant/AssistantToolActivity.js +2 -110
- package/dist/components/assistant/composer/AssistantComposer.js +7 -7
- package/dist/components/assistant/composer/AssistantComposer.js.map +1 -1
- package/dist/components/assistant/index.js +1 -1
- package/dist/config/assistantLanguages.js +2 -2
- package/dist/healthybowl/HealthyBowlRoot.js +57 -56
- package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoutes.js +48 -36
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
- package/dist/healthybowl/components/PageLayout.js +11 -10
- package/dist/healthybowl/components/PageLayout.js.map +1 -1
- package/dist/healthybowl/context/HealthyBowlContext.js +7 -7
- package/dist/healthybowl/context/HealthyBowlContext.js.map +1 -1
- package/dist/healthybowl/hooks/useAgronomyDecisions.js +79 -0
- package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +1 -0
- package/dist/healthybowl/hooks/useAnalyticsReports.js +173 -0
- package/dist/healthybowl/hooks/useAnalyticsReports.js.map +1 -0
- package/dist/healthybowl/hooks/useComplianceExports.js +74 -0
- package/dist/healthybowl/hooks/useComplianceExports.js.map +1 -0
- package/dist/healthybowl/hooks/useConsultationPayments.js +59 -0
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +1 -0
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js +157 -141
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +18 -0
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +52 -37
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +135 -78
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js.map +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js.map +1 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +88 -0
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -0
- package/dist/healthybowl/hooks/useSuccessionPlanning.js +1 -1
- package/dist/healthybowl/hooks/useSuccessionPlanning.js.map +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -1
- package/dist/healthybowl/offline/HeaderOfflinePill.js +28 -0
- package/dist/healthybowl/offline/HeaderOfflinePill.js.map +1 -0
- package/dist/healthybowl/offline/OfflineStatusPill.js +40 -21
- package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
- package/dist/healthybowl/offline/OfflineSyncProvider.js +153 -130
- package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
- package/dist/healthybowl/offline/captureCache.js +30 -0
- package/dist/healthybowl/offline/captureCache.js.map +1 -0
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/headerSlot.js +24 -0
- package/dist/healthybowl/offline/headerSlot.js.map +1 -0
- package/dist/healthybowl/offline/store.js +1 -1
- package/dist/healthybowl/offline/syncEngine.js +2 -1
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/GettingStartedPage.js +1 -0
- package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js +287 -0
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +1 -0
- package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -2
- package/dist/healthybowl/pages/analytics/InsightsPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +136 -99
- package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +204 -162
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +196 -178
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +142 -141
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +291 -0
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +1 -0
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +300 -0
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +1 -0
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js +135 -0
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +1 -0
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +2 -0
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +316 -272
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +6 -0
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +871 -846
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +376 -334
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +415 -188
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/labels.js +10 -2
- package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +1 -0
- package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
- package/dist/healthybowl/pages/field-capture/CaptureObservationForm.js +8 -8
- package/dist/healthybowl/pages/fields/FieldMapPage.js +2 -0
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +92 -107
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +228 -188
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +261 -191
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +49 -0
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +1 -0
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +48 -0
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +1 -0
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +54 -0
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +1 -0
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +14 -14
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js +338 -307
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +126 -102
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +257 -215
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js +1 -0
- package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js +4 -0
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/PedigreeTree.js +154 -0
- package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +1 -0
- package/dist/healthybowl/pages/livestock/eidTagInput.js +39 -0
- package/dist/healthybowl/pages/livestock/eidTagInput.js.map +1 -0
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +8 -9
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js +68 -0
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +1 -0
- package/dist/healthybowl/pages/network/ExpertsPage.js +520 -419
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +129 -130
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +285 -237
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/alertDelivery.js +105 -0
- package/dist/healthybowl/pages/weather/alertDelivery.js.map +1 -0
- package/dist/healthybowl/utils/icsInspection.js +18 -0
- package/dist/healthybowl/utils/icsInspection.js.map +1 -0
- package/dist/healthybowl/utils/plantingCapacity.js +10 -10
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/hooks/useVoiceSession.js +2 -164
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +33 -42
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +44 -47
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +74 -86
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/services/assistantApi.js +60 -31
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/services/speech/index.js +2 -2
- package/dist/utils/pageContext.js +15 -1
- package/dist/utils/pageContext.js.map +1 -1
- package/dist/utils/speechVoices.js +2 -2
- package/dist/utils/voiceSession.js +2 -2
- package/package.json +2 -2
- package/dist/components/assistant/AssistantSpeechProvider.js.map +0 -1
- package/dist/components/assistant/AssistantToolActivity.js.map +0 -1
- package/dist/config/speechLabels.js +0 -2
- package/dist/hooks/useVoiceSession.js.map +0 -1
- package/dist/utils/replyLanguage.js +0 -2
- package/dist/utils/speakableText.js +0 -2
- package/dist/utils/speechPlayback.js +0 -2
- package/dist/utils/voicePreview.js +0 -2
|
@@ -5,82 +5,84 @@ import { isVoiceTurn as f, voiceMarker as p, voiceSessionIdOf as m } from "../..
|
|
|
5
5
|
import { downloadFile as h } from "../../services/assistantExportService.js";
|
|
6
6
|
import { resolveAssistantLanguage as g } from "../../config/assistantLanguages.js";
|
|
7
7
|
import { resolveLanguagePair as _ } from "../../config/assistantLanguagePair.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { buildPromptParts as ie, buildPromptWithAttachments as ae, countInlineImageCandidates as oe, countInlinedImageParts as se, getSendableAttachments as x, toMessageAttachment as ce } from "../../utils/assistantAttachments.js";
|
|
8
|
+
import { getActorId as ne, getOrganizationId as v, getWorkspaceId as y } from "../../utils/assistantContext.js";
|
|
9
|
+
import { buildPromptParts as re, buildPromptWithAttachments as ie, countInlineImageCandidates as ae, countInlinedImageParts as oe, getSendableAttachments as b, toMessageAttachment as se } from "../../utils/assistantAttachments.js";
|
|
10
|
+
import { parseToolActivity as x } from "./AssistantToolActivity.js";
|
|
12
11
|
import { AssistantMessageList as S } from "./AssistantMessageList.js";
|
|
13
12
|
import { AssistantApiCallsConsentDialog as C } from "./AssistantApiCallsConsentDialog.js";
|
|
14
|
-
import { ASSISTANT_MODES as
|
|
15
|
-
import { AssistantEmptyState as
|
|
16
|
-
import { AssistantSpokenTurnsNotice as
|
|
17
|
-
import { VoiceTranscriptDrawer as
|
|
18
|
-
import { useAssistantAttachments as
|
|
19
|
-
import { AssistantComposer as
|
|
20
|
-
import { AssistantVoiceSession as
|
|
21
|
-
import { useVoiceSession as
|
|
22
|
-
import { useAssistantApiAccess as
|
|
23
|
-
import { useWorkspaceWriteAccess as
|
|
24
|
-
import { useConversationTurns as
|
|
25
|
-
import { isQuotaExhaustedError as
|
|
26
|
-
import { dispatchAssistantQuotaExhausted as
|
|
27
|
-
import { buildPromptForMode as
|
|
28
|
-
import { isMultimodalBodyRejection as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
13
|
+
import { ASSISTANT_MODES as w } from "../../types/assistant.js";
|
|
14
|
+
import { AssistantEmptyState as ce } from "./AssistantEmptyState.js";
|
|
15
|
+
import { AssistantSpokenTurnsNotice as le } from "./AssistantSpokenTurnsNotice.js";
|
|
16
|
+
import { VoiceTranscriptDrawer as ue } from "./voice/VoiceTranscriptDrawer.js";
|
|
17
|
+
import { useAssistantAttachments as de } from "../../hooks/useAssistantAttachments.js";
|
|
18
|
+
import { AssistantComposer as fe } from "./composer/AssistantComposer.js";
|
|
19
|
+
import { AssistantVoiceSession as pe } from "./voice/AssistantVoiceSession.js";
|
|
20
|
+
import { useVoiceSession as me } from "../../hooks/useVoiceSession.js";
|
|
21
|
+
import { useAssistantApiAccess as he } from "../../hooks/useAssistantApiAccess.js";
|
|
22
|
+
import { useWorkspaceWriteAccess as ge } from "../../hooks/useWorkspaceWriteAccess.js";
|
|
23
|
+
import { useConversationTurns as _e } from "../../hooks/useConversationTurns.js";
|
|
24
|
+
import { isQuotaExhaustedError as ve } from "../../utils/quotaUtils.js";
|
|
25
|
+
import { dispatchAssistantQuotaExhausted as ye, notifyAiCreditsUpdated as be } from "../../utils/aiCredits.js";
|
|
26
|
+
import { buildPromptForMode as xe } from "../../utils/assistantPrompt.js";
|
|
27
|
+
import { isMultimodalBodyRejection as Se, isRecoverableAssistantError as Ce } from "../../utils/assistantTransportErrors.js";
|
|
28
|
+
import { isTurnInFlight as we } from "../../utils/assistantTurnState.js";
|
|
29
|
+
import { pollDelayMs as Te } from "../../utils/assistantPollSchedule.js";
|
|
30
|
+
import { findPendingWrite as Ee } from "../../utils/pendingWrite.js";
|
|
31
|
+
import { toCaptionText as De } from "../../utils/captionText.js";
|
|
32
|
+
import { buildContinuedFromVoiceNote as Oe, buildVoiceTranscriptMarkdown as ke, voiceTranscriptFilename as Ae } from "../../utils/voiceTranscript.js";
|
|
33
|
+
import { createReadinessTracker as je } from "../../utils/sandboxReadiness.js";
|
|
34
|
+
import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as Me } from "react";
|
|
35
|
+
import { useI18n as Ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
36
|
+
import { getAssistantMedia as k, useAssistantTr as Pe } from "@burdenoff/fe-libs/shared/assistant";
|
|
37
|
+
import { jsx as A, jsxs as Fe } from "react/jsx-runtime";
|
|
38
|
+
import { useGatewayClient as Ie } from "@burdenoff/fe-libs/shared/graphql";
|
|
39
|
+
import { useAuthToken as Le } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
40
40
|
//#region src/components/assistant/AssistantChatArea.tsx
|
|
41
|
-
var
|
|
41
|
+
var Re = {
|
|
42
42
|
general: 18e4,
|
|
43
43
|
assistant: 18e4,
|
|
44
44
|
"api-calls": 18e4,
|
|
45
45
|
"vibe-plugins": 6e5
|
|
46
|
-
},
|
|
47
|
-
function
|
|
46
|
+
}, ze = 18e4, Be = 2e4;
|
|
47
|
+
function Ve() {
|
|
48
48
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function He(e) {
|
|
51
51
|
return e.replace(/(Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/(X-Workspace-Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+\.[A-Za-z0-9._-]+\b/g, "[REDACTED_JWT]").replace(/\bsk-ant-[A-Za-z0-9-]+\b/g, "[REDACTED_API_KEY]");
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function j(e) {
|
|
54
54
|
return e.info?.time?.created ?? 0;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function M(e) {
|
|
57
57
|
return (e ?? []).filter((e) => e.type === "text" && typeof e.text == "string").map((e) => e.text?.trim() ?? "").filter(Boolean).join("\n");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function N(e) {
|
|
60
60
|
return (e ?? []).filter((e) => e.type === "tool" && e.tool).map((e) => {
|
|
61
61
|
let t = e.state?.status ?? "running", n = e.tool ?? "tool";
|
|
62
62
|
return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let n = e.filter((e) => e.info?.role === "assistant" &&
|
|
65
|
+
function Ue(e, t) {
|
|
66
|
+
let n = e.filter((e) => e.info?.role === "assistant" && j(e) > t).sort((e, t) => j(e) - j(t));
|
|
67
67
|
if (n.length === 0) return {
|
|
68
68
|
content: "Thinking...",
|
|
69
69
|
done: !1
|
|
70
70
|
};
|
|
71
|
-
let r = n[n.length - 1], i =
|
|
71
|
+
let r = n[n.length - 1], i = M(r.parts), a = k(r.parts), o = N(r.parts), s = Ee(r.parts), ee = [
|
|
72
|
+
i,
|
|
73
|
+
...a,
|
|
74
|
+
...o
|
|
75
|
+
].filter(Boolean).join("\n\n") || "Thinking...", c = r.info?.providerID, l = r.info?.modelID;
|
|
72
76
|
return {
|
|
73
|
-
content:
|
|
74
|
-
i,
|
|
75
|
-
...a,
|
|
76
|
-
...o
|
|
77
|
-
].filter(Boolean).join("\n\n") || "Thinking...",
|
|
77
|
+
content: ee,
|
|
78
78
|
done: !!r.info?.time?.completed && (!!i || a.length > 0 || o.length > 0),
|
|
79
79
|
tokens: r.info?.tokens,
|
|
80
|
+
messageId: r.info?.id,
|
|
81
|
+
...c && l ? { model: `${c}/${l}` } : {},
|
|
80
82
|
...s ? { pendingWrite: s } : {}
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
|
-
function
|
|
85
|
+
function We(e) {
|
|
84
86
|
switch (e) {
|
|
85
87
|
case "provisioning": return "Starting assistant environment...";
|
|
86
88
|
case "connecting": return "Connecting to assistant...";
|
|
@@ -88,95 +90,95 @@ function Ge(e) {
|
|
|
88
90
|
default: return "";
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
|
-
var
|
|
92
|
-
let
|
|
93
|
+
var Ge = ({ visible: Ee = !0 }) => {
|
|
94
|
+
let k = Pe(), M = Ie("workspace"), { getAccessToken: N, getWorkspaceToken: Ge, userId: Ke } = Le(), { locale: qe } = Ne(), Je = e((e) => e.assistantLanguage), Ye = e((e) => e.replyLanguage), Xe = D(() => _(Je, Ye, qe), [
|
|
95
|
+
Je,
|
|
93
96
|
Ye,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
mt || (!wt || wt.requiresAdmin && !pt) && P !== "assistant" && F("assistant");
|
|
97
|
+
qe
|
|
98
|
+
]), Ze = Xe.reply.english, Qe = Xe.replyIsExplicit, $e = Xe.reply.code, { conversations: et, activeConversationId: P, mode: F, processingByConversationId: tt, setMode: I, setConversationMode: L, setActiveConversation: nt, createConversation: R, addMessage: z, updateMessage: rt, patchMessage: B, mergeMessageMetadata: it, setConversationProcessing: V, clearConversationProcessing: at, setBackendSessionId: ot, clearBackendSessionId: H, setSandbox: U, clearSandbox: st, acknowledgeApiCalls: ct } = e(), W = _e(et.find((e) => e.id === P)), G = W.all, lt = P ? tt[P] : void 0, ut = we(lt?.status), dt = ut ? lt?.messageId ?? null : null, ft = lt?.status === "error" ? lt.messageId : null, { canUseApiCalls: pt, loading: mt } = he(v()), ht = ge(ne(), y() || null), gt = D(() => w.filter((e) => !e.requiresAdmin || pt), [pt]), [_t, vt] = Me(null), [yt, bt] = Me(!1), xt = O({}), St = O(je()), Ct = O(/* @__PURE__ */ new Set()), wt = D(() => w.find((e) => e.id === F), [F]);
|
|
99
|
+
E(() => {
|
|
100
|
+
mt || (!wt || wt.requiresAdmin && !pt) && F !== "assistant" && I("assistant");
|
|
99
101
|
}, [
|
|
100
|
-
|
|
102
|
+
F,
|
|
101
103
|
wt,
|
|
102
104
|
pt,
|
|
103
105
|
mt,
|
|
104
|
-
|
|
106
|
+
I
|
|
105
107
|
]);
|
|
106
|
-
let K =
|
|
107
|
-
|
|
108
|
-
}, [
|
|
108
|
+
let K = T((e, t, n, r) => {
|
|
109
|
+
V(e, n, t, null), r ? rt(e, t, r) : rt(e, t, We(n));
|
|
110
|
+
}, [V, rt]), Tt = T(async (t, i, o, s, c) => {
|
|
109
111
|
let l = e.getState().sandboxesByMode[o]?.sandboxId ?? null, te = async (e) => {
|
|
110
112
|
if (St.current.isFresh(e)) return !0;
|
|
111
113
|
try {
|
|
112
|
-
return await d(
|
|
114
|
+
return await d(M, e, s, c, 3e5, (e) => K(t, i, "provisioning", e)), await u(M, e, s, c, 9e4, (e) => K(t, i, "connecting", e)), St.current.markVerified(e), !0;
|
|
113
115
|
} catch {
|
|
114
116
|
return St.current.invalidate(e), !1;
|
|
115
117
|
}
|
|
116
118
|
};
|
|
117
|
-
if (l && (
|
|
119
|
+
if (l && (U(o, l, "provisioning"), K(t, i, "provisioning", "Reusing assistant environment..."), await te(l) || (U(o, null, "provisioning"), l = null)), !l) {
|
|
118
120
|
K(t, i, "provisioning", "Looking for existing environment...");
|
|
119
|
-
let e = await a(
|
|
120
|
-
e && (
|
|
121
|
+
let e = await a(M, s, o, c);
|
|
122
|
+
e && (U(o, e, "provisioning"), K(t, i, "provisioning", "Reusing assistant environment..."), await te(e) ? l = e : U(o, null, "provisioning"));
|
|
121
123
|
}
|
|
122
124
|
if (!l) {
|
|
123
|
-
if (o === "api-calls" && !
|
|
124
|
-
K(t, i, "provisioning", "Starting assistant environment..."),
|
|
125
|
+
if (o === "api-calls" && !N()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
|
|
126
|
+
K(t, i, "provisioning", "Starting assistant environment..."), U(o, null, "provisioning"), l = await n(M, o, s, c), U(o, l, "provisioning"), await d(M, l, s, c, 3e5, (e) => K(t, i, "provisioning", e)), await u(M, l, s, c, 9e4, (e) => K(t, i, "connecting", e));
|
|
125
127
|
}
|
|
126
|
-
|
|
128
|
+
U(o, l, "running");
|
|
127
129
|
let f = e.getState().conversations.find((e) => e.id === t)?.backendSessionId ?? null;
|
|
128
130
|
if (f) try {
|
|
129
|
-
let e = await ee(
|
|
131
|
+
let e = await ee(M, l, s, f, c);
|
|
130
132
|
if (e.mode !== o) throw Error(`Session mode mismatch: expected ${o}, received ${e.mode}`);
|
|
131
133
|
} catch {
|
|
132
|
-
|
|
134
|
+
H(t), f = null;
|
|
133
135
|
}
|
|
134
|
-
return f || (K(t, i, "connecting", "Preparing session..."), f = (await r(
|
|
136
|
+
return f || (K(t, i, "connecting", "Preparing session..."), f = (await r(M, l, s, o, c)).sessionId, ot(t, f)), {
|
|
135
137
|
sandboxId: l,
|
|
136
138
|
sessionId: f
|
|
137
139
|
};
|
|
138
140
|
}, [
|
|
139
|
-
j,
|
|
140
|
-
V,
|
|
141
141
|
M,
|
|
142
|
-
st,
|
|
143
142
|
H,
|
|
143
|
+
N,
|
|
144
|
+
ot,
|
|
145
|
+
U,
|
|
144
146
|
K
|
|
145
|
-
]), q =
|
|
146
|
-
let ee = a.voiceSessionId !== void 0, u = e.getState(), d = u.activeConversationId ??
|
|
147
|
-
if (d && (
|
|
148
|
-
let f = u.mode, m =
|
|
149
|
-
if (m ? h && h.mode !== f && (h.messages.length > 0 || h.backendSessionId) ? m =
|
|
147
|
+
]), q = T(async (n, r = [], a = {}) => {
|
|
148
|
+
let ee = a.voiceSessionId !== void 0, u = e.getState(), d = u.activeConversationId ?? P;
|
|
149
|
+
if (d && (we(u.processingByConversationId[d]?.status) || Ct.current.has(d))) return;
|
|
150
|
+
let f = u.mode, m = P, h = m ? e.getState().conversations.find((e) => e.id === m) : void 0;
|
|
151
|
+
if (m ? h && h.mode !== f && (h.messages.length > 0 || h.backendSessionId) ? m = R(void 0, f) : h && h.mode !== f && L(m, f) : m = R(void 0, f), !m) return;
|
|
150
152
|
xt.current[m] = r;
|
|
151
|
-
let g =
|
|
152
|
-
accessToken:
|
|
153
|
-
workspaceToken:
|
|
154
|
-
userId:
|
|
155
|
-
organizationId:
|
|
156
|
-
},
|
|
157
|
-
id:
|
|
153
|
+
let g = y(), _ = {
|
|
154
|
+
accessToken: N(),
|
|
155
|
+
workspaceToken: Ge(),
|
|
156
|
+
userId: Ke,
|
|
157
|
+
organizationId: v()
|
|
158
|
+
}, ne = {
|
|
159
|
+
id: Ve(),
|
|
158
160
|
role: "user",
|
|
159
161
|
content: n,
|
|
160
162
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
161
163
|
metadata: {
|
|
162
|
-
...r.length ? { attachments: r.map(
|
|
164
|
+
...r.length ? { attachments: r.map(se) } : {},
|
|
163
165
|
...p(a.voiceSessionId)
|
|
164
166
|
}
|
|
165
167
|
};
|
|
166
|
-
|
|
167
|
-
let
|
|
168
|
-
|
|
169
|
-
id:
|
|
168
|
+
z(m, ne);
|
|
169
|
+
let b = Ve();
|
|
170
|
+
z(m, {
|
|
171
|
+
id: b,
|
|
170
172
|
role: "assistant",
|
|
171
173
|
content: "",
|
|
172
174
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
173
175
|
metadata: {
|
|
174
|
-
lang:
|
|
176
|
+
lang: $e,
|
|
175
177
|
...p(a.voiceSessionId)
|
|
176
178
|
}
|
|
177
|
-
}),
|
|
178
|
-
let x = (e, t, n, r, i =
|
|
179
|
-
|
|
179
|
+
}), V(m, "provisioning", b, null);
|
|
180
|
+
let x = (e, t, n, r, i = $e) => {
|
|
181
|
+
B(m, b, { content: He(e) }), it(m, b, {
|
|
180
182
|
lang: i,
|
|
181
183
|
...t?.length ? { artifacts: t } : {},
|
|
182
184
|
...t?.length || n || r ? { mode: f } : {},
|
|
@@ -187,44 +189,44 @@ var Ke = ({ visible: De = !0 }) => {
|
|
|
187
189
|
}, S = async (e = 1) => {
|
|
188
190
|
let a = !1;
|
|
189
191
|
try {
|
|
190
|
-
await t(
|
|
192
|
+
await t(M, g, _);
|
|
191
193
|
} catch (e) {
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
+
if (ve(e)) {
|
|
195
|
+
ye("ai-credits"), x("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting.", void 0, void 0, void 0, "en"), V(m, "error", b, null);
|
|
194
196
|
return;
|
|
195
197
|
}
|
|
196
198
|
console.warn("[assistant] AI-credit pre-flight check failed with a non-quota error; proceeding — gateway @usage(checkQuota) still enforces the real budget downstream", e);
|
|
197
199
|
}
|
|
198
200
|
try {
|
|
199
|
-
let { sandboxId: e, sessionId: t } = await Tt(m,
|
|
200
|
-
K(m,
|
|
201
|
-
let d =
|
|
202
|
-
a =
|
|
201
|
+
let { sandboxId: e, sessionId: t } = await Tt(m, b, f, g, _), u = (await s(M, e, g, t, _, 50).catch(() => [])).reduce((e, t) => Math.max(e, j(t)), 0);
|
|
202
|
+
K(m, b, "streaming", "Thinking...");
|
|
203
|
+
let d = xe(f, ie(n, r), Ze, Qe, ee), p = re(d, r), h = oe(p), ne = h > 0, v = te();
|
|
204
|
+
a = ae(r) > h;
|
|
203
205
|
try {
|
|
204
|
-
await l(
|
|
206
|
+
await l(M, e, g, t, d, f, v, _, p);
|
|
205
207
|
} catch (n) {
|
|
206
|
-
if (!p || !
|
|
207
|
-
await l(
|
|
208
|
+
if (!p || !Se(n)) throw n;
|
|
209
|
+
await l(M, e, g, t, d, f, v, _, void 0), a ||= ne;
|
|
208
210
|
}
|
|
209
|
-
let
|
|
210
|
-
for (; Date.now() <
|
|
211
|
-
if (!
|
|
212
|
-
let
|
|
213
|
-
if (
|
|
214
|
-
...
|
|
215
|
-
content: `${
|
|
216
|
-
}), a && (
|
|
217
|
-
...
|
|
218
|
-
content: `${
|
|
219
|
-
}), x(
|
|
220
|
-
|
|
211
|
+
let y = Ue([], u), se = Date.now() + (Re[f] ?? ze), S = Date.now(), C = Date.now();
|
|
212
|
+
for (; Date.now() < se && (y = Ue(await s(M, e, g, t, _, 50, u), u), B(m, b, { content: He(y.content) }), y.pendingWrite && it(m, b, { pendingWrite: y.pendingWrite }), !y.done);) Date.now() - S > 3e4 && (await i(M, e, g, 600, _).catch(() => void 0), S = Date.now()), await new Promise((e) => setTimeout(e, Te(Date.now() - C)));
|
|
213
|
+
if (!y.done && f !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
|
|
214
|
+
let w = f === "vibe-plugins" ? await o(M, e, g, t, _).catch(() => []) : void 0;
|
|
215
|
+
if (y.done || (y = {
|
|
216
|
+
...y,
|
|
217
|
+
content: `${y.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
|
|
218
|
+
}), a && (y = {
|
|
219
|
+
...y,
|
|
220
|
+
content: `${y.content}\n\n${k("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._")}`
|
|
221
|
+
}), x(y.content, w, t, e), y.tokens) {
|
|
222
|
+
B(m, b, { tokens: y.tokens });
|
|
221
223
|
try {
|
|
222
|
-
await c(
|
|
224
|
+
await c(M, g, t, y.messageId, y.model, y.tokens, _), be();
|
|
223
225
|
} catch {}
|
|
224
226
|
}
|
|
225
|
-
|
|
227
|
+
V(m, "complete", b, null);
|
|
226
228
|
} catch (t) {
|
|
227
|
-
if (e === 1 &&
|
|
229
|
+
if (e === 1 && Ce(t)) return H(m), st(f), S(2);
|
|
228
230
|
throw t;
|
|
229
231
|
}
|
|
230
232
|
}, C = m;
|
|
@@ -233,12 +235,12 @@ var Ke = ({ visible: De = !0 }) => {
|
|
|
233
235
|
if (!g) throw Error("Assistant backend is unavailable without an active workspace context.");
|
|
234
236
|
await S();
|
|
235
237
|
} catch (t) {
|
|
236
|
-
if (St.current.invalidate(e.getState().sandboxesByMode[f]?.sandboxId ?? null),
|
|
237
|
-
|
|
238
|
+
if (St.current.invalidate(e.getState().sandboxesByMode[f]?.sandboxId ?? null), ve(t)) {
|
|
239
|
+
ye("sandbox"), x("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant.", void 0, void 0, void 0, "en"), V(m, "error", b, null);
|
|
238
240
|
return;
|
|
239
241
|
}
|
|
240
242
|
let n = t instanceof Error ? t.message : "Something went wrong";
|
|
241
|
-
|
|
243
|
+
V(m, "error", b, n), B(m, b, { content: `Sorry, an error occurred: ${n}. Please try again.` }), it(m, b, {
|
|
242
244
|
lang: "en",
|
|
243
245
|
...p(a.voiceSessionId)
|
|
244
246
|
});
|
|
@@ -246,188 +248,188 @@ var Ke = ({ visible: De = !0 }) => {
|
|
|
246
248
|
Ct.current.delete(C);
|
|
247
249
|
}
|
|
248
250
|
}, [
|
|
249
|
-
|
|
250
|
-
R,
|
|
251
|
-
j,
|
|
252
|
-
V,
|
|
253
|
-
ct,
|
|
254
|
-
tt,
|
|
255
|
-
L,
|
|
256
|
-
Tt,
|
|
257
|
-
M,
|
|
258
|
-
Ke,
|
|
251
|
+
P,
|
|
259
252
|
z,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
Qe,
|
|
253
|
+
M,
|
|
254
|
+
H,
|
|
263
255
|
st,
|
|
264
|
-
|
|
256
|
+
et,
|
|
257
|
+
R,
|
|
258
|
+
Tt,
|
|
259
|
+
N,
|
|
260
|
+
Ge,
|
|
265
261
|
B,
|
|
266
|
-
|
|
262
|
+
Qe,
|
|
263
|
+
$e,
|
|
264
|
+
Ze,
|
|
265
|
+
ot,
|
|
266
|
+
L,
|
|
267
|
+
V,
|
|
268
|
+
k,
|
|
267
269
|
K,
|
|
268
|
-
|
|
269
|
-
]), Et =
|
|
270
|
+
Ke
|
|
271
|
+
]), Et = T((e) => {
|
|
270
272
|
q(e);
|
|
271
|
-
}, [q]), Dt =
|
|
272
|
-
let e = [...
|
|
273
|
+
}, [q]), Dt = T(() => {
|
|
274
|
+
let e = [...W.chat].reverse().find((e) => e.role === "user"), t = P ? xt.current[P] ?? [] : [];
|
|
273
275
|
e && q(e.content, t);
|
|
274
276
|
}, [
|
|
275
|
-
|
|
277
|
+
G,
|
|
276
278
|
q,
|
|
277
|
-
|
|
278
|
-
]),
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
P
|
|
280
|
+
]), Ot = O(q);
|
|
281
|
+
E(() => {
|
|
282
|
+
Ot.current = q;
|
|
281
283
|
}, [q]);
|
|
282
|
-
let
|
|
284
|
+
let J = D(() => {
|
|
283
285
|
if (ut) return null;
|
|
284
|
-
for (let e =
|
|
285
|
-
let t =
|
|
286
|
+
for (let e = G.length - 1; e >= 0; --e) {
|
|
287
|
+
let t = G[e];
|
|
286
288
|
if (t?.role !== "assistant" || !f(t)) continue;
|
|
287
|
-
let n =
|
|
289
|
+
let n = x(t.content).text.trim();
|
|
288
290
|
return n ? {
|
|
289
291
|
id: t.id,
|
|
290
292
|
text: n
|
|
291
293
|
} : null;
|
|
292
294
|
}
|
|
293
295
|
return null;
|
|
294
|
-
}, [
|
|
296
|
+
}, [G, ut]), kt = D(() => J ? De(J.text) : null, [J]), At = W.chat, Y = D(() => W.voice.filter((e) => e.role === "user" || e.role === "assistant").map((e) => ({
|
|
295
297
|
id: e.id,
|
|
296
298
|
role: e.role,
|
|
297
|
-
text:
|
|
299
|
+
text: x(e.content).text.trim(),
|
|
298
300
|
sessionId: m(e),
|
|
299
301
|
timestamp: e.timestamp
|
|
300
|
-
})).filter((e) => e.text.length > 0), [
|
|
302
|
+
})).filter((e) => e.text.length > 0), [W.voice]), jt = T(() => {
|
|
301
303
|
if (Y.length === 0) return;
|
|
302
304
|
let e = /* @__PURE__ */ new Date();
|
|
303
|
-
h(
|
|
304
|
-
title:
|
|
305
|
-
savedAt:
|
|
306
|
-
session:
|
|
307
|
-
earlier:
|
|
308
|
-
you:
|
|
309
|
-
assistant:
|
|
310
|
-
}, e),
|
|
311
|
-
}, [Y,
|
|
305
|
+
h(ke(Y, {
|
|
306
|
+
title: k("voiceSession.transcript", "Voice conversation"),
|
|
307
|
+
savedAt: k("voiceSession.savedAt", "Saved"),
|
|
308
|
+
session: k("voiceSession.sessionLabel", "Session"),
|
|
309
|
+
earlier: k("voiceSession.earlierLabel", "Earlier"),
|
|
310
|
+
you: k("voiceSession.speakerYou", "You"),
|
|
311
|
+
assistant: k("voiceSession.speakerAssistant", "Assistant")
|
|
312
|
+
}, e), Ae(e), "text/markdown");
|
|
313
|
+
}, [Y, k]), X = de(), Z = O(X);
|
|
312
314
|
Z.current = X;
|
|
313
|
-
let Q =
|
|
314
|
-
onSubmit:
|
|
315
|
+
let Q = me({
|
|
316
|
+
onSubmit: T((e, t) => {
|
|
315
317
|
let n = () => {
|
|
316
|
-
let n = Z.current, r =
|
|
317
|
-
|
|
318
|
+
let n = Z.current, r = b(n.attachments);
|
|
319
|
+
Ot.current(e, r, { voiceSessionId: t }), n.clear();
|
|
318
320
|
};
|
|
319
321
|
if (!Z.current.isBusy) {
|
|
320
322
|
n();
|
|
321
323
|
return;
|
|
322
324
|
}
|
|
323
325
|
let r = Date.now(), i = window.setInterval(() => {
|
|
324
|
-
Z.current.isBusy && Date.now() - r <
|
|
326
|
+
Z.current.isBusy && Date.now() - r < Be || (window.clearInterval(i), n());
|
|
325
327
|
}, 200);
|
|
326
328
|
}, []),
|
|
327
|
-
latestReply:
|
|
328
|
-
language: g(
|
|
329
|
-
}), Mt =
|
|
329
|
+
latestReply: J,
|
|
330
|
+
language: g(Je, qe).tag
|
|
331
|
+
}), Mt = T(() => {
|
|
330
332
|
let t = e.getState().activeConversationId;
|
|
331
|
-
!t || Y.length === 0 || (
|
|
332
|
-
id:
|
|
333
|
+
!t || Y.length === 0 || (z(t, {
|
|
334
|
+
id: Ve(),
|
|
333
335
|
role: "system",
|
|
334
|
-
content:
|
|
335
|
-
intro:
|
|
336
|
-
nothing:
|
|
337
|
-
more: (e) =>
|
|
336
|
+
content: Oe(Y, {
|
|
337
|
+
intro: k("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
|
|
338
|
+
nothing: k("voiceSession.continuedNothing", "Continued from a voice conversation."),
|
|
339
|
+
more: (e) => k("voiceSession.continuedMore", "…and {{count}} more", { count: e })
|
|
338
340
|
}),
|
|
339
341
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
340
342
|
}), bt(!1), Q.end());
|
|
341
343
|
}, [
|
|
342
344
|
Y,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
+
z,
|
|
346
|
+
k
|
|
345
347
|
]);
|
|
346
|
-
|
|
347
|
-
!
|
|
348
|
-
}, [
|
|
348
|
+
E(() => {
|
|
349
|
+
!Ee && Q.active && Q.end();
|
|
350
|
+
}, [Ee, Q]), E(() => {
|
|
349
351
|
Q.active || Z.current.clear();
|
|
350
|
-
}, [Q.active]),
|
|
352
|
+
}, [Q.active]), E(() => {
|
|
351
353
|
let t = e.getState().consumePendingPrompt();
|
|
352
|
-
return t &&
|
|
354
|
+
return t && Ot.current(t), e.subscribe((t, n) => {
|
|
353
355
|
if (t.pendingPrompt && t.pendingPrompt !== n.pendingPrompt) {
|
|
354
356
|
let t = e.getState().consumePendingPrompt();
|
|
355
|
-
t &&
|
|
357
|
+
t && Ot.current(t);
|
|
356
358
|
}
|
|
357
359
|
});
|
|
358
360
|
}, []);
|
|
359
|
-
let $ =
|
|
360
|
-
let n =
|
|
361
|
+
let $ = T((t) => {
|
|
362
|
+
let n = P ? e.getState().conversations.find((e) => e.id === P) : void 0;
|
|
361
363
|
if (n && (n.messages.length > 0 || n.backendSessionId)) {
|
|
362
364
|
if (n.mode !== t) {
|
|
363
365
|
let n = e.getState().conversations.find((n) => n.mode === t && n.messages.length === 0 && !n.backendSessionId && !e.getState().processingByConversationId[n.id]);
|
|
364
|
-
n ?
|
|
366
|
+
n ? nt(n.id) : R(void 0, t);
|
|
365
367
|
}
|
|
366
|
-
} else
|
|
367
|
-
|
|
368
|
+
} else P && L(P, t);
|
|
369
|
+
I(t);
|
|
368
370
|
}, [
|
|
369
|
-
|
|
371
|
+
P,
|
|
372
|
+
R,
|
|
373
|
+
nt,
|
|
370
374
|
L,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
]), Nt = w((t) => {
|
|
375
|
-
if (le.find((e) => e.id === t)?.writeCapable && !e.getState().apiCallsAcknowledged) {
|
|
375
|
+
I
|
|
376
|
+
]), Nt = T((t) => {
|
|
377
|
+
if (w.find((e) => e.id === t)?.writeCapable && !e.getState().apiCallsAcknowledged) {
|
|
376
378
|
vt(t);
|
|
377
379
|
return;
|
|
378
380
|
}
|
|
379
381
|
$(t);
|
|
380
|
-
}, [$]), Pt =
|
|
382
|
+
}, [$]), Pt = T(() => {
|
|
381
383
|
let e = _t;
|
|
382
|
-
vt(null),
|
|
384
|
+
vt(null), ct(), e && $(e);
|
|
383
385
|
}, [
|
|
384
386
|
_t,
|
|
385
|
-
|
|
387
|
+
ct,
|
|
386
388
|
$
|
|
387
|
-
]), Ft =
|
|
389
|
+
]), Ft = T(() => {
|
|
388
390
|
vt(null);
|
|
389
391
|
}, []);
|
|
390
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ Fe("div", {
|
|
391
393
|
className: "relative flex flex-1 flex-col overflow-hidden",
|
|
392
394
|
children: [
|
|
393
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ Fe("div", {
|
|
394
396
|
className: "contents",
|
|
395
397
|
inert: Q.active || void 0,
|
|
396
398
|
children: [
|
|
397
|
-
Y.length > 0 && !Q.active ? /* @__PURE__ */
|
|
399
|
+
Y.length > 0 && !Q.active ? /* @__PURE__ */ A(le, {
|
|
398
400
|
count: Y.length,
|
|
399
401
|
onOpenTranscript: () => bt(!0)
|
|
400
402
|
}) : null,
|
|
401
|
-
At.length === 0 ? /* @__PURE__ */
|
|
402
|
-
mode:
|
|
403
|
+
At.length === 0 ? /* @__PURE__ */ A(ce, {
|
|
404
|
+
mode: F,
|
|
403
405
|
onSuggestionClick: Et
|
|
404
|
-
}) : /* @__PURE__ */
|
|
406
|
+
}) : /* @__PURE__ */ A("div", {
|
|
405
407
|
className: "flex min-h-0 flex-1 flex-col",
|
|
406
|
-
children: /* @__PURE__ */
|
|
408
|
+
children: /* @__PURE__ */ A(S, {
|
|
407
409
|
messages: At,
|
|
408
410
|
streamingMessageId: dt,
|
|
409
411
|
failedMessageId: ft,
|
|
410
412
|
onRetry: Dt
|
|
411
413
|
})
|
|
412
414
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
onStartVoiceSession: Q.available &&
|
|
415
|
+
/* @__PURE__ */ A(fe, {
|
|
416
|
+
onStartVoiceSession: Q.available && F !== "api-calls" ? Q.start : void 0,
|
|
415
417
|
onSend: (e, t) => void q(e, t),
|
|
416
418
|
disabled: ut,
|
|
417
|
-
placeholder:
|
|
418
|
-
mode:
|
|
419
|
+
placeholder: F === "api-calls" ? k("chatArea.placeholderActions", "What would you like me to do?") : k("chatArea.placeholderGeneral", "Ask HealthyBowl anything…"),
|
|
420
|
+
mode: F,
|
|
419
421
|
writeAccessDenied: ht === "denied" && !!wt?.writeCapable,
|
|
420
422
|
availableModes: gt,
|
|
421
423
|
onModeChange: Nt
|
|
422
424
|
})
|
|
423
425
|
]
|
|
424
426
|
}),
|
|
425
|
-
yt && !Q.active ? /* @__PURE__ */
|
|
427
|
+
yt && !Q.active ? /* @__PURE__ */ A(ue, {
|
|
426
428
|
turns: Y,
|
|
427
429
|
onClose: () => bt(!1),
|
|
428
430
|
onSave: jt
|
|
429
431
|
}) : null,
|
|
430
|
-
Q.active && /* @__PURE__ */
|
|
432
|
+
Q.active && /* @__PURE__ */ A(pe, {
|
|
431
433
|
session: Q.session,
|
|
432
434
|
notice: Q.notice,
|
|
433
435
|
capturing: Q.capturing,
|
|
@@ -448,7 +450,7 @@ var Ke = ({ visible: De = !0 }) => {
|
|
|
448
450
|
onToggleMute: Q.toggleMute,
|
|
449
451
|
onEnd: Q.end
|
|
450
452
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ A(C, {
|
|
452
454
|
open: _t !== null,
|
|
453
455
|
onConfirm: Pt,
|
|
454
456
|
onCancel: Ft
|
|
@@ -457,6 +459,6 @@ var Ke = ({ visible: De = !0 }) => {
|
|
|
457
459
|
});
|
|
458
460
|
};
|
|
459
461
|
//#endregion
|
|
460
|
-
export {
|
|
462
|
+
export { Ge as AssistantChatArea };
|
|
461
463
|
|
|
462
464
|
//# sourceMappingURL=AssistantChatArea.js.map
|