@vercel/geistdocs 2.7.10 → 2.9.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/assets/icons/icon-fullscreen-close.d.ts +26 -0
- package/dist/assets/icons/icon-fullscreen-close.d.ts.map +1 -0
- package/dist/assets/icons/icon-fullscreen-close.js +25 -0
- package/dist/assets/icons/icon-fullscreen.d.ts +26 -0
- package/dist/assets/icons/icon-fullscreen.d.ts.map +1 -0
- package/dist/assets/icons/icon-fullscreen.js +25 -0
- package/dist/assets/icons/icon-thumb-down.d.ts +26 -0
- package/dist/assets/icons/icon-thumb-down.d.ts.map +1 -0
- package/dist/assets/icons/icon-thumb-down.js +25 -0
- package/dist/assets/icons/index.d.ts +3 -0
- package/dist/assets/icons/index.d.ts.map +1 -1
- package/dist/assets/icons/index.js +3 -0
- package/dist/cli/index.js +1 -1
- package/dist/config.d.ts +67 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/controls.d.ts +23 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +44 -3
- package/dist/footer.js +1 -1
- package/dist/internal/chat/activity.d.ts +5 -1
- package/dist/internal/chat/activity.d.ts.map +1 -1
- package/dist/internal/chat/activity.js +11 -4
- package/dist/internal/chat/chat-user.d.ts +12 -0
- package/dist/internal/chat/chat-user.d.ts.map +1 -0
- package/dist/internal/chat/chat-user.js +27 -0
- package/dist/internal/chat/commands.d.ts +91 -0
- package/dist/internal/chat/commands.d.ts.map +1 -0
- package/dist/internal/chat/commands.js +165 -0
- package/dist/internal/chat/context.d.ts +49 -2
- package/dist/internal/chat/context.d.ts.map +1 -1
- package/dist/internal/chat/context.js +57 -4
- package/dist/internal/chat/message-actions.d.ts +15 -0
- package/dist/internal/chat/message-actions.d.ts.map +1 -0
- package/dist/internal/chat/message-actions.js +113 -0
- package/dist/internal/chat/message-feedback.d.ts +68 -0
- package/dist/internal/chat/message-feedback.d.ts.map +1 -0
- package/dist/internal/chat/message-feedback.js +188 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -1
- package/dist/internal/chat/message-metadata.js +7 -1
- package/dist/internal/chat/message-text.d.ts +9 -0
- package/dist/internal/chat/message-text.d.ts.map +1 -0
- package/dist/internal/chat/message-text.js +15 -0
- package/dist/internal/chat/message.d.ts +4 -2
- package/dist/internal/chat/message.d.ts.map +1 -1
- package/dist/internal/chat/message.js +8 -1
- package/dist/internal/chat/options.d.ts +94 -0
- package/dist/internal/chat/options.d.ts.map +1 -0
- package/dist/internal/chat/options.js +171 -0
- package/dist/internal/chat/page-attachment.d.ts +12 -0
- package/dist/internal/chat/page-attachment.d.ts.map +1 -0
- package/dist/internal/chat/page-attachment.js +18 -0
- package/dist/internal/chat/session-provider.d.ts +33 -0
- package/dist/internal/chat/session-provider.d.ts.map +1 -0
- package/dist/internal/chat/session-provider.js +138 -0
- package/dist/internal/chat/session.d.ts +60 -0
- package/dist/internal/chat/session.d.ts.map +1 -0
- package/dist/internal/chat/session.js +85 -0
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +86 -157
- package/dist/internal/chat/use-chat-commands.d.ts +28 -0
- package/dist/internal/chat/use-chat-commands.d.ts.map +1 -0
- package/dist/internal/chat/use-chat-commands.js +62 -0
- package/dist/internal/chat/user-avatar.d.ts +7 -0
- package/dist/internal/chat/user-avatar.d.ts.map +1 -0
- package/dist/internal/chat/user-avatar.js +27 -0
- package/dist/internal/eve-agent-session-cookie.d.ts +68 -0
- package/dist/internal/eve-agent-session-cookie.d.ts.map +1 -0
- package/dist/internal/eve-agent-session-cookie.js +164 -0
- package/dist/internal/eve-agent-session.d.ts +9 -7
- package/dist/internal/eve-agent-session.d.ts.map +1 -1
- package/dist/internal/eve-agent-session.js +10 -13
- package/dist/internal/eve-agent.d.ts +96 -24
- package/dist/internal/eve-agent.d.ts.map +1 -1
- package/dist/internal/eve-agent.js +74 -51
- package/dist/internal/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -1
- package/dist/internal/feedback-action.js +37 -5
- package/dist/internal/mdx-to-markdown.d.ts.map +1 -1
- package/dist/internal/mdx-to-markdown.js +226 -19
- package/dist/internal/page-actions-client.d.ts +9 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +8 -4
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +10 -4
- package/dist/internal/use-mobile.d.ts +7 -0
- package/dist/internal/use-mobile.d.ts.map +1 -1
- package/dist/internal/use-mobile.js +17 -1
- package/dist/internal/webmcp-client.d.ts.map +1 -1
- package/dist/internal/webmcp-client.js +13 -3
- package/dist/internal/webmcp.d.ts +5 -1
- package/dist/internal/webmcp.d.ts.map +1 -1
- package/dist/internal/webmcp.js +31 -1
- package/dist/pages/changelog.d.ts.map +1 -1
- package/dist/pages/changelog.js +4 -0
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +2 -0
- package/dist/routes/chat.d.ts +83 -5
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +517 -80
- package/dist/routes/discovery.d.ts +1 -1
- package/dist/routes/discovery.d.ts.map +1 -1
- package/dist/routes/discovery.js +7 -11
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +47 -25
- package/docs/agents.md +3 -3
- package/docs/llms.txt +634 -37
- package/docs/manifest.json +3 -3
- package/docs/pages/agent-readiness.md +1 -1
- package/docs/pages/ask-ai.md +570 -26
- package/docs/pages/configuration.md +21 -1
- package/docs/pages/env.md +17 -3
- package/docs/pages/feedback.md +4 -0
- package/docs/pages/webmcp.md +18 -3
- package/docs/sitemap.md +1 -1
- package/package.json +1 -2
- package/template/.env.example +5 -0
- package/template/AGENTS.md +2 -0
- package/template/content/docs/agent-readiness.mdx +1 -1
- package/template/content/docs/ask-ai.cn.mdx +466 -15
- package/template/content/docs/ask-ai.mdx +570 -26
- package/template/content/docs/configuration.cn.mdx +39 -0
- package/template/content/docs/configuration.mdx +21 -1
- package/template/content/docs/env.cn.mdx +15 -1
- package/template/content/docs/env.mdx +18 -4
- package/template/content/docs/feedback.cn.mdx +4 -0
- package/template/content/docs/feedback.mdx +4 -0
- package/template/content/docs/webmcp.mdx +18 -3
- package/template/package.json +1 -2
|
@@ -6,7 +6,9 @@ import remarkStringify from "remark-stringify";
|
|
|
6
6
|
import { unified } from "unified";
|
|
7
7
|
const LEADING_WHITESPACE = /^\s+/;
|
|
8
8
|
const TRAILING_WHITESPACE = /\s+$/;
|
|
9
|
+
const VERSIONED_PATH = /^\/v\d+(?:\/|$)/;
|
|
9
10
|
const WHITESPACE = /\s+/;
|
|
11
|
+
const markdownFragmentParser = unified().use(remarkParse).use(remarkGfm);
|
|
10
12
|
// JSX applies props left to right, so a repeated attribute or a later spread
|
|
11
13
|
// wins at runtime. Read the last literal and distrust it when a spread follows.
|
|
12
14
|
const findAttribute = (node, name) => {
|
|
@@ -38,6 +40,16 @@ function expressionString(node) {
|
|
|
38
40
|
}
|
|
39
41
|
return undefined;
|
|
40
42
|
}
|
|
43
|
+
const expressionBoolean = (node) => node?.type === "Literal" && typeof node.value === "boolean"
|
|
44
|
+
? node.value
|
|
45
|
+
: undefined;
|
|
46
|
+
const expressionScalar = (node) => {
|
|
47
|
+
if (node?.type === "Literal" &&
|
|
48
|
+
(typeof node.value === "string" || typeof node.value === "number")) {
|
|
49
|
+
return String(node.value);
|
|
50
|
+
}
|
|
51
|
+
return expressionString(node);
|
|
52
|
+
};
|
|
41
53
|
const getAttribute = (node, name) => {
|
|
42
54
|
const attribute = findAttribute(node, name);
|
|
43
55
|
if (!attribute) {
|
|
@@ -95,6 +107,15 @@ const paragraph = (value) => ({
|
|
|
95
107
|
children: [{ type: "text", value }],
|
|
96
108
|
type: "paragraph",
|
|
97
109
|
});
|
|
110
|
+
const strongParagraph = (value) => ({
|
|
111
|
+
children: [
|
|
112
|
+
{
|
|
113
|
+
children: [{ type: "text", value }],
|
|
114
|
+
type: "strong",
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
type: "paragraph",
|
|
118
|
+
});
|
|
98
119
|
const inlineCode = (value) => ({
|
|
99
120
|
type: "inlineCode",
|
|
100
121
|
value,
|
|
@@ -342,6 +363,37 @@ const listItem = (label, nested) => ({
|
|
|
342
363
|
spread: false,
|
|
343
364
|
type: "listItem",
|
|
344
365
|
});
|
|
366
|
+
const describedListItem = (label, description, nested) => {
|
|
367
|
+
const descriptionBlocks = description
|
|
368
|
+
? (markdownFragmentParser.parse(description)
|
|
369
|
+
.children ?? [])
|
|
370
|
+
: [];
|
|
371
|
+
const first = descriptionBlocks[0];
|
|
372
|
+
const inlineDescription = first?.type === "paragraph" ? (first.children ?? []) : [];
|
|
373
|
+
const remainingDescription = inlineDescription.length > 0
|
|
374
|
+
? descriptionBlocks.slice(1)
|
|
375
|
+
: descriptionBlocks;
|
|
376
|
+
return {
|
|
377
|
+
children: [
|
|
378
|
+
{
|
|
379
|
+
children: [
|
|
380
|
+
...label,
|
|
381
|
+
...(label.length > 0 && inlineDescription.length > 0
|
|
382
|
+
? [{ type: "text", value: " " }]
|
|
383
|
+
: []),
|
|
384
|
+
...inlineDescription,
|
|
385
|
+
],
|
|
386
|
+
type: "paragraph",
|
|
387
|
+
},
|
|
388
|
+
...remainingDescription,
|
|
389
|
+
...(nested.length > 0
|
|
390
|
+
? [{ children: nested, ordered: false, spread: false, type: "list" }]
|
|
391
|
+
: []),
|
|
392
|
+
],
|
|
393
|
+
spread: remainingDescription.length > 0,
|
|
394
|
+
type: "listItem",
|
|
395
|
+
};
|
|
396
|
+
};
|
|
345
397
|
const describedLabel = (label, description) => {
|
|
346
398
|
if (!description) {
|
|
347
399
|
return label;
|
|
@@ -408,6 +460,89 @@ const propertiesTableNodes = (node) => {
|
|
|
408
460
|
? [{ children: items, ordered: false, spread: false, type: "list" }]
|
|
409
461
|
: [];
|
|
410
462
|
};
|
|
463
|
+
const constraintItems = (entry) => objectElements(objectProperty(entry, "constraints")).flatMap((constraint) => {
|
|
464
|
+
const label = expressionString(objectProperty(constraint, "label"));
|
|
465
|
+
const value = expressionScalar(objectProperty(constraint, "value"));
|
|
466
|
+
if (!(label && value)) {
|
|
467
|
+
return [];
|
|
468
|
+
}
|
|
469
|
+
return [
|
|
470
|
+
listItem([
|
|
471
|
+
{
|
|
472
|
+
children: [{ type: "text", value: `${label}:` }],
|
|
473
|
+
type: "strong",
|
|
474
|
+
},
|
|
475
|
+
{ type: "text", value: ` ${value}` },
|
|
476
|
+
], []),
|
|
477
|
+
];
|
|
478
|
+
});
|
|
479
|
+
const apiVariantItems = (entry) => objectElements(objectProperty(entry, "variants")).flatMap((variant) => {
|
|
480
|
+
const name = expressionString(objectProperty(variant, "name"));
|
|
481
|
+
const description = expressionString(objectProperty(variant, "description"));
|
|
482
|
+
const nested = apiParameterItems(objectElements(objectProperty(variant, "properties")));
|
|
483
|
+
if (!name) {
|
|
484
|
+
return nested;
|
|
485
|
+
}
|
|
486
|
+
return [
|
|
487
|
+
describedListItem([
|
|
488
|
+
{
|
|
489
|
+
children: [{ type: "text", value: name }],
|
|
490
|
+
type: "strong",
|
|
491
|
+
},
|
|
492
|
+
], description, nested),
|
|
493
|
+
];
|
|
494
|
+
});
|
|
495
|
+
function apiParameterItems(entries) {
|
|
496
|
+
return entries.flatMap((entry) => {
|
|
497
|
+
const name = expressionString(objectProperty(entry, "name"));
|
|
498
|
+
const type = expressionString(objectProperty(entry, "type"));
|
|
499
|
+
const description = expressionString(objectProperty(entry, "description"));
|
|
500
|
+
const required = expressionBoolean(objectProperty(entry, "required"));
|
|
501
|
+
const deprecated = expressionBoolean(objectProperty(entry, "deprecated"));
|
|
502
|
+
const label = [];
|
|
503
|
+
const optionalName = name && required === false ? `${name}?` : name;
|
|
504
|
+
if (optionalName || type) {
|
|
505
|
+
label.push(inlineCode([optionalName, type].filter(Boolean).join(": ")));
|
|
506
|
+
}
|
|
507
|
+
if (deprecated) {
|
|
508
|
+
label.push({ type: "text", value: label.length > 0 ? " " : "" }, {
|
|
509
|
+
children: [{ type: "text", value: "Deprecated." }],
|
|
510
|
+
type: "strong",
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
const nestedProperties = apiParameterItems(objectElements(objectProperty(entry, "properties")));
|
|
514
|
+
const arrayItem = objectProperty(entry, "arrayItems");
|
|
515
|
+
const nestedArrayItem = arrayItem?.type === "ObjectExpression"
|
|
516
|
+
? apiParameterItems([arrayItem])
|
|
517
|
+
: [];
|
|
518
|
+
const nested = [
|
|
519
|
+
...constraintItems(entry),
|
|
520
|
+
...nestedProperties,
|
|
521
|
+
...nestedArrayItem,
|
|
522
|
+
...apiVariantItems(entry),
|
|
523
|
+
];
|
|
524
|
+
if (label.length === 0 && !description) {
|
|
525
|
+
return nested;
|
|
526
|
+
}
|
|
527
|
+
return [describedListItem(label, description, nested)];
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
const apiSignatureNodes = (node) => {
|
|
531
|
+
const parameters = objectElements(getAttributeExpression(node, "parameters"));
|
|
532
|
+
if (parameters.length === 0) {
|
|
533
|
+
return endpointNodes(node);
|
|
534
|
+
}
|
|
535
|
+
const title = getAttribute(node, "title");
|
|
536
|
+
return [
|
|
537
|
+
...(title ? [heading([{ type: "text", value: title }], 2)] : []),
|
|
538
|
+
{
|
|
539
|
+
children: apiParameterItems(parameters),
|
|
540
|
+
ordered: false,
|
|
541
|
+
spread: false,
|
|
542
|
+
type: "list",
|
|
543
|
+
},
|
|
544
|
+
];
|
|
545
|
+
};
|
|
411
546
|
const TRIM_NEWLINES = /^\n+|\n+$/g;
|
|
412
547
|
// `Snippet` renders a copyable command or code line from its `text` prop: a
|
|
413
548
|
// string, a static template literal, or an array of lines. The page decides
|
|
@@ -528,34 +663,87 @@ const filesNodes = (node) => {
|
|
|
528
663
|
? [{ children: items, ordered: false, spread: false, type: "list" }]
|
|
529
664
|
: [];
|
|
530
665
|
};
|
|
666
|
+
// True when a prop is written, or a spread could supply it, but its value is
|
|
667
|
+
// not a literal: the rendered value is unknown, so no default may stand in.
|
|
668
|
+
const hasUnreadableAttribute = (node, name, value) => value === undefined &&
|
|
669
|
+
(node.attributes ?? []).some((attribute) => attribute.type === "mdxJsxExpressionAttribute" ||
|
|
670
|
+
(attribute.type === "mdxJsxAttribute" && attribute.name === name));
|
|
671
|
+
const getBooleanAttribute = (node, name) => {
|
|
672
|
+
const attribute = findAttribute(node, name);
|
|
673
|
+
if (!attribute) {
|
|
674
|
+
return undefined;
|
|
675
|
+
}
|
|
676
|
+
if (attribute.value === null) {
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
return expressionBoolean(getAttributeExpression(node, name));
|
|
680
|
+
};
|
|
531
681
|
const packageNodes = (node) => {
|
|
532
682
|
const packageValue = getAttribute(node, "package") ?? getAttribute(node, "packages");
|
|
533
683
|
const packageExpression = getAttributeExpression(node, "packages");
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
684
|
+
let packages = [];
|
|
685
|
+
if (packageValue) {
|
|
686
|
+
packages = packageValue.split(WHITESPACE).filter(Boolean);
|
|
687
|
+
}
|
|
688
|
+
else if (packageExpression?.type === "ArrayExpression") {
|
|
689
|
+
const entries = packageExpression.elements ?? [];
|
|
690
|
+
const values = entries.map((entry) => expressionString(entry ?? undefined));
|
|
691
|
+
if (values.some((entry) => entry === undefined)) {
|
|
692
|
+
return [];
|
|
693
|
+
}
|
|
694
|
+
packages = values;
|
|
695
|
+
}
|
|
539
696
|
if (packages.length === 0) {
|
|
540
697
|
return [];
|
|
541
698
|
}
|
|
699
|
+
const dev = getBooleanAttribute(node, "dev");
|
|
700
|
+
if (hasUnreadableAttribute(node, "dev", dev)) {
|
|
701
|
+
return [];
|
|
702
|
+
}
|
|
542
703
|
return [
|
|
543
704
|
{
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
705
|
+
lang: "bash",
|
|
706
|
+
type: "code",
|
|
707
|
+
value: `pnpm add ${dev ? "-D " : ""}${packages.join(" ")}`,
|
|
708
|
+
},
|
|
709
|
+
];
|
|
710
|
+
};
|
|
711
|
+
const CODE_LANGUAGES = {
|
|
712
|
+
cURL: "bash",
|
|
713
|
+
JavaScript: "javascript",
|
|
714
|
+
TypeScript: "typescript",
|
|
715
|
+
};
|
|
716
|
+
const codeVariantNodes = (node) => {
|
|
717
|
+
const code = getAttribute(node, "code");
|
|
718
|
+
if (!code) {
|
|
719
|
+
return node.children ?? [];
|
|
720
|
+
}
|
|
721
|
+
const language = getAttribute(node, "language");
|
|
722
|
+
return [
|
|
723
|
+
{
|
|
724
|
+
lang: language
|
|
725
|
+
? (CODE_LANGUAGES[language] ?? language.toLowerCase())
|
|
726
|
+
: undefined,
|
|
727
|
+
type: "code",
|
|
728
|
+
value: code.replace(TRIM_NEWLINES, ""),
|
|
556
729
|
},
|
|
557
730
|
];
|
|
558
731
|
};
|
|
732
|
+
const copyPromptNodes = (node) => {
|
|
733
|
+
const title = getAttribute(node, "title");
|
|
734
|
+
const titleIsDynamic = hasUnreadableAttribute(node, "title", title);
|
|
735
|
+
const body = blockChildren(node, true);
|
|
736
|
+
const text = getAttribute(node, "text");
|
|
737
|
+
const content = body.length > 0 ? body : [];
|
|
738
|
+
if (content.length === 0 && text) {
|
|
739
|
+
content.push(paragraph(text));
|
|
740
|
+
}
|
|
741
|
+
const titleNodes = title ? [strongParagraph(title)] : [];
|
|
742
|
+
if (title === undefined && !titleIsDynamic) {
|
|
743
|
+
titleNodes.push(strongParagraph("Prompt for coding agents"));
|
|
744
|
+
}
|
|
745
|
+
return [...titleNodes, ...content];
|
|
746
|
+
};
|
|
559
747
|
const videoNodes = (node) => {
|
|
560
748
|
const url = getAttribute(node, "src") ?? getAttribute(node, "url");
|
|
561
749
|
if (!url) {
|
|
@@ -595,6 +783,19 @@ const endpointNodes = (node) => {
|
|
|
595
783
|
? [heading([inlineCode(`${method.toUpperCase()} ${path}`)])]
|
|
596
784
|
: [];
|
|
597
785
|
};
|
|
786
|
+
const endpointDisplayNodes = (node) => {
|
|
787
|
+
const method = getAttribute(node, "method");
|
|
788
|
+
const path = getAttribute(node, "path");
|
|
789
|
+
const versionPrefix = getAttribute(node, "versionPrefix");
|
|
790
|
+
if (hasUnreadableAttribute(node, "versionPrefix", versionPrefix)) {
|
|
791
|
+
return [];
|
|
792
|
+
}
|
|
793
|
+
const fullPath = path
|
|
794
|
+
? `${versionPrefix ?? (VERSIONED_PATH.test(path) ? "" : "/v1")}${path}`
|
|
795
|
+
: undefined;
|
|
796
|
+
const label = method?.toUpperCase() === "DELETE" ? "DEL" : method?.toUpperCase();
|
|
797
|
+
return method && path ? [heading([inlineCode(`${label}${fullPath}`)])] : [];
|
|
798
|
+
};
|
|
598
799
|
const themeAwareImageNodes = (node) => {
|
|
599
800
|
const light = getAttributeExpression(node, "light");
|
|
600
801
|
const dark = getAttributeExpression(node, "dark");
|
|
@@ -672,15 +873,17 @@ const buttonNodes = (node) => {
|
|
|
672
873
|
const COMPONENT_REPLACERS = {
|
|
673
874
|
Accordion: (node) => labelledContentNodes(node, ["title"]),
|
|
674
875
|
APIPage: apiOperationNodes,
|
|
675
|
-
APISignature:
|
|
876
|
+
APISignature: apiSignatureNodes,
|
|
676
877
|
Button: buttonNodes,
|
|
677
878
|
ButtonLink: linkNodes,
|
|
678
879
|
Callout: (node) => [calloutNode(node)],
|
|
679
880
|
Card: cardNodes,
|
|
680
881
|
CardPlayer: cardNodes,
|
|
681
882
|
ChatGeneration: chatGenerationNodes,
|
|
883
|
+
CodeVariant: codeVariantNodes,
|
|
884
|
+
CopyPrompt: copyPromptNodes,
|
|
682
885
|
Details: (node) => blockChildren(node, true),
|
|
683
|
-
EndpointDisplay:
|
|
886
|
+
EndpointDisplay: endpointDisplayNodes,
|
|
684
887
|
ExampleLinks: exampleLinksNodes,
|
|
685
888
|
GithubLink: githubLinkNodes,
|
|
686
889
|
Image: imageNodes,
|
|
@@ -691,6 +894,10 @@ const COMPONENT_REPLACERS = {
|
|
|
691
894
|
MDXImage: imageNodes,
|
|
692
895
|
Mermaid: mermaidNodes,
|
|
693
896
|
PackageInstall: packageNodes,
|
|
897
|
+
PromptLink: (node) => {
|
|
898
|
+
const text = getAttribute(node, "text");
|
|
899
|
+
return text ? [paragraph(text)] : [];
|
|
900
|
+
},
|
|
694
901
|
PropertiesTable: propertiesTableNodes,
|
|
695
902
|
Snippet: snippetNodes,
|
|
696
903
|
Summary: summaryNodes,
|
|
@@ -11,6 +11,15 @@ interface PageActionsProps {
|
|
|
11
11
|
page: {
|
|
12
12
|
markdownUrl: string;
|
|
13
13
|
path?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether "Ask AI about this page" attaches the page to the next Ask AI
|
|
16
|
+
* message. Pages the chat route cannot resolve, such as changelog
|
|
17
|
+
* entries, set `false` to pre-fill a prompt with the page URL instead.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
attachToChat?: boolean;
|
|
21
|
+
/** Page title, shown when the page is attached to an Ask AI message. */
|
|
22
|
+
title?: string;
|
|
14
23
|
url: string;
|
|
15
24
|
};
|
|
16
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-actions-client.d.ts","sourceRoot":"","sources":["../../src/internal/page-actions-client.tsx"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAiBf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAgBjD,UAAU,gBAAgB;IACxB,MAAM,EAAE,IAAI,CACV,eAAe,EACf,IAAI,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CACxD,CAAC;IACF;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,IAAI,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@@ -8,7 +8,7 @@ import { LogoIconGithub, LogoIconV0 } from "#geistdocs-assets/logos";
|
|
|
8
8
|
import { Button } from "#geistdocs-ui/components/button";
|
|
9
9
|
import { Textarea } from "#geistdocs-ui/components/textarea";
|
|
10
10
|
import { cn } from "#geistdocs-ui/utils";
|
|
11
|
-
import {
|
|
11
|
+
import { useGeistdocsChatContext } from "./chat/context";
|
|
12
12
|
import { sendFeedback } from "./feedback-action";
|
|
13
13
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./ui/dropdown-menu";
|
|
14
14
|
import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
|
|
@@ -198,7 +198,7 @@ const DesktopPageActions = ({ askAIEnabled, checked, copyEnabled, editSourceEnab
|
|
|
198
198
|
};
|
|
199
199
|
export const GeistdocsPageActions = ({ config, page, only, }) => {
|
|
200
200
|
const isMobile = useIsMobile();
|
|
201
|
-
const { enabled: chatEnabled, preloadChat, setIsOpen, setPrompt, } =
|
|
201
|
+
const { enabled: chatEnabled, openWithPage, preloadChat, setIsOpen, setPrompt, } = useGeistdocsChatContext();
|
|
202
202
|
const [menuView, setMenuView] = useState("main");
|
|
203
203
|
const openInChatRef = useRef(null);
|
|
204
204
|
const providersBackRef = useRef(null);
|
|
@@ -233,8 +233,12 @@ export const GeistdocsPageActions = ({ config, page, only, }) => {
|
|
|
233
233
|
const showMobile = only !== "desktop";
|
|
234
234
|
const onAskAI = () => {
|
|
235
235
|
preloadChat();
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
if (page.attachToChat === false) {
|
|
237
|
+
setPrompt(getPageQuery(page.url, window.location.origin));
|
|
238
|
+
setIsOpen(true);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
openWithPage({ title: page.title, url: page.url });
|
|
238
242
|
};
|
|
239
243
|
// Desktop variant aligns beside the title (self-end); the mobile variant is
|
|
240
244
|
// rendered below the description and left-aligned.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-client.d.ts","sourceRoot":"","sources":["../../src/internal/provider-client.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAKjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUjD,KAAK,kBAAkB,GAAG,WAAW,CACnC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC9C,CAAC;AAEF,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,QAAQ,CAAC;IAC3D,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;QAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;KACjE,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"provider-client.d.ts","sourceRoot":"","sources":["../../src/internal/provider-client.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAKjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUjD,KAAK,kBAAkB,GAAG,WAAW,CACnC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC9C,CAAC;AAEF,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,QAAQ,CAAC;IAC3D,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;QAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;KACjE,CAAC;CACH;AA+FD,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4CAQ9D,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { lazy, Suspense, useCallback, useEffect, } from "react";
|
|
|
5
5
|
import { Toasts } from "#geistdocs-ui/components/toasts";
|
|
6
6
|
import { GeistProvider } from "#geistdocs-ui/core";
|
|
7
7
|
import { cn } from "#geistdocs-ui/utils";
|
|
8
|
-
import { GeistdocsChatProvider,
|
|
8
|
+
import { GeistdocsChatProvider, useGeistdocsChatContext } from "./chat/context";
|
|
9
9
|
import { ChatLoadingSkeleton } from "./chat/loading-skeleton";
|
|
10
10
|
import { GeistdocsConfigProvider } from "./config-context";
|
|
11
11
|
import { createGeistdocsI18n } from "./i18n";
|
|
@@ -17,7 +17,7 @@ const GeistdocsChatShell = lazy(() => import("./chat/shell").then(({ GeistdocsCh
|
|
|
17
17
|
})));
|
|
18
18
|
const GeistdocsProviderInner = ({ config, search, theme: _theme, lang, ...props }) => {
|
|
19
19
|
const { i18n, i18nProvider } = createGeistdocsI18n(config);
|
|
20
|
-
const { enabled, hasBeenOpened, isOpen, setIsOpen } =
|
|
20
|
+
const { enabled, hasBeenOpened, isExpanded, isOpen, setIsExpanded, setIsOpen, } = useGeistdocsChatContext();
|
|
21
21
|
const isMobile = useIsMobile();
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
if (!enabled) {
|
|
@@ -26,7 +26,13 @@ const GeistdocsProviderInner = ({ config, search, theme: _theme, lang, ...props
|
|
|
26
26
|
const handleKeyDown = (event) => {
|
|
27
27
|
if (event.key === "Escape" && isOpen) {
|
|
28
28
|
event.preventDefault();
|
|
29
|
-
|
|
29
|
+
// The first Escape returns an expanded desktop panel to the sidebar.
|
|
30
|
+
if (isExpanded && !isMobile) {
|
|
31
|
+
setIsExpanded(false);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
setIsOpen(false);
|
|
35
|
+
}
|
|
30
36
|
return;
|
|
31
37
|
}
|
|
32
38
|
if ((event.metaKey || event.ctrlKey) &&
|
|
@@ -39,7 +45,7 @@ const GeistdocsProviderInner = ({ config, search, theme: _theme, lang, ...props
|
|
|
39
45
|
};
|
|
40
46
|
document.addEventListener("keydown", handleKeyDown, true);
|
|
41
47
|
return () => document.removeEventListener("keydown", handleKeyDown, true);
|
|
42
|
-
}, [enabled, isOpen, setIsOpen]);
|
|
48
|
+
}, [enabled, isExpanded, isMobile, isOpen, setIsExpanded, setIsOpen]);
|
|
43
49
|
// fumadocs spreads the provider's `search.options` onto the dialog, which is
|
|
44
50
|
// how a consumer reaches `tag`. Typed here so it survives the hand-off.
|
|
45
51
|
const SearchDialogComponent = useCallback((searchProps) => (_jsx(GeistdocsSearchDialog, { basePath: config.basePath, ...searchProps })), [config.basePath]);
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export declare const useIsMobile: () => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* `useIsMobile` for components that only mount on the client after
|
|
4
|
+
* hydration, such as the lazily loaded chat shell: the first render already
|
|
5
|
+
* has the live value instead of `false`. During server rendering and
|
|
6
|
+
* hydration it returns `false`, like `useIsMobile`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useIsMobileAfterHydration: () => boolean;
|
|
2
9
|
//# sourceMappingURL=use-mobile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/internal/use-mobile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/internal/use-mobile.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,eAEvB,CAAC;AAYF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,eAKnC,CAAC"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useMediaQuery } from "phase/react";
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
3
4
|
const MOBILE_BREAKPOINT = 768;
|
|
5
|
+
const MOBILE_QUERY = `(max-width: ${MOBILE_BREAKPOINT - 1}px)`;
|
|
4
6
|
export const useIsMobile = () => {
|
|
5
|
-
return useMediaQuery(
|
|
7
|
+
return useMediaQuery(MOBILE_QUERY);
|
|
6
8
|
};
|
|
9
|
+
const subscribeToMobileQuery = (onChange) => {
|
|
10
|
+
const query = window.matchMedia(MOBILE_QUERY);
|
|
11
|
+
query.addEventListener("change", onChange);
|
|
12
|
+
return () => query.removeEventListener("change", onChange);
|
|
13
|
+
};
|
|
14
|
+
const getMobileSnapshot = () => window.matchMedia(MOBILE_QUERY).matches;
|
|
15
|
+
const getServerMobileSnapshot = () => false;
|
|
16
|
+
/**
|
|
17
|
+
* `useIsMobile` for components that only mount on the client after
|
|
18
|
+
* hydration, such as the lazily loaded chat shell: the first render already
|
|
19
|
+
* has the live value instead of `false`. During server rendering and
|
|
20
|
+
* hydration it returns `false`, like `useIsMobile`.
|
|
21
|
+
*/
|
|
22
|
+
export const useIsMobileAfterHydration = () => useSyncExternalStore(subscribeToMobileQuery, getMobileSnapshot, getServerMobileSnapshot);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmcp-client.d.ts","sourceRoot":"","sources":["../../src/internal/webmcp-client.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"webmcp-client.d.ts","sourceRoot":"","sources":["../../src/internal/webmcp-client.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;AAQhE,eAAO,MAAM,eAAe,GAAI,YAAY;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,mDA+BtE,CAAC"}
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import Script from "next/script";
|
|
4
|
-
import { useEffect } from "react";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
5
|
import { getPublicPath } from "../config";
|
|
6
|
+
import { useGeistdocsChatContext } from "./chat/context";
|
|
6
7
|
import { createWebMCPTools, registerWebMCPTools, } from "./webmcp";
|
|
7
8
|
export const GeistdocsWebMCP = ({ config }) => {
|
|
8
9
|
const enabled = config.webmcp?.enabled;
|
|
10
|
+
const chat = useGeistdocsChatContext();
|
|
11
|
+
const askAI = Boolean(enabled && config.webmcp?.askAI && chat.enabled);
|
|
12
|
+
// Registered tools outlive renders; the ref keeps `ask_ai` on the current
|
|
13
|
+
// controller without re-registering.
|
|
14
|
+
const askRef = useRef(chat.ask);
|
|
15
|
+
askRef.current = chat.ask;
|
|
9
16
|
useEffect(() => {
|
|
10
17
|
const context = document
|
|
11
18
|
.modelContext;
|
|
12
19
|
if (!(enabled && context?.registerTool)) {
|
|
13
20
|
return;
|
|
14
21
|
}
|
|
15
|
-
return registerWebMCPTools(context, createWebMCPTools({
|
|
16
|
-
|
|
22
|
+
return registerWebMCPTools(context, createWebMCPTools({
|
|
23
|
+
ask: askAI ? (question) => askRef.current(question) : undefined,
|
|
24
|
+
location: window.location,
|
|
25
|
+
}), (error) => console.warn("Geistdocs WebMCP registration failed:", error));
|
|
26
|
+
}, [askAI, enabled]);
|
|
17
27
|
return enabled ? (_jsx(Script, { id: "geistdocs-webmcp", src: `${getPublicPath("/api/mcp", config.basePath)}?webmcp-script` })) : null;
|
|
18
28
|
};
|
|
@@ -16,7 +16,11 @@ export interface WebMCPContext {
|
|
|
16
16
|
signal: AbortSignal;
|
|
17
17
|
}) => Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const ASK_AI_QUESTION_MIN_CHARS = 2;
|
|
20
|
+
export declare const ASK_AI_QUESTION_MAX_CHARS = 2000;
|
|
21
|
+
export declare const createWebMCPTools: ({ ask, fetcher, location, requestTimeoutMs, }: {
|
|
22
|
+
/** Registers `ask_ai` when provided; receives the trimmed question. */
|
|
23
|
+
ask?: (question: string) => void;
|
|
20
24
|
fetcher?: typeof fetch;
|
|
21
25
|
location: Pick<Location, "href">;
|
|
22
26
|
requestTimeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmcp.d.ts","sourceRoot":"","sources":["../../src/internal/webmcp.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,UAAU,UAAU;IAClB,WAAW,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,oBAAoB,EAAE,OAAO,CAAA;KAAE,CAAC;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CACP,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,CACZ,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,KAC7B,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,GAAI
|
|
1
|
+
{"version":3,"file":"webmcp.d.ts","sourceRoot":"","sources":["../../src/internal/webmcp.ts"],"names":[],"mappings":"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
2
|
+
export const ASK_AI_QUESTION_MAX_CHARS = 2000;
|
|
3
|
+
const createAskAITool = (ask) => ({
|
|
4
|
+
name: "ask_ai",
|
|
5
|
+
description: "Ask a question in this documentation site's Ask AI chat. The question is submitted on the user's behalf and the answer streams into the chat panel on the page; this tool does not return the answer.",
|
|
6
|
+
annotations: { readOnlyHint: false, untrustedContentHint: false },
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
question: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "The question to ask about this documentation.",
|
|
13
|
+
minLength: ASK_AI_QUESTION_MIN_CHARS,
|
|
14
|
+
maxLength: ASK_AI_QUESTION_MAX_CHARS,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ["question"],
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
},
|
|
20
|
+
execute: (input) => {
|
|
21
|
+
const question = typeof input?.question === "string" ? input.question.trim() : "";
|
|
22
|
+
if (question.length < ASK_AI_QUESTION_MIN_CHARS ||
|
|
23
|
+
question.length > ASK_AI_QUESTION_MAX_CHARS) {
|
|
24
|
+
return Promise.reject(new Error(`question must be a string of ${ASK_AI_QUESTION_MIN_CHARS} to ${ASK_AI_QUESTION_MAX_CHARS} characters after trimming whitespace.`));
|
|
25
|
+
}
|
|
26
|
+
ask(question);
|
|
27
|
+
return Promise.resolve("Submitted the question to this site's Ask AI chat. The answer appears in the chat panel on the page.");
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const createWebMCPTools = ({ ask, fetcher = fetch, location, requestTimeoutMs = 15_000, }) => [
|
|
2
31
|
{
|
|
3
32
|
name: "read_current_page",
|
|
4
33
|
description: "Read the current documentation page as Markdown. Navigate to a documentation page before calling this tool.",
|
|
@@ -27,6 +56,7 @@ export const createWebMCPTools = ({ fetcher = fetch, location, requestTimeoutMs
|
|
|
27
56
|
return response.text();
|
|
28
57
|
},
|
|
29
58
|
},
|
|
59
|
+
...(ask ? [createAskAITool(ask)] : []),
|
|
30
60
|
];
|
|
31
61
|
export const registerWebMCPTools = (context, tools, onError) => {
|
|
32
62
|
const controller = new AbortController();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/pages/changelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,EACL,KAAK,oBAAoB,EAM1B,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAID,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B;
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/pages/changelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,EACL,KAAK,oBAAoB,EAM1B,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAID,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B;kBAgH1C,kBAAkB;2BAgBT,kBAAkB;8BAdf,kBAAkB;uCAkBT,kBAAkB;;;;uCAO/D;QACD,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B;;;;CAUF,CAAC"}
|
package/dist/pages/changelog.js
CHANGED
|
@@ -47,7 +47,11 @@ export const createChangelogPage = (options) => {
|
|
|
47
47
|
notFound();
|
|
48
48
|
}
|
|
49
49
|
const actionPage = {
|
|
50
|
+
// The chat route does not index changelog entries, so Ask AI pre-fills
|
|
51
|
+
// a prompt with the entry URL instead of attaching the page.
|
|
52
|
+
attachToChat: false,
|
|
50
53
|
markdownUrl: markdownHref(lang, page),
|
|
54
|
+
title,
|
|
51
55
|
url: getChangelogPagePath(config, path, lang, page),
|
|
52
56
|
};
|
|
53
57
|
return (_jsxs("main", { className: "mx-auto w-full max-w-[1080px] px-6 pt-16 pb-32 font-sans sm:px-10 lg:pt-24", id: "geistdocs-changelog", children: [_jsxs("header", { className: "border-gray-400 border-b pb-12 lg:pb-16", children: [_jsxs("div", { className: "flex flex-col-reverse gap-4 md:flex-row md:items-end md:justify-between", children: [_jsx("h1", { className: "text-gray-1000 text-heading-40 tracking-tighter", children: title }), markdownPath ? (_jsx(GeistdocsPageActions, { config: config, only: "desktop", page: actionPage })) : null] }), _jsx("p", { className: "mt-5 max-w-xl text-balance text-gray-900 text-lg leading-8", children: description }), markdownPath ? (_jsx("div", { className: "mt-5 @min-[961px]:hidden", children: _jsx(GeistdocsPageActions, { config: config, only: "mobile", page: actionPage }) })) : null, page > 1 ? (_jsxs("p", { className: "mt-5 text-gray-900 text-sm", children: ["Page ", page] })) : null] }), _jsx(ChangelogFeed, { dataPath: getChangelogPath(config, dataPath ?? `${path.replace(TRAILING_SLASH_PATTERN, "")}/data`, lang), initialPage: data, lang: lang, path: getChangelogPath(config, path, lang) }, `${lang}:${page}`)] }));
|
package/dist/pages/docs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/pages/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C;QACD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;KACzB,KAAG,OAAO,CAAC,QAAQ,CAAC;CAqDtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAA4B,CAAC"}
|
package/dist/pages/docs.js
CHANGED
|
@@ -171,10 +171,12 @@ export const createDocsPage = ({ canViewPage, config, source, mdx, pageActions =
|
|
|
171
171
|
}), _jsxs("div", { className: cn("flex flex-col-reverse gap-4 md:flex-row md:items-end md:justify-between", data.description === undefined && "mb-8"), children: [_jsx(DocsTitle, { className: "mb-0 min-w-0", children: data.title }), _jsx(GeistdocsPageActions, { config: pageActions.config, only: "desktop", page: {
|
|
172
172
|
markdownUrl,
|
|
173
173
|
path: page.path,
|
|
174
|
+
title: data.title,
|
|
174
175
|
url: publicPageUrl,
|
|
175
176
|
} })] }), _jsx(DocsDescription, { children: data.description }), _jsx("div", { className: "-mt-6 mb-4 @min-[961px]:hidden", children: _jsx(GeistdocsPageActions, { config: pageActions.config, only: "mobile", page: {
|
|
176
177
|
markdownUrl,
|
|
177
178
|
path: page.path,
|
|
179
|
+
title: data.title,
|
|
178
180
|
url: publicPageUrl,
|
|
179
181
|
} }) }), _jsx(DocsBody, { children: _jsx(MDX, { components: {
|
|
180
182
|
...createMdxComponents({ a: link }),
|