@burdenoff/microfe-healthybowl 2026.904.15 → 2026.904.16
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 +72 -74
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoot.js +56 -57
- package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoutes.js +36 -48
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
- package/dist/healthybowl/components/PageLayout.js +10 -11
- 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/useHealthyBowlCompliance.js +141 -157
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -18
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +37 -52
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +78 -135
- 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/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/OfflineStatusPill.js +21 -40
- package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
- package/dist/healthybowl/offline/OfflineSyncProvider.js +130 -153
- package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/store.js +1 -1
- package/dist/healthybowl/offline/syncEngine.js +1 -2
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/GettingStartedPage.js +0 -1
- package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
- 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 +99 -136
- package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +162 -204
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +178 -196
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +141 -142
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +0 -2
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +272 -316
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +0 -6
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +846 -871
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +334 -376
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +188 -415
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/labels.js +2 -10
- package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +0 -1
- 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 +0 -2
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +107 -92
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- 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 +307 -338
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +102 -126
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +215 -257
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js +0 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js +0 -4
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +9 -8
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +130 -129
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +237 -285
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
- package/dist/healthybowl/utils/plantingCapacity.js +10 -10
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +86 -74
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/services/assistantApi.js +31 -60
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/utils/pageContext.js +1 -15
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
- package/dist/healthybowl/hooks/useAgronomyDecisions.js +0 -79
- package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +0 -1
- package/dist/healthybowl/hooks/useAnalyticsReports.js +0 -173
- package/dist/healthybowl/hooks/useAnalyticsReports.js.map +0 -1
- package/dist/healthybowl/hooks/useComplianceExports.js +0 -74
- package/dist/healthybowl/hooks/useComplianceExports.js.map +0 -1
- package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +0 -88
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +0 -1
- package/dist/healthybowl/offline/HeaderOfflinePill.js +0 -28
- package/dist/healthybowl/offline/HeaderOfflinePill.js.map +0 -1
- package/dist/healthybowl/offline/captureCache.js +0 -30
- package/dist/healthybowl/offline/captureCache.js.map +0 -1
- package/dist/healthybowl/offline/headerSlot.js +0 -24
- package/dist/healthybowl/offline/headerSlot.js.map +0 -1
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js +0 -287
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +0 -291
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +0 -300
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js +0 -135
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
- package/dist/healthybowl/pages/livestock/PedigreeTree.js +0 -154
- package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +0 -1
- package/dist/healthybowl/pages/livestock/eidTagInput.js +0 -39
- package/dist/healthybowl/pages/livestock/eidTagInput.js.map +0 -1
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js +0 -68
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +0 -1
- package/dist/healthybowl/pages/weather/alertDelivery.js +0 -105
- package/dist/healthybowl/pages/weather/alertDelivery.js.map +0 -1
- package/dist/healthybowl/utils/icsInspection.js +0 -18
- package/dist/healthybowl/utils/icsInspection.js.map +0 -1
|
@@ -6,18 +6,18 @@ import { resolveLanguagePair as p } from "../../config/assistantLanguagePair.js"
|
|
|
6
6
|
import { AssistantMessageList as m } from "./AssistantMessageList.js";
|
|
7
7
|
import { AssistantApiCallsConsentDialog as h } from "./AssistantApiCallsConsentDialog.js";
|
|
8
8
|
import { AssistantEmptyState as g } from "./AssistantEmptyState.js";
|
|
9
|
-
import { AssistantSpokenTurnsNotice as
|
|
10
|
-
import { VoiceTranscriptDrawer as
|
|
11
|
-
import { getActorId as
|
|
12
|
-
import { buildPromptParts as
|
|
13
|
-
import { useAssistantAttachments as
|
|
14
|
-
import { AssistantComposer as
|
|
15
|
-
import { AssistantVoiceSession as
|
|
16
|
-
import { parseToolActivity as
|
|
17
|
-
import { useVoiceSession as
|
|
18
|
-
import { useAssistantApiAccess as
|
|
19
|
-
import { useWorkspaceWriteAccess as
|
|
20
|
-
import { isVoiceTurn as
|
|
9
|
+
import { AssistantSpokenTurnsNotice as ne } from "./AssistantSpokenTurnsNotice.js";
|
|
10
|
+
import { VoiceTranscriptDrawer as _ } from "./voice/VoiceTranscriptDrawer.js";
|
|
11
|
+
import { getActorId as v, getOrganizationId as re, getWorkspaceId as y } from "../../utils/assistantContext.js";
|
|
12
|
+
import { buildPromptParts as ie, buildPromptWithAttachments as ae, countInlineImageCandidates as oe, countInlinedImageParts as se, getSendableAttachments as b, toMessageAttachment as ce } from "../../utils/assistantAttachments.js";
|
|
13
|
+
import { useAssistantAttachments as x } from "../../hooks/useAssistantAttachments.js";
|
|
14
|
+
import { AssistantComposer as le } from "./composer/AssistantComposer.js";
|
|
15
|
+
import { AssistantVoiceSession as ue } from "./voice/AssistantVoiceSession.js";
|
|
16
|
+
import { parseToolActivity as de } from "./AssistantToolActivity.js";
|
|
17
|
+
import { useVoiceSession as fe } from "../../hooks/useVoiceSession.js";
|
|
18
|
+
import { useAssistantApiAccess as pe } from "../../hooks/useAssistantApiAccess.js";
|
|
19
|
+
import { useWorkspaceWriteAccess as me } from "../../hooks/useWorkspaceWriteAccess.js";
|
|
20
|
+
import { isVoiceTurn as he, voiceMarker as S, voiceSessionIdOf as ge } from "../../utils/voiceTurnVisibility.js";
|
|
21
21
|
import { useConversationTurns as _e } from "../../hooks/useConversationTurns.js";
|
|
22
22
|
import { isQuotaExhaustedError as ve } from "../../utils/quotaUtils.js";
|
|
23
23
|
import { dispatchAssistantQuotaExhausted as ye, notifyAiCreditsUpdated as be } from "../../utils/aiCredits.js";
|
|
@@ -68,17 +68,15 @@ function Ge(e, t) {
|
|
|
68
68
|
content: "Thinking...",
|
|
69
69
|
done: !1
|
|
70
70
|
};
|
|
71
|
-
let r = n[n.length - 1], i = A(r.parts), a = O(r.parts), o = j(r.parts), s = De(r.parts)
|
|
72
|
-
i,
|
|
73
|
-
...a,
|
|
74
|
-
...o
|
|
75
|
-
].filter(Boolean).join("\n\n") || "Thinking...", c = r.info?.providerID, l = r.info?.modelID;
|
|
71
|
+
let r = n[n.length - 1], i = A(r.parts), a = O(r.parts), o = j(r.parts), s = De(r.parts);
|
|
76
72
|
return {
|
|
77
|
-
content:
|
|
73
|
+
content: [
|
|
74
|
+
i,
|
|
75
|
+
...a,
|
|
76
|
+
...o
|
|
77
|
+
].filter(Boolean).join("\n\n") || "Thinking...",
|
|
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}` } : {},
|
|
82
80
|
...s ? { pendingWrite: s } : {}
|
|
83
81
|
};
|
|
84
82
|
}
|
|
@@ -95,7 +93,7 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
95
93
|
Xe,
|
|
96
94
|
Ze,
|
|
97
95
|
Ye
|
|
98
|
-
]), $e = Qe.reply.english, et = Qe.replyIsExplicit, tt = Qe.reply.code, { conversations: nt, activeConversationId: M, mode: N, processingByConversationId: rt, setMode: P, setConversationMode: F, setActiveConversation: it, createConversation: I, addMessage: L, updateMessage: at, patchMessage: R, mergeMessageMetadata: ot, setConversationProcessing: z, clearConversationProcessing: st, setBackendSessionId: ct, clearBackendSessionId: B, setSandbox: V, clearSandbox: lt, acknowledgeApiCalls: ut } = e(), H = _e(nt.find((e) => e.id === M)), U = H.all, W = M ? rt[M] : void 0, G = we(W?.status), dt = G ? W?.messageId ?? null : null, ft = W?.status === "error" ? W.messageId : null, { canUseApiCalls: pt, loading: mt } =
|
|
96
|
+
]), $e = Qe.reply.english, et = Qe.replyIsExplicit, tt = Qe.reply.code, { conversations: nt, activeConversationId: M, mode: N, processingByConversationId: rt, setMode: P, setConversationMode: F, setActiveConversation: it, createConversation: I, addMessage: L, updateMessage: at, patchMessage: R, mergeMessageMetadata: ot, setConversationProcessing: z, clearConversationProcessing: st, setBackendSessionId: ct, clearBackendSessionId: B, setSandbox: V, clearSandbox: lt, acknowledgeApiCalls: ut } = e(), H = _e(nt.find((e) => e.id === M)), U = H.all, W = M ? rt[M] : void 0, G = we(W?.status), dt = G ? W?.messageId ?? null : null, ft = W?.status === "error" ? W.messageId : null, { canUseApiCalls: pt, loading: mt } = pe(re()), ht = me(v(), y() || null), gt = T(() => Te.filter((e) => !e.requiresAdmin || pt), [pt]), [_t, vt] = Pe(null), [yt, bt] = Pe(!1), xt = E({}), St = E(Ne()), Ct = E(/* @__PURE__ */ new Set()), wt = T(() => Te.find((e) => e.id === N), [N]);
|
|
99
97
|
w(() => {
|
|
100
98
|
mt || (!wt || wt.requiresAdmin && !pt) && N !== "assistant" && P("assistant");
|
|
101
99
|
}, [
|
|
@@ -150,102 +148,102 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
150
148
|
let f = u.mode, p = M, m = p ? e.getState().conversations.find((e) => e.id === p) : void 0;
|
|
151
149
|
if (p ? m && m.mode !== f && (m.messages.length > 0 || m.backendSessionId) ? p = I(void 0, f) : m && m.mode !== f && F(p, f) : p = I(void 0, f), !p) return;
|
|
152
150
|
xt.current[p] = r;
|
|
153
|
-
let h =
|
|
151
|
+
let h = y(), g = {
|
|
154
152
|
accessToken: j(),
|
|
155
153
|
workspaceToken: qe(),
|
|
156
154
|
userId: Je,
|
|
157
|
-
organizationId:
|
|
158
|
-
},
|
|
155
|
+
organizationId: re()
|
|
156
|
+
}, ne = {
|
|
159
157
|
id: Ue(),
|
|
160
158
|
role: "user",
|
|
161
159
|
content: n,
|
|
162
160
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
163
161
|
metadata: {
|
|
164
|
-
...r.length ? { attachments: r.map(
|
|
165
|
-
...
|
|
162
|
+
...r.length ? { attachments: r.map(ce) } : {},
|
|
163
|
+
...S(a.voiceSessionId)
|
|
166
164
|
}
|
|
167
165
|
};
|
|
168
|
-
L(p,
|
|
169
|
-
let
|
|
166
|
+
L(p, ne);
|
|
167
|
+
let _ = Ue();
|
|
170
168
|
L(p, {
|
|
171
|
-
id:
|
|
169
|
+
id: _,
|
|
172
170
|
role: "assistant",
|
|
173
171
|
content: "",
|
|
174
172
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
175
173
|
metadata: {
|
|
176
174
|
lang: tt,
|
|
177
|
-
...
|
|
175
|
+
...S(a.voiceSessionId)
|
|
178
176
|
}
|
|
179
|
-
}), z(p, "provisioning",
|
|
180
|
-
let
|
|
181
|
-
R(p,
|
|
177
|
+
}), z(p, "provisioning", _, null);
|
|
178
|
+
let v = (e, t, n, r, i = tt) => {
|
|
179
|
+
R(p, _, { content: We(e) }), ot(p, _, {
|
|
182
180
|
lang: i,
|
|
183
181
|
...t?.length ? { artifacts: t } : {},
|
|
184
182
|
...t?.length || n || r ? { mode: f } : {},
|
|
185
183
|
...n ? { sessionId: n } : {},
|
|
186
184
|
...r ? { sandboxId: r } : {},
|
|
187
|
-
...
|
|
185
|
+
...S(a.voiceSessionId)
|
|
188
186
|
});
|
|
189
|
-
},
|
|
187
|
+
}, b = async (e = 1) => {
|
|
190
188
|
let a = !1;
|
|
191
189
|
try {
|
|
192
190
|
await t(A, h, g);
|
|
193
191
|
} catch (e) {
|
|
194
192
|
if (ve(e)) {
|
|
195
|
-
ye("ai-credits"),
|
|
193
|
+
ye("ai-credits"), v("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting.", void 0, void 0, void 0, "en"), z(p, "error", _, null);
|
|
196
194
|
return;
|
|
197
195
|
}
|
|
198
196
|
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);
|
|
199
197
|
}
|
|
200
198
|
try {
|
|
201
|
-
let { sandboxId: e, sessionId: t } = await Tt(p,
|
|
202
|
-
K(p,
|
|
203
|
-
let d = xe(f,
|
|
204
|
-
a =
|
|
199
|
+
let { sandboxId: e, sessionId: t } = await Tt(p, _, f, h, g), u = (await s(A, e, h, t, g, 50).catch(() => [])).reduce((e, t) => Math.max(e, k(t)), 0);
|
|
200
|
+
K(p, _, "streaming", "Thinking...");
|
|
201
|
+
let d = xe(f, ae(n, r), $e, et, ee), m = ie(d, r), ne = se(m), re = ne > 0, y = te();
|
|
202
|
+
a = oe(r) > ne;
|
|
205
203
|
try {
|
|
206
|
-
await l(A, e, h, t, d, f,
|
|
204
|
+
await l(A, e, h, t, d, f, y, g, m);
|
|
207
205
|
} catch (n) {
|
|
208
206
|
if (!m || !Se(n)) throw n;
|
|
209
|
-
await l(A, e, h, t, d, f,
|
|
207
|
+
await l(A, e, h, t, d, f, y, g, void 0), a ||= re;
|
|
210
208
|
}
|
|
211
|
-
let
|
|
212
|
-
for (; Date.now() <
|
|
213
|
-
if (!
|
|
214
|
-
let
|
|
215
|
-
if (
|
|
216
|
-
...
|
|
217
|
-
content: `${
|
|
218
|
-
}), a && (
|
|
219
|
-
...
|
|
220
|
-
content: `${
|
|
221
|
-
}),
|
|
222
|
-
R(p,
|
|
209
|
+
let b = Ge([], u), ce = Date.now() + (Be[f] ?? Ve), x = Date.now(), le = Date.now();
|
|
210
|
+
for (; Date.now() < ce && (b = Ge(await s(A, e, h, t, g, 50, u), u), R(p, _, { content: We(b.content) }), b.pendingWrite && ot(p, _, { pendingWrite: b.pendingWrite }), !b.done);) Date.now() - x > 3e4 && (await i(A, e, h, 600, g).catch(() => void 0), x = Date.now()), await new Promise((e) => setTimeout(e, Ee(Date.now() - le)));
|
|
211
|
+
if (!b.done && f !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
|
|
212
|
+
let ue = f === "vibe-plugins" ? await o(A, e, h, t, g).catch(() => []) : void 0;
|
|
213
|
+
if (b.done || (b = {
|
|
214
|
+
...b,
|
|
215
|
+
content: `${b.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
|
|
216
|
+
}), a && (b = {
|
|
217
|
+
...b,
|
|
218
|
+
content: `${b.content}\n\n${O("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._")}`
|
|
219
|
+
}), v(b.content, ue, t, e), b.tokens) {
|
|
220
|
+
R(p, _, { tokens: b.tokens });
|
|
223
221
|
try {
|
|
224
|
-
await c(A, h, t,
|
|
222
|
+
await c(A, h, t, b.tokens, g), be();
|
|
225
223
|
} catch {}
|
|
226
224
|
}
|
|
227
|
-
z(p, "complete",
|
|
225
|
+
z(p, "complete", _, null);
|
|
228
226
|
} catch (t) {
|
|
229
|
-
if (e === 1 && Ce(t)) return B(p), lt(f),
|
|
227
|
+
if (e === 1 && Ce(t)) return B(p), lt(f), b(2);
|
|
230
228
|
throw t;
|
|
231
229
|
}
|
|
232
|
-
},
|
|
233
|
-
Ct.current.add(
|
|
230
|
+
}, x = p;
|
|
231
|
+
Ct.current.add(x);
|
|
234
232
|
try {
|
|
235
233
|
if (!h) throw Error("Assistant backend is unavailable without an active workspace context.");
|
|
236
|
-
await
|
|
234
|
+
await b();
|
|
237
235
|
} catch (t) {
|
|
238
236
|
if (St.current.invalidate(e.getState().sandboxesByMode[f]?.sandboxId ?? null), ve(t)) {
|
|
239
|
-
ye("sandbox"),
|
|
237
|
+
ye("sandbox"), v("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant.", void 0, void 0, void 0, "en"), z(p, "error", _, null);
|
|
240
238
|
return;
|
|
241
239
|
}
|
|
242
240
|
let n = t instanceof Error ? t.message : "Something went wrong";
|
|
243
|
-
z(p, "error",
|
|
241
|
+
z(p, "error", _, n), R(p, _, { content: `Sorry, an error occurred: ${n}. Please try again.` }), ot(p, _, {
|
|
244
242
|
lang: "en",
|
|
245
|
-
...
|
|
243
|
+
...S(a.voiceSessionId)
|
|
246
244
|
});
|
|
247
245
|
} finally {
|
|
248
|
-
Ct.current.delete(
|
|
246
|
+
Ct.current.delete(x);
|
|
249
247
|
}
|
|
250
248
|
}, [
|
|
251
249
|
M,
|
|
@@ -285,8 +283,8 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
285
283
|
if (G) return null;
|
|
286
284
|
for (let e = U.length - 1; e >= 0; --e) {
|
|
287
285
|
let t = U[e];
|
|
288
|
-
if (t?.role !== "assistant" || !
|
|
289
|
-
let n =
|
|
286
|
+
if (t?.role !== "assistant" || !he(t)) continue;
|
|
287
|
+
let n = de(t.content).text.trim();
|
|
290
288
|
return n ? {
|
|
291
289
|
id: t.id,
|
|
292
290
|
text: n
|
|
@@ -296,7 +294,7 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
296
294
|
}, [U, G]), kt = T(() => J ? Oe(J.text) : null, [J]), At = H.chat, Y = T(() => H.voice.filter((e) => e.role === "user" || e.role === "assistant").map((e) => ({
|
|
297
295
|
id: e.id,
|
|
298
296
|
role: e.role,
|
|
299
|
-
text:
|
|
297
|
+
text: de(e.content).text.trim(),
|
|
300
298
|
sessionId: ge(e),
|
|
301
299
|
timestamp: e.timestamp
|
|
302
300
|
})).filter((e) => e.text.length > 0), [H.voice]), jt = C(() => {
|
|
@@ -310,12 +308,12 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
310
308
|
you: O("voiceSession.speakerYou", "You"),
|
|
311
309
|
assistant: O("voiceSession.speakerAssistant", "Assistant")
|
|
312
310
|
}, e), je(e), "text/markdown");
|
|
313
|
-
}, [Y, O]), X =
|
|
311
|
+
}, [Y, O]), X = x(), Z = E(X);
|
|
314
312
|
Z.current = X;
|
|
315
|
-
let Q =
|
|
313
|
+
let Q = fe({
|
|
316
314
|
onSubmit: C((e, t) => {
|
|
317
315
|
let n = () => {
|
|
318
|
-
let n = Z.current, r =
|
|
316
|
+
let n = Z.current, r = b(n.attachments);
|
|
319
317
|
Ot.current(e, r, { voiceSessionId: t }), n.clear();
|
|
320
318
|
};
|
|
321
319
|
if (!Z.current.isBusy) {
|
|
@@ -396,7 +394,7 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
396
394
|
className: "contents",
|
|
397
395
|
inert: Q.active || void 0,
|
|
398
396
|
children: [
|
|
399
|
-
Y.length > 0 && !Q.active ? /* @__PURE__ */ D(
|
|
397
|
+
Y.length > 0 && !Q.active ? /* @__PURE__ */ D(ne, {
|
|
400
398
|
count: Y.length,
|
|
401
399
|
onOpenTranscript: () => bt(!0)
|
|
402
400
|
}) : null,
|
|
@@ -412,7 +410,7 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
412
410
|
onRetry: Dt
|
|
413
411
|
})
|
|
414
412
|
}),
|
|
415
|
-
/* @__PURE__ */ D(
|
|
413
|
+
/* @__PURE__ */ D(le, {
|
|
416
414
|
onStartVoiceSession: Q.available && N !== "api-calls" ? Q.start : void 0,
|
|
417
415
|
onSend: (e, t) => void q(e, t),
|
|
418
416
|
disabled: G,
|
|
@@ -424,12 +422,12 @@ var qe = ({ visible: De = !0 }) => {
|
|
|
424
422
|
})
|
|
425
423
|
]
|
|
426
424
|
}),
|
|
427
|
-
yt && !Q.active ? /* @__PURE__ */ D(
|
|
425
|
+
yt && !Q.active ? /* @__PURE__ */ D(_, {
|
|
428
426
|
turns: Y,
|
|
429
427
|
onClose: () => bt(!1),
|
|
430
428
|
onSave: jt
|
|
431
429
|
}) : null,
|
|
432
|
-
Q.active && /* @__PURE__ */ D(
|
|
430
|
+
Q.active && /* @__PURE__ */ D(ue, {
|
|
433
431
|
session: Q.session,
|
|
434
432
|
notice: Q.notice,
|
|
435
433
|
capturing: Q.capturing,
|