@flamingo-stack/openframe-frontend-core 0.0.725 → 0.0.727
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/{chunk-F56GNKX2.js → chunk-33AFAVBF.js} +2 -2
- package/dist/{chunk-7V5KFBY2.cjs → chunk-3D2SCG2E.cjs} +16 -16
- package/dist/{chunk-B7234BE2.cjs → chunk-3N3QA47Y.cjs} +11 -11
- package/dist/{chunk-OBMWSUBK.js → chunk-3Q7ZNY4B.js} +5 -5
- package/dist/{chunk-JVHP7Y4S.js → chunk-4FQ5ZICE.js} +2 -2
- package/dist/{chunk-AI3CLDZO.cjs → chunk-AM2RHT3H.cjs} +280 -280
- package/dist/{chunk-PUADVXJD.js → chunk-AU4WWLFP.js} +1 -1
- package/dist/{chunk-RU6BTELI.cjs → chunk-BKTV3VOD.cjs} +533 -488
- package/dist/{chunk-2VOZ37BL.cjs → chunk-BMOEUIFI.cjs} +35 -35
- package/dist/{chunk-IOTAUWWF.js → chunk-C6Y22J32.js} +1 -1
- package/dist/{chunk-ZSXZE4FJ.cjs → chunk-CGL3TJ2A.cjs} +3 -3
- package/dist/{chunk-MLFS5G3V.js → chunk-CIAAU44V.js} +307 -262
- package/dist/{chunk-4ZZ4TNCY.cjs → chunk-CNBGSWLN.cjs} +9 -9
- package/dist/{chunk-AX4F35C2.js → chunk-FIKAJKPE.js} +1 -1
- package/dist/{chunk-SEVKFMKR.cjs → chunk-FLCYWEEB.cjs} +3 -3
- package/dist/{chunk-ASHRHL4W.js → chunk-GKJFSE72.js} +5 -5
- package/dist/{chunk-ASIXPRHV.js → chunk-HVMH67Z7.js} +3 -3
- package/dist/{chunk-F77J34W2.js → chunk-J274GOBJ.js} +1 -1
- package/dist/{chunk-LYQYLPPV.cjs → chunk-MAGVU2HZ.cjs} +26 -26
- package/dist/{chunk-QV4GO3GW.cjs → chunk-MGVT5RT6.cjs} +29 -56
- package/dist/{chunk-W2DXHR2R.js → chunk-N27CSEDR.js} +1 -1
- package/dist/{chunk-YPEILGVZ.cjs → chunk-N2PHC6RX.cjs} +3 -3
- package/dist/{chunk-5FVWDDX6.js → chunk-NQRFGXDG.js} +2 -2
- package/dist/{chunk-772242QR.cjs → chunk-QJVG5V46.cjs} +65 -65
- package/dist/{chunk-LR6DJY4Z.cjs → chunk-RZFTEUV4.cjs} +9 -9
- package/dist/{chunk-SE4O4HCD.cjs → chunk-U6HOC7JD.cjs} +8 -8
- package/dist/{chunk-ZZRUKEN2.js → chunk-URDJXB75.js} +3 -3
- package/dist/{chunk-MGTZ2BKY.js → chunk-VTXIY33G.js} +22 -49
- package/dist/{chunk-2SO3OJFY.cjs → chunk-WWJOQGSH.cjs} +33 -33
- package/dist/{chunk-JAKG6BY7.js → chunk-WXL5G7WC.js} +3 -3
- package/dist/{cloud-tenants-US63E2HV.js → cloud-tenants-65EUPGVC.js} +2 -2
- package/dist/{cloud-tenants-SMULXU54.cjs → cloud-tenants-PT5QPWWU.cjs} +3 -3
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/assistant-ask-prompts.d.ts +34 -14
- package/dist/components/chat/assistant-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -1
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +34 -7
- package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -4
- package/dist/components/chat/index.js +3 -5
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/faq-ask-card.d.ts +8 -11
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +71 -71
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +35 -37
- package/dist/components/index.js +14 -16
- package/dist/components/meeting-scheduler/index.cjs +19 -19
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/product-demo/index.js +6 -6
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -5
- package/dist/components/ui/index.js +4 -6
- package/dist/{devices-JWHGWKLK.js → devices-J253LQNQ.js} +2 -2
- package/dist/{devices-6ZURNFRB.cjs → devices-ZPVLATZA.cjs} +4 -4
- package/dist/index.cjs +7 -9
- package/dist/index.js +8 -10
- package/dist/{knowledge-CY66JZ54.cjs → knowledge-3FAF5T7Q.cjs} +4 -4
- package/dist/{knowledge-TEDPLCFX.js → knowledge-IMTMYURI.js} +2 -2
- package/dist/{logs-S46THPPD.js → logs-55GOSGVE.js} +2 -2
- package/dist/{logs-MO357RE7.cjs → logs-UL7BQEXP.cjs} +11 -11
- package/dist/{policies-BUXT7DKF.js → policies-KRDF563O.js} +2 -2
- package/dist/{policies-GSH4K5YP.cjs → policies-O5F2XSCY.cjs} +7 -7
- package/dist/{software-update-YKS6KLX2.js → software-update-NXSC4OVM.js} +2 -2
- package/dist/{software-update-2ETT35NM.cjs → software-update-R2ASCRWP.cjs} +6 -6
- package/dist/utils/index.cjs +17 -18
- package/dist/utils/index.js +17 -18
- package/dist/utils/source-grouping.d.ts +15 -5
- package/dist/utils/source-grouping.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/assistant-ask-prompts.tsx +84 -39
- package/src/components/chat/entity-cards/dispatch.tsx +47 -58
- package/src/components/chat/hooks/index.ts +3 -2
- package/src/components/chat/hooks/use-ask-prompts.ts +140 -56
- package/src/components/faq/faq-ask-card.tsx +22 -67
- package/src/utils/source-grouping.ts +24 -14
- package/src/utils/source-icons.ts +16 -16
|
@@ -207,16 +207,10 @@ import {
|
|
|
207
207
|
Arrow02LeftIcon,
|
|
208
208
|
Arrow02RightIcon,
|
|
209
209
|
ArrowRightUpIcon,
|
|
210
|
-
BankIcon,
|
|
211
210
|
BoxArchiveIcon,
|
|
212
|
-
BracketCurlyCheckIcon,
|
|
213
211
|
CalendarIcon,
|
|
214
|
-
CallIcon,
|
|
215
|
-
ChartBar01VerIcon,
|
|
216
|
-
ChartPieIcon,
|
|
217
212
|
ChatPlusIcon,
|
|
218
213
|
ChatQuestionIcon,
|
|
219
|
-
ChatQuoteIcon,
|
|
220
214
|
ChatsIcon,
|
|
221
215
|
CheckCircleIcon,
|
|
222
216
|
CheckFillIcon,
|
|
@@ -224,22 +218,15 @@ import {
|
|
|
224
218
|
Chevron02LeftIcon,
|
|
225
219
|
Chevron02RightIcon,
|
|
226
220
|
ClickupLogoIcon,
|
|
227
|
-
ClipboardListIcon,
|
|
228
221
|
ClockHistoryIcon,
|
|
229
222
|
CodeIcon,
|
|
230
|
-
CodeSquareIcon,
|
|
231
|
-
CodingBranchIcon,
|
|
232
223
|
CodingCommitIcon,
|
|
233
|
-
CodingMergeIcon,
|
|
234
224
|
CodingPullRequestIcon,
|
|
235
|
-
CoinsExchangeCurrencyIcon,
|
|
236
225
|
CompassIcon,
|
|
237
|
-
Copy01Icon,
|
|
238
226
|
DotsLoaderIcon,
|
|
239
227
|
Ellipsis01Icon,
|
|
240
228
|
ExternalLinkIcon,
|
|
241
229
|
EyeIcon,
|
|
242
|
-
FileCodeIcon,
|
|
243
230
|
FileContentIcon,
|
|
244
231
|
GeminiLogoGreyIcon,
|
|
245
232
|
InfoCircleIcon,
|
|
@@ -249,11 +236,9 @@ import {
|
|
|
249
236
|
Megaphone01Icon,
|
|
250
237
|
MessageIndicatorIcon,
|
|
251
238
|
MicrophoneIcon,
|
|
252
|
-
MoneyBillDollarIcon,
|
|
253
239
|
NewspaperIcon,
|
|
254
240
|
OpenaiLogoGreyIcon,
|
|
255
241
|
PackageCheckIcon,
|
|
256
|
-
PackageIcon,
|
|
257
242
|
PackagePlusIcon,
|
|
258
243
|
PenEditIcon,
|
|
259
244
|
PlusCircleIcon,
|
|
@@ -6879,11 +6864,11 @@ var SOURCE_ICON_NAMES = {
|
|
|
6879
6864
|
vendors: "package-search",
|
|
6880
6865
|
// Financials
|
|
6881
6866
|
"investor-updates": "mail",
|
|
6882
|
-
"financial-kpis": "
|
|
6883
|
-
"financial-cap-table": "
|
|
6884
|
-
"financial-pnl": "
|
|
6885
|
-
"financial-balance-sheet": "
|
|
6886
|
-
"financial-cash-flow": "
|
|
6867
|
+
"financial-kpis": "chart-bar-01-ver",
|
|
6868
|
+
"financial-cap-table": "chart-pie",
|
|
6869
|
+
"financial-pnl": "money-bill-dollar",
|
|
6870
|
+
"financial-balance-sheet": "bank",
|
|
6871
|
+
"financial-cash-flow": "coins-exchange-currency",
|
|
6887
6872
|
// ClickUp
|
|
6888
6873
|
"clickup-roadmap": "clickup",
|
|
6889
6874
|
"clickup-delivery": "clickup",
|
|
@@ -6902,22 +6887,22 @@ var SOURCE_ICON_NAMES = {
|
|
|
6902
6887
|
// Communications
|
|
6903
6888
|
"slack-messages": "slack",
|
|
6904
6889
|
// People-hub employee content
|
|
6905
|
-
"what-i-shipped": "
|
|
6906
|
-
"how-i-work": "
|
|
6907
|
-
"ai-prompts": "
|
|
6890
|
+
"what-i-shipped": "rocket-02",
|
|
6891
|
+
"how-i-work": "clipboard-list",
|
|
6892
|
+
"ai-prompts": "chat-quote",
|
|
6908
6893
|
// Product-hub internal
|
|
6909
6894
|
"design-docs": "file-text",
|
|
6910
6895
|
"openframe-tenants": "openframe",
|
|
6911
|
-
"prospect-calls": "
|
|
6896
|
+
"prospect-calls": "call",
|
|
6912
6897
|
// Code intelligence
|
|
6913
|
-
"code-rules": "check
|
|
6914
|
-
"code-graph-repos": "
|
|
6898
|
+
"code-rules": "bracket-curly-check",
|
|
6899
|
+
"code-graph-repos": "coding-branch",
|
|
6915
6900
|
"code-graph-deployments": "package",
|
|
6916
|
-
"code-graph-files": "file-
|
|
6917
|
-
"code-symbols": "
|
|
6918
|
-
"code-duplicates": "
|
|
6919
|
-
"code-impact": "
|
|
6920
|
-
"change-sets": "coding-
|
|
6901
|
+
"code-graph-files": "file-code",
|
|
6902
|
+
"code-symbols": "code-square",
|
|
6903
|
+
"code-duplicates": "copy-01",
|
|
6904
|
+
"code-impact": "coding-pull-request",
|
|
6905
|
+
"change-sets": "coding-merge"
|
|
6921
6906
|
};
|
|
6922
6907
|
function getSourceIconName(tableId) {
|
|
6923
6908
|
if (!tableId) return void 0;
|
|
@@ -7094,8 +7079,7 @@ function typeOf(source) {
|
|
|
7094
7079
|
return source.documentType || defaultDocumentTypeForTableId(source.sourceRepo) || "";
|
|
7095
7080
|
}
|
|
7096
7081
|
function joinsTableChip(source) {
|
|
7097
|
-
|
|
7098
|
-
return groupsByTable(typeOf({ ...source, sourceRepo: source.sourceRepo }));
|
|
7082
|
+
return !!source.sourceRepo;
|
|
7099
7083
|
}
|
|
7100
7084
|
function rowsOf(source) {
|
|
7101
7085
|
if (isGroupedChip(source)) return source.items ?? [];
|
|
@@ -8908,11 +8892,8 @@ function AskCard({
|
|
|
8908
8892
|
);
|
|
8909
8893
|
}
|
|
8910
8894
|
|
|
8911
|
-
// src/components/chat/assistant-ask-prompts.tsx
|
|
8912
|
-
import { useMemo as useMemo9 } from "react";
|
|
8913
|
-
|
|
8914
8895
|
// src/components/chat/hooks/use-ask-prompts.ts
|
|
8915
|
-
import { useCallback as useCallback6, useId as useId2, useLayoutEffect as useLayoutEffect5, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
8896
|
+
import { useCallback as useCallback6, useId as useId2, useLayoutEffect as useLayoutEffect5, useMemo as useMemo9, useState as useState13, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
8916
8897
|
var ASK_PROMPTS_DEFAULT_COUNT = 3;
|
|
8917
8898
|
function buildAskPromptsUrl(base, { count, topic, exclude = [] }) {
|
|
8918
8899
|
const params = new URLSearchParams({ count: String(count) });
|
|
@@ -8932,8 +8913,9 @@ function useAskPrompts({
|
|
|
8932
8913
|
const assistant = useAssistantRuntime();
|
|
8933
8914
|
const base = assistantAvailable(assistant) ? assistant.askPromptsUrl : void 0;
|
|
8934
8915
|
const url = base && enabled ? buildAskPromptsUrl(base, { count, topic, exclude }) : null;
|
|
8935
|
-
const { data,
|
|
8936
|
-
|
|
8916
|
+
const { data, dataUrl, error } = useSelfFetch(url);
|
|
8917
|
+
const landed = url !== null && (dataUrl === url || error);
|
|
8918
|
+
return { prompts: landed ? data?.prompts ?? [] : [], isLoading: !!base && !landed, supported: !!base };
|
|
8937
8919
|
}
|
|
8938
8920
|
function useAssistantOpen(topic, onOpen) {
|
|
8939
8921
|
const assistant = useAssistantRuntime();
|
|
@@ -8949,90 +8931,158 @@ function useAssistantOpen(topic, onOpen) {
|
|
|
8949
8931
|
[onOpen, runtimeOpen, source, topic]
|
|
8950
8932
|
);
|
|
8951
8933
|
}
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
const bySurface = /* @__PURE__ */ new Map();
|
|
8934
|
+
function createAskQueue() {
|
|
8935
|
+
const entries = /* @__PURE__ */ new Map();
|
|
8955
8936
|
const listeners = /* @__PURE__ */ new Set();
|
|
8956
|
-
let
|
|
8937
|
+
let next = 0;
|
|
8957
8938
|
const publish = () => {
|
|
8958
|
-
const lists = [...bySurface.values()];
|
|
8959
|
-
const next = lists.some((list) => list === null) ? null : lists.flatMap((list) => list ?? []);
|
|
8960
|
-
const same = next === null ? snapshot === null : snapshot !== null && next.join(",") === snapshot.join(",");
|
|
8961
|
-
if (same) return;
|
|
8962
|
-
snapshot = next === null ? null : next.length > 0 ? next : NO_IDS;
|
|
8963
8939
|
for (const listener of listeners) listener();
|
|
8964
8940
|
};
|
|
8965
8941
|
return {
|
|
8966
|
-
|
|
8967
|
-
|
|
8942
|
+
enter(surface) {
|
|
8943
|
+
if (entries.has(surface)) return;
|
|
8944
|
+
entries.set(surface, { turn: next++, ids: null });
|
|
8968
8945
|
publish();
|
|
8969
8946
|
},
|
|
8970
|
-
|
|
8971
|
-
|
|
8947
|
+
settle(surface, ids) {
|
|
8948
|
+
const entry = entries.get(surface);
|
|
8949
|
+
if (!entry || (entry.ids?.join(",") ?? null) === (ids?.join(",") ?? null)) return;
|
|
8950
|
+
entry.ids = ids;
|
|
8972
8951
|
publish();
|
|
8973
8952
|
},
|
|
8953
|
+
leave(surface) {
|
|
8954
|
+
if (entries.delete(surface)) publish();
|
|
8955
|
+
},
|
|
8974
8956
|
subscribe(listener) {
|
|
8975
8957
|
listeners.add(listener);
|
|
8976
8958
|
return () => listeners.delete(listener);
|
|
8977
8959
|
},
|
|
8978
|
-
|
|
8960
|
+
turnOf(surface) {
|
|
8961
|
+
const own = entries.get(surface);
|
|
8962
|
+
if (!own) return null;
|
|
8963
|
+
const shown = [];
|
|
8964
|
+
for (const [other, entry] of entries) {
|
|
8965
|
+
if (other === surface) continue;
|
|
8966
|
+
if (entry.ids === null) {
|
|
8967
|
+
if (entry.turn < own.turn) return null;
|
|
8968
|
+
continue;
|
|
8969
|
+
}
|
|
8970
|
+
shown.push(...entry.ids);
|
|
8971
|
+
}
|
|
8972
|
+
return shown.join(",");
|
|
8973
|
+
}
|
|
8979
8974
|
};
|
|
8980
8975
|
}
|
|
8981
|
-
var
|
|
8982
|
-
function
|
|
8976
|
+
var askQueues = /* @__PURE__ */ new Map();
|
|
8977
|
+
function useAskQueue() {
|
|
8983
8978
|
const scope = useAssistantRuntime()?.askPromptsUrl ?? "";
|
|
8984
|
-
let
|
|
8985
|
-
if (!
|
|
8986
|
-
|
|
8987
|
-
|
|
8979
|
+
let queue = askQueues.get(scope);
|
|
8980
|
+
if (!queue) {
|
|
8981
|
+
queue = createAskQueue();
|
|
8982
|
+
askQueues.set(scope, queue);
|
|
8988
8983
|
}
|
|
8989
|
-
return
|
|
8984
|
+
return queue;
|
|
8990
8985
|
}
|
|
8991
|
-
function
|
|
8986
|
+
function useAskSurface({
|
|
8987
|
+
topic,
|
|
8988
|
+
count = ASK_PROMPTS_DEFAULT_COUNT,
|
|
8989
|
+
exclude,
|
|
8990
|
+
enabled = true,
|
|
8991
|
+
onOpen
|
|
8992
|
+
} = {}) {
|
|
8993
|
+
const assistant = useAssistantRuntime();
|
|
8992
8994
|
const surface = useId2();
|
|
8993
|
-
const
|
|
8994
|
-
const
|
|
8995
|
+
const queue = useAskQueue();
|
|
8996
|
+
const picks = assistantAvailable(assistant) && !!assistant.askPromptsUrl && enabled && exclude !== null;
|
|
8995
8997
|
useLayoutEffect5(() => {
|
|
8996
|
-
if (
|
|
8997
|
-
|
|
8998
|
-
return () =>
|
|
8999
|
-
}, [
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
8998
|
+
if (!picks) return void 0;
|
|
8999
|
+
queue.enter(surface);
|
|
9000
|
+
return () => queue.leave(surface);
|
|
9001
|
+
}, [queue, surface, picks]);
|
|
9002
|
+
const turn = useSyncExternalStore2(
|
|
9003
|
+
queue.subscribe,
|
|
9004
|
+
() => queue.turnOf(surface),
|
|
9005
|
+
() => null
|
|
9006
|
+
);
|
|
9007
|
+
const [shownAtTurn, setShownAtTurn] = useState13(null);
|
|
9008
|
+
if (picks && turn !== null && shownAtTurn === null) setShownAtTurn(turn);
|
|
9009
|
+
const leftOut = useMemo9(() => exclude ?? (shownAtTurn ? shownAtTurn.split(",") : void 0), [exclude, shownAtTurn]);
|
|
9010
|
+
const { prompts, isLoading, supported } = useAskPrompts({
|
|
9011
|
+
topic,
|
|
9012
|
+
count,
|
|
9013
|
+
exclude: leftOut,
|
|
9014
|
+
// Told exactly what to leave out, a surface needs nobody's pick: it never waits for a turn.
|
|
9015
|
+
enabled: picks && (exclude !== void 0 || shownAtTurn !== null)
|
|
9016
|
+
});
|
|
9017
|
+
const settled = picks && !isLoading ? prompts.map((prompt) => prompt.id).join(",") : null;
|
|
9018
|
+
useLayoutEffect5(() => {
|
|
9019
|
+
queue.settle(surface, settled === null ? null : settled ? settled.split(",") : []);
|
|
9020
|
+
}, [queue, surface, settled]);
|
|
9021
|
+
const open = useAssistantOpen(topic, onOpen);
|
|
9022
|
+
const scoped = useMemo9(() => assistant ? { ...assistant, open } : null, [assistant, open]);
|
|
9023
|
+
const onAsk = assistant?.onAsk;
|
|
9024
|
+
const reportAsk = useCallback6((prompt) => onAsk?.({ promptId: prompt.id, topic }), [onAsk, topic]);
|
|
9025
|
+
return { assistant, scoped, prompts, isLoading: supported && (!picks || isLoading), supported, open, reportAsk };
|
|
9004
9026
|
}
|
|
9005
9027
|
|
|
9006
9028
|
// src/components/chat/assistant-ask-prompts.tsx
|
|
9007
9029
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
9030
|
+
var DEFAULT_ASK_CARD = {
|
|
9031
|
+
title: "Still deciding?",
|
|
9032
|
+
description: "{assistant} answers from our docs and customer stories."
|
|
9033
|
+
};
|
|
9034
|
+
var fillAssistant = (text2, name) => text2.split("{assistant}").join(name);
|
|
9008
9035
|
function AssistantAskPrompts({
|
|
9036
|
+
variant = "row",
|
|
9009
9037
|
topic,
|
|
9010
|
-
count
|
|
9038
|
+
count,
|
|
9039
|
+
exclude,
|
|
9040
|
+
enabled,
|
|
9011
9041
|
label,
|
|
9012
9042
|
loading = false,
|
|
9043
|
+
title,
|
|
9044
|
+
description,
|
|
9013
9045
|
onOpen,
|
|
9014
9046
|
align,
|
|
9015
9047
|
fadeColor,
|
|
9016
9048
|
className
|
|
9017
9049
|
}) {
|
|
9050
|
+
const card = variant === "card";
|
|
9018
9051
|
const assistant = useAssistantRuntime();
|
|
9019
|
-
const
|
|
9020
|
-
const
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9052
|
+
const slots = count ?? (card ? assistant?.askCard?.count : void 0) ?? ASK_PROMPTS_DEFAULT_COUNT;
|
|
9053
|
+
const ask = useAskSurface({ topic, count: slots, exclude, enabled, onOpen });
|
|
9054
|
+
if (!assistantAvailable(assistant)) return null;
|
|
9055
|
+
const shared = {
|
|
9056
|
+
prompts: ask.prompts,
|
|
9057
|
+
loading: ask.isLoading || loading,
|
|
9058
|
+
source: assistant.source,
|
|
9059
|
+
icon: assistant.icon,
|
|
9060
|
+
onOpen: ask.open,
|
|
9061
|
+
onAsk: ask.reportAsk
|
|
9062
|
+
};
|
|
9063
|
+
if (card) {
|
|
9064
|
+
const name = label ?? assistant.name;
|
|
9065
|
+
if (!name) return null;
|
|
9066
|
+
const words2 = description ?? assistant.askCard?.description ?? DEFAULT_ASK_CARD.description;
|
|
9067
|
+
return /* @__PURE__ */ jsx30(AssistantRuntimeContext.Provider, { value: ask.scoped, children: /* @__PURE__ */ jsx30(
|
|
9068
|
+
AskCard,
|
|
9069
|
+
{
|
|
9070
|
+
...shared,
|
|
9071
|
+
title: fillAssistant(title ?? assistant.askCard?.title ?? DEFAULT_ASK_CARD.title, name),
|
|
9072
|
+
description: words2 ? fillAssistant(words2, name) : void 0,
|
|
9073
|
+
count: ask.supported ? slots : 0,
|
|
9074
|
+
label: name,
|
|
9075
|
+
className
|
|
9076
|
+
}
|
|
9077
|
+
) });
|
|
9078
|
+
}
|
|
9079
|
+
if (!ask.supported) return null;
|
|
9080
|
+
return /* @__PURE__ */ jsx30(AssistantRuntimeContext.Provider, { value: ask.scoped, children: /* @__PURE__ */ jsx30(
|
|
9026
9081
|
AskPrompts,
|
|
9027
9082
|
{
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
count,
|
|
9031
|
-
source: assistant.source,
|
|
9083
|
+
...shared,
|
|
9084
|
+
count: slots,
|
|
9032
9085
|
label: label ?? assistant.name ?? void 0,
|
|
9033
|
-
icon: assistant.icon,
|
|
9034
|
-
onOpen: open,
|
|
9035
|
-
onAsk: (prompt) => assistant.onAsk?.({ promptId: prompt.id, topic }),
|
|
9036
9086
|
align,
|
|
9037
9087
|
fadeColor,
|
|
9038
9088
|
className
|
|
@@ -9044,7 +9094,7 @@ function AssistantAskPrompts({
|
|
|
9044
9094
|
import { useMemo as useMemo12 } from "react";
|
|
9045
9095
|
|
|
9046
9096
|
// src/components/chat/quick-action-wall.tsx
|
|
9047
|
-
import { useRef as useRef8, useState as
|
|
9097
|
+
import { useRef as useRef8, useState as useState15, useEffect as useEffect9, useMemo as useMemo11 } from "react";
|
|
9048
9098
|
|
|
9049
9099
|
// src/components/ui/marquee-wall.tsx
|
|
9050
9100
|
import {
|
|
@@ -9053,7 +9103,7 @@ import {
|
|
|
9053
9103
|
useLayoutEffect as useLayoutEffect6,
|
|
9054
9104
|
useMemo as useMemo10,
|
|
9055
9105
|
useRef as useRef7,
|
|
9056
|
-
useState as
|
|
9106
|
+
useState as useState14,
|
|
9057
9107
|
useSyncExternalStore as useSyncExternalStore3
|
|
9058
9108
|
} from "react";
|
|
9059
9109
|
import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
@@ -9104,7 +9154,7 @@ var subscribeNever = () => () => {
|
|
|
9104
9154
|
};
|
|
9105
9155
|
var alwaysDriver = () => true;
|
|
9106
9156
|
function useMarqueeSync() {
|
|
9107
|
-
const [controller] =
|
|
9157
|
+
const [controller] = useState14(createMarqueeSyncController);
|
|
9108
9158
|
return controller;
|
|
9109
9159
|
}
|
|
9110
9160
|
var MARQUEE_TRACK_OFFSETS = /* @__PURE__ */ new Map();
|
|
@@ -9192,7 +9242,7 @@ function MarqueeWall({
|
|
|
9192
9242
|
const trackRef = useRef7(null);
|
|
9193
9243
|
const copyRef = useRef7(null);
|
|
9194
9244
|
const reducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)") ?? false;
|
|
9195
|
-
const [overflows, setOverflows] =
|
|
9245
|
+
const [overflows, setOverflows] = useState14(false);
|
|
9196
9246
|
const copySizeRef = useRef7(0);
|
|
9197
9247
|
const wrapSizeRef = useRef7(0);
|
|
9198
9248
|
const measure = useCallback7(() => {
|
|
@@ -9278,7 +9328,7 @@ function MarqueeWall({
|
|
|
9278
9328
|
useEffect8(() => {
|
|
9279
9329
|
applyTransformRef.current = applyTransform;
|
|
9280
9330
|
});
|
|
9281
|
-
const [member] =
|
|
9331
|
+
const [member] = useState14(() => ({
|
|
9282
9332
|
apply: (pos) => {
|
|
9283
9333
|
applyTransformRef.current(pos);
|
|
9284
9334
|
}
|
|
@@ -9480,8 +9530,8 @@ function QuickActionWall({
|
|
|
9480
9530
|
sync
|
|
9481
9531
|
}) {
|
|
9482
9532
|
const brickRef = useRef8(null);
|
|
9483
|
-
const [brickWidth, setBrickWidth] =
|
|
9484
|
-
const [chipWidth, setChipWidth] =
|
|
9533
|
+
const [brickWidth, setBrickWidth] = useState15(0);
|
|
9534
|
+
const [chipWidth, setChipWidth] = useState15(0);
|
|
9485
9535
|
useEffect9(() => {
|
|
9486
9536
|
const el = brickRef.current;
|
|
9487
9537
|
if (!el) return void 0;
|
|
@@ -9848,10 +9898,10 @@ function MingoOnboardingListSkeleton({ rows = 6, className }) {
|
|
|
9848
9898
|
}
|
|
9849
9899
|
|
|
9850
9900
|
// src/components/chat/mingo-welcome.tsx
|
|
9851
|
-
import { useCallback as useCallback8, useMemo as useMemo14, useState as
|
|
9901
|
+
import { useCallback as useCallback8, useMemo as useMemo14, useState as useState17 } from "react";
|
|
9852
9902
|
|
|
9853
9903
|
// src/components/chat/mingo-chat-history.tsx
|
|
9854
|
-
import { useState as
|
|
9904
|
+
import { useState as useState16, useMemo as useMemo13, useRef as useRef9, useEffect as useEffect10 } from "react";
|
|
9855
9905
|
|
|
9856
9906
|
// src/components/chat/chat-dialog-menu-items.tsx
|
|
9857
9907
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
@@ -9952,7 +10002,7 @@ function MingoChatHistoryRow({
|
|
|
9952
10002
|
const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink || !!onRequestCompact;
|
|
9953
10003
|
const owner = dialog.owner;
|
|
9954
10004
|
const hasAvatar = !!(owner?.name || owner?.avatarUrl);
|
|
9955
|
-
const [menuOpen, setMenuOpen] =
|
|
10005
|
+
const [menuOpen, setMenuOpen] = useState16(false);
|
|
9956
10006
|
const menuItems = chatDialogMenuItems({
|
|
9957
10007
|
onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
|
|
9958
10008
|
onRename: onRequestRename && (() => onRequestRename(dialog)),
|
|
@@ -10210,7 +10260,7 @@ function MingoWelcome({
|
|
|
10210
10260
|
const heading = title ?? "Hey, I'm Mingo";
|
|
10211
10261
|
const resolvedPromo = hasExistingChats ? null : promo === void 0 ? onStartGuideChat ? DEFAULT_PROMO : null : promo;
|
|
10212
10262
|
const hydrated = useIsHydrated();
|
|
10213
|
-
const [dismissedThisSession, setPromoDismissed] =
|
|
10263
|
+
const [dismissedThisSession, setPromoDismissed] = useState17(false);
|
|
10214
10264
|
const storedDismissed = useMemo14(() => {
|
|
10215
10265
|
if (!hydrated || !resolvedPromo) return false;
|
|
10216
10266
|
try {
|
|
@@ -10711,10 +10761,10 @@ function MingoChatHeader({
|
|
|
10711
10761
|
}
|
|
10712
10762
|
|
|
10713
10763
|
// src/components/chat/mingo-chat-rail.tsx
|
|
10714
|
-
import { useEffect as useEffect13, useRef as useRef12, useState as
|
|
10764
|
+
import { useEffect as useEffect13, useRef as useRef12, useState as useState19 } from "react";
|
|
10715
10765
|
|
|
10716
10766
|
// src/components/chat/chat-header-search-field.tsx
|
|
10717
|
-
import { useState as
|
|
10767
|
+
import { useState as useState18, useRef as useRef11, useEffect as useEffect12, useCallback as useCallback9 } from "react";
|
|
10718
10768
|
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10719
10769
|
function ChatHeaderSearchField({
|
|
10720
10770
|
initialValue,
|
|
@@ -10723,10 +10773,10 @@ function ChatHeaderSearchField({
|
|
|
10723
10773
|
autoFocus = true,
|
|
10724
10774
|
className
|
|
10725
10775
|
}) {
|
|
10726
|
-
const [value, setValue] =
|
|
10776
|
+
const [value, setValue] = useState18(initialValue ?? "");
|
|
10727
10777
|
const debounced = useDebounce(value, 300);
|
|
10728
10778
|
const lastEmitted = useRef11(initialValue ?? "");
|
|
10729
|
-
const [exiting, setExiting] =
|
|
10779
|
+
const [exiting, setExiting] = useState18(false);
|
|
10730
10780
|
const collapsedRef = useRef11(false);
|
|
10731
10781
|
useEffect12(() => {
|
|
10732
10782
|
if (exiting) return;
|
|
@@ -10847,7 +10897,7 @@ function MingoChatRail({
|
|
|
10847
10897
|
onExpand,
|
|
10848
10898
|
className
|
|
10849
10899
|
}) {
|
|
10850
|
-
const [searchOpen, setSearchOpen] =
|
|
10900
|
+
const [searchOpen, setSearchOpen] = useState19(!!searchQuery?.trim());
|
|
10851
10901
|
const hasSearch = !!searchQuery?.trim();
|
|
10852
10902
|
const items = [];
|
|
10853
10903
|
if (onNewChat) items.push({ id: "new", label: "Start New Chat", icon: /* @__PURE__ */ jsx48(ChatPlusIcon, {}), onClick: onNewChat });
|
|
@@ -11018,7 +11068,7 @@ function MingoChatRail({
|
|
|
11018
11068
|
);
|
|
11019
11069
|
}
|
|
11020
11070
|
function MingoChatRailRow({ dialog, active, status, onSelect, menuItems }) {
|
|
11021
|
-
const [menuOpen, setMenuOpen] =
|
|
11071
|
+
const [menuOpen, setMenuOpen] = useState19(false);
|
|
11022
11072
|
const hasMenu = menuItems.length > 0;
|
|
11023
11073
|
const glyph = status ? STATUS_GLYPHS[status] : void 0;
|
|
11024
11074
|
const title = dialog.title || "Untitled Chat";
|
|
@@ -11234,15 +11284,15 @@ function MingoHistoryRail({
|
|
|
11234
11284
|
}
|
|
11235
11285
|
|
|
11236
11286
|
// src/components/chat/mingo-chat-modals.tsx
|
|
11237
|
-
import { useState as
|
|
11287
|
+
import { useState as useState20 } from "react";
|
|
11238
11288
|
import { Fragment as Fragment15, jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
11239
11289
|
var footerBtn = "flex-1 min-w-0 rounded-md px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent disabled:opacity-50 disabled:cursor-not-allowed";
|
|
11240
11290
|
var cancelBtn = cn(footerBtn, "border border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-bg-hover");
|
|
11241
11291
|
var saveBtn = cn(footerBtn, "bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover");
|
|
11242
11292
|
var dangerBtn = cn(footerBtn, "bg-ods-error text-ods-text-on-accent hover:opacity-90");
|
|
11243
11293
|
function RenameChatModal({ isOpen, initialName = "", onClose, onSave }) {
|
|
11244
|
-
const [name, setName] =
|
|
11245
|
-
const [seededWith, setSeededWith] =
|
|
11294
|
+
const [name, setName] = useState20(initialName);
|
|
11295
|
+
const [seededWith, setSeededWith] = useState20({ isOpen, initialName });
|
|
11246
11296
|
if (seededWith.isOpen !== isOpen || seededWith.initialName !== initialName) {
|
|
11247
11297
|
setSeededWith({ isOpen, initialName });
|
|
11248
11298
|
if (isOpen) setName(initialName);
|
|
@@ -11675,7 +11725,7 @@ function useObjectUrl(file) {
|
|
|
11675
11725
|
}
|
|
11676
11726
|
|
|
11677
11727
|
// src/components/chat/chat-context-memory-bar.tsx
|
|
11678
|
-
import { useEffect as useEffect15, useRef as useRef14, useState as
|
|
11728
|
+
import { useEffect as useEffect15, useRef as useRef14, useState as useState21 } from "react";
|
|
11679
11729
|
import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11680
11730
|
var itemKey3 = (item) => `${item.type}:${item.id}`;
|
|
11681
11731
|
function ChatContextMemoryBar({
|
|
@@ -11685,7 +11735,7 @@ function ChatContextMemoryBar({
|
|
|
11685
11735
|
disabled = false,
|
|
11686
11736
|
className
|
|
11687
11737
|
}) {
|
|
11688
|
-
const [open, setOpen] =
|
|
11738
|
+
const [open, setOpen] = useState21(false);
|
|
11689
11739
|
const rootRef = useRef14(null);
|
|
11690
11740
|
if (items.length === 0 && open) setOpen(false);
|
|
11691
11741
|
useEffect15(() => {
|
|
@@ -12432,7 +12482,7 @@ var ChatTopNavigation = forwardRef22(
|
|
|
12432
12482
|
ChatTopNavigation.displayName = "ChatTopNavigation";
|
|
12433
12483
|
|
|
12434
12484
|
// src/components/chat/onboarding-carousel.tsx
|
|
12435
|
-
import { useState as
|
|
12485
|
+
import { useState as useState22 } from "react";
|
|
12436
12486
|
import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
12437
12487
|
function OnboardingCarousel({
|
|
12438
12488
|
steps,
|
|
@@ -12443,7 +12493,7 @@ function OnboardingCarousel({
|
|
|
12443
12493
|
label = "Introduction",
|
|
12444
12494
|
className
|
|
12445
12495
|
}) {
|
|
12446
|
-
const [index, setIndex] =
|
|
12496
|
+
const [index, setIndex] = useState22(0);
|
|
12447
12497
|
const lastIndex = steps.length - 1;
|
|
12448
12498
|
const isFirst = index === 0;
|
|
12449
12499
|
const isLast = index === lastIndex;
|
|
@@ -12875,7 +12925,7 @@ function useCaptions() {
|
|
|
12875
12925
|
}
|
|
12876
12926
|
|
|
12877
12927
|
// src/components/features/video-bites-strip.tsx
|
|
12878
|
-
import { useMemo as useMemo20, useRef as useRef17, useState as
|
|
12928
|
+
import { useMemo as useMemo20, useRef as useRef17, useState as useState24 } from "react";
|
|
12879
12929
|
|
|
12880
12930
|
// src/components/user-display.tsx
|
|
12881
12931
|
import { jsx as jsx67, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
@@ -12943,7 +12993,7 @@ function CardHitLayer({
|
|
|
12943
12993
|
}
|
|
12944
12994
|
|
|
12945
12995
|
// src/components/features/cards-strip.tsx
|
|
12946
|
-
import React3, { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef16, useState as
|
|
12996
|
+
import React3, { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef16, useState as useState23 } from "react";
|
|
12947
12997
|
import { Fragment as Fragment21, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
12948
12998
|
var TRACK_GAP_PX = 16;
|
|
12949
12999
|
var CHEVRON_SUPPRESS_MS = 4e3;
|
|
@@ -13060,9 +13110,9 @@ function CardsStrip(props) {
|
|
|
13060
13110
|
const wrapperRef = useRef16(null);
|
|
13061
13111
|
const scrollerRef = useRef16(null);
|
|
13062
13112
|
const trackRef = useRef16(null);
|
|
13063
|
-
const [reducedMotion, setReducedMotion] =
|
|
13064
|
-
const [isTouch, setIsTouch] =
|
|
13065
|
-
const [isMobile, setIsMobile] =
|
|
13113
|
+
const [reducedMotion, setReducedMotion] = useState23(false);
|
|
13114
|
+
const [isTouch, setIsTouch] = useState23(false);
|
|
13115
|
+
const [isMobile, setIsMobile] = useState23(false);
|
|
13066
13116
|
useEffect17(() => {
|
|
13067
13117
|
const subs = [];
|
|
13068
13118
|
const watch = (query, set) => {
|
|
@@ -13081,11 +13131,11 @@ function CardsStrip(props) {
|
|
|
13081
13131
|
});
|
|
13082
13132
|
};
|
|
13083
13133
|
}, []);
|
|
13084
|
-
const [overflows, setOverflows] =
|
|
13085
|
-
const [marqueeEligible, setMarqueeEligible] =
|
|
13134
|
+
const [overflows, setOverflows] = useState23(false);
|
|
13135
|
+
const [marqueeEligible, setMarqueeEligible] = useState23(false);
|
|
13086
13136
|
const singleCopyWidthRef = useRef16(0);
|
|
13087
13137
|
const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
|
|
13088
|
-
const [insets, setInsets] =
|
|
13138
|
+
const [insets, setInsets] = useState23(NO_BLEED);
|
|
13089
13139
|
const measure = useCallback11(() => {
|
|
13090
13140
|
const wrapper = wrapperRef.current;
|
|
13091
13141
|
const track = trackRef.current;
|
|
@@ -13122,7 +13172,7 @@ function CardsStrip(props) {
|
|
|
13122
13172
|
return () => observe(null);
|
|
13123
13173
|
}, [observe]);
|
|
13124
13174
|
const autoplay = useAutoplay(nearViewport);
|
|
13125
|
-
const [activeKey, setActiveKey] =
|
|
13175
|
+
const [activeKey, setActiveKey] = useState23(null);
|
|
13126
13176
|
const activeKeyRef = useRef16(null);
|
|
13127
13177
|
const activate = useCallback11((key) => {
|
|
13128
13178
|
activeKeyRef.current = key;
|
|
@@ -13205,7 +13255,7 @@ function CardsStrip(props) {
|
|
|
13205
13255
|
readBack: () => mirror(scrollerRef.current?.scrollLeft ?? 0),
|
|
13206
13256
|
onAfterFrame: syncHoverIfScrolled
|
|
13207
13257
|
});
|
|
13208
|
-
const [mountedIdx, setMountedIdx] =
|
|
13258
|
+
const [mountedIdx, setMountedIdx] = useState23(() => /* @__PURE__ */ new Set());
|
|
13209
13259
|
const cardObserverRef = useRef16(null);
|
|
13210
13260
|
const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
|
|
13211
13261
|
const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
|
|
@@ -13242,7 +13292,7 @@ function CardsStrip(props) {
|
|
|
13242
13292
|
cardObserverRef.current = null;
|
|
13243
13293
|
};
|
|
13244
13294
|
}, []);
|
|
13245
|
-
const [cardRefFns] =
|
|
13295
|
+
const [cardRefFns] = useState23(() => /* @__PURE__ */ new Map());
|
|
13246
13296
|
const getCardRef = useCallback11(
|
|
13247
13297
|
(idx) => {
|
|
13248
13298
|
let fn = cardRefFns.get(idx);
|
|
@@ -13574,7 +13624,7 @@ function VideoBiteCard({
|
|
|
13574
13624
|
const hasTarget = !!(targetHref || bite.onNavigate || onBiteNavigate);
|
|
13575
13625
|
const key = cardKey ?? `${bite.url}__${index}`;
|
|
13576
13626
|
const controlled = active !== void 0;
|
|
13577
|
-
const [selfActive, setSelfActive] =
|
|
13627
|
+
const [selfActive, setSelfActive] = useState24(false);
|
|
13578
13628
|
const isActive = controlled ? !!active : selfActive;
|
|
13579
13629
|
const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
|
|
13580
13630
|
const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
|
|
@@ -15820,11 +15870,11 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
15820
15870
|
};
|
|
15821
15871
|
}
|
|
15822
15872
|
var FINANCIAL_CARD_CONFIGS = {
|
|
15823
|
-
financial_kpi: { label: "Financial KPI"
|
|
15824
|
-
cap_table: { label: "Cap table entry"
|
|
15825
|
-
profit_loss: { label: "P&L period"
|
|
15826
|
-
balance_sheet: { label: "Balance sheet"
|
|
15827
|
-
cash_flow: { label: "Cash flow"
|
|
15873
|
+
financial_kpi: { label: "Financial KPI" },
|
|
15874
|
+
cap_table: { label: "Cap table entry" },
|
|
15875
|
+
profit_loss: { label: "P&L period" },
|
|
15876
|
+
balance_sheet: { label: "Balance sheet" },
|
|
15877
|
+
cash_flow: { label: "Cash flow" }
|
|
15828
15878
|
};
|
|
15829
15879
|
function registryEntries(configs, build) {
|
|
15830
15880
|
const out = {};
|
|
@@ -15838,7 +15888,7 @@ function financialRegistryEntries() {
|
|
|
15838
15888
|
GenericFinancialChatCard,
|
|
15839
15889
|
{
|
|
15840
15890
|
chatRef: displayRef,
|
|
15841
|
-
icon:
|
|
15891
|
+
icon: sourceGlyph(docType),
|
|
15842
15892
|
isNewTab: opts.isNewTab,
|
|
15843
15893
|
discuss: opts.discuss
|
|
15844
15894
|
}
|
|
@@ -15864,41 +15914,45 @@ var GITHUB_CARD_CONFIGS = {
|
|
|
15864
15914
|
github_pr_review: { label: "GitHub review", kind: "pr_review" },
|
|
15865
15915
|
github_pr_review_public: { label: "GitHub review (public)", kind: "pr_review" }
|
|
15866
15916
|
};
|
|
15867
|
-
var OpenFrameGlyph = resolveIcon("openframe");
|
|
15868
15917
|
var REF_GLYPH_CARD_CONFIGS = {
|
|
15869
|
-
openframe_tenant: { label: "OpenFrame tenant"
|
|
15870
|
-
prospect_call: { label: "Prospect call",
|
|
15918
|
+
openframe_tenant: { label: "OpenFrame tenant" },
|
|
15919
|
+
prospect_call: { label: "Prospect call", media: true },
|
|
15871
15920
|
// Code intelligence (product-hub internal): the review rules a repository is
|
|
15872
15921
|
// held to, the repositories themselves, and one row per deployment
|
|
15873
15922
|
// environment. Glyph cards like their siblings — none of the three has a
|
|
15874
15923
|
// cover image, and a rule is read in the admin screen it links to.
|
|
15875
|
-
code_rule: { label: "Code rule"
|
|
15876
|
-
code_repo: { label: "Repository"
|
|
15877
|
-
code_deployment: { label: "Deployment"
|
|
15924
|
+
code_rule: { label: "Code rule" },
|
|
15925
|
+
code_repo: { label: "Repository" },
|
|
15926
|
+
code_deployment: { label: "Deployment" },
|
|
15878
15927
|
// The graph's own objects: one source file's public surface, one public
|
|
15879
15928
|
// symbol, a near-duplicate cluster, and a pull request's blast radius.
|
|
15880
15929
|
// Glyph cards for the same reason as their three siblings — none carries a
|
|
15881
15930
|
// cover image, and each links to the admin screen that renders it in full.
|
|
15882
|
-
code_file: { label: "Code file"
|
|
15883
|
-
code_symbol: { label: "Code symbol"
|
|
15884
|
-
code_duplicate: { label: "Duplicate code"
|
|
15885
|
-
code_impact: { label: "Change impact"
|
|
15931
|
+
code_file: { label: "Code file" },
|
|
15932
|
+
code_symbol: { label: "Code symbol" },
|
|
15933
|
+
code_duplicate: { label: "Duplicate code" },
|
|
15934
|
+
code_impact: { label: "Change impact" },
|
|
15886
15935
|
// A change set: pull requests across repositories declared as one change, with the ClickUp tasks and design
|
|
15887
15936
|
// docs its pull requests are attached to. ONE card for it wherever a set is shown (chat, a design doc's page).
|
|
15888
|
-
change_set: { label: "Change set"
|
|
15937
|
+
change_set: { label: "Change set" },
|
|
15889
15938
|
// A page of the public website (pricing, product, legal, and every page the navigation lists), read live
|
|
15890
15939
|
// from the data the page shows. A glyph card: a page has no cover of its own, and the card opens the page.
|
|
15891
15940
|
site_page: { label: "Website page", icon: (ref) => /* @__PURE__ */ jsx85(SitePageGlyph, { iconName: refText(ref, "icon_name") }) },
|
|
15892
15941
|
// What OpenFrame charges, read live from its billing: the plan in force, or one AI model's token exchange
|
|
15893
15942
|
// rate. A glyph card; it opens the pricing page.
|
|
15894
|
-
openframe_price: { label: "OpenFrame price"
|
|
15943
|
+
openframe_price: { label: "OpenFrame price" },
|
|
15895
15944
|
// A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
|
|
15896
15945
|
vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ jsx85(VendorGlyph, { title: ref?.title ?? "", logoUrl: refText(ref, "logo_url") }) }
|
|
15897
15946
|
};
|
|
15947
|
+
function sourceGlyph(docType) {
|
|
15948
|
+
const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
|
|
15949
|
+
return /* @__PURE__ */ jsx85(Icon, { className: "size-6" });
|
|
15950
|
+
}
|
|
15898
15951
|
function refGlyphRegistryEntries() {
|
|
15899
|
-
return registryEntries(
|
|
15900
|
-
|
|
15901
|
-
|
|
15952
|
+
return registryEntries(REF_GLYPH_CARD_CONFIGS, (config, docType) => {
|
|
15953
|
+
const glyph = config.icon ?? (() => sourceGlyph(docType));
|
|
15954
|
+
const cfg = config;
|
|
15955
|
+
return refHydratedEntry(
|
|
15902
15956
|
docType,
|
|
15903
15957
|
cfg.label,
|
|
15904
15958
|
(displayRef, opts) => cfg.media ? /* @__PURE__ */ jsx85(
|
|
@@ -15910,24 +15964,16 @@ function refGlyphRegistryEntries() {
|
|
|
15910
15964
|
displayRef.metadata?.videoPoster,
|
|
15911
15965
|
opts.extras?.buildOgPlaceholderUrl?.(displayRef.title ?? "") ?? null
|
|
15912
15966
|
),
|
|
15913
|
-
fallbackIcon:
|
|
15967
|
+
fallbackIcon: glyph(displayRef),
|
|
15914
15968
|
status: { label: cfg.label, variant: "grey" },
|
|
15915
15969
|
chatRef: displayRef,
|
|
15916
15970
|
isNewTab: opts.isNewTab,
|
|
15917
15971
|
discuss: opts.discuss,
|
|
15918
15972
|
menuAriaLabel: `${cfg.label} actions`
|
|
15919
15973
|
}
|
|
15920
|
-
) : /* @__PURE__ */ jsx85(
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
chatRef: displayRef,
|
|
15924
|
-
icon: cfg.icon(displayRef),
|
|
15925
|
-
isNewTab: opts.isNewTab,
|
|
15926
|
-
discuss: opts.discuss
|
|
15927
|
-
}
|
|
15928
|
-
)
|
|
15929
|
-
)
|
|
15930
|
-
);
|
|
15974
|
+
) : /* @__PURE__ */ jsx85(GlyphChatCard, { chatRef: displayRef, icon: glyph(displayRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15975
|
+
);
|
|
15976
|
+
});
|
|
15931
15977
|
}
|
|
15932
15978
|
function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
15933
15979
|
const it = item;
|
|
@@ -15938,9 +15984,9 @@ function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
|
15938
15984
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
15939
15985
|
}
|
|
15940
15986
|
var EMPLOYEE_ENTRY_CARD_CONFIGS = {
|
|
15941
|
-
what_i_shipped: { label: "What I Shipped"
|
|
15942
|
-
how_i_work: { label: "How I Work"
|
|
15943
|
-
ai_prompt: { label: "Squawkbox"
|
|
15987
|
+
what_i_shipped: { label: "What I Shipped" },
|
|
15988
|
+
how_i_work: { label: "How I Work" },
|
|
15989
|
+
ai_prompt: { label: "Squawkbox" }
|
|
15944
15990
|
};
|
|
15945
15991
|
function employeeEntryRegistryEntries() {
|
|
15946
15992
|
return registryEntries(EMPLOYEE_ENTRY_CARD_CONFIGS, (cfg, docType) => ({
|
|
@@ -15952,7 +15998,7 @@ function employeeEntryRegistryEntries() {
|
|
|
15952
15998
|
GlyphChatCard,
|
|
15953
15999
|
{
|
|
15954
16000
|
chatRef: fetchedEmployeeEntryDisplayRef(item, chatRef),
|
|
15955
|
-
icon:
|
|
16001
|
+
icon: sourceGlyph(docType),
|
|
15956
16002
|
isNewTab: opts.isNewTab,
|
|
15957
16003
|
discuss: opts.discuss
|
|
15958
16004
|
}
|
|
@@ -16715,15 +16761,15 @@ function useChunkCatchup({
|
|
|
16715
16761
|
}
|
|
16716
16762
|
|
|
16717
16763
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
16718
|
-
import { useEffect as useEffect19, useState as
|
|
16764
|
+
import { useEffect as useEffect19, useState as useState25 } from "react";
|
|
16719
16765
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
16720
16766
|
function prefersReducedMotion() {
|
|
16721
16767
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
16722
16768
|
}
|
|
16723
16769
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
16724
|
-
const [index, setIndex] =
|
|
16725
|
-
const [reducedMotion, setReducedMotion] =
|
|
16726
|
-
const [prevKey, setPrevKey] =
|
|
16770
|
+
const [index, setIndex] = useState25(0);
|
|
16771
|
+
const [reducedMotion, setReducedMotion] = useState25(false);
|
|
16772
|
+
const [prevKey, setPrevKey] = useState25(resetKey);
|
|
16727
16773
|
if (resetKey !== prevKey) {
|
|
16728
16774
|
setPrevKey(resetKey);
|
|
16729
16775
|
setIndex(0);
|
|
@@ -16750,7 +16796,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
16750
16796
|
}
|
|
16751
16797
|
|
|
16752
16798
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
16753
|
-
import { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef19, useState as
|
|
16799
|
+
import { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef19, useState as useState26 } from "react";
|
|
16754
16800
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
16755
16801
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
16756
16802
|
var RESYNC_COALESCE_MS = 1e3;
|
|
@@ -16772,11 +16818,11 @@ function useJetStreamDialogSubscription({
|
|
|
16772
16818
|
inactiveThresholdMs,
|
|
16773
16819
|
resyncSignal = 0
|
|
16774
16820
|
}) {
|
|
16775
|
-
const [isConnected, setIsConnected] =
|
|
16776
|
-
const [subscriptionLive, setIsSubscribed] =
|
|
16777
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
16778
|
-
const [recoveryCount, setRecoveryCount] =
|
|
16779
|
-
const [seqEntry, setSeqEntry] =
|
|
16821
|
+
const [isConnected, setIsConnected] = useState26(false);
|
|
16822
|
+
const [subscriptionLive, setIsSubscribed] = useState26(false);
|
|
16823
|
+
const [reconnectionCount, setReconnectionCount] = useState26(0);
|
|
16824
|
+
const [recoveryCount, setRecoveryCount] = useState26(0);
|
|
16825
|
+
const [seqEntry, setSeqEntry] = useState26(null);
|
|
16780
16826
|
const currentStreamSeq = seqEntry && seqEntry.dialogId === dialogId ? seqEntry.seq : null;
|
|
16781
16827
|
const isSubscribed = subscriptionLive && enabled && Boolean(dialogId) && isConnected;
|
|
16782
16828
|
const lastRecoveryReportRef = useRef19(0);
|
|
@@ -17052,7 +17098,7 @@ function useJetStreamDialogSubscription({
|
|
|
17052
17098
|
}
|
|
17053
17099
|
|
|
17054
17100
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
17055
|
-
import { useEffect as useEffect21, useRef as useRef20, useState as
|
|
17101
|
+
import { useEffect as useEffect21, useRef as useRef20, useState as useState27 } from "react";
|
|
17056
17102
|
function useNatsDialogSubscription({
|
|
17057
17103
|
enabled,
|
|
17058
17104
|
dialogId,
|
|
@@ -17066,9 +17112,9 @@ function useNatsDialogSubscription({
|
|
|
17066
17112
|
clientConfig = {},
|
|
17067
17113
|
reconnectionBackoff
|
|
17068
17114
|
}) {
|
|
17069
|
-
const [isConnected, setIsConnected] =
|
|
17070
|
-
const [isSubscribed, setIsSubscribed] =
|
|
17071
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
17115
|
+
const [isConnected, setIsConnected] = useState27(false);
|
|
17116
|
+
const [isSubscribed, setIsSubscribed] = useState27(false);
|
|
17117
|
+
const [reconnectionCount, setReconnectionCount] = useState27(0);
|
|
17072
17118
|
const clientRef = useRef20(null);
|
|
17073
17119
|
const subscriptionRefs = useRef20(/* @__PURE__ */ new Map());
|
|
17074
17120
|
const onEventRef = useRef20(onEvent);
|
|
@@ -17326,7 +17372,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
17326
17372
|
|
|
17327
17373
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
17328
17374
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
17329
|
-
import { useEffect as useEffect22, useState as
|
|
17375
|
+
import { useEffect as useEffect22, useState as useState28 } from "react";
|
|
17330
17376
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
17331
17377
|
try {
|
|
17332
17378
|
const url = new URL(commandsUrl, window.location.origin);
|
|
@@ -17343,7 +17389,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
17343
17389
|
}
|
|
17344
17390
|
var NO_COMMANDS = [];
|
|
17345
17391
|
function useSlashCommands(prefix, commandsUrl) {
|
|
17346
|
-
const [answered, setAnswered] =
|
|
17392
|
+
const [answered, setAnswered] = useState28(null);
|
|
17347
17393
|
const commands = prefix != null && answered?.prefix === prefix ? answered.commands : NO_COMMANDS;
|
|
17348
17394
|
const loading = prefix != null && answered?.prefix !== prefix;
|
|
17349
17395
|
useEffect22(() => {
|
|
@@ -17453,7 +17499,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
|
|
|
17453
17499
|
|
|
17454
17500
|
// src/components/chat/hooks/use-chat-attachments.ts
|
|
17455
17501
|
import { fileTypeFromBlob } from "file-type";
|
|
17456
|
-
import { useCallback as useCallback14, useEffect as useEffect23, useMemo as useMemo21, useRef as useRef21, useState as
|
|
17502
|
+
import { useCallback as useCallback14, useEffect as useEffect23, useMemo as useMemo21, useRef as useRef21, useState as useState29 } from "react";
|
|
17457
17503
|
var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
|
|
17458
17504
|
var CHAT_ATTACHMENTS_FOLDER = "chat";
|
|
17459
17505
|
var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
@@ -17520,7 +17566,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
17520
17566
|
function useChatAttachments() {
|
|
17521
17567
|
const runtime = useRequiredChatRuntime();
|
|
17522
17568
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
17523
|
-
const [attachments, setAttachments] =
|
|
17569
|
+
const [attachments, setAttachments] = useState29([]);
|
|
17524
17570
|
const controllersRef = useRef21(/* @__PURE__ */ new Map());
|
|
17525
17571
|
const updateOne = useCallback14((id, patch) => {
|
|
17526
17572
|
setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
|
|
@@ -17686,14 +17732,14 @@ function useChatAttachments() {
|
|
|
17686
17732
|
}
|
|
17687
17733
|
|
|
17688
17734
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
17689
|
-
import { useCallback as useCallback15, useEffect as useEffect24, useRef as useRef22, useState as
|
|
17735
|
+
import { useCallback as useCallback15, useEffect as useEffect24, useRef as useRef22, useState as useState30 } from "react";
|
|
17690
17736
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
17691
17737
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
17692
17738
|
function useChatAttachmentImageGallery() {
|
|
17693
17739
|
const runtime = useRequiredChatRuntime();
|
|
17694
17740
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
17695
17741
|
const panelRef = useRef22(null);
|
|
17696
|
-
const [state, setState] =
|
|
17742
|
+
const [state, setState] = useState30(CLOSED);
|
|
17697
17743
|
const handleClose = useCallback15(() => setState(CLOSED), []);
|
|
17698
17744
|
useEffect24(() => {
|
|
17699
17745
|
const root = panelRef.current;
|
|
@@ -17741,7 +17787,7 @@ function absolutize(prefix) {
|
|
|
17741
17787
|
}
|
|
17742
17788
|
|
|
17743
17789
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
17744
|
-
import { createContext as createContext4, createElement, useContext as useContext4, useEffect as useEffect25, useState as
|
|
17790
|
+
import { createContext as createContext4, createElement, useContext as useContext4, useEffect as useEffect25, useState as useState31 } from "react";
|
|
17745
17791
|
var ANON_DEFAULTS = {
|
|
17746
17792
|
authTier: "anon",
|
|
17747
17793
|
source: null,
|
|
@@ -17753,7 +17799,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
17753
17799
|
const url = runtime.endpoints.identityUrl;
|
|
17754
17800
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
17755
17801
|
const requestKey = enabled ? `${url}\0${proxyEmail ?? ""}` : null;
|
|
17756
|
-
const [resolved, setResolved] =
|
|
17802
|
+
const [resolved, setResolved] = useState31(null);
|
|
17757
17803
|
const data = resolved?.key === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
17758
17804
|
const isLoading = requestKey !== null && resolved?.key !== requestKey;
|
|
17759
17805
|
useEffect25(() => {
|
|
@@ -17818,13 +17864,13 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
17818
17864
|
}
|
|
17819
17865
|
|
|
17820
17866
|
// src/components/chat/hooks/use-chat.ts
|
|
17821
|
-
import { useState as
|
|
17867
|
+
import { useState as useState33, useCallback as useCallback17, useEffect as useEffect27, useRef as useRef25 } from "react";
|
|
17822
17868
|
|
|
17823
17869
|
// src/components/chat/hooks/use-sse.ts
|
|
17824
|
-
import { useState as
|
|
17870
|
+
import { useState as useState32, useCallback as useCallback16, useRef as useRef24 } from "react";
|
|
17825
17871
|
function useSSE({ streamFn } = {}) {
|
|
17826
|
-
const [isStreaming, setIsStreaming] =
|
|
17827
|
-
const [error, setError] =
|
|
17872
|
+
const [isStreaming, setIsStreaming] = useState32(false);
|
|
17873
|
+
const [error, setError] = useState32(null);
|
|
17828
17874
|
const abortControllerRef = useRef24(null);
|
|
17829
17875
|
const streamMessage = useCallback16(
|
|
17830
17876
|
async function* (message, extra) {
|
|
@@ -17894,8 +17940,8 @@ function useChat({
|
|
|
17894
17940
|
initialMessages,
|
|
17895
17941
|
onMessagesChange
|
|
17896
17942
|
} = {}) {
|
|
17897
|
-
const [messages, setMessages] =
|
|
17898
|
-
const [isTyping, setIsTyping] =
|
|
17943
|
+
const [messages, setMessages] = useState33(() => initialMessages ?? []);
|
|
17944
|
+
const [isTyping, setIsTyping] = useState33(false);
|
|
17899
17945
|
const currentAssistantSegmentsRef = useRef25([]);
|
|
17900
17946
|
const onMessagesChangeRef = useRef25(onMessagesChange);
|
|
17901
17947
|
useEffect27(() => {
|
|
@@ -18140,7 +18186,7 @@ function useChat({
|
|
|
18140
18186
|
}
|
|
18141
18187
|
|
|
18142
18188
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
18143
|
-
import { useCallback as useCallback20, useMemo as useMemo24, useRef as useRef28, useState as
|
|
18189
|
+
import { useCallback as useCallback20, useMemo as useMemo24, useRef as useRef28, useState as useState37 } from "react";
|
|
18144
18190
|
|
|
18145
18191
|
// src/chat-protocol/confirm-tool.ts
|
|
18146
18192
|
function buildConfirmToolBody(request) {
|
|
@@ -20724,7 +20770,7 @@ function createChatDialogStore(options = {}) {
|
|
|
20724
20770
|
}
|
|
20725
20771
|
|
|
20726
20772
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
20727
|
-
import { useCallback as useCallback18, useEffect as useEffect28, useMemo as useMemo22, useState as
|
|
20773
|
+
import { useCallback as useCallback18, useEffect as useEffect28, useMemo as useMemo22, useState as useState34, useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
20728
20774
|
|
|
20729
20775
|
// src/components/chat/stream/delta-batcher.ts
|
|
20730
20776
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -20820,7 +20866,7 @@ function useChatStreamReducer({
|
|
|
20820
20866
|
const state = useSyncExternalStore4(subscribe2, getSnapshot2, getServerSnapshot2);
|
|
20821
20867
|
useEffect28(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
20822
20868
|
const key = useMemo22(() => ({ store, dialogId, side }), [store, dialogId, side]);
|
|
20823
|
-
const [batcher] =
|
|
20869
|
+
const [batcher] = useState34(
|
|
20824
20870
|
() => createDeltaBatcher({
|
|
20825
20871
|
applyOne: (event, k) => {
|
|
20826
20872
|
if (k) k.store.apply(k.dialogId, k.side, event);
|
|
@@ -20943,7 +20989,7 @@ function buildDiscussPrompt(reference, options = {}) {
|
|
|
20943
20989
|
}
|
|
20944
20990
|
|
|
20945
20991
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
20946
|
-
import { useEffect as useEffect29, useRef as useRef26, useState as
|
|
20992
|
+
import { useEffect as useEffect29, useRef as useRef26, useState as useState35 } from "react";
|
|
20947
20993
|
function useChatHistoryHydration({
|
|
20948
20994
|
active,
|
|
20949
20995
|
source,
|
|
@@ -20954,7 +21000,7 @@ function useChatHistoryHydration({
|
|
|
20954
21000
|
bumpMetaTick,
|
|
20955
21001
|
onOrphanedConversation
|
|
20956
21002
|
}) {
|
|
20957
|
-
const [isHydratingHistory, setIsHydratingHistory] =
|
|
21003
|
+
const [isHydratingHistory, setIsHydratingHistory] = useState35(false);
|
|
20958
21004
|
const hydratedKeyRef = useRef26(null);
|
|
20959
21005
|
const runIdRef = useRef26(0);
|
|
20960
21006
|
useEffect29(() => {
|
|
@@ -21029,7 +21075,7 @@ function useChatHistoryHydration({
|
|
|
21029
21075
|
}
|
|
21030
21076
|
|
|
21031
21077
|
// src/components/chat/hooks/use-managed-dialog-list.ts
|
|
21032
|
-
import { useCallback as useCallback19, useEffect as useEffect30, useMemo as useMemo23, useRef as useRef27, useState as
|
|
21078
|
+
import { useCallback as useCallback19, useEffect as useEffect30, useMemo as useMemo23, useRef as useRef27, useState as useState36 } from "react";
|
|
21033
21079
|
function useManagedDialogList({
|
|
21034
21080
|
autoLoad,
|
|
21035
21081
|
fetchDialogs,
|
|
@@ -21041,19 +21087,19 @@ function useManagedDialogList({
|
|
|
21041
21087
|
onDialogRemoved,
|
|
21042
21088
|
logTag
|
|
21043
21089
|
}) {
|
|
21044
|
-
const [dialogs, setDialogs] =
|
|
21045
|
-
const [dialogsNextCursor, setDialogsNextCursor] =
|
|
21046
|
-
const [isDialogsLoading, setIsDialogsLoading] =
|
|
21047
|
-
const [settledSearch, setSettledSearch] =
|
|
21090
|
+
const [dialogs, setDialogs] = useState36([]);
|
|
21091
|
+
const [dialogsNextCursor, setDialogsNextCursor] = useState36(null);
|
|
21092
|
+
const [isDialogsLoading, setIsDialogsLoading] = useState36(false);
|
|
21093
|
+
const [settledSearch, setSettledSearch] = useState36(
|
|
21048
21094
|
autoLoad && fetchDialogs ? void 0 : null
|
|
21049
21095
|
);
|
|
21050
|
-
const [autoLoadWas, setAutoLoadWas] =
|
|
21096
|
+
const [autoLoadWas, setAutoLoadWas] = useState36(autoLoad);
|
|
21051
21097
|
if (autoLoad !== autoLoadWas) {
|
|
21052
21098
|
setAutoLoadWas(autoLoad);
|
|
21053
21099
|
if (autoLoad && fetchDialogs) setSettledSearch(void 0);
|
|
21054
21100
|
}
|
|
21055
21101
|
const pendingRef = useRef27(false);
|
|
21056
|
-
const [dialogsError, setDialogsError] =
|
|
21102
|
+
const [dialogsError, setDialogsError] = useState36(false);
|
|
21057
21103
|
const dialogsRef = useRef27(dialogs);
|
|
21058
21104
|
useEffect30(() => {
|
|
21059
21105
|
dialogsRef.current = dialogs;
|
|
@@ -21287,7 +21333,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21287
21333
|
pruneStaleChatConversationStorage(source);
|
|
21288
21334
|
conversationIdRef.current = conversationStorage.load()?.conversationId ?? null;
|
|
21289
21335
|
}
|
|
21290
|
-
const [conversationId, setConversationId] =
|
|
21336
|
+
const [conversationId, setConversationId] = useState37(() => conversationIdRef.current);
|
|
21291
21337
|
const commitConversationId = useCallback20(
|
|
21292
21338
|
(id) => {
|
|
21293
21339
|
conversationIdRef.current = id;
|
|
@@ -21390,7 +21436,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21390
21436
|
() => conversationsUrl ? createChatConversationsApi(conversationsUrl) : null,
|
|
21391
21437
|
[conversationsUrl]
|
|
21392
21438
|
);
|
|
21393
|
-
const [dialogSearch, setDialogSearch] =
|
|
21439
|
+
const [dialogSearch, setDialogSearch] = useState37("");
|
|
21394
21440
|
const fetchActiveDialogs = useMemo24(
|
|
21395
21441
|
() => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "active" }) : void 0,
|
|
21396
21442
|
[conversationsApi]
|
|
@@ -21708,7 +21754,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21708
21754
|
}
|
|
21709
21755
|
|
|
21710
21756
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
21711
|
-
import { useCallback as useCallback21, useEffect as useEffect31, useMemo as useMemo25, useRef as useRef29, useState as
|
|
21757
|
+
import { useCallback as useCallback21, useEffect as useEffect31, useMemo as useMemo25, useRef as useRef29, useState as useState38 } from "react";
|
|
21712
21758
|
|
|
21713
21759
|
// src/chat-protocol/nats-decoder.ts
|
|
21714
21760
|
function str(value) {
|
|
@@ -22722,7 +22768,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22722
22768
|
modelLabel = null
|
|
22723
22769
|
} = config;
|
|
22724
22770
|
const isManagedMode = fetchDialogs !== void 0;
|
|
22725
|
-
const [internalDialogId, setInternalDialogId] =
|
|
22771
|
+
const [internalDialogId, setInternalDialogId] = useState38(null);
|
|
22726
22772
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
22727
22773
|
const currentDialogIdRef = useRef29(dialogId);
|
|
22728
22774
|
useEffect31(() => {
|
|
@@ -22740,8 +22786,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22740
22786
|
if (!requestId) return void 0;
|
|
22741
22787
|
return handleRejectRef.current(requestId);
|
|
22742
22788
|
}, []);
|
|
22743
|
-
const [dialogStore] =
|
|
22744
|
-
const [globalApprovalStatuses] =
|
|
22789
|
+
const [dialogStore] = useState38(() => createChatDialogStore());
|
|
22790
|
+
const [globalApprovalStatuses] = useState38(() => ({}));
|
|
22745
22791
|
const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
|
|
22746
22792
|
const { state, applyEvent, mutate } = useChatStreamReducer({
|
|
22747
22793
|
store: dialogStore,
|
|
@@ -22796,7 +22842,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22796
22842
|
},
|
|
22797
22843
|
[applyEvent]
|
|
22798
22844
|
);
|
|
22799
|
-
const [isCreatingDialog, setIsCreatingDialog] =
|
|
22845
|
+
const [isCreatingDialog, setIsCreatingDialog] = useState38(false);
|
|
22800
22846
|
const {
|
|
22801
22847
|
dialogs,
|
|
22802
22848
|
isDialogsLoading,
|
|
@@ -22823,9 +22869,9 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22823
22869
|
}
|
|
22824
22870
|
}
|
|
22825
22871
|
});
|
|
22826
|
-
const [messagesNextCursor, setMessagesNextCursor] =
|
|
22827
|
-
const [isMessagesLoading, setIsMessagesLoading] =
|
|
22828
|
-
const [connectedForDialog, setConnectedForDialog] =
|
|
22872
|
+
const [messagesNextCursor, setMessagesNextCursor] = useState38(null);
|
|
22873
|
+
const [isMessagesLoading, setIsMessagesLoading] = useState38(false);
|
|
22874
|
+
const [connectedForDialog, setConnectedForDialog] = useState38(null);
|
|
22829
22875
|
const hasConnectedOnceRef = useRef29(false);
|
|
22830
22876
|
const {
|
|
22831
22877
|
processChunk: catchupProcessChunk,
|
|
@@ -23136,7 +23182,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
23136
23182
|
}
|
|
23137
23183
|
|
|
23138
23184
|
// src/components/chat/hooks/use-stable-shallow.ts
|
|
23139
|
-
import { useState as
|
|
23185
|
+
import { useState as useState39 } from "react";
|
|
23140
23186
|
function shallowEqual(a, b) {
|
|
23141
23187
|
const aKeys = Object.keys(a);
|
|
23142
23188
|
if (aKeys.length !== Object.keys(b).length) return false;
|
|
@@ -23145,14 +23191,14 @@ function shallowEqual(a, b) {
|
|
|
23145
23191
|
return aKeys.every((key) => key in b && Object.is(aRec[key], bRec[key]));
|
|
23146
23192
|
}
|
|
23147
23193
|
function useStableShallow(value) {
|
|
23148
|
-
const [cached, setCached] =
|
|
23194
|
+
const [cached, setCached] = useState39(value);
|
|
23149
23195
|
const same = cached === value || cached !== void 0 && value !== void 0 && shallowEqual(cached, value);
|
|
23150
23196
|
if (!same) setCached(value);
|
|
23151
23197
|
return same ? cached : value;
|
|
23152
23198
|
}
|
|
23153
23199
|
|
|
23154
23200
|
// src/components/chat/hooks/use-unified-chat.ts
|
|
23155
|
-
import { useCallback as useCallback22, useEffect as useEffect32, useMemo as useMemo26, useRef as useRef30, useState as
|
|
23201
|
+
import { useCallback as useCallback22, useEffect as useEffect32, useMemo as useMemo26, useRef as useRef30, useState as useState40 } from "react";
|
|
23156
23202
|
var EMPTY_SSE_OPTIONS = {};
|
|
23157
23203
|
function createDisabledNatsConfig() {
|
|
23158
23204
|
return {
|
|
@@ -23167,7 +23213,7 @@ function createDisabledNatsConfig() {
|
|
|
23167
23213
|
}
|
|
23168
23214
|
function useUnifiedChat(options) {
|
|
23169
23215
|
const { modes, activeMode, mingoStateOverride, injectedDialogCapabilities } = options;
|
|
23170
|
-
const [disabledNatsConfig] =
|
|
23216
|
+
const [disabledNatsConfig] = useState40(createDisabledNatsConfig);
|
|
23171
23217
|
const sseActive = activeMode === "guide" && modes.guide !== void 0;
|
|
23172
23218
|
const natsActive = activeMode === "mingo" && modes.mingo !== void 0;
|
|
23173
23219
|
const sseState = useSseChatAdapter(modes.guide ?? EMPTY_SSE_OPTIONS, {
|
|
@@ -23677,7 +23723,7 @@ import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
|
23677
23723
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
23678
23724
|
import { isIOS } from "@react-aria/utils";
|
|
23679
23725
|
import { MessageSquare as MessageSquare2 } from "lucide-react";
|
|
23680
|
-
import React7, { useCallback as useCallback26, useEffect as useEffect35, useImperativeHandle as useImperativeHandle2, useMemo as useMemo29, useRef as useRef35, useState as
|
|
23726
|
+
import React7, { useCallback as useCallback26, useEffect as useEffect35, useImperativeHandle as useImperativeHandle2, useMemo as useMemo29, useRef as useRef35, useState as useState45 } from "react";
|
|
23681
23727
|
|
|
23682
23728
|
// src/components/ui/drawer.tsx
|
|
23683
23729
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
@@ -23687,12 +23733,12 @@ import {
|
|
|
23687
23733
|
forwardRef as forwardRef24,
|
|
23688
23734
|
useEffect as useEffect34,
|
|
23689
23735
|
useRef as useRef32,
|
|
23690
|
-
useState as
|
|
23736
|
+
useState as useState42,
|
|
23691
23737
|
useSyncExternalStore as useSyncExternalStore5
|
|
23692
23738
|
} from "react";
|
|
23693
23739
|
|
|
23694
23740
|
// src/hooks/ui/use-resizable-panel-size.ts
|
|
23695
|
-
import { useCallback as useCallback23, useMemo as useMemo27, useState as
|
|
23741
|
+
import { useCallback as useCallback23, useMemo as useMemo27, useState as useState41 } from "react";
|
|
23696
23742
|
var CHOSEN_SIZE_KEY_SUFFIX = ":chosen";
|
|
23697
23743
|
function isStoredPanelSize(value) {
|
|
23698
23744
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -23716,7 +23762,7 @@ function useResizablePanelSize({
|
|
|
23716
23762
|
}) : null,
|
|
23717
23763
|
[enabled, storageKey]
|
|
23718
23764
|
);
|
|
23719
|
-
const [held, setChosen] =
|
|
23765
|
+
const [held, setChosen] = useState41(() => ({ storage, size: storage?.load()?.size ?? null }));
|
|
23720
23766
|
const chosen = held.storage === storage ? held : { storage, size: storage?.load()?.size ?? null };
|
|
23721
23767
|
if (chosen !== held) setChosen(chosen);
|
|
23722
23768
|
const chosenSize = chosen.size;
|
|
@@ -24000,7 +24046,7 @@ var DrawerContent = forwardRef24(
|
|
|
24000
24046
|
const resolvedSide = side ?? "right";
|
|
24001
24047
|
const isHorizontal = HORIZONTAL_SIDES2.has(resolvedSide);
|
|
24002
24048
|
const headerHeight = useHeaderHeight();
|
|
24003
|
-
const [isMobile, setIsMobile] =
|
|
24049
|
+
const [isMobile, setIsMobile] = useState42(false);
|
|
24004
24050
|
useEffect34(() => {
|
|
24005
24051
|
if (typeof window === "undefined") return void 0;
|
|
24006
24052
|
const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
@@ -24102,7 +24148,7 @@ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx88("div", { c
|
|
|
24102
24148
|
DrawerFooter.displayName = "DrawerFooter";
|
|
24103
24149
|
|
|
24104
24150
|
// src/components/ui/hover-dropdown.tsx
|
|
24105
|
-
import { useState as
|
|
24151
|
+
import { useState as useState43, useRef as useRef33, useCallback as useCallback24 } from "react";
|
|
24106
24152
|
import { Fragment as Fragment34, jsx as jsx89, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
24107
24153
|
function DefaultAnchor({ href, className, children }) {
|
|
24108
24154
|
return /* @__PURE__ */ jsx89("a", { href, className, children });
|
|
@@ -24115,7 +24161,7 @@ function HoverDropdown({
|
|
|
24115
24161
|
className,
|
|
24116
24162
|
renderAnchor
|
|
24117
24163
|
}) {
|
|
24118
|
-
const [open, setOpen] =
|
|
24164
|
+
const [open, setOpen] = useState43(false);
|
|
24119
24165
|
const timeoutRef = useRef33(void 0);
|
|
24120
24166
|
const containerRef = useRef33(null);
|
|
24121
24167
|
const panelRef = useRef33(null);
|
|
@@ -24219,7 +24265,7 @@ function HoverDropdown({
|
|
|
24219
24265
|
}
|
|
24220
24266
|
|
|
24221
24267
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
24222
|
-
import { useCallback as useCallback25, useMemo as useMemo28, useRef as useRef34, useState as
|
|
24268
|
+
import { useCallback as useCallback25, useMemo as useMemo28, useRef as useRef34, useState as useState44 } from "react";
|
|
24223
24269
|
function useChatDialogManager({
|
|
24224
24270
|
dialogs,
|
|
24225
24271
|
activeDialogId,
|
|
@@ -24231,8 +24277,8 @@ function useChatDialogManager({
|
|
|
24231
24277
|
fetchArchivedDialogs,
|
|
24232
24278
|
unarchiveDialog
|
|
24233
24279
|
}) {
|
|
24234
|
-
const [renameTarget, setRenameTarget] =
|
|
24235
|
-
const [archiveTarget, setArchiveTarget] =
|
|
24280
|
+
const [renameTarget, setRenameTarget] = useState44(null);
|
|
24281
|
+
const [archiveTarget, setArchiveTarget] = useState44(null);
|
|
24236
24282
|
const handleConfirmRename = useCallback25(
|
|
24237
24283
|
(name) => {
|
|
24238
24284
|
if (renameTarget) void renameDialog(renameTarget.id, name);
|
|
@@ -24240,7 +24286,7 @@ function useChatDialogManager({
|
|
|
24240
24286
|
},
|
|
24241
24287
|
[renameTarget, renameDialog]
|
|
24242
24288
|
);
|
|
24243
|
-
const [openingDialogId, setOpeningDialogId] =
|
|
24289
|
+
const [openingDialogId, setOpeningDialogId] = useState44(null);
|
|
24244
24290
|
const handleConfirmArchive = useCallback25(async () => {
|
|
24245
24291
|
if (archiveTarget) {
|
|
24246
24292
|
try {
|
|
@@ -24256,11 +24302,11 @@ function useChatDialogManager({
|
|
|
24256
24302
|
}
|
|
24257
24303
|
setArchiveTarget(null);
|
|
24258
24304
|
}, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
|
|
24259
|
-
const [archiveOpen, setArchiveOpen] =
|
|
24260
|
-
const [archivedDialogs, setArchivedDialogs] =
|
|
24261
|
-
const [archivedCursor, setArchivedCursor] =
|
|
24262
|
-
const [archivedLoading, setArchivedLoading] =
|
|
24263
|
-
const [archivedPending, setArchivedPending] =
|
|
24305
|
+
const [archiveOpen, setArchiveOpen] = useState44(false);
|
|
24306
|
+
const [archivedDialogs, setArchivedDialogs] = useState44([]);
|
|
24307
|
+
const [archivedCursor, setArchivedCursor] = useState44(null);
|
|
24308
|
+
const [archivedLoading, setArchivedLoading] = useState44(false);
|
|
24309
|
+
const [archivedPending, setArchivedPending] = useState44(false);
|
|
24264
24310
|
const archivedRequestIdRef = useRef34(0);
|
|
24265
24311
|
const loadArchivedPage = useCallback25(
|
|
24266
24312
|
async (cursor) => {
|
|
@@ -24300,7 +24346,7 @@ function useChatDialogManager({
|
|
|
24300
24346
|
void loadArchivedPage();
|
|
24301
24347
|
}, [loadArchivedPage]);
|
|
24302
24348
|
const closeArchive = useCallback25(() => setArchiveOpen(false), []);
|
|
24303
|
-
const [viewingArchivedId, setViewingArchivedId] =
|
|
24349
|
+
const [viewingArchivedId, setViewingArchivedId] = useState44(null);
|
|
24304
24350
|
const handleSelectDialog = useCallback25(
|
|
24305
24351
|
(id) => {
|
|
24306
24352
|
setViewingArchivedId(null);
|
|
@@ -24319,7 +24365,7 @@ function useChatDialogManager({
|
|
|
24319
24365
|
},
|
|
24320
24366
|
[selectDialog]
|
|
24321
24367
|
);
|
|
24322
|
-
const [restoreTarget, setRestoreTarget] =
|
|
24368
|
+
const [restoreTarget, setRestoreTarget] = useState44(null);
|
|
24323
24369
|
const handleConfirmRestore = useCallback25(async () => {
|
|
24324
24370
|
if (restoreTarget) {
|
|
24325
24371
|
try {
|
|
@@ -24483,8 +24529,8 @@ var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
|
24483
24529
|
var NO_CONTEXT_ITEMS = [];
|
|
24484
24530
|
var RAIL_ANIM_MS = 320;
|
|
24485
24531
|
function useRailPresence(open) {
|
|
24486
|
-
const [mounted, setMounted] =
|
|
24487
|
-
const [active, setActive] =
|
|
24532
|
+
const [mounted, setMounted] = useState45(open);
|
|
24533
|
+
const [active, setActive] = useState45(false);
|
|
24488
24534
|
if (open && !mounted) setMounted(true);
|
|
24489
24535
|
if (!open && active) setActive(false);
|
|
24490
24536
|
useEffect35(() => {
|
|
@@ -24711,7 +24757,7 @@ function SourceChips({
|
|
|
24711
24757
|
onClose,
|
|
24712
24758
|
onDiscuss
|
|
24713
24759
|
}) {
|
|
24714
|
-
const [expanded, setExpanded] =
|
|
24760
|
+
const [expanded, setExpanded] = useState45(false);
|
|
24715
24761
|
if (cited.length === 0) {
|
|
24716
24762
|
const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
|
|
24717
24763
|
if (fallback.length === 0) return null;
|
|
@@ -24842,7 +24888,7 @@ function EmbeddableChatInner({
|
|
|
24842
24888
|
defaultProp: defaultOpen ?? false,
|
|
24843
24889
|
onChange: onOpenChange
|
|
24844
24890
|
});
|
|
24845
|
-
const [autoFocusInput] =
|
|
24891
|
+
const [autoFocusInput] = useState45(() => {
|
|
24846
24892
|
if (typeof window === "undefined") return false;
|
|
24847
24893
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
24848
24894
|
});
|
|
@@ -24875,7 +24921,7 @@ function EmbeddableChatInner({
|
|
|
24875
24921
|
};
|
|
24876
24922
|
}, [isOpen, shellLess]);
|
|
24877
24923
|
const chatInputRef = useRef35(null);
|
|
24878
|
-
const [quickActionPreview, setQuickActionPreview] =
|
|
24924
|
+
const [quickActionPreview, setQuickActionPreview] = useState45(null);
|
|
24879
24925
|
const slashCommandsProp = useMemo29(
|
|
24880
24926
|
() => ({
|
|
24881
24927
|
fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
|
|
@@ -24898,7 +24944,7 @@ function EmbeddableChatInner({
|
|
|
24898
24944
|
}, [modes, tableIdForDocumentType]);
|
|
24899
24945
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
24900
24946
|
const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
|
|
24901
|
-
const [uncontrolledActiveMode, setUncontrolledActiveMode] =
|
|
24947
|
+
const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState45(initialActiveMode);
|
|
24902
24948
|
const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
|
|
24903
24949
|
const handleActiveModeChange = useCallback26(
|
|
24904
24950
|
(next) => {
|
|
@@ -24974,7 +25020,7 @@ function EmbeddableChatInner({
|
|
|
24974
25020
|
injectedDialogCapabilities: mingoDialogCapabilities
|
|
24975
25021
|
});
|
|
24976
25022
|
const historyListMode = dialogCapabilities !== void 0;
|
|
24977
|
-
const [namingNewChat, setNamingNewChat] =
|
|
25023
|
+
const [namingNewChat, setNamingNewChat] = useState45(false);
|
|
24978
25024
|
const sendMessage = useCallback26(
|
|
24979
25025
|
async (text2, options) => {
|
|
24980
25026
|
if (activeDialogId == null) setNamingNewChat(true);
|
|
@@ -25018,17 +25064,17 @@ function EmbeddableChatInner({
|
|
|
25018
25064
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
25019
25065
|
const contextMaxItems = contextPicker?.maxItems ?? 10;
|
|
25020
25066
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
25021
|
-
const [contextItems, setContextItems] =
|
|
25022
|
-
const [contextPickerOpen, setContextPickerOpen] =
|
|
25023
|
-
const [mentionQuery, setMentionQuery] =
|
|
25067
|
+
const [contextItems, setContextItems] = useState45(NO_CONTEXT_ITEMS);
|
|
25068
|
+
const [contextPickerOpen, setContextPickerOpen] = useState45(false);
|
|
25069
|
+
const [mentionQuery, setMentionQuery] = useState45(null);
|
|
25024
25070
|
const mentionActiveRef = useRef35(false);
|
|
25025
25071
|
useEffect35(() => {
|
|
25026
25072
|
mentionActiveRef.current = mentionQuery !== null;
|
|
25027
25073
|
}, [mentionQuery]);
|
|
25028
25074
|
const mentionKeysRef = useRef35(/* @__PURE__ */ new Set());
|
|
25029
25075
|
const scopeDialogId = activeDialogId ?? null;
|
|
25030
|
-
const [composerScope, setComposerScope] =
|
|
25031
|
-
const [composerKey, setComposerKey] =
|
|
25076
|
+
const [composerScope, setComposerScope] = useState45({ dialogId: scopeDialogId, mode: activeMode });
|
|
25077
|
+
const [composerKey, setComposerKey] = useState45(0);
|
|
25032
25078
|
if (composerScope.dialogId !== scopeDialogId || composerScope.mode !== activeMode) {
|
|
25033
25079
|
const named = namingNewChat && composerScope.dialogId == null && scopeDialogId != null && composerScope.mode === activeMode;
|
|
25034
25080
|
setComposerScope({ dialogId: scopeDialogId, mode: activeMode });
|
|
@@ -25143,7 +25189,7 @@ function EmbeddableChatInner({
|
|
|
25143
25189
|
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx90(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx90(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
25144
25190
|
[effectiveAssistantIcon]
|
|
25145
25191
|
);
|
|
25146
|
-
const [timestampCache] =
|
|
25192
|
+
const [timestampCache] = useState45(() => /* @__PURE__ */ new Map());
|
|
25147
25193
|
const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
|
|
25148
25194
|
const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
|
|
25149
25195
|
const messages = useMemo29(() => {
|
|
@@ -25341,10 +25387,10 @@ function EmbeddableChatInner({
|
|
|
25341
25387
|
},
|
|
25342
25388
|
[chatLoading, messages.length, resolvedBaseRoute, chipBasePlatform, handleNavigationClose, askAbout]
|
|
25343
25389
|
);
|
|
25344
|
-
const [portalHost, setPortalHost] =
|
|
25345
|
-
const [panelBoundary, setPanelBoundary] =
|
|
25390
|
+
const [portalHost, setPortalHost] = useState45(null);
|
|
25391
|
+
const [panelBoundary, setPanelBoundary] = useState45(null);
|
|
25346
25392
|
const splitMinWidth = (isV2 ? MINGO_V2_RAIL_WIDTH : HISTORY_RAIL_WIDTH) + CHAT_BLOCK_MIN_WIDTH;
|
|
25347
|
-
const [canSplit, setCanSplit] =
|
|
25393
|
+
const [canSplit, setCanSplit] = useState45(false);
|
|
25348
25394
|
useEffect35(() => {
|
|
25349
25395
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
25350
25396
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -25361,9 +25407,9 @@ function EmbeddableChatInner({
|
|
|
25361
25407
|
},
|
|
25362
25408
|
[splitMinWidth]
|
|
25363
25409
|
);
|
|
25364
|
-
const [railCollapsed, setRailCollapsed] =
|
|
25410
|
+
const [railCollapsed, setRailCollapsed] = useState45(false);
|
|
25365
25411
|
const railStorageHydrated = useIsHydrated();
|
|
25366
|
-
const [railStorageRead, setRailStorageRead] =
|
|
25412
|
+
const [railStorageRead, setRailStorageRead] = useState45(false);
|
|
25367
25413
|
if (railStorageHydrated && !railStorageRead) {
|
|
25368
25414
|
setRailStorageRead(true);
|
|
25369
25415
|
try {
|
|
@@ -25381,13 +25427,13 @@ function EmbeddableChatInner({
|
|
|
25381
25427
|
return next;
|
|
25382
25428
|
});
|
|
25383
25429
|
}, []);
|
|
25384
|
-
const [railSearchOpen, setRailSearchOpen] =
|
|
25430
|
+
const [railSearchOpen, setRailSearchOpen] = useState45(false);
|
|
25385
25431
|
const splitEligible = historyListMode;
|
|
25386
25432
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
25387
25433
|
const splitActive = wideMingo && !railCollapsed;
|
|
25388
25434
|
const railPresence = useRailPresence(splitActive);
|
|
25389
25435
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
25390
|
-
const [composeOpen, setComposeOpen] =
|
|
25436
|
+
const [composeOpen, setComposeOpen] = useState45(false);
|
|
25391
25437
|
if (hasConversation && composeOpen) setComposeOpen(false);
|
|
25392
25438
|
const isMingoMode = historyListMode;
|
|
25393
25439
|
const emptyListSkipped = mingoCaps.emptyListSkipsToCompose === true && dialogs.length === 0 && !dialogsInitialLoading && !mingoCaps.searchQuery;
|
|
@@ -25433,8 +25479,8 @@ function EmbeddableChatInner({
|
|
|
25433
25479
|
useEffect35(() => {
|
|
25434
25480
|
if (activeDialogId && !isViewingArchived) lastDialogIdRef.current = activeDialogId;
|
|
25435
25481
|
}, [activeDialogId, isViewingArchived]);
|
|
25436
|
-
const [pendingDraft, setPendingDraft] =
|
|
25437
|
-
const [seededDraft, setSeededDraft] =
|
|
25482
|
+
const [pendingDraft, setPendingDraft] = useState45(null);
|
|
25483
|
+
const [seededDraft, setSeededDraft] = useState45(null);
|
|
25438
25484
|
if (pendingDraft && seededDraft !== pendingDraft) {
|
|
25439
25485
|
setSeededDraft(pendingDraft);
|
|
25440
25486
|
setContextItems(pendingDraft.mentions);
|
|
@@ -26067,7 +26113,7 @@ function EmbeddableChatInner({
|
|
|
26067
26113
|
}
|
|
26068
26114
|
|
|
26069
26115
|
// src/components/chat/proxy-credentials-panel.tsx
|
|
26070
|
-
import { useMemo as useMemo30, useState as
|
|
26116
|
+
import { useMemo as useMemo30, useState as useState46 } from "react";
|
|
26071
26117
|
|
|
26072
26118
|
// src/components/ui/field.tsx
|
|
26073
26119
|
import { useId as useId4 } from "react";
|
|
@@ -26210,12 +26256,12 @@ function ProxyCredentialsPanel({ description }) {
|
|
|
26210
26256
|
}
|
|
26211
26257
|
function ProxyCredentialsForm({ description, saved }) {
|
|
26212
26258
|
const { secret: savedSecret, email: savedEmail, ...savedOptional } = saved ?? { email: "", secret: "" };
|
|
26213
|
-
const [secret, setSecret] =
|
|
26214
|
-
const [email, setEmail] =
|
|
26215
|
-
const [optional, setOptional] =
|
|
26216
|
-
const [savedKeyTail, setSavedKeyTail] =
|
|
26217
|
-
const [activeEmail, setActiveEmail] =
|
|
26218
|
-
const [status, setStatus] =
|
|
26259
|
+
const [secret, setSecret] = useState46("");
|
|
26260
|
+
const [email, setEmail] = useState46(savedEmail);
|
|
26261
|
+
const [optional, setOptional] = useState46(savedOptional);
|
|
26262
|
+
const [savedKeyTail, setSavedKeyTail] = useState46(savedSecret ? maskKey(savedSecret) : null);
|
|
26263
|
+
const [activeEmail, setActiveEmail] = useState46(savedEmail || null);
|
|
26264
|
+
const [status, setStatus] = useState46("");
|
|
26219
26265
|
const errors = useMemo30(() => {
|
|
26220
26266
|
const out = {};
|
|
26221
26267
|
for (const { field } of EMBED_PROXY_OPTIONAL_HEADERS) {
|
|
@@ -26675,8 +26721,7 @@ export {
|
|
|
26675
26721
|
assistantAvailable,
|
|
26676
26722
|
useAskPrompts,
|
|
26677
26723
|
useAssistantOpen,
|
|
26678
|
-
|
|
26679
|
-
useShownAskPromptIds,
|
|
26724
|
+
useAskSurface,
|
|
26680
26725
|
AssistantAskPrompts,
|
|
26681
26726
|
useMarqueeSync,
|
|
26682
26727
|
getMarqueeTrackOffset,
|