@carlonicora/nextjs-jsonapi 1.108.0 → 1.109.0
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/{AssistantInterface-BYgI5z1-.d.mts → AssistantInterface-B1c8FhGA.d.mts} +2 -0
- package/dist/{AssistantInterface-DfDcz0gJ.d.ts → AssistantInterface-BBUHxOCd.d.ts} +2 -0
- package/dist/{AssistantMessageInterface-BpEhx2pC.d.ts → AssistantMessageInterface-Cs1yb-gF.d.ts} +3 -1
- package/dist/{AssistantMessageInterface-DJ3Me16Y.d.mts → AssistantMessageInterface-DQ3mH5L8.d.mts} +3 -1
- package/dist/{AuthComponent-B6DIk8Vf.d.ts → AuthComponent-Cd7lcYif.d.ts} +1 -1
- package/dist/{AuthComponent-BKI0ZbtD.d.mts → AuthComponent-DdxCFgUZ.d.mts} +1 -1
- package/dist/{BlockNoteEditor-2AXSTGGG.js → BlockNoteEditor-3XYBZLWO.js} +20 -19
- package/dist/BlockNoteEditor-3XYBZLWO.js.map +1 -0
- package/dist/{BlockNoteEditor-XVIBGXHF.mjs → BlockNoteEditor-EBFZG7AL.mjs} +5 -4
- package/dist/{BlockNoteEditor-XVIBGXHF.mjs.map → BlockNoteEditor-EBFZG7AL.mjs.map} +1 -1
- package/dist/{auth.interface-BBUgMZzs.d.ts → auth.interface-8b601idJ.d.ts} +1 -1
- package/dist/{auth.interface-XYEREOD6.d.mts → auth.interface-CXBF8Mhi.d.mts} +1 -1
- package/dist/billing/index.js +347 -346
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +4 -3
- package/dist/billing/index.mjs.map +1 -1
- package/dist/chunk-3J7RQBF3.js +123 -0
- package/dist/chunk-3J7RQBF3.js.map +1 -0
- package/dist/{chunk-VLDLERJN.js → chunk-7E3O52U5.js} +15 -8
- package/dist/chunk-7E3O52U5.js.map +1 -0
- package/dist/{chunk-RXXZGPC3.js → chunk-CFI4WZ5R.js} +159 -113
- package/dist/chunk-CFI4WZ5R.js.map +1 -0
- package/dist/chunk-CQID6RCF.mjs +38 -0
- package/dist/chunk-CQID6RCF.mjs.map +1 -0
- package/dist/{chunk-56XBGQGU.mjs → chunk-CRTVAQEK.mjs} +42 -27
- package/dist/chunk-CRTVAQEK.mjs.map +1 -0
- package/dist/{chunk-N3NVIPSU.mjs → chunk-MSNNAHDB.mjs} +129 -83
- package/dist/{chunk-N3NVIPSU.mjs.map → chunk-MSNNAHDB.mjs.map} +1 -1
- package/dist/chunk-MZTKPPET.mjs +123 -0
- package/dist/chunk-MZTKPPET.mjs.map +1 -0
- package/dist/{chunk-HC3JFN3C.js → chunk-UHO3KUUH.js} +838 -823
- package/dist/chunk-UHO3KUUH.js.map +1 -0
- package/dist/{chunk-CFECWLHH.mjs → chunk-UOYIWJEJ.mjs} +10 -3
- package/dist/chunk-UOYIWJEJ.mjs.map +1 -0
- package/dist/chunk-YQQHAFBS.js +38 -0
- package/dist/chunk-YQQHAFBS.js.map +1 -0
- package/dist/client/index.d.mts +8 -16
- package/dist/client/index.d.ts +8 -16
- package/dist/client/index.js +5 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +4 -3
- package/dist/components/index.d.mts +6 -5
- package/dist/components/index.d.ts +6 -5
- package/dist/components/index.js +5 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -3
- package/dist/{config-CLQynoaa.d.ts → config-CN23v3eJ.d.ts} +4 -1
- package/dist/{config-k61pe_o2.d.mts → config-gh88Qn4h.d.mts} +4 -1
- package/dist/contexts/index.d.mts +18 -7
- package/dist/contexts/index.d.ts +18 -7
- package/dist/contexts/index.js +5 -4
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +4 -3
- package/dist/core/index.d.mts +44 -11
- package/dist/core/index.d.ts +44 -11
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/features/help/index.css +29 -0
- package/dist/features/help/index.css.map +1 -0
- package/dist/features/help/index.d.mts +115 -0
- package/dist/features/help/index.d.ts +115 -0
- package/dist/features/help/index.js +532 -0
- package/dist/features/help/index.js.map +1 -0
- package/dist/features/help/index.mjs +532 -0
- package/dist/features/help/index.mjs.map +1 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.d.mts +11 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.d.ts +11 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.js +43 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.js.map +1 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.mjs +43 -0
- package/dist/features/help/server/createHelpAssetRouteHandler.mjs.map +1 -0
- package/dist/features/help/server.d.mts +71 -0
- package/dist/features/help/server.d.ts +71 -0
- package/dist/features/help/server.js +123 -0
- package/dist/features/help/server.js.map +1 -0
- package/dist/features/help/server.mjs +123 -0
- package/dist/features/help/server.mjs.map +1 -0
- package/dist/help-content-config.interface-B9L02u9i.d.mts +50 -0
- package/dist/help-content-config.interface-B9L02u9i.d.ts +50 -0
- package/dist/index.d.mts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/{notification.interface-aLEJbA_g.d.ts → notification.interface-C1T1C2ee.d.ts} +1 -100
- package/dist/{notification.interface-DLZGtV7Z.d.mts → notification.interface-DIxR23eS.d.mts} +1 -100
- package/dist/{s3.service-CVgLWaDc.d.mts → s3.service-0BTClOYO.d.mts} +2 -2
- package/dist/{s3.service-SLlX0Zbz.d.ts → s3.service-CT27Fm1s.d.ts} +2 -2
- package/dist/server/index.d.mts +4 -3
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/types-CQSjy7et.d.mts +101 -0
- package/dist/types-DHOxe8rc.d.ts +101 -0
- package/dist/usePageUrlGenerator-tjq2mlDV.d.ts +14 -0
- package/dist/usePageUrlGenerator-uOnyJ6j2.d.mts +14 -0
- package/dist/{useSocket-BkxHHujj.d.mts → useSocket-B1fMIr17.d.mts} +1 -1
- package/dist/{useSocket-CMDjWFYm.d.ts → useSocket-BdJTBXKv.d.ts} +1 -1
- package/package.json +20 -1
- package/src/client/config.ts +9 -1
- package/src/core/registry/helpStore.ts +45 -0
- package/src/features/assistant/contexts/AssistantContext.tsx +35 -19
- package/src/features/assistant/contexts/__tests__/AssistantContext.spec.tsx +66 -6
- package/src/features/assistant/data/Assistant.ts +2 -0
- package/src/features/assistant/data/AssistantInterface.ts +2 -0
- package/src/features/assistant/data/AssistantService.ts +18 -8
- package/src/features/assistant-message/components/parts/MessageSourcesPanel.tsx +6 -4
- package/src/features/assistant-message/components/parts/tabs/ContentsTab.tsx +5 -1
- package/src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx +2 -1
- package/src/features/assistant-message/data/AssistantMessage.ts +27 -1
- package/src/features/assistant-message/data/AssistantMessageInterface.ts +1 -0
- package/src/features/assistant-message/data/__tests__/AssistantMessage.spec.ts +7 -3
- package/src/features/help/components/HelpArticleBody.tsx +54 -0
- package/src/features/help/components/HelpAskAi.tsx +36 -0
- package/src/features/help/components/HelpAssistantSheet.tsx +53 -0
- package/src/features/help/components/HelpHeader.tsx +40 -0
- package/src/features/help/components/HelpHint.tsx +77 -0
- package/src/features/help/components/HelpSearchResultRow.tsx +51 -0
- package/src/features/help/components/HelpSideNav.tsx +84 -0
- package/src/features/help/components/HelpTOC.tsx +49 -0
- package/src/features/help/components/__tests__/HelpAskAi.spec.tsx +68 -0
- package/src/features/help/components/__tests__/HelpAssistantSheet.spec.tsx +36 -0
- package/src/features/help/components/__tests__/HelpHint.spec.tsx +50 -0
- package/src/features/help/components/__tests__/HelpSearchResultRow.spec.tsx +59 -0
- package/src/features/help/components/__tests__/HelpSideNav.spec.tsx +52 -0
- package/src/features/help/components/mdx/Callout.tsx +21 -0
- package/src/features/help/components/mdx/EntityRef.tsx +18 -0
- package/src/features/help/components/mdx/KeyBinding.tsx +6 -0
- package/src/features/help/components/mdx/Related.tsx +33 -0
- package/src/features/help/components/mdx/Screenshot.tsx +9 -0
- package/src/features/help/components/mdx/Steps.tsx +21 -0
- package/src/features/help/components/mdx/Video.tsx +8 -0
- package/src/features/help/components/mdx/mdx-server-components.ts +23 -0
- package/src/features/help/components/mdx/mdxComponents.ts +9 -0
- package/src/features/help/contexts/HelpContext.spec.tsx +28 -0
- package/src/features/help/contexts/HelpContext.tsx +24 -0
- package/src/features/help/hooks/useHelp.ts +1 -0
- package/src/features/help/hooks/useHelpArticle.ts +7 -0
- package/src/features/help/hooks/useHelpFilter.ts +27 -0
- package/src/features/help/hooks/useHelpManifest.ts +5 -0
- package/src/features/help/i18n-keys.ts +34 -0
- package/src/features/help/index.ts +27 -0
- package/src/features/help/interfaces/help-content-config.interface.ts +17 -0
- package/src/features/help/server/__tests__/createHelpAssetRouteHandler.spec.ts +43 -0
- package/src/features/help/server/createHelpAssetRouteHandler.ts +35 -0
- package/src/features/help/server/generateHelpArticleMetadata.ts +18 -0
- package/src/features/help/server/generateHelpArticleStaticParams.ts +7 -0
- package/src/features/help/server/generateHelpModeStaticParams.ts +5 -0
- package/src/features/help/server/getHelpContent.ts +17 -0
- package/src/features/help/server/index.ts +8 -0
- package/src/features/help/server/serializeHelpArticle.tsx +46 -0
- package/src/features/help/server-entry.ts +20 -0
- package/src/features/help/types/help-article.types.ts +37 -0
- package/src/features/help/utils/__tests__/helpNavigation.spec.ts +70 -0
- package/src/features/help/utils/articleUrl.ts +13 -0
- package/src/features/help/utils/helpNavigation.ts +29 -0
- package/src/features/how-to/HowToModule.ts +1 -1
- package/src/features/how-to/data/HowTo.ts +21 -3
- package/src/features/how-to/data/HowToInterface.ts +1 -0
- package/src/index.ts +4 -0
- package/dist/BlockNoteEditor-2AXSTGGG.js.map +0 -1
- package/dist/chunk-56XBGQGU.mjs.map +0 -1
- package/dist/chunk-CFECWLHH.mjs.map +0 -1
- package/dist/chunk-HC3JFN3C.js.map +0 -1
- package/dist/chunk-RXXZGPC3.js.map +0 -1
- package/dist/chunk-VLDLERJN.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-PAWJFY3S.mjs";
|
|
4
|
+
|
|
5
|
+
// src/core/registry/helpStore.ts
|
|
6
|
+
var HELP_CONTENT_KEY = /* @__PURE__ */ Symbol.for("nextjs-jsonapi:helpContent");
|
|
7
|
+
var HELP_READER_KEY = /* @__PURE__ */ Symbol.for("nextjs-jsonapi:helpReader");
|
|
8
|
+
var globalStore = globalThis;
|
|
9
|
+
if (globalStore[HELP_CONTENT_KEY] === void 0) {
|
|
10
|
+
globalStore[HELP_CONTENT_KEY] = null;
|
|
11
|
+
}
|
|
12
|
+
if (globalStore[HELP_READER_KEY] === void 0) {
|
|
13
|
+
globalStore[HELP_READER_KEY] = null;
|
|
14
|
+
}
|
|
15
|
+
function _setStaticHelpContent(cfg) {
|
|
16
|
+
globalStore[HELP_CONTENT_KEY] = cfg;
|
|
17
|
+
}
|
|
18
|
+
__name(_setStaticHelpContent, "_setStaticHelpContent");
|
|
19
|
+
function _getStaticHelpContent() {
|
|
20
|
+
return globalStore[HELP_CONTENT_KEY] ?? null;
|
|
21
|
+
}
|
|
22
|
+
__name(_getStaticHelpContent, "_getStaticHelpContent");
|
|
23
|
+
function setHelpReader(reader) {
|
|
24
|
+
globalStore[HELP_READER_KEY] = reader;
|
|
25
|
+
}
|
|
26
|
+
__name(setHelpReader, "setHelpReader");
|
|
27
|
+
function _getStaticHelpReader() {
|
|
28
|
+
return globalStore[HELP_READER_KEY] ?? null;
|
|
29
|
+
}
|
|
30
|
+
__name(_getStaticHelpReader, "_getStaticHelpReader");
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
_setStaticHelpContent,
|
|
34
|
+
_getStaticHelpContent,
|
|
35
|
+
setHelpReader,
|
|
36
|
+
_getStaticHelpReader
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=chunk-CQID6RCF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/registry/helpStore.ts"],"sourcesContent":["/**\n * Centralized help-content store accessible from client and server contexts.\n * Uses globalThis Symbol keys to persist across HMR/Turbopack reloads and to\n * bridge between the client-side `configureJsonApi` (in `client/config.ts`)\n * and server-side consumers (HelpProvider, getHelpContent, serializeHelpArticle).\n *\n * NO external dependencies to avoid circular imports.\n *\n * Pattern mirrors `bootstrapStore.ts`.\n */\n\n// Help content config shape is duplicated here as `unknown` to avoid pulling\n// the help feature into this core file. Callers cast on read.\ntype HelpReader = (article: { path: string }) => Promise<string>;\n\nconst HELP_CONTENT_KEY = Symbol.for(\"nextjs-jsonapi:helpContent\");\nconst HELP_READER_KEY = Symbol.for(\"nextjs-jsonapi:helpReader\");\n\nconst globalStore = globalThis as unknown as {\n [HELP_CONTENT_KEY]?: unknown | null;\n [HELP_READER_KEY]?: HelpReader | null;\n};\n\nif (globalStore[HELP_CONTENT_KEY] === undefined) {\n globalStore[HELP_CONTENT_KEY] = null;\n}\nif (globalStore[HELP_READER_KEY] === undefined) {\n globalStore[HELP_READER_KEY] = null;\n}\n\nexport function _setStaticHelpContent(cfg: unknown | null): void {\n globalStore[HELP_CONTENT_KEY] = cfg;\n}\n\nexport function _getStaticHelpContent<T = unknown>(): T | null {\n return (globalStore[HELP_CONTENT_KEY] as T | null) ?? null;\n}\n\nexport function setHelpReader(reader: HelpReader): void {\n globalStore[HELP_READER_KEY] = reader;\n}\n\nexport function _getStaticHelpReader(): HelpReader | null {\n return globalStore[HELP_READER_KEY] ?? null;\n}\n"],"mappings":";;;;;AAeA,IAAM,mBAAmB,uBAAO,IAAI,4BAA4B;AAChE,IAAM,kBAAkB,uBAAO,IAAI,2BAA2B;AAE9D,IAAM,cAAc;AAKpB,IAAI,YAAY,gBAAgB,MAAM,QAAW;AAC/C,cAAY,gBAAgB,IAAI;AAClC;AACA,IAAI,YAAY,eAAe,MAAM,QAAW;AAC9C,cAAY,eAAe,IAAI;AACjC;AAEO,SAAS,sBAAsB,KAA2B;AAC/D,cAAY,gBAAgB,IAAI;AAClC;AAFgB;AAIT,SAAS,wBAA+C;AAC7D,SAAQ,YAAY,gBAAgB,KAAkB;AACxD;AAFgB;AAIT,SAAS,cAAc,QAA0B;AACtD,cAAY,eAAe,IAAI;AACjC;AAFgB;AAIT,SAAS,uBAA0C;AACxD,SAAO,YAAY,eAAe,KAAK;AACzC;AAFgB;","names":[]}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
useI18nLocale,
|
|
21
21
|
useI18nRouter,
|
|
22
22
|
useI18nTranslations
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UOYIWJEJ.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AVAILABLE_OAUTH_SCOPES,
|
|
26
26
|
AssistantMessage,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
showToast,
|
|
61
61
|
useComposedRefs,
|
|
62
62
|
useIsMobile
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-MSNNAHDB.mjs";
|
|
64
64
|
import {
|
|
65
65
|
JsonApiContext
|
|
66
66
|
} from "./chunk-VOXD3ZLY.mjs";
|
|
@@ -9592,7 +9592,7 @@ import { useRef as useRef15 } from "react";
|
|
|
9592
9592
|
import dynamic from "next/dynamic";
|
|
9593
9593
|
import React15 from "react";
|
|
9594
9594
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
9595
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9595
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-EBFZG7AL.mjs"), {
|
|
9596
9596
|
ssr: false
|
|
9597
9597
|
});
|
|
9598
9598
|
var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -13107,7 +13107,7 @@ import { createContext as createContext16, useCallback as useCallback24, useCont
|
|
|
13107
13107
|
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
13108
13108
|
var AssistantContext = createContext16(void 0);
|
|
13109
13109
|
function stripOptimistic(list) {
|
|
13110
|
-
return list.filter((m) => !m.
|
|
13110
|
+
return list.filter((m) => !m.isOptimistic);
|
|
13111
13111
|
}
|
|
13112
13112
|
__name(stripOptimistic, "stripOptimistic");
|
|
13113
13113
|
function nextPosition(list) {
|
|
@@ -13125,7 +13125,7 @@ function withPatchedTitle(source, title) {
|
|
|
13125
13125
|
});
|
|
13126
13126
|
}
|
|
13127
13127
|
__name(withPatchedTitle, "withPatchedTitle");
|
|
13128
|
-
function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }) {
|
|
13128
|
+
function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages, manageUrl = true }) {
|
|
13129
13129
|
const t = useTranslations45();
|
|
13130
13130
|
const generateUrl = usePageUrlGenerator();
|
|
13131
13131
|
const [assistant, setAssistant] = useState41(
|
|
@@ -13141,7 +13141,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
13141
13141
|
const [failedMessageIds, setFailedMessageIds] = useState41(() => /* @__PURE__ */ new Set());
|
|
13142
13142
|
const { socket } = useSocketContext();
|
|
13143
13143
|
const sendMessage = useCallback24(
|
|
13144
|
-
async (content) => {
|
|
13144
|
+
async (content, opts) => {
|
|
13145
13145
|
const trimmed = content.trim();
|
|
13146
13146
|
if (!trimmed) return;
|
|
13147
13147
|
const optimistic = AssistantMessage.buildOptimistic({
|
|
@@ -13159,18 +13159,24 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
13159
13159
|
socket?.on("assistant:status", handler);
|
|
13160
13160
|
try {
|
|
13161
13161
|
if (!assistant) {
|
|
13162
|
-
const created = await AssistantService.create({
|
|
13162
|
+
const created = await AssistantService.create({
|
|
13163
|
+
firstMessage: trimmed,
|
|
13164
|
+
howToMode: opts?.howToMode,
|
|
13165
|
+
limitToHowToId: opts?.limitToHowToId
|
|
13166
|
+
});
|
|
13163
13167
|
const msgs = await AssistantMessageService.findByAssistant({ assistantId: created.id });
|
|
13164
13168
|
setAssistant(created);
|
|
13165
13169
|
setMessages(msgs);
|
|
13166
13170
|
setThreads((prev) => [created, ...prev]);
|
|
13167
|
-
if (typeof window !== "undefined") {
|
|
13171
|
+
if (manageUrl && typeof window !== "undefined") {
|
|
13168
13172
|
window.history.replaceState(null, "", `/assistants/${created.id}`);
|
|
13169
13173
|
}
|
|
13170
13174
|
} else {
|
|
13171
13175
|
const result = await AssistantService.appendMessage({
|
|
13172
13176
|
assistantId: assistant.id,
|
|
13173
|
-
content: trimmed
|
|
13177
|
+
content: trimmed,
|
|
13178
|
+
howToMode: opts?.howToMode,
|
|
13179
|
+
limitToHowToId: opts?.limitToHowToId
|
|
13174
13180
|
});
|
|
13175
13181
|
setMessages((prev) => [...stripOptimistic(prev), ...result]);
|
|
13176
13182
|
}
|
|
@@ -13203,17 +13209,20 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
13203
13209
|
},
|
|
13204
13210
|
[messages, sendMessage]
|
|
13205
13211
|
);
|
|
13206
|
-
const selectThread = useCallback24(
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13212
|
+
const selectThread = useCallback24(
|
|
13213
|
+
async (id) => {
|
|
13214
|
+
const [target, msgs] = await Promise.all([
|
|
13215
|
+
AssistantService.findOne({ id }),
|
|
13216
|
+
AssistantMessageService.findByAssistant({ assistantId: id })
|
|
13217
|
+
]);
|
|
13218
|
+
setAssistant(target);
|
|
13219
|
+
setMessages(msgs);
|
|
13220
|
+
if (manageUrl && typeof window !== "undefined") {
|
|
13221
|
+
window.history.replaceState(null, "", `/assistants/${id}`);
|
|
13222
|
+
}
|
|
13223
|
+
},
|
|
13224
|
+
[manageUrl]
|
|
13225
|
+
);
|
|
13217
13226
|
const renameThread = useCallback24(async (id, title2) => {
|
|
13218
13227
|
await AssistantService.rename({ id, title: title2 });
|
|
13219
13228
|
setAssistant((prev) => prev && prev.id === id ? withPatchedTitle(prev, title2) : prev);
|
|
@@ -13223,10 +13232,10 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
13223
13232
|
setAssistant(void 0);
|
|
13224
13233
|
setMessages([]);
|
|
13225
13234
|
setFailedMessageIds(/* @__PURE__ */ new Set());
|
|
13226
|
-
if (typeof window !== "undefined") {
|
|
13235
|
+
if (manageUrl && typeof window !== "undefined") {
|
|
13227
13236
|
window.history.replaceState(null, "", "/assistants");
|
|
13228
13237
|
}
|
|
13229
|
-
}, []);
|
|
13238
|
+
}, [manageUrl]);
|
|
13230
13239
|
const deleteThread = useCallback24(async (id) => {
|
|
13231
13240
|
await AssistantService.delete({ id });
|
|
13232
13241
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
@@ -18644,7 +18653,8 @@ function ReferencesTab({ references }) {
|
|
|
18644
18653
|
} catch {
|
|
18645
18654
|
return null;
|
|
18646
18655
|
}
|
|
18647
|
-
const
|
|
18656
|
+
const helpContentSlug = ref.helpContentSlug;
|
|
18657
|
+
const href = helpContentSlug ? `/help/${helpContentSlug}` : generate({ page: module, id: ref.id });
|
|
18648
18658
|
return /* @__PURE__ */ jsxs126(TableRow, { children: [
|
|
18649
18659
|
/* @__PURE__ */ jsx209(TableCell, { children: /* @__PURE__ */ jsx209(Link4, { href, target: "_blank", rel: "noopener noreferrer", className: "font-medium", children: ref.identifier }) }),
|
|
18650
18660
|
/* @__PURE__ */ jsx209(TableCell, { className: "text-muted-foreground text-xs", children: module.name })
|
|
@@ -18787,7 +18797,8 @@ function ContentsTab({ citations, sources }) {
|
|
|
18787
18797
|
} catch {
|
|
18788
18798
|
return null;
|
|
18789
18799
|
}
|
|
18790
|
-
const
|
|
18800
|
+
const helpContentSlug = source.helpContentSlug;
|
|
18801
|
+
const href = helpContentSlug ? `/help/${helpContentSlug}` : generate({ page: module, id: source.id });
|
|
18791
18802
|
const name = source.name ?? source.identifier;
|
|
18792
18803
|
return /* @__PURE__ */ jsxs129(TableRow, { children: [
|
|
18793
18804
|
/* @__PURE__ */ jsx212(TableCell, { children: /* @__PURE__ */ jsxs129(Link5, { href, target: "_blank", rel: "noopener noreferrer", children: [
|
|
@@ -18923,10 +18934,11 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
18923
18934
|
const citationsCount = message.citations.length;
|
|
18924
18935
|
const suggestionsCount = isLatestAssistant ? message.suggestedQuestions.length : 0;
|
|
18925
18936
|
const contentsCount = useMemo31(() => {
|
|
18926
|
-
if (sources) return sources.size;
|
|
18927
18937
|
const ids = /* @__PURE__ */ new Set();
|
|
18928
18938
|
for (const c of message.citations) {
|
|
18929
|
-
if (c.nodeId)
|
|
18939
|
+
if (!c.nodeId) continue;
|
|
18940
|
+
if (sources && !sources.has(c.nodeId)) continue;
|
|
18941
|
+
ids.add(c.nodeId);
|
|
18930
18942
|
}
|
|
18931
18943
|
return ids.size;
|
|
18932
18944
|
}, [message.citations, sources]);
|
|
@@ -22462,9 +22474,12 @@ export {
|
|
|
22462
22474
|
HowToSelector,
|
|
22463
22475
|
AssistantProvider,
|
|
22464
22476
|
useAssistantContext,
|
|
22477
|
+
AssistantComposer,
|
|
22478
|
+
AssistantEmptyState,
|
|
22465
22479
|
MessageSourcesPanel,
|
|
22466
22480
|
MessageItem,
|
|
22467
22481
|
MessageList,
|
|
22482
|
+
AssistantThread,
|
|
22468
22483
|
AssistantContainer,
|
|
22469
22484
|
NotificationErrorBoundary,
|
|
22470
22485
|
generateNotificationData,
|
|
@@ -22539,4 +22554,4 @@ export {
|
|
|
22539
22554
|
useOAuthClients,
|
|
22540
22555
|
useOAuthClient
|
|
22541
22556
|
};
|
|
22542
|
-
//# sourceMappingURL=chunk-
|
|
22557
|
+
//# sourceMappingURL=chunk-CRTVAQEK.mjs.map
|