@vercel/geistdocs 2.12.5 → 2.13.1
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/cli/index.js +1 -1
- package/dist/config.d.ts +18 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/footer.js +1 -1
- package/dist/internal/chat/session.d.ts +2 -3
- package/dist/internal/chat/session.d.ts.map +1 -1
- package/dist/internal/chat/session.js +28 -4
- package/dist/internal/chat/shell.js +2 -2
- package/dist/internal/eve-agent-session.d.ts +5 -7
- package/dist/internal/eve-agent-session.d.ts.map +1 -1
- package/dist/internal/eve-agent-session.js +5 -8
- package/dist/internal/eve-agent.d.ts +11 -3
- package/dist/internal/eve-agent.d.ts.map +1 -1
- package/dist/internal/eve-agent.js +19 -4
- package/dist/internal/languages.d.ts +22 -1
- package/dist/internal/languages.d.ts.map +1 -1
- package/dist/internal/languages.js +32 -0
- package/dist/internal/lazy-search.d.ts +13 -0
- package/dist/internal/lazy-search.d.ts.map +1 -0
- package/dist/internal/lazy-search.js +61 -0
- package/dist/internal/provider-client.d.ts +1 -1
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +2 -2
- package/dist/mdx.d.ts +1 -44
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +4 -4
- package/dist/navbar.d.ts +1 -1
- package/dist/navbar.d.ts.map +1 -1
- package/dist/navbar.js +3 -1
- package/dist/pages/changelog.d.ts +7 -4
- package/dist/pages/changelog.d.ts.map +1 -1
- package/dist/pages/changelog.js +6 -4
- package/dist/pages/docs.d.ts +4 -2
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +15 -3
- package/dist/providers/public/components/toasts.d.ts +4 -4
- package/dist/providers/public/components/toasts.d.ts.map +1 -1
- package/dist/providers/public/components/toasts.js +50 -14
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +12 -1
- package/dist/routes/agents.d.ts +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +4 -3
- package/dist/routes/changelog.d.ts +19 -10
- package/dist/routes/changelog.d.ts.map +1 -1
- package/dist/routes/changelog.js +11 -11
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +21 -4
- package/dist/routes/llms.d.ts +10 -5
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +10 -5
- package/dist/routes/mcp.d.ts +1 -1
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +2 -1
- package/dist/routes/openapi.d.ts +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +12 -5
- package/dist/routes/sitemap.d.ts +5 -5
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +4 -9
- package/dist/source.d.ts +6 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +1 -0
- package/docs/agents.md +1 -1
- package/docs/llms.txt +11 -3
- package/docs/manifest.json +1 -1
- package/docs/pages/ask-ai.md +5 -1
- package/docs/pages/configuration.md +5 -1
- package/package.json +2 -2
- package/template/content/docs/ask-ai.mdx +5 -1
- package/template/content/docs/configuration.mdx +5 -1
- package/template/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/routes/chat.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,aAAa,EAQnB,MAAM,IAAI,CAAC;AAGZ,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;AAKhE,OAAO,EAEL,KAAK,qBAAqB,EAG3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/routes/chat.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,aAAa,EAQnB,MAAM,IAAI,CAAC;AAGZ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CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,UAAU,iBAAiB;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,sBAAsB;IAC9B,MAAM,EAAE,IAAI,CACV,eAAe,EACb,IAAI,GACJ,UAAU,GACV,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,cAAc,CACjB,CAAC;IACF;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,4DAA4D;IAC5D,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAyqDD,eAAO,MAAM,eAAe,GAAI,wGAW7B,sBAAsB;gBAqBE,OAAO;;CAiMjC,CAAC"}
|
package/dist/routes/chat.js
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { getPublicPath } from "../config";
|
|
6
6
|
import { createSourceChunk, createSourceChunks, } from "../internal/chat/source-chunks";
|
|
7
7
|
import { createChatDocumentSearch, } from "../internal/chat-retrieval";
|
|
8
|
-
import { buildEveAgentTranscript, capLastUserMessageText, createEmptyEveAgentSession, getEveAgentMessageMetadata, hasPriorEveAgentTurn, normalizeAgentUrl, resolveEveAgentUrl, startOrContinueEveAgentSession, streamEveAgentTurn, } from "../internal/eve-agent";
|
|
8
|
+
import { buildEveAgentTranscript, capLastUserMessageText, createEmptyEveAgentSession, getEveAgentMessageMetadata, hasPriorEveAgentTurn, normalizeAgentUrl, prewarmExistingEveAgentSession, resolveEveAgentUrl, startOrContinueEveAgentSession, streamEveAgentTurn, } from "../internal/eve-agent";
|
|
9
9
|
import { CHAT_SECRET_ENV, createEveAgentSessionCookieCodec, EVE_AGENT_SESSION_COOKIE, isSameSessionTag, readCookieValues, serializeEveAgentSessionCookie, } from "../internal/eve-agent-session-cookie";
|
|
10
10
|
import { isPageVisibleForSurface, } from "../page-visibility";
|
|
11
11
|
const DEFAULT_CHAT_MODEL = "openai/gpt-5.6-sol";
|
|
@@ -749,17 +749,33 @@ const readEveAgentCookieSession = (req, sessionCodec) => {
|
|
|
749
749
|
}
|
|
750
750
|
return null;
|
|
751
751
|
};
|
|
752
|
-
const createEveAgentPrewarmResponse = async ({ agentUrl, enabled, eveAgent, req, sessionCodec, }) => {
|
|
752
|
+
const createEveAgentPrewarmResponse = async ({ agentUrl, body, enabled, eveAgent, req, sessionCodec, }) => {
|
|
753
753
|
// Without a signing secret a prewarmed session could not be bound to the
|
|
754
754
|
// browser, so prewarming is refused rather than allocating sessions
|
|
755
755
|
// nobody can reuse.
|
|
756
756
|
if (!(agentUrl && enabled && sessionCodec)) {
|
|
757
757
|
return createChatErrorResponse("Invalid chat request: eve agent prewarming is not enabled.", 400);
|
|
758
758
|
}
|
|
759
|
-
|
|
759
|
+
if ("sessionTag" in body) {
|
|
760
|
+
const cookieSession = readEveAgentCookieSession(req, sessionCodec);
|
|
761
|
+
if (typeof body.sessionTag !== "string" ||
|
|
762
|
+
body.sessionTag.length !== 22 ||
|
|
763
|
+
!cookieSession ||
|
|
764
|
+
!isSameSessionTag(body.sessionTag, sessionCodec.tag(cookieSession.sessionId))) {
|
|
765
|
+
return createChatErrorResponse("Invalid chat request: session does not match this conversation.", 400);
|
|
766
|
+
}
|
|
767
|
+
await prewarmExistingEveAgentSession({
|
|
768
|
+
agentUrl,
|
|
769
|
+
headers: await getEveAgentRequestHeaders({ eveAgent, req }),
|
|
770
|
+
sessionId: cookieSession.sessionId,
|
|
771
|
+
signal: req.signal,
|
|
772
|
+
});
|
|
773
|
+
// Preparing an owner preserves the session cookie and its expiry.
|
|
774
|
+
return Response.json({ ok: true }, { status: 202 });
|
|
775
|
+
}
|
|
760
776
|
const { sessionId } = await createEmptyEveAgentSession({
|
|
761
777
|
agentUrl,
|
|
762
|
-
headers,
|
|
778
|
+
headers: await getEveAgentRequestHeaders({ eveAgent, req }),
|
|
763
779
|
signal: req.signal,
|
|
764
780
|
});
|
|
765
781
|
return Response.json({ ok: true }, {
|
|
@@ -816,6 +832,7 @@ const resolveChatRequestBody = async ({ eveAgent, eveAgentUrl, limits, prewarmEn
|
|
|
816
832
|
return {
|
|
817
833
|
response: await createEveAgentPrewarmResponse({
|
|
818
834
|
agentUrl: eveAgentUrl,
|
|
835
|
+
body,
|
|
819
836
|
enabled: prewarmEnabled,
|
|
820
837
|
eveAgent,
|
|
821
838
|
req,
|
package/dist/routes/llms.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ interface CreateLlmsRouteOptions {
|
|
|
21
21
|
transform?: MarkdownTransform;
|
|
22
22
|
}
|
|
23
23
|
export declare const createLlmsRoute: ({ filterPage, source, sources, transform, }: CreateLlmsRouteOptions) => {
|
|
24
|
-
GET: (_req: NextRequest, { params }
|
|
25
|
-
params
|
|
26
|
-
lang
|
|
24
|
+
GET: (_req: NextRequest, { params }?: {
|
|
25
|
+
params?: Promise<{
|
|
26
|
+
lang?: string;
|
|
27
27
|
}>;
|
|
28
28
|
}) => Promise<Response>;
|
|
29
29
|
revalidate: false;
|
|
@@ -72,13 +72,18 @@ export interface MarkdownNotFoundOptions {
|
|
|
72
72
|
}
|
|
73
73
|
export declare const createDocsMarkdownRoute: <Params extends DocsMarkdownParams = DocsMarkdownParams>({ canViewPage, config, filterStaticParams, notFound: notFoundOptions, source, sources, transform, }: CreateDocsMarkdownRouteOptions<Params>) => {
|
|
74
74
|
GET: (request: Request, { params }: {
|
|
75
|
-
params: Promise<Params
|
|
75
|
+
params: Promise<Omit<Params, "lang"> & {
|
|
76
|
+
lang?: string;
|
|
77
|
+
}>;
|
|
76
78
|
}) => Promise<Response>;
|
|
77
79
|
generateStaticParams: ({ params, }?: {
|
|
78
80
|
params?: Promise<{
|
|
79
81
|
lang?: string;
|
|
82
|
+
[param: string]: unknown;
|
|
80
83
|
}>;
|
|
81
|
-
}) => Promise<DocsMarkdownParams
|
|
84
|
+
}) => Promise<(Omit<DocsMarkdownParams, "lang"> & {
|
|
85
|
+
lang?: string;
|
|
86
|
+
})[]>;
|
|
82
87
|
revalidate: false;
|
|
83
88
|
};
|
|
84
89
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.ts","sourceRoot":"","sources":["../../src/routes/llms.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"llms.d.ts","sourceRoot":"","sources":["../../src/routes/llms.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,cAAc,CAAC;AAYtB,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,KAAK,YAAY,GAAG,qBAAqB,CAAC;AAC1C,KAAK,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAkBhF,MAAM,WAAW,kBACf,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,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;SAAE,CAAC,CAAC;KAC/D;;;;CAiBF,CAAC"}
|
package/dist/routes/llms.js
CHANGED
|
@@ -2,6 +2,7 @@ import { applyMarkdownHeaders, createNotFoundResponse, } from "@vercel/agent-rea
|
|
|
2
2
|
import { notFound } from "next/navigation";
|
|
3
3
|
import { getPublicPath, normalizeBasePath, withBasePath, } from "../config.js";
|
|
4
4
|
import { resolveAgentProductContext } from "../internal/agent-product.js";
|
|
5
|
+
import { omitLanguageParam, resolveRouteLanguage, } from "../internal/languages.js";
|
|
5
6
|
import { resolvePageMarkdownUrl } from "../internal/markdown-url.js";
|
|
6
7
|
import { findSmartNotFoundSuggestions, renderSmartNotFoundMarkdown, } from "../internal/smart-not-found.js";
|
|
7
8
|
import { isPageVisibleForSurface, } from "../page-visibility.js";
|
|
@@ -135,8 +136,8 @@ const getMarkdownStaticParams = ({ lang, sources, }) => {
|
|
|
135
136
|
};
|
|
136
137
|
export const createLlmsRoute = ({ filterPage, source, sources, transform, }) => {
|
|
137
138
|
const routeSources = resolveSources(source, sources, "createLlmsRoute");
|
|
138
|
-
const GET = async (_req, { params }) => {
|
|
139
|
-
const
|
|
139
|
+
const GET = async (_req, { params } = {}) => {
|
|
140
|
+
const lang = resolveRouteLanguage(routeSources[0].routingConfig, (await params)?.lang);
|
|
140
141
|
const scanned = await Promise.all(routeSources.flatMap((entry) => entry.source
|
|
141
142
|
.getPages(lang)
|
|
142
143
|
.filter((page) => isPageVisibleForSurface(page, "llms") &&
|
|
@@ -300,8 +301,11 @@ export const createDocsMarkdownRoute = ({ canViewPage, config, filterStaticParam
|
|
|
300
301
|
});
|
|
301
302
|
};
|
|
302
303
|
const GET = async (request, { params }) => {
|
|
303
|
-
|
|
304
|
-
const
|
|
304
|
+
// Single-language apps have no [lang] segment, so params arrive without it.
|
|
305
|
+
const requestParams = await params;
|
|
306
|
+
const lang = resolveRouteLanguage(routingConfig, requestParams.lang);
|
|
307
|
+
const resolvedParams = { ...requestParams, lang };
|
|
308
|
+
const { slug } = resolvedParams;
|
|
305
309
|
const pathContext = notFoundOptions
|
|
306
310
|
? getRequestedPathContext({ lang, slug })
|
|
307
311
|
: undefined;
|
|
@@ -357,9 +361,10 @@ export const createDocsMarkdownRoute = ({ canViewPage, config, filterStaticParam
|
|
|
357
361
|
lang,
|
|
358
362
|
sources: routeSources,
|
|
359
363
|
});
|
|
360
|
-
|
|
364
|
+
const filtered = filterStaticParams
|
|
361
365
|
? staticParams.filter(filterStaticParams)
|
|
362
366
|
: staticParams;
|
|
367
|
+
return omitLanguageParam(routingConfig, filtered);
|
|
363
368
|
};
|
|
364
369
|
return {
|
|
365
370
|
GET,
|
package/dist/routes/mcp.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface CreateMcpManifestRouteOptions {
|
|
|
24
24
|
export declare const createMcpManifestRoute: ({ config, transform, }: CreateMcpManifestRouteOptions) => {
|
|
25
25
|
GET: (request: NextRequest) => Promise<Response>;
|
|
26
26
|
generateStaticParams: () => {
|
|
27
|
-
lang
|
|
27
|
+
lang?: string;
|
|
28
28
|
}[];
|
|
29
29
|
revalidate: false;
|
|
30
30
|
};
|
package/dist/routes/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/routes/mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/routes/mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,cAAc,CAAC;AAQtB,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,IAAI,CACV,eAAe,EACf,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,cAAc,GAAG,QAAQ,CACrE,CAAC;IACF,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAChE;AAyBD,eAAO,MAAM,cAAc,GAAI,oBAAoB,qBAAqB,MAQxD,UAAU,OAAO,KAAG,OAAO,CAAC,QAAQ,CA4FnD,CAAC;AAEF,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,0BAA0B,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,IAAI,CACV,eAAe,EACf,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,cAAc,CACpE,CAAC;IACF,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAC9B,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;CAC3D;AAoBD,eAAO,MAAM,sBAAsB,GAAI,wBAGpC,6BAA6B;mBAGF,WAAW;;;;;CAsBxC,CAAC"}
|
package/dist/routes/mcp.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createMcpHandler, getPublicUrl } from "mcp-handler";
|
|
|
2
2
|
import { NextRequest } from "next/server.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { getPublicPath, withBasePath, } from "../config.js";
|
|
5
|
+
import { getLanguageStaticParams } from "../internal/languages.js";
|
|
5
6
|
import { getDiscoveryLanguages, toSiteUrl, validateMcpManifestConfig, } from "./discovery.js";
|
|
6
7
|
const withoutCache = (response) => {
|
|
7
8
|
const headers = new Headers(response.headers);
|
|
@@ -129,7 +130,7 @@ export const createMcpManifestRoute = ({ config, transform, }) => {
|
|
|
129
130
|
const manifest = renderManifest(config, request);
|
|
130
131
|
return Response.json(transform ? await transform(manifest, { request }) : manifest);
|
|
131
132
|
};
|
|
132
|
-
const generateStaticParams = () =>
|
|
133
|
+
const generateStaticParams = () => getLanguageStaticParams(config);
|
|
133
134
|
return {
|
|
134
135
|
GET,
|
|
135
136
|
generateStaticParams,
|
package/dist/routes/openapi.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export interface GeistdocsOpenApiDocument {
|
|
|
56
56
|
export declare const createOpenApiRoute: ({ config, endpoints, transform, }: CreateOpenApiRouteOptions) => {
|
|
57
57
|
GET: (request: NextRequest) => Promise<Response>;
|
|
58
58
|
generateStaticParams: () => {
|
|
59
|
-
lang
|
|
59
|
+
lang?: string;
|
|
60
60
|
}[];
|
|
61
61
|
revalidate: false;
|
|
62
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/routes/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/routes/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,WAAW,CAAC;AAS9E,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,IAAI,CACV,eAAe,EACb,OAAO,GACP,IAAI,GACJ,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,cAAc,CACjB,CAAC;IACF;;;;;OAKG;IACH,SAAS,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M,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAokBD,eAAO,MAAM,kBAAkB,GAAI,mCAIhC,yBAAyB;mBAmBE,WAAW;;;;;CA6BxC,CAAC"}
|
package/dist/routes/openapi.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { stripBasePath, withBasePath } from "../config";
|
|
2
2
|
import { resolveChatEndpoint } from "../internal/chat/options.js";
|
|
3
|
+
import { getLanguageStaticParams } from "../internal/languages";
|
|
3
4
|
import { getDiscoveryLanguages, toSiteUrl, validateAgentDiscoveryConfig, } from "./discovery";
|
|
4
5
|
export const DEFAULT_SITE_OPENAPI_PATH = "/openapi.json";
|
|
5
6
|
const OPENAPI_VERSION = "3.1.0";
|
|
@@ -157,7 +158,7 @@ const buildChatPath = (config) => {
|
|
|
157
158
|
operationId: "askDocsAssistant",
|
|
158
159
|
tags: ["Chat"],
|
|
159
160
|
summary: "Ask the documentation assistant",
|
|
160
|
-
description: `Streams an answer from the Ask AI assistant. The assistant searches the documentation before answering and cites the pages it used. The response body is an AI SDK UI message stream sent as server-sent events. This endpoint calls a language model on the site owner's account; use the search endpoint for lookups that do not need an answer written for you.${eveAgent ? " The assistant keeps one session per browser across turns: the response sets a session cookie, and assistant messages carry the stream position in `metadata.eveAgent`. Send the full conversation, including that metadata, with each request." : ""}${prewarm ? ' Send `{ "prewarm": true }` instead of a conversation to allocate an assistant session ahead of the first question; the response sets the session cookie and contains no answer.' : ""}`,
|
|
161
|
+
description: `Streams an answer from the Ask AI assistant. The assistant searches the documentation before answering and cites the pages it used. The response body is an AI SDK UI message stream sent as server-sent events. This endpoint calls a language model on the site owner's account; use the search endpoint for lookups that do not need an answer written for you.${eveAgent ? " The assistant keeps one session per browser across turns: the response sets a session cookie, and assistant messages carry the stream position in `metadata.eveAgent`. Send the full conversation, including that metadata, with each request." : ""}${prewarm ? ' Send `{ "prewarm": true }` instead of a conversation to allocate an assistant session ahead of the first question; the response sets the session cookie and contains no answer. To prepare an existing conversation instead, also send `sessionTag` from the latest answer\'s `metadata.eveAgent.session`; the route verifies it against the signed cookie and preserves the session. Existing-session preparation requires eve 0.83+.' : ""}`,
|
|
161
162
|
requestBody: {
|
|
162
163
|
required: true,
|
|
163
164
|
content: {
|
|
@@ -177,7 +178,7 @@ const buildChatPath = (config) => {
|
|
|
177
178
|
...(prewarm
|
|
178
179
|
? {
|
|
179
180
|
"202": {
|
|
180
|
-
...jsonResponse("
|
|
181
|
+
...jsonResponse("A fresh assistant session was allocated and bound to the session cookie, or an existing-session preparation request was accepted without changing the cookie. Acceptance does not mean a background owner transfer has finished. Sites without a session signing secret refuse prewarm requests with 400.", ref("ChatPrewarmResponse")),
|
|
181
182
|
headers: EVE_AGENT_SESSION_COOKIE_HEADER,
|
|
182
183
|
},
|
|
183
184
|
}
|
|
@@ -350,7 +351,13 @@ const SCHEMAS = {
|
|
|
350
351
|
prewarm: {
|
|
351
352
|
type: "boolean",
|
|
352
353
|
enum: [true],
|
|
353
|
-
description: "
|
|
354
|
+
description: "Prepare an assistant session without asking a question.",
|
|
355
|
+
},
|
|
356
|
+
sessionTag: {
|
|
357
|
+
type: "string",
|
|
358
|
+
minLength: 22,
|
|
359
|
+
maxLength: 22,
|
|
360
|
+
description: "The latest answer's metadata.eveAgent.session tag. When present, prepare only the existing session whose signed cookie matches this tag; a missing, expired, or mismatched cookie is rejected with 400. Omit for fresh-session creation.",
|
|
354
361
|
},
|
|
355
362
|
},
|
|
356
363
|
example: { prewarm: true },
|
|
@@ -361,7 +368,7 @@ const SCHEMAS = {
|
|
|
361
368
|
properties: {
|
|
362
369
|
ok: { type: "boolean", enum: [true] },
|
|
363
370
|
},
|
|
364
|
-
description: "
|
|
371
|
+
description: "Fresh sessions are bound to the `Set-Cookie` response header. Existing-session preparation does not set a cookie. The body carries no session identifier.",
|
|
365
372
|
example: { ok: true },
|
|
366
373
|
},
|
|
367
374
|
UIMessage: {
|
|
@@ -494,7 +501,7 @@ export const createOpenApiRoute = ({ config, endpoints, transform, }) => {
|
|
|
494
501
|
},
|
|
495
502
|
});
|
|
496
503
|
};
|
|
497
|
-
const generateStaticParams = () =>
|
|
504
|
+
const generateStaticParams = () => getLanguageStaticParams(config);
|
|
498
505
|
return {
|
|
499
506
|
GET,
|
|
500
507
|
generateStaticParams,
|
package/dist/routes/sitemap.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface SitemapSection {
|
|
|
24
24
|
title?: string;
|
|
25
25
|
}
|
|
26
26
|
interface CreateSitemapMarkdownRouteOptions {
|
|
27
|
-
config: Pick<GeistdocsConfig, "basePath" | "defaultLanguage" | "translations">;
|
|
27
|
+
config: Pick<GeistdocsConfig, "basePath" | "defaultLanguage" | "singleLanguage" | "translations">;
|
|
28
28
|
filterPage?: GeistdocsPageFilter<SitemapPage, SitemapSourceInput>;
|
|
29
29
|
source?: SitemapSourceInput;
|
|
30
30
|
sources?: SitemapSection[];
|
|
@@ -34,13 +34,13 @@ interface CreateSitemapMarkdownRouteOptions {
|
|
|
34
34
|
}) => Promise<string> | string;
|
|
35
35
|
}
|
|
36
36
|
export declare const createSitemapMarkdownRoute: ({ config, filterPage, source, sources, title, transform, }: CreateSitemapMarkdownRouteOptions) => {
|
|
37
|
-
GET: (_req: NextRequest, { params }
|
|
38
|
-
params
|
|
39
|
-
lang
|
|
37
|
+
GET: (_req: NextRequest, { params }?: {
|
|
38
|
+
params?: Promise<{
|
|
39
|
+
lang?: string;
|
|
40
40
|
}>;
|
|
41
41
|
}) => Promise<Response>;
|
|
42
42
|
generateStaticParams: () => {
|
|
43
|
-
lang
|
|
43
|
+
lang?: string;
|
|
44
44
|
}[];
|
|
45
45
|
revalidate: false;
|
|
46
46
|
dynamic: "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;AAKhE,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAEjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,qBAAqB,EAA2B,MAAM,WAAW,CAAC;AAKhF,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,IAAI,CAAC;KACrB,GAAG,2BAA2B,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;CACvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,GAAG,aAAa,CAAC;AAEhE,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,MAAM,EAAE,IAAI,CACV,eAAe,EACf,UAAU,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,cAAc,CACnE,CAAC;IACF,UAAU,CAAC,EAAE,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAClE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/B;AAsMD,eAAO,MAAM,0BAA0B,GAAI,4DAOxC,iCAAiC;gBAI1B,WAAW,eACL;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;;;;;;CA6DtD,CAAC"}
|
package/dist/routes/sitemap.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { getPublicPath } from "../config";
|
|
2
|
+
import { getLanguageStaticParams, resolveRouteLanguage, } from "../internal/languages";
|
|
2
3
|
import { isPageVisibleForSurface, } from "../page-visibility";
|
|
3
4
|
import { isGeistdocsSourceBundle } from "../source";
|
|
4
5
|
const DOCS_PREFIX_PATTERN = /^\/docs\/?/;
|
|
5
6
|
const WHITESPACE_PATTERN = /\s+/;
|
|
6
|
-
const getLanguages = (config) => {
|
|
7
|
-
const defaultLanguage = config.defaultLanguage ?? "en";
|
|
8
|
-
const languages = Object.keys(config.translations ?? {});
|
|
9
|
-
return Array.from(new Set([defaultLanguage, ...languages]));
|
|
10
|
-
};
|
|
11
7
|
function buildTree(pages) {
|
|
12
8
|
const root = [];
|
|
13
9
|
const map = new Map();
|
|
@@ -145,10 +141,9 @@ const getSectionPages = (source, lang, basePath, filterPage) => {
|
|
|
145
141
|
const getSectionTitle = (section) => section.title ??
|
|
146
142
|
(isGeistdocsSourceBundle(section.source) ? section.source.label : undefined);
|
|
147
143
|
export const createSitemapMarkdownRoute = ({ config, filterPage, source, sources, title = "Documentation Sitemap", transform, }) => {
|
|
148
|
-
const languages = getLanguages(config);
|
|
149
144
|
const sections = resolveSitemapSections(source, sources);
|
|
150
|
-
const GET = async (_req, { params }) => {
|
|
151
|
-
const
|
|
145
|
+
const GET = async (_req, { params } = {}) => {
|
|
146
|
+
const lang = resolveRouteLanguage(config, (await params)?.lang);
|
|
152
147
|
const header = `# ${title}
|
|
153
148
|
|
|
154
149
|
## Purpose
|
|
@@ -185,7 +180,7 @@ It is not intended to replace individual docs.
|
|
|
185
180
|
},
|
|
186
181
|
});
|
|
187
182
|
};
|
|
188
|
-
const generateStaticParams = () =>
|
|
183
|
+
const generateStaticParams = () => getLanguageStaticParams(config);
|
|
189
184
|
return {
|
|
190
185
|
GET,
|
|
191
186
|
generateStaticParams,
|
package/dist/source.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export interface GeistdocsSlugsContext {
|
|
|
70
70
|
}
|
|
71
71
|
export interface CreateSourceOptions {
|
|
72
72
|
baseUrl?: string;
|
|
73
|
-
config: Pick<GeistdocsConfig, "agent" | "basePath" | "defaultLanguage" | "siteUrl" | "translations"> & Partial<Pick<GeistdocsConfig, "title">>;
|
|
73
|
+
config: Pick<GeistdocsConfig, "agent" | "basePath" | "defaultLanguage" | "singleLanguage" | "siteUrl" | "translations"> & Partial<Pick<GeistdocsConfig, "title">>;
|
|
74
74
|
docs: FumadocsCollection;
|
|
75
75
|
id?: string;
|
|
76
76
|
label?: string;
|
|
@@ -106,6 +106,7 @@ export declare const createSource: ({ docs, config, baseUrl, id, label, markdown
|
|
|
106
106
|
agent: import("./config.js").GeistdocsAgentReadinessConfig | undefined;
|
|
107
107
|
basePath: string | undefined;
|
|
108
108
|
defaultLanguage: string | undefined;
|
|
109
|
+
singleLanguage: boolean | undefined;
|
|
109
110
|
siteUrl: string | undefined;
|
|
110
111
|
title: string | undefined;
|
|
111
112
|
translations: import("./config.js").GeistdocsTranslations | undefined;
|
|
@@ -141,6 +142,7 @@ export declare const createSources: ({ config, sources }: CreateSourcesOptions)
|
|
|
141
142
|
agent: import("./config.js").GeistdocsAgentReadinessConfig | undefined;
|
|
142
143
|
basePath: string | undefined;
|
|
143
144
|
defaultLanguage: string | undefined;
|
|
145
|
+
singleLanguage: boolean | undefined;
|
|
144
146
|
siteUrl: string | undefined;
|
|
145
147
|
title: string | undefined;
|
|
146
148
|
translations: import("./config.js").GeistdocsTranslations | undefined;
|
|
@@ -179,6 +181,7 @@ export declare const createVersionedSources: ({ config, current, versions, }: Cr
|
|
|
179
181
|
agent: import("./config.js").GeistdocsAgentReadinessConfig | undefined;
|
|
180
182
|
basePath: string | undefined;
|
|
181
183
|
defaultLanguage: string | undefined;
|
|
184
|
+
singleLanguage: boolean | undefined;
|
|
182
185
|
siteUrl: string | undefined;
|
|
183
186
|
title: string | undefined;
|
|
184
187
|
translations: import("./config.js").GeistdocsTranslations | undefined;
|
|
@@ -208,6 +211,7 @@ export declare const createVersionedSources: ({ config, current, versions, }: Cr
|
|
|
208
211
|
agent: import("./config.js").GeistdocsAgentReadinessConfig | undefined;
|
|
209
212
|
basePath: string | undefined;
|
|
210
213
|
defaultLanguage: string | undefined;
|
|
214
|
+
singleLanguage: boolean | undefined;
|
|
211
215
|
siteUrl: string | undefined;
|
|
212
216
|
title: string | undefined;
|
|
213
217
|
translations: import("./config.js").GeistdocsTranslations | undefined;
|
|
@@ -236,6 +240,7 @@ export declare const createVersionedSources: ({ config, current, versions, }: Cr
|
|
|
236
240
|
agent: import("./config.js").GeistdocsAgentReadinessConfig | undefined;
|
|
237
241
|
basePath: string | undefined;
|
|
238
242
|
defaultLanguage: string | undefined;
|
|
243
|
+
singleLanguage: boolean | undefined;
|
|
239
244
|
siteUrl: string | undefined;
|
|
240
245
|
title: string | undefined;
|
|
241
246
|
translations: import("./config.js").GeistdocsTranslations | undefined;
|
package/dist/source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","s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B,EAAE,CAAC;CAC1D;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,6CAKjC,0BAA0B,KAAG,MAAM,EAYrC,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAC/C,UAAU,CAAC,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAAE,KAAK,CAAC,CAAC;CAClE;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,iCAIvC,gCAAgC,KAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAiBvE,CAAC"}
|
package/dist/source.js
CHANGED
|
@@ -247,6 +247,7 @@ For an index of all available documentation, see [${llmsLabel}](${llmsPath})${ag
|
|
|
247
247
|
agent: config.agent,
|
|
248
248
|
basePath: config.basePath,
|
|
249
249
|
defaultLanguage: config.defaultLanguage,
|
|
250
|
+
singleLanguage: config.singleLanguage,
|
|
250
251
|
siteUrl: config.siteUrl,
|
|
251
252
|
title: config.title,
|
|
252
253
|
translations: config.translations,
|
package/docs/agents.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Geistdocs Package Docs
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@vercel/geistdocs` 2.
|
|
3
|
+
These docs are bundled with `@vercel/geistdocs` 2.13.1 so agents can understand the installed package without web access.
|
|
4
4
|
They are generated from `apps/template/content/docs` during the package build.
|
|
5
5
|
|
|
6
6
|
## How to use these files
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Geistdocs Package Documentation
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@vercel/geistdocs` 2.
|
|
3
|
+
These docs are bundled with `@vercel/geistdocs` 2.13.1.
|
|
4
4
|
They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
|
|
5
5
|
|
|
6
6
|
## Documentation Index
|
|
@@ -1346,7 +1346,7 @@ export const ai = {
|
|
|
1346
1346
|
};
|
|
1347
1347
|
```
|
|
1348
1348
|
|
|
1349
|
-
Set `eveAgent.prewarm`
|
|
1349
|
+
Set `eveAgent.prewarm` when preparing a durable session while a reader types is appropriate for the site. Fresh-session creation requires eve 0.59 or newer. With eve 0.83 or newer, the same option also prepares existing conversations before follow-up messages, preserving the session and allowing Send to proceed without waiting.
|
|
1350
1350
|
|
|
1351
1351
|
The `ai` config also controls the chat panel and its route:
|
|
1352
1352
|
|
|
@@ -1372,6 +1372,10 @@ See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authe
|
|
|
1372
1372
|
|
|
1373
1373
|
Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
|
|
1374
1374
|
|
|
1375
|
+
## Single-language sites
|
|
1376
|
+
|
|
1377
|
+
A site with one language can drop the `[lang]` route segment by setting `singleLanguage: true` in `defineConfig`. Routes then live directly under `app/`, the proxy skips locale rewrites, and route factories resolve every request to `defaultLanguage`. `translations` may only list `defaultLanguage`. Public URLs, `.md` routes, `llms.txt`, and `agents.md` keep their paths.
|
|
1378
|
+
|
|
1375
1379
|
## `source.config.ts`
|
|
1376
1380
|
|
|
1377
1381
|
Use the source-config-safe package export in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during install and build, so it should avoid imports from runtime component entry points such as `@vercel/geistdocs/mdx`.
|
|
@@ -4271,7 +4275,11 @@ export const ai = {
|
|
|
4271
4275
|
};
|
|
4272
4276
|
```
|
|
4273
4277
|
|
|
4274
|
-
Set `prewarm: true` to
|
|
4278
|
+
Set `prewarm: true` to prepare a session when a reader starts typing each question. In a new conversation, the route creates an empty session and binds it to the browser with the session cookie. The first message waits for that request so it can reuse the session. Fresh-session prewarming requires eve 0.59 or newer.
|
|
4279
|
+
|
|
4280
|
+
With eve 0.83 or newer, typing a follow-up also prepares the existing session owner on the deployment accepting the request. An idle owner on another deployment can transfer before Send. This keeps the same session, history, stream position, and expiry, and runs no model call. The client prepares each idle turn once, including restored conversations. Send proceeds without waiting for existing-session preparation; acceptance does not mean a background transfer has finished.
|
|
4281
|
+
|
|
4282
|
+
Prewarming requires [`GEISTDOCS_CHAT_SECRET`](#keep-eve-sessions-across-turns-with-geistdocs_chat_secret). The route verifies the latest answer's session tag against the signed cookie before preparing an existing session. Preparation failures, older agents without support, and expired or mismatched cookies fall back to the normal send path. Leave prewarming disabled when typing a draft should not allocate a durable session before the reader sends a message.
|
|
4275
4283
|
|
|
4276
4284
|
The URL flows to `createChatRoute` through the config object you already pass in `app/api/chat/route.ts` — no route changes are required. Geistdocs speaks eve's session API directly: it starts or resumes a durable eve session, streams the agent's NDJSON events, and translates them into the same UI message stream the chat panel already renders. With `GEISTDOCS_CHAT_SECRET` set, Geistdocs continues one eve session across turns by binding it to the reader's browser with a signed, httpOnly cookie.
|
|
4277
4285
|
|
package/docs/manifest.json
CHANGED
package/docs/pages/ask-ai.md
CHANGED
|
@@ -336,7 +336,11 @@ export const ai = {
|
|
|
336
336
|
};
|
|
337
337
|
```
|
|
338
338
|
|
|
339
|
-
Set `prewarm: true` to
|
|
339
|
+
Set `prewarm: true` to prepare a session when a reader starts typing each question. In a new conversation, the route creates an empty session and binds it to the browser with the session cookie. The first message waits for that request so it can reuse the session. Fresh-session prewarming requires eve 0.59 or newer.
|
|
340
|
+
|
|
341
|
+
With eve 0.83 or newer, typing a follow-up also prepares the existing session owner on the deployment accepting the request. An idle owner on another deployment can transfer before Send. This keeps the same session, history, stream position, and expiry, and runs no model call. The client prepares each idle turn once, including restored conversations. Send proceeds without waiting for existing-session preparation; acceptance does not mean a background transfer has finished.
|
|
342
|
+
|
|
343
|
+
Prewarming requires [`GEISTDOCS_CHAT_SECRET`](#keep-eve-sessions-across-turns-with-geistdocs_chat_secret). The route verifies the latest answer's session tag against the signed cookie before preparing an existing session. Preparation failures, older agents without support, and expired or mismatched cookies fall back to the normal send path. Leave prewarming disabled when typing a draft should not allocate a durable session before the reader sends a message.
|
|
340
344
|
|
|
341
345
|
The URL flows to `createChatRoute` through the config object you already pass in `app/api/chat/route.ts` — no route changes are required. Geistdocs speaks eve's session API directly: it starts or resumes a durable eve session, streams the agent's NDJSON events, and translates them into the same UI message stream the chat panel already renders. With `GEISTDOCS_CHAT_SECRET` set, Geistdocs continues one eve session across turns by binding it to the reader's browser with a signed, httpOnly cookie.
|
|
342
346
|
|
|
@@ -207,7 +207,7 @@ export const ai = {
|
|
|
207
207
|
};
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
Set `eveAgent.prewarm`
|
|
210
|
+
Set `eveAgent.prewarm` when preparing a durable session while a reader types is appropriate for the site. Fresh-session creation requires eve 0.59 or newer. With eve 0.83 or newer, the same option also prepares existing conversations before follow-up messages, preserving the session and allowing Send to proceed without waiting.
|
|
211
211
|
|
|
212
212
|
The `ai` config also controls the chat panel and its route:
|
|
213
213
|
|
|
@@ -233,6 +233,10 @@ See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authe
|
|
|
233
233
|
|
|
234
234
|
Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
|
|
235
235
|
|
|
236
|
+
## Single-language sites
|
|
237
|
+
|
|
238
|
+
A site with one language can drop the `[lang]` route segment by setting `singleLanguage: true` in `defineConfig`. Routes then live directly under `app/`, the proxy skips locale rewrites, and route factories resolve every request to `defaultLanguage`. `translations` may only list `defaultLanguage`. Public URLs, `.md` routes, `llms.txt`, and `agents.md` keep their paths.
|
|
239
|
+
|
|
236
240
|
## `source.config.ts`
|
|
237
241
|
|
|
238
242
|
Use the source-config-safe package export in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during install and build, so it should avoid imports from runtime component entry points such as `@vercel/geistdocs/mdx`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
3
|
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.13.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
"remark-mdx": "^3.1.1",
|
|
334
334
|
"remark-parse": "^11.0.0",
|
|
335
335
|
"remark-stringify": "^11.0.0",
|
|
336
|
-
"sonner": "^2.0.
|
|
336
|
+
"sonner": "^2.0.8",
|
|
337
337
|
"streamdown": "^2.1.0",
|
|
338
338
|
"tailwind-merge": "^3.4.0",
|
|
339
339
|
"ts-morph": "^27.0.2",
|
|
@@ -334,7 +334,11 @@ export const ai = {
|
|
|
334
334
|
};
|
|
335
335
|
```
|
|
336
336
|
|
|
337
|
-
Set `prewarm: true` to
|
|
337
|
+
Set `prewarm: true` to prepare a session when a reader starts typing each question. In a new conversation, the route creates an empty session and binds it to the browser with the session cookie. The first message waits for that request so it can reuse the session. Fresh-session prewarming requires eve 0.59 or newer.
|
|
338
|
+
|
|
339
|
+
With eve 0.83 or newer, typing a follow-up also prepares the existing session owner on the deployment accepting the request. An idle owner on another deployment can transfer before Send. This keeps the same session, history, stream position, and expiry, and runs no model call. The client prepares each idle turn once, including restored conversations. Send proceeds without waiting for existing-session preparation; acceptance does not mean a background transfer has finished.
|
|
340
|
+
|
|
341
|
+
Prewarming requires [`GEISTDOCS_CHAT_SECRET`](#keep-eve-sessions-across-turns-with-geistdocs_chat_secret). The route verifies the latest answer's session tag against the signed cookie before preparing an existing session. Preparation failures, older agents without support, and expired or mismatched cookies fall back to the normal send path. Leave prewarming disabled when typing a draft should not allocate a durable session before the reader sends a message.
|
|
338
342
|
|
|
339
343
|
The URL flows to `createChatRoute` through the config object you already pass in `app/api/chat/route.ts` — no route changes are required. Geistdocs speaks eve's session API directly: it starts or resumes a durable eve session, streams the agent's NDJSON events, and translates them into the same UI message stream the chat panel already renders. With `GEISTDOCS_CHAT_SECRET` set, Geistdocs continues one eve session across turns by binding it to the reader's browser with a signed, httpOnly cookie.
|
|
340
344
|
|
|
@@ -205,7 +205,7 @@ export const ai = {
|
|
|
205
205
|
};
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
Set `eveAgent.prewarm`
|
|
208
|
+
Set `eveAgent.prewarm` when preparing a durable session while a reader types is appropriate for the site. Fresh-session creation requires eve 0.59 or newer. With eve 0.83 or newer, the same option also prepares existing conversations before follow-up messages, preserving the session and allowing Send to proceed without waiting.
|
|
209
209
|
|
|
210
210
|
The `ai` config also controls the chat panel and its route:
|
|
211
211
|
|
|
@@ -231,6 +231,10 @@ See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authe
|
|
|
231
231
|
|
|
232
232
|
Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
|
|
233
233
|
|
|
234
|
+
## Single-language sites
|
|
235
|
+
|
|
236
|
+
A site with one language can drop the `[lang]` route segment by setting `singleLanguage: true` in `defineConfig`. Routes then live directly under `app/`, the proxy skips locale rewrites, and route factories resolve every request to `defaultLanguage`. `translations` may only list `defaultLanguage`. Public URLs, `.md` routes, `llms.txt`, and `agents.md` keep their paths.
|
|
237
|
+
|
|
234
238
|
## `source.config.ts`
|
|
235
239
|
|
|
236
240
|
Use the source-config-safe package export in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during install and build, so it should avoid imports from runtime component entry points such as `@vercel/geistdocs/mdx`.
|
package/template/package.json
CHANGED