@pluno/product-agent-web 0.1.233 → 0.1.235
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/adapters/web/conversationPresentation.d.ts +3 -2
- package/dist/core/conversation/contracts.d.ts +1 -0
- package/dist/core/conversation/selectors.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/product-agent-runtime.cjs +1 -1
- package/dist/product-agent-runtime.js +152 -141
- package/dist/product-agent-sdk.js +1901 -1732
- package/dist/product-agent-widget.js +4402 -4201
- package/dist/renderDiagnostics.d.ts +21 -1
- package/dist/runtime/engine.d.ts +10 -0
- package/dist/runtime/transitionDiagnostics.d.ts +35 -0
- package/dist/uiInvariants.d.ts +1 -0
- package/package.json +4 -1
|
@@ -8,7 +8,7 @@ function f(s) {
|
|
|
8
8
|
updatedAt: null
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class M {
|
|
12
12
|
constructor(e, t, i = (n, r) => r) {
|
|
13
13
|
this.loader = t, this.merge = i, this.state = f(e);
|
|
14
14
|
}
|
|
@@ -103,24 +103,24 @@ function U(s, e, t) {
|
|
|
103
103
|
function $(s) {
|
|
104
104
|
return s ? s.ids.map((e) => s.entitiesById[e]).filter((e) => !!e) : [];
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function de(s) {
|
|
107
107
|
return s.visible ? s.minimized ? { state: "minimized" } : { state: s.open ? "visible_open" : "visible_closed" } : { state: "hidden" };
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function le(s, e) {
|
|
110
110
|
return e === "limit_exceeded" ? { allowed: !1, reason: "credits_exhausted", actions: ["upgrade", "earn_credits"] } : e === "subscription_required" || e === "subscription_inactive" || e === "payment_issue" || e === "subscription_invalid" || e === "payment_required" ? { allowed: !1, reason: "payment_issue", actions: ["upgrade"] } : s ?? { allowed: !0, reason: "allowed", actions: [] };
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ue(s) {
|
|
113
113
|
if (!s || typeof s != "object") return !1;
|
|
114
114
|
const e = s.paidCreditFallbackModel;
|
|
115
115
|
return typeof e == "string" && e.length > 0;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function pe(s) {
|
|
118
118
|
return s ? s.submissionGate?.allowed === !1 ? { state: "action_required", reason: s.submissionGate.reason } : s.usingPaidCreditFallback === !0 ? { state: "paid_credit_fallback" } : s.creditLimit !== null && s.creditLimit > 0 && s.creditsRemaining !== null && s.creditsRemaining > 0 && s.creditsRemaining / s.creditLimit <= 0.2 ? { state: "low_credits" } : s.creditsUsed !== null ? { state: "usage" } : { state: "hidden" } : { state: "hidden" };
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function he(s) {
|
|
121
121
|
return s.submissionAllowed && s.isAuthenticated && s.hasWorkspace && !s.isWebsiteBlocked && s.isCurrentPageResolved && !s.isSubmitting && !s.hasPendingMessage;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function ge(s) {
|
|
124
124
|
const e = s.hasDraftMessage || s.hasPreSubmittedAttachment;
|
|
125
125
|
return s.hasRunningAssistantTurn && !e ? {
|
|
126
126
|
action: "stop",
|
|
@@ -130,13 +130,13 @@ function ue(s) {
|
|
|
130
130
|
disabled: !e || !s.canSubmitMessage
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const F = "Pluno is reconnecting. Try again in a moment.";
|
|
134
134
|
function Q(s) {
|
|
135
|
-
return (s instanceof Error ? s.message : s) ===
|
|
135
|
+
return (s instanceof Error ? s.message : s) === F;
|
|
136
136
|
}
|
|
137
|
-
class
|
|
137
|
+
class fe {
|
|
138
138
|
constructor(e, t, i = 20) {
|
|
139
|
-
this.loadPage = t, this.limit = i, this.recentQuery = new
|
|
139
|
+
this.loadPage = t, this.limit = i, this.recentQuery = new M(
|
|
140
140
|
`${e}:recent`,
|
|
141
141
|
async ({ cursor: n }) => m(
|
|
142
142
|
await this.loadPage({ cursor: n, limit: this.limit, pinned: !1 }).then((r) => ({
|
|
@@ -145,7 +145,7 @@ class pe {
|
|
|
145
145
|
}))
|
|
146
146
|
),
|
|
147
147
|
U
|
|
148
|
-
), this.pinnedQuery = new
|
|
148
|
+
), this.pinnedQuery = new M(
|
|
149
149
|
`${e}:pinned`,
|
|
150
150
|
async () => m({
|
|
151
151
|
entities: await this.loadAllPinned(),
|
|
@@ -169,9 +169,9 @@ class pe {
|
|
|
169
169
|
const e = this.recentQuery.getState(), t = this.pinnedQuery.getState(), i = [
|
|
170
170
|
...h(t.data),
|
|
171
171
|
...h(e.data)
|
|
172
|
-
], n = new Map(i.map((
|
|
173
|
-
(
|
|
174
|
-
), a = Array.from(this.optimisticEntities.values()).filter((
|
|
172
|
+
], n = new Map(i.map((c) => [c.id, c])), r = Array.from(n.values()).map(
|
|
173
|
+
(c) => this.applyOverrides(c, this.completedRefreshSequence)
|
|
174
|
+
), a = Array.from(this.optimisticEntities.values()).filter((c) => !n.has(c.id)).reverse(), o = e.data || t.data || a.length > 0 ? m({
|
|
175
175
|
entities: [...a, ...r],
|
|
176
176
|
nextCursor: e.data?.nextCursor ?? null
|
|
177
177
|
}) : null;
|
|
@@ -289,7 +289,7 @@ function h(s) {
|
|
|
289
289
|
function B(s, e) {
|
|
290
290
|
return s.status === "error" || e.status === "error" ? "error" : s.status === "loading" || e.status === "loading" ? "loading" : s.status === "refreshing" || e.status === "refreshing" ? "refreshing" : s.status === "loading_more" ? "loading_more" : s.status === "ready" || e.status === "ready" ? "ready" : "not_requested";
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function O(s) {
|
|
293
293
|
const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d{1,6}))?(?:Z|\+00:00)$/.exec(s);
|
|
294
294
|
if (!e) throw new Error("Display timestamps must retain the backend UTC precision.");
|
|
295
295
|
return `${e[1]}.${(e[2] ?? "").padEnd(6, "0")}`;
|
|
@@ -302,28 +302,28 @@ function A(s) {
|
|
|
302
302
|
const e = Object.getPrototypeOf(s);
|
|
303
303
|
return e !== Object.prototype && e !== null ? !1 : Object.values(s).every(A);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return s !== null && typeof s == "object" && !Object.isFrozen(s) && (Object.values(s).forEach(
|
|
305
|
+
function N(s) {
|
|
306
|
+
return s !== null && typeof s == "object" && !Object.isFrozen(s) && (Object.values(s).forEach(N), Object.freeze(s)), s;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function z(s) {
|
|
309
309
|
if (!A(s)) throw new Error("Conversation inputs must be JSON-safe values.");
|
|
310
310
|
return JSON.parse(JSON.stringify(s));
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function G(s, e) {
|
|
313
313
|
if (!e) return !1;
|
|
314
314
|
const t = s.executionByUserMessage[e];
|
|
315
315
|
if (t) return ["completed", "stopped", "failed"].includes(t.phase);
|
|
316
|
-
const i = Object.values(s.items).sort((r, a) =>
|
|
316
|
+
const i = Object.values(s.items).sort((r, a) => O(r.created_at).localeCompare(O(a.created_at)) || r.id.localeCompare(a.id));
|
|
317
317
|
let n = !1;
|
|
318
318
|
for (const r of i)
|
|
319
319
|
if (r.type === "user_message" && (n = r.id === e), !!n && (r.type === "stopped" || r.type === "error" || r.type === "final_response" && s.streams[r.id]?.state === "finished" && s.streams[r.id].revision >= r.data.revision))
|
|
320
320
|
return !0;
|
|
321
321
|
return !1;
|
|
322
322
|
}
|
|
323
|
-
class
|
|
323
|
+
class me {
|
|
324
324
|
constructor(e, t = null) {
|
|
325
325
|
this.storage = e, t && (this.decisions = new Map(
|
|
326
|
-
t.filter(
|
|
326
|
+
t.filter(w).map((i) => [this.getDecisionKey(i), i])
|
|
327
327
|
), this.initialized = !0);
|
|
328
328
|
}
|
|
329
329
|
storage;
|
|
@@ -345,7 +345,7 @@ class he {
|
|
|
345
345
|
if (n && n.version >= t.version) continue;
|
|
346
346
|
if (n && n.payload.kind !== t.payload.kind) throw new Error("Interaction kind changed.");
|
|
347
347
|
const r = n?.payload.kind === "personal_channel" && n.lifecycle === "completed" ? "completed" : t.lifecycle, a = n?.payload.kind === "sharing" && t.payload.kind === "sharing" ? { ...t.payload, variant: n.payload.variant } : t.payload;
|
|
348
|
-
this.sources.set(i,
|
|
348
|
+
this.sources.set(i, N(z({ ...t, lifecycle: r, payload: a }))), t.payload.kind === "integration_auth" && this.invalidateAuth(t.payload.request_id);
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
/** @internal */
|
|
@@ -371,7 +371,7 @@ class he {
|
|
|
371
371
|
userPrompt: o?.type === "user_message" ? o.data.content : "",
|
|
372
372
|
assistantAnswer: ""
|
|
373
373
|
},
|
|
374
|
-
terminal: !a.wait_for_terminal ||
|
|
374
|
+
terminal: !a.wait_for_terminal || G(i, r.user_message_id)
|
|
375
375
|
};
|
|
376
376
|
} else a.kind === "integration_auth" ? t.integrations.push({
|
|
377
377
|
revision: r.version,
|
|
@@ -401,7 +401,7 @@ class he {
|
|
|
401
401
|
if (this.initialized) return;
|
|
402
402
|
const e = await this.storage.load();
|
|
403
403
|
this.decisions = new Map(
|
|
404
|
-
e.filter(
|
|
404
|
+
e.filter(w).map((t) => [this.getDecisionKey(t), t])
|
|
405
405
|
), this.initialized = !0;
|
|
406
406
|
}
|
|
407
407
|
isEligible(e, t = Date.now()) {
|
|
@@ -463,51 +463,51 @@ class he {
|
|
|
463
463
|
return null;
|
|
464
464
|
}
|
|
465
465
|
getDecisionKey(e) {
|
|
466
|
-
const t =
|
|
466
|
+
const t = S(e.scope);
|
|
467
467
|
return e.action === "dont_show_again" ? `${t}:category:${e.category}` : `${t}:interaction:${e.promptKey}`;
|
|
468
468
|
}
|
|
469
469
|
getExactKey(e) {
|
|
470
|
-
return `${
|
|
470
|
+
return `${S(e.scope)}:interaction:${e.key}`;
|
|
471
471
|
}
|
|
472
472
|
getCategoryKey(e) {
|
|
473
|
-
return `${
|
|
473
|
+
return `${S(e.scope)}:category:${e.category}`;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function ye(s, e) {
|
|
477
477
|
return {
|
|
478
|
-
load: async () =>
|
|
478
|
+
load: async () => H(s, e),
|
|
479
479
|
save: async (t) => s.setItem(e, JSON.stringify(t))
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function H(s, e) {
|
|
483
483
|
const t = s.getItem(e);
|
|
484
484
|
if (!t) return [];
|
|
485
485
|
const i = JSON.parse(t);
|
|
486
|
-
return Array.isArray(i) ? i.filter(
|
|
486
|
+
return Array.isArray(i) ? i.filter(w) : [];
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function S(s) {
|
|
489
489
|
return `${s.level}:${s.key}`;
|
|
490
490
|
}
|
|
491
491
|
function L(s) {
|
|
492
492
|
return s === "dismiss" || s === "later" || s === "snooze" || s === "never" || s === "dont_show_again";
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function w(s) {
|
|
495
495
|
if (!s || typeof s != "object") return !1;
|
|
496
496
|
const e = s;
|
|
497
497
|
return typeof e.promptKey == "string" && typeof e.category == "string" && typeof e.decidedAt == "string" && (e.nextEligibleAt === null || typeof e.nextEligibleAt == "string") && L(e.action) && !!(e.scope && typeof e.scope == "object" && typeof e.scope.level == "string" && typeof e.scope.key == "string");
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const V = {
|
|
500
500
|
working: "⏳",
|
|
501
501
|
completed: "✅",
|
|
502
502
|
failed: "❗",
|
|
503
503
|
stopped: "⏹️"
|
|
504
|
-
},
|
|
505
|
-
function
|
|
506
|
-
if (!e) return
|
|
507
|
-
const t =
|
|
504
|
+
}, Z = /^(?:⌛|⏳|✅|❗|⏹️) Pluno(?:: )?/;
|
|
505
|
+
function J(s, e) {
|
|
506
|
+
if (!e) return b(s);
|
|
507
|
+
const t = b(s), i = `${V[e]} Pluno`;
|
|
508
508
|
return t ? `${i}: ${t}` : i;
|
|
509
509
|
}
|
|
510
|
-
class
|
|
510
|
+
class ve {
|
|
511
511
|
constructor(e) {
|
|
512
512
|
this.titleDocument = e;
|
|
513
513
|
}
|
|
@@ -529,10 +529,10 @@ class fe {
|
|
|
529
529
|
}
|
|
530
530
|
applyStatus(e) {
|
|
531
531
|
const t = this.titleDocument.getTitle();
|
|
532
|
-
t !== this.lastAppliedTitle && (this.baseTitle =
|
|
532
|
+
t !== this.lastAppliedTitle && (this.baseTitle = b(t)), this.status = e, this.stopObserving || (this.stopObserving = this.titleDocument.observeTitle(() => this.handleTitleChanged())), this.applyTitle();
|
|
533
533
|
}
|
|
534
534
|
applyClear() {
|
|
535
|
-
const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, i = this.lastAppliedTitle === null ?
|
|
535
|
+
const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, i = this.lastAppliedTitle === null ? b(e) : e;
|
|
536
536
|
this.status = null, this.lastAppliedTitle = null, this.stopObserving?.(), this.stopObserving = null, t ? this.titleDocument.setTitle(this.baseTitle) : i !== e && this.titleDocument.setTitle(i);
|
|
537
537
|
}
|
|
538
538
|
handleTitleChanged() {
|
|
@@ -541,11 +541,11 @@ class fe {
|
|
|
541
541
|
applyTitle() {
|
|
542
542
|
if (!this.status)
|
|
543
543
|
return;
|
|
544
|
-
const e =
|
|
544
|
+
const e = J(this.baseTitle, this.status);
|
|
545
545
|
this.lastAppliedTitle = e, this.titleDocument.getTitle() !== e && this.titleDocument.setTitle(e);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function be(s) {
|
|
549
549
|
return {
|
|
550
550
|
getTitle: () => s.title,
|
|
551
551
|
setTitle: (e) => {
|
|
@@ -561,10 +561,10 @@ function me(s) {
|
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
return s.replace(
|
|
564
|
+
function b(s) {
|
|
565
|
+
return s.replace(Z, "");
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const W = [
|
|
568
568
|
"submit",
|
|
569
569
|
"stop",
|
|
570
570
|
"staging_ipc",
|
|
@@ -600,22 +600,22 @@ const J = [
|
|
|
600
600
|
"stopping_painted",
|
|
601
601
|
"progress_painted",
|
|
602
602
|
"stopped_painted"
|
|
603
|
-
],
|
|
604
|
-
let
|
|
605
|
-
const
|
|
606
|
-
function
|
|
603
|
+
], Y = Math.random().toString(36).slice(2);
|
|
604
|
+
let X = 0;
|
|
605
|
+
const R = () => `timing:${Y}:${++X}`, g = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s);
|
|
606
|
+
function E(s) {
|
|
607
607
|
if (!s || typeof s != "object") return !1;
|
|
608
608
|
const e = s;
|
|
609
|
-
return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs"].includes(t)) && (e.entrySurface === void 0 || ["extension_sidepanel", "extension_widget", "main_web_chat", "embedded_widget", "embedded_custom_ui", "automation", "mcp", "whatsapp"].includes(e.entrySurface)) && ["send", "stop"].includes(e.operation) && ["renderer", "sdk", "extension", "http"].includes(e.layer) &&
|
|
609
|
+
return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs"].includes(t)) && (e.entrySurface === void 0 || ["extension_sidepanel", "extension_widget", "main_web_chat", "embedded_widget", "embedded_custom_ui", "automation", "mcp", "whatsapp"].includes(e.entrySurface)) && ["send", "stop"].includes(e.operation) && ["renderer", "sdk", "extension", "http"].includes(e.layer) && W.includes(e.stage) && ["started", "completed", "failed", "observed"].includes(e.status) && g(e.spanId) && g(e.requestId) && (e.clientMessageId === null || g(e.clientMessageId)) && (e.sessionId === null || g(e.sessionId)) && typeof e.occurredAt == "string" && e.occurredAt.length <= 40 && Number.isFinite(Date.parse(e.occurredAt)) && Number.isSafeInteger(e.durationMs) && e.durationMs >= 0;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function C(s, e) {
|
|
612
612
|
if (!s) return {
|
|
613
613
|
mark: (n) => {
|
|
614
614
|
},
|
|
615
615
|
measure: (n, r) => r()
|
|
616
616
|
};
|
|
617
617
|
const t = performance.now(), i = (n, r, a, o) => {
|
|
618
|
-
const
|
|
618
|
+
const c = {
|
|
619
619
|
...e,
|
|
620
620
|
stage: n,
|
|
621
621
|
status: r,
|
|
@@ -623,59 +623,70 @@ function R(s, e) {
|
|
|
623
623
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
624
624
|
durationMs: Math.max(0, Math.round(performance.now() - a))
|
|
625
625
|
};
|
|
626
|
-
s &&
|
|
626
|
+
s && E(c) && Promise.resolve().then(() => s(c)).catch(() => {
|
|
627
627
|
});
|
|
628
628
|
};
|
|
629
629
|
return {
|
|
630
|
-
mark: (n) => i(n, "observed", t,
|
|
630
|
+
mark: (n) => i(n, "observed", t, R()),
|
|
631
631
|
measure(n, r) {
|
|
632
|
-
const a = performance.now(), o =
|
|
632
|
+
const a = performance.now(), o = R();
|
|
633
633
|
return i(n, "started", a, o), r().then(
|
|
634
|
-
(
|
|
635
|
-
(
|
|
636
|
-
throw i(n, "failed", a, o),
|
|
634
|
+
(c) => (i(n, "completed", a, o), c),
|
|
635
|
+
(c) => {
|
|
636
|
+
throw i(n, "failed", a, o), c;
|
|
637
637
|
}
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
const
|
|
643
|
-
function
|
|
642
|
+
const y = (s) => typeof s == "string" && /^[a-zA-Z0-9:_.-]{1,160}$/.test(s) ? s : null;
|
|
643
|
+
function ee(s) {
|
|
644
|
+
if (!s || typeof s != "object") return !1;
|
|
645
|
+
const e = s, t = (n) => Number.isSafeInteger(n) && n >= 0, i = (n) => n && typeof n == "object" && Object.keys(n).every((r) => ["sequence", "at", "type", "changed", "generation", "sessionId", "scopeId", "requestId", "effectId", "clientScopeId", "reason", "effectKind", "eventType", "itemCount", "removedCount", "projectionReady"].includes(r)) && t(n.sequence) && t(n.at) && y(n.type) !== null && typeof n.changed == "boolean" && [n.generation, n.itemCount, n.removedCount].every((r) => r === null || t(r)) && [n.sessionId, n.scopeId, n.requestId, n.effectId, n.clientScopeId, n.reason, n.effectKind, n.eventType].every((r) => r === null || y(r) !== null) && (n.projectionReady === null || typeof n.projectionReady == "boolean");
|
|
646
|
+
return Object.keys(e).every((n) => ["ownerId", "revision", "dropped", "lastIntent", "lastSelection", "transitions"].includes(n)) && y(e.ownerId) !== null && t(e.revision) && t(e.dropped) && (e.lastIntent == null || i(e.lastIntent)) && (e.lastSelection === null || i(e.lastSelection)) && Array.isArray(e.transitions) && e.transitions.length <= 16 && e.transitions.every(i);
|
|
647
|
+
}
|
|
648
|
+
const k = ["messageKeys", "canonicalItemKeys", "terminalResponseKeys", "toolCallKeys", "activeResponseKeys"], T = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s), v = (s) => s === null || T(s), te = (s) => typeof s == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|\+00:00)$/.test(s) && Number.isFinite(Date.parse(s));
|
|
649
|
+
function j(s) {
|
|
644
650
|
if (!s || typeof s != "object") return !1;
|
|
645
651
|
const e = s;
|
|
646
|
-
return Object.keys(s).every((t) => ["sessionId", "itemId", "userMessageId", "createdAt", "runId", "retryable"].includes(t)) &&
|
|
652
|
+
return Object.keys(s).every((t) => ["sessionId", "itemId", "userMessageId", "createdAt", "runId", "retryable"].includes(t)) && v(e.sessionId) && T(e.itemId) && v(e.userMessageId) && (e.retryable === void 0 || typeof e.retryable == "boolean") && v(e.runId) && (e.createdAt === null || te(e.createdAt));
|
|
653
|
+
}
|
|
654
|
+
function se(s) {
|
|
655
|
+
if (!s || typeof s != "object") return !1;
|
|
656
|
+
const e = s, t = (i) => Number.isSafeInteger(i) && i >= 0;
|
|
657
|
+
return Object.keys(e).every((i) => ["capturedAt", "selectionKey", "userId", "loading", "draft", "thinking", "connected", "hasError", "phase", "queryStatus", "queryRequestId", "queryUpdatedAt", "renderSource", "selectionFencePending", "guardCreatedAt", "owner"].includes(i)) && t(e.capturedAt) && [e.queryUpdatedAt, e.guardCreatedAt].every((i) => i === null || t(i)) && [e.selectionKey, e.userId, e.phase, e.queryStatus, e.queryRequestId].every((i) => i === null || y(i) !== null) && [e.loading, e.draft, e.thinking, e.connected, e.hasError, e.selectionFencePending].every((i) => typeof i == "boolean") && ["state", "account", "interactions", "local", "sidepanel_layout"].includes(e.renderSource) && (e.owner === void 0 || ee(e.owner));
|
|
647
658
|
}
|
|
648
659
|
function K(s) {
|
|
649
660
|
if (!s || typeof s != "object" || Object.keys(s).some((i) => i !== "before" && i !== "current")) return !1;
|
|
650
661
|
const e = (i) => {
|
|
651
662
|
if (!i || typeof i != "object") return !1;
|
|
652
663
|
const n = i;
|
|
653
|
-
return Object.keys(i).every((r) => [...
|
|
664
|
+
return Object.keys(i).every((r) => [...k, "sessionId", "runtimeItemCount", "welcome", "truncated", "thinkingSequence", "context"].includes(r)) && (n.context === void 0 || se(n.context)) && (n.thinkingSequence === void 0 || Array.isArray(n.thinkingSequence) && n.thinkingSequence.length <= 20 && n.thinkingSequence.every((r) => r === "user" || r === "thinking")) && v(n.sessionId) && Number.isSafeInteger(n.runtimeItemCount) && n.runtimeItemCount >= 0 && typeof n.welcome == "boolean" && typeof n.truncated == "boolean" && k.every((r) => Array.isArray(n[r]) && n[r].length <= 20 && n[r].every(T));
|
|
654
665
|
}, t = s;
|
|
655
666
|
return (t.before === null || e(t.before)) && e(t.current);
|
|
656
667
|
}
|
|
657
668
|
const _ = (s) => s === null || typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s);
|
|
658
|
-
function
|
|
669
|
+
function ie(s) {
|
|
659
670
|
if (!s || typeof s != "object") return !1;
|
|
660
671
|
const e = s;
|
|
661
672
|
return typeof e.observedAt == "string" && e.observedAt.length <= 40 && Number.isFinite(Date.parse(e.observedAt)) && _(e.sessionId) && _(e.responseItemId) && _(e.respondsToUserMessageId) && typeof e.panelVisible == "boolean" && typeof e.documentVisible == "boolean" && typeof e.loading == "boolean";
|
|
662
673
|
}
|
|
663
|
-
const
|
|
664
|
-
function
|
|
674
|
+
const x = 500;
|
|
675
|
+
function ne(s) {
|
|
665
676
|
const e = s.replace(/\n\s*at\s[\s\S]*$/, "").replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/g, "[REDACTED]").replace(/\b(?:set-cookie|cookie)\s*[:=]\s*[^\n]+/gi, "cookie=[REDACTED]").replace(/\bdata:[^\s<>"']+/gi, "[DATA]").replace(/\b(?:https?:\/\/|www\.)[^\s<>"']+/gi, "[URL]").replace(/\b(?:Bearer|Basic)\s+[^\s,;"']+/gi, "[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?/g, "[REDACTED]").replace(/\b(?:sk|pk|ghp|gho|github_pat|xoxb|xoxp)[-_][A-Za-z0-9_-]{8,}/g, "[REDACTED]").replace(/\b((?:access|refresh|id|auth)[_-]?token|api[_-]?key|client[_-]?secret|password|passwd|pwd|secret|token|jwt|authorization|cookie|set-cookie)\b["']?\s*[:=]\s*(?:"[^"]*"|'[^']*'|[^\s,;}&]+)/gi, "$1=[REDACTED]").replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, "[EMAIL]").replace(/(?:[A-Z]:[\\/]|\\\\|(?:~|\.\.?)?\/|[\w.-]+[\\/])[^\s<>"']+/gi, "[FILE]").replace(new RegExp("(?<![\\w.])(?:[\\w.-]+\\.[A-Z][A-Z0-9]{0,15}|\\.[A-Z][\\w.-]*)\\b", "gi"), "[FILE]").replace(/\s+/g, " ").trim();
|
|
666
|
-
return e.length >
|
|
677
|
+
return e.length > x ? `${e.slice(0, x - 1)}…` : e;
|
|
667
678
|
}
|
|
668
|
-
function
|
|
679
|
+
function re(s, e, t = "stopped", i) {
|
|
669
680
|
const n = new Set(i ?? [
|
|
670
681
|
s.assistantDraftRespondsToUserMessageId,
|
|
671
682
|
s.activeResponseUserMessageId,
|
|
672
683
|
s.messages.filter((o) => o.role === "user").slice(-1)[0]?.id
|
|
673
684
|
].filter((o) => !!o)), r = s.messages.filter((o) => !(o.dataType === "run_status" && o.loading && n.has(o.respondsToUserMessageId ?? ""))).map((o) => n.has(o.respondsToUserMessageId ?? "") ? { ...o, loading: !1 } : o);
|
|
674
685
|
for (const o of n)
|
|
675
|
-
r.some((
|
|
686
|
+
r.some((c) => c.respondsToUserMessageId === o && (c.dataType === "run_status" || c.dataType === "run_error" || c.role === "assistant" && c.phase !== "commentary")) || r.some((c) => c.role === "user" && c.id === o) && r.push({ id: `local-interrupted:${o}`, role: "system", dataType: "run_status", content: t === "stopping" ? "Stopping…" : "Run stopped by user.", createdAt: e, respondsToUserMessageId: o });
|
|
676
687
|
const a = s.segments?.map((o) => ({ ...o, outcomeIds: [
|
|
677
688
|
...o.outcomeIds,
|
|
678
|
-
...r.filter((
|
|
689
|
+
...r.filter((c) => c.id === `local-interrupted:${o.userMessageId}` && !o.outcomeIds.includes(c.id)).map((c) => c.id)
|
|
679
690
|
] }));
|
|
680
691
|
return {
|
|
681
692
|
...s,
|
|
@@ -692,7 +703,7 @@ function se(s, e, t = "stopped", i) {
|
|
|
692
703
|
lastErrorCode: null
|
|
693
704
|
};
|
|
694
705
|
}
|
|
695
|
-
const
|
|
706
|
+
const oe = {
|
|
696
707
|
"stop-without-rendered-message": "Stop is enabled while no message is rendered or the welcome screen is still visible.",
|
|
697
708
|
"in-progress-stop-unavailable": "An in-progress response has no visible enabled interrupt control.",
|
|
698
709
|
"stop-did-not-interrupt": "The stopped response remained in progress after an interrupt click.",
|
|
@@ -708,10 +719,10 @@ const ie = {
|
|
|
708
719
|
"thinking-groups-without-user-message": "Multiple thinking groups appeared without a user message between them.",
|
|
709
720
|
"thinking-without-progress": "Thinking remained visible without progress for five minutes."
|
|
710
721
|
};
|
|
711
|
-
function
|
|
712
|
-
return typeof s == "string" && s.startsWith("ui_invariant:") && Object.prototype.hasOwnProperty.call(
|
|
722
|
+
function ae(s) {
|
|
723
|
+
return typeof s == "string" && s.startsWith("ui_invariant:") && Object.prototype.hasOwnProperty.call(oe, s.slice(13));
|
|
713
724
|
}
|
|
714
|
-
function
|
|
725
|
+
function D(s) {
|
|
715
726
|
return {
|
|
716
727
|
...s.id === void 0 ? {} : { id: s.id },
|
|
717
728
|
name: s.name,
|
|
@@ -722,7 +733,7 @@ function C(s) {
|
|
|
722
733
|
...s.fileUrl === void 0 ? {} : { fileUrl: s.fileUrl }
|
|
723
734
|
};
|
|
724
735
|
}
|
|
725
|
-
function
|
|
736
|
+
function Se(s) {
|
|
726
737
|
if (!s || typeof s != "object" || !("type" in s)) return !1;
|
|
727
738
|
const e = s;
|
|
728
739
|
switch (e.type) {
|
|
@@ -733,15 +744,15 @@ function ye(s) {
|
|
|
733
744
|
case "run.stop":
|
|
734
745
|
return e.clientMessageIds === void 0 || Array.isArray(e.clientMessageIds) && e.clientMessageIds.length <= 100 && e.clientMessageIds.every((t) => typeof t == "string" && t.length > 0 && t.length <= 160);
|
|
735
746
|
case "runtime.report_response_visibility":
|
|
736
|
-
return
|
|
747
|
+
return ie(e.observation);
|
|
737
748
|
case "runtime.warmup":
|
|
738
749
|
return e.reason === "panel_open" || e.reason === "extension_install" || e.reason === "composer_input";
|
|
739
750
|
case "runtime.report_operation_timing":
|
|
740
|
-
return
|
|
751
|
+
return E(e.timing);
|
|
741
752
|
case "runtime.report_displayed_error":
|
|
742
|
-
return (e.renderedError === void 0 ||
|
|
753
|
+
return (e.renderedError === void 0 || j(e.renderedError)) && (e.reason === "conversation_error" || e.reason === "attachment_error" || e.reason === "history_error" || e.reason === "action_error") && typeof e.errorFingerprint == "string" && /^fnv1a-[0-9a-f]{8}$/.test(e.errorFingerprint) && (e.displayedMessage === void 0 || typeof e.displayedMessage == "string" && e.displayedMessage.length <= 500);
|
|
743
754
|
case "runtime.report_invalid_state_transition":
|
|
744
|
-
return (e.uiInvariant === void 0 || K(e.uiInvariant)) && (e.reason === "submitted_turn_returned_to_welcome_without_new_chat" || e.reason === "new_messages_button_without_user_scroll" ||
|
|
755
|
+
return (e.uiInvariant === void 0 || K(e.uiInvariant)) && (e.reason === "submitted_turn_returned_to_welcome_without_new_chat" || e.reason === "new_messages_button_without_user_scroll" || ae(e.reason)) && (e.clientMessageId === void 0 || typeof e.clientMessageId == "string");
|
|
745
756
|
case "runtime.widget_lifecycle":
|
|
746
757
|
return (e.action === "opened" || e.action === "closed" || e.action === "minimized") && typeof e.trigger == "string";
|
|
747
758
|
case "session.load":
|
|
@@ -769,9 +780,9 @@ function ye(s) {
|
|
|
769
780
|
return !1;
|
|
770
781
|
}
|
|
771
782
|
}
|
|
772
|
-
class
|
|
783
|
+
class _e {
|
|
773
784
|
constructor(e, t, i) {
|
|
774
|
-
this.adapter = t, this.state =
|
|
785
|
+
this.adapter = t, this.state = I(e), this.model = i;
|
|
775
786
|
}
|
|
776
787
|
adapter;
|
|
777
788
|
listeners = {};
|
|
@@ -798,10 +809,10 @@ class ve {
|
|
|
798
809
|
return i.add(t), this.listeners[e] = i, () => i.delete(t);
|
|
799
810
|
}
|
|
800
811
|
getState() {
|
|
801
|
-
const e =
|
|
812
|
+
const e = I(this.state);
|
|
802
813
|
for (const [t, i] of this.submissionPreviews)
|
|
803
814
|
e.messages.some((n) => n.id === t) || (e.messages.push({ ...i.message, attachments: i.message.attachments?.map((n) => ({ ...n })) }), e.segments && (e.segments = [...e.segments, { id: t, userMessageId: t, activityIds: [], outcomeIds: [], collapsed: !1 }]), e.isLoadingSession = !1, i.pending && (e.activeResponseUserMessageId = t, e.pendingMessageStatus = "sending", e.turnPhase = "sending", e.activity = { phase: "submitting", activeItemId: null }), i.error && (e.lastError = i.error, e.lastErrorCode = "message_delivery_failed"));
|
|
804
|
-
return this.stopError && (e.lastError = this.stopError, e.lastErrorCode = "stop_failed"), this.pendingStop ?
|
|
815
|
+
return this.stopError && (e.lastError = this.stopError, e.lastErrorCode = "stop_failed"), this.pendingStop ? re(e, "", "stopping", this.pendingStop.userMessageIds) : e;
|
|
805
816
|
}
|
|
806
817
|
updateProjection(e, t, i, n, r) {
|
|
807
818
|
if (this.destroyed) return;
|
|
@@ -809,14 +820,14 @@ class ve {
|
|
|
809
820
|
(a.user?.id !== e.user?.id || a.selectionKey !== void 0 && a.selectionKey !== e.selectionKey || a.selectionKey === void 0 && a.sessionId !== null && a.sessionId !== e.sessionId) && (this.cancelPendingSubmissions(), this.submissionPreviews.clear());
|
|
810
821
|
for (const o of e.messages)
|
|
811
822
|
o.role === "user" && this.submissionPreviews.delete(o.id);
|
|
812
|
-
if (this.state =
|
|
823
|
+
if (this.state = I(e), a.user?.id === e.user?.id)
|
|
813
824
|
for (const o of this.state.messages) {
|
|
814
825
|
if (o.role !== "user" || !o.attachments?.length) continue;
|
|
815
|
-
const
|
|
816
|
-
a.sessionId !== e.sessionId && !(a.sessionId === null &&
|
|
826
|
+
const c = a.messages.find((d) => d.role === "user" && d.id === o.id);
|
|
827
|
+
a.sessionId !== e.sessionId && !(a.sessionId === null && c) || (o.attachments = ce(c?.attachments, o.attachments));
|
|
817
828
|
}
|
|
818
829
|
if (t !== void 0 && (this.model = t), i && JSON.stringify(i) !== JSON.stringify(this.sessionHistoryState)) {
|
|
819
|
-
this.sessionHistoryState =
|
|
830
|
+
this.sessionHistoryState = q(i);
|
|
820
831
|
for (const o of this.sessionHistoryListeners)
|
|
821
832
|
o(this.getSessionHistoryState());
|
|
822
833
|
}
|
|
@@ -848,7 +859,7 @@ class ve {
|
|
|
848
859
|
this.dispatch({ type: "runtime.widget_lifecycle", action: e, trigger: t });
|
|
849
860
|
}
|
|
850
861
|
reportOperationTiming(e) {
|
|
851
|
-
!this.destroyed &&
|
|
862
|
+
!this.destroyed && E(e) && this.adapter.dispatch({ type: "runtime.report_operation_timing", timing: e }).catch(() => {
|
|
852
863
|
});
|
|
853
864
|
}
|
|
854
865
|
reportResponseVisibility(e) {
|
|
@@ -865,12 +876,12 @@ class ve {
|
|
|
865
876
|
});
|
|
866
877
|
}
|
|
867
878
|
reportDisplayedError(e, t, i, n) {
|
|
868
|
-
n !== void 0 && !
|
|
879
|
+
n !== void 0 && !j(n) || this.adapter.dispatch({
|
|
869
880
|
type: "runtime.report_displayed_error",
|
|
870
881
|
reason: e,
|
|
871
882
|
errorFingerprint: t,
|
|
872
883
|
...n ? { renderedError: n } : {},
|
|
873
|
-
...i ? { displayedMessage:
|
|
884
|
+
...i ? { displayedMessage: ne(i) } : {}
|
|
874
885
|
}).catch(() => {
|
|
875
886
|
});
|
|
876
887
|
}
|
|
@@ -879,21 +890,21 @@ class ve {
|
|
|
879
890
|
if (!i && n.length === 0) return Promise.resolve(null);
|
|
880
891
|
this.pendingStop = null, this.stopError = null;
|
|
881
892
|
const r = t.clientMessageId ?? (t.proactiveSuggestionQuestion && this.stagedProactiveSuggestionClientMessageId ? this.stagedProactiveSuggestionClientMessageId : crypto.randomUUID()), a = t.submittedAt ?? Date.now(), o = this.submissionGeneration;
|
|
882
|
-
this.pendingTransfers.set(r, n.flatMap((
|
|
893
|
+
this.pendingTransfers.set(r, n.flatMap((d) => d.id ? [d.id] : [])), this.submissionPreviews.set(r, { pending: !0, message: {
|
|
883
894
|
id: r,
|
|
884
895
|
role: "user",
|
|
885
896
|
content: i,
|
|
886
897
|
createdAt: "",
|
|
887
|
-
attachments: n.map((
|
|
898
|
+
attachments: n.map((d) => ({ ...d }))
|
|
888
899
|
} });
|
|
889
|
-
const
|
|
890
|
-
return this.emit("state", this.getState()),
|
|
900
|
+
const c = this.sendMessageNow(i, { ...t, clientMessageId: r, submittedAt: a }, o);
|
|
901
|
+
return this.emit("state", this.getState()), c.finally(() => {
|
|
891
902
|
this.pendingTransfers.delete(r);
|
|
892
903
|
});
|
|
893
904
|
}
|
|
894
905
|
async sendMessageNow(e, t, i) {
|
|
895
|
-
const n = e, r = t.clientMessageId, a =
|
|
896
|
-
i === this.submissionGeneration && this.reportOperationTiming(
|
|
906
|
+
const n = e, r = t.clientMessageId, a = C((d) => {
|
|
907
|
+
i === this.submissionGeneration && this.reportOperationTiming(d);
|
|
897
908
|
}, {
|
|
898
909
|
operation: "send",
|
|
899
910
|
layer: "renderer",
|
|
@@ -902,11 +913,11 @@ class ve {
|
|
|
902
913
|
sessionId: this.state.sessionId
|
|
903
914
|
});
|
|
904
915
|
a.mark("submit");
|
|
905
|
-
let o = t.attachments ?? [],
|
|
916
|
+
let o = t.attachments ?? [], c = !1;
|
|
906
917
|
if (i !== this.submissionGeneration) return null;
|
|
907
918
|
try {
|
|
908
919
|
if (!await a.measure("staging_ipc", async () => {
|
|
909
|
-
const
|
|
920
|
+
const l = await this.enqueueOperation(async () => this.destroyed || i !== this.submissionGeneration ? null : { result: this.adapter.dispatch({
|
|
910
921
|
type: "conversation.stage",
|
|
911
922
|
initiatedBy: t.initiatedBy,
|
|
912
923
|
invocation: t.invocation,
|
|
@@ -915,25 +926,25 @@ class ve {
|
|
|
915
926
|
clientMessageId: r,
|
|
916
927
|
proactiveSuggestionQuestion: t.proactiveSuggestionQuestion,
|
|
917
928
|
// Preview URLs belong to the renderer's optimistic snapshot and are not valid runtime-command metadata.
|
|
918
|
-
attachments: o.length > 0 ? o.map(
|
|
929
|
+
attachments: o.length > 0 ? o.map(D) : void 0,
|
|
919
930
|
submittedAt: t.submittedAt
|
|
920
931
|
}) });
|
|
921
|
-
return
|
|
932
|
+
return l ? (await l.result, l) : null;
|
|
922
933
|
}) || i !== this.submissionGeneration) return null;
|
|
923
|
-
if (
|
|
934
|
+
if (c = !0, o.length > 0) {
|
|
924
935
|
if (!this.adapter.uploadAttachment)
|
|
925
936
|
throw new Error("The runtime does not support attachments.");
|
|
926
|
-
const
|
|
937
|
+
const l = [];
|
|
927
938
|
for (const u of o) {
|
|
928
939
|
if (u.sandboxPath || u.storageKey) {
|
|
929
|
-
|
|
940
|
+
l.push(u);
|
|
930
941
|
continue;
|
|
931
942
|
}
|
|
932
|
-
const
|
|
933
|
-
if (!
|
|
934
|
-
if (
|
|
943
|
+
const P = u.id ? this.attachmentFiles.get(u.id) : void 0;
|
|
944
|
+
if (!P) throw new Error(`Attachment bytes are unavailable for ${u.name}`);
|
|
945
|
+
if (l.push(await a.measure("attachment_transfer", () => this.adapter.uploadAttachment(P, u, { clientMessageId: r }))), i !== this.submissionGeneration) return null;
|
|
935
946
|
}
|
|
936
|
-
o =
|
|
947
|
+
o = l;
|
|
937
948
|
}
|
|
938
949
|
const p = await a.measure("send_ipc", () => this.adapter.dispatch({
|
|
939
950
|
type: "conversation.send",
|
|
@@ -943,23 +954,23 @@ class ve {
|
|
|
943
954
|
invocation: t.invocation,
|
|
944
955
|
proactiveSuggestionQuestion: t.proactiveSuggestionQuestion,
|
|
945
956
|
...t.automationOnboarding ? { automationOnboarding: !0 } : {},
|
|
946
|
-
attachments: o.length > 0 ? o.map(
|
|
957
|
+
attachments: o.length > 0 ? o.map(D) : void 0
|
|
947
958
|
}));
|
|
948
959
|
if (i !== this.submissionGeneration) return null;
|
|
949
|
-
for (const
|
|
950
|
-
|
|
960
|
+
for (const l of t.attachments ?? [])
|
|
961
|
+
l.id && this.attachmentFiles.delete(l.id);
|
|
951
962
|
return r === this.stagedProactiveSuggestionClientMessageId && (this.stagedProactiveSuggestionClientMessageId = null), p?.clientMessageId ?? r;
|
|
952
|
-
} catch (
|
|
963
|
+
} catch (d) {
|
|
953
964
|
if (i !== this.submissionGeneration) return null;
|
|
954
|
-
if (Q(
|
|
955
|
-
for (const
|
|
956
|
-
|
|
965
|
+
if (Q(d))
|
|
966
|
+
for (const l of t.attachments ?? [])
|
|
967
|
+
l.id && this.attachmentFiles.delete(l.id);
|
|
957
968
|
const p = this.submissionPreviews.get(r);
|
|
958
|
-
throw p && (p.pending = !1, p.error =
|
|
969
|
+
throw p && (p.pending = !1, p.error = d instanceof Error ? d.message : String(d), this.emit("state", this.getState())), c && await this.adapter.dispatch({
|
|
959
970
|
type: "conversation.fail_staged",
|
|
960
971
|
clientMessageId: r,
|
|
961
|
-
message:
|
|
962
|
-
}),
|
|
972
|
+
message: d instanceof Error ? d.message : String(d)
|
|
973
|
+
}), d;
|
|
963
974
|
}
|
|
964
975
|
}
|
|
965
976
|
getModel() {
|
|
@@ -987,7 +998,7 @@ class ve {
|
|
|
987
998
|
...t,
|
|
988
999
|
e.activeResponseUserMessageId,
|
|
989
1000
|
e.messages.filter((o) => o.role === "user").slice(-1)[0]?.id
|
|
990
|
-
].filter((o) => !!o))], n =
|
|
1001
|
+
].filter((o) => !!o))], n = C((o) => this.reportOperationTiming(o), {
|
|
991
1002
|
operation: "stop",
|
|
992
1003
|
layer: "renderer",
|
|
993
1004
|
requestId: crypto.randomUUID(),
|
|
@@ -1032,7 +1043,7 @@ class ve {
|
|
|
1032
1043
|
return t.sessionHistoryPage;
|
|
1033
1044
|
}
|
|
1034
1045
|
getSessionHistoryState() {
|
|
1035
|
-
return
|
|
1046
|
+
return q(this.sessionHistoryState);
|
|
1036
1047
|
}
|
|
1037
1048
|
subscribeSessionHistory(e) {
|
|
1038
1049
|
return this.sessionHistoryListeners.add(e), e(this.getSessionHistoryState()), () => this.sessionHistoryListeners.delete(e);
|
|
@@ -1111,7 +1122,7 @@ class ve {
|
|
|
1111
1122
|
for (const n of i ?? []) n(t);
|
|
1112
1123
|
}
|
|
1113
1124
|
}
|
|
1114
|
-
function
|
|
1125
|
+
function ce(s, e) {
|
|
1115
1126
|
if (!e || !s) return e;
|
|
1116
1127
|
const t = /* @__PURE__ */ new Map();
|
|
1117
1128
|
for (const i of s) {
|
|
@@ -1123,7 +1134,7 @@ function re(s, e) {
|
|
|
1123
1134
|
return n ? { ...i, previewUrl: n } : i;
|
|
1124
1135
|
});
|
|
1125
1136
|
}
|
|
1126
|
-
function
|
|
1137
|
+
function I(s) {
|
|
1127
1138
|
return {
|
|
1128
1139
|
...s,
|
|
1129
1140
|
starterPrompts: [...s.starterPrompts],
|
|
@@ -1147,7 +1158,7 @@ function S(s) {
|
|
|
1147
1158
|
activeScheduledFollowUps: s.activeScheduledFollowUps?.map((e) => ({ ...e })) ?? null
|
|
1148
1159
|
};
|
|
1149
1160
|
}
|
|
1150
|
-
function
|
|
1161
|
+
function q(s) {
|
|
1151
1162
|
return {
|
|
1152
1163
|
...s,
|
|
1153
1164
|
data: s.data ? m({
|
|
@@ -1157,26 +1168,26 @@ function x(s) {
|
|
|
1157
1168
|
};
|
|
1158
1169
|
}
|
|
1159
1170
|
export {
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1171
|
+
F as PRODUCT_AGENT_AUTH_RECONNECTING_ERROR_MESSAGE,
|
|
1172
|
+
me as ProductAgentInteractionManager,
|
|
1173
|
+
M as ProductAgentQueryController,
|
|
1174
|
+
_e as ProductAgentRemoteRuntimeClient,
|
|
1175
|
+
fe as ProductAgentSessionHistoryManager,
|
|
1176
|
+
ve as ProductAgentTaskPageTitleController,
|
|
1177
|
+
he as canSubmitPersonalProductAgentMessage,
|
|
1178
|
+
ye as createLocalStorageInteractionDecisionStorage,
|
|
1168
1179
|
f as createProductAgentQueryState,
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1180
|
+
be as createProductAgentTaskPageTitleDocument,
|
|
1181
|
+
J as formatProductAgentTaskPageTitle,
|
|
1182
|
+
ue as hasProductAgentPaidCreditFallback,
|
|
1172
1183
|
Q as isProductAgentAuthReconnectError,
|
|
1173
|
-
|
|
1184
|
+
Se as isProductAgentRuntimeCommand,
|
|
1174
1185
|
U as mergeProductAgentEntityPages,
|
|
1175
1186
|
m as normalizeProductAgentEntityPage,
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1187
|
+
H as readLocalStorageInteractionDecisions,
|
|
1188
|
+
le as reconcileProductAgentSubmissionGate,
|
|
1189
|
+
pe as resolveProductAgentBillingPresentation,
|
|
1190
|
+
ge as resolveProductAgentComposerAction,
|
|
1191
|
+
de as resolveProductAgentWidgetPresentation,
|
|
1181
1192
|
$ as selectProductAgentQueryEntities
|
|
1182
1193
|
};
|