@vercel/geistdocs 2.7.9 → 2.8.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-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 +1 -0
- package/dist/assets/icons/index.d.ts.map +1 -1
- package/dist/assets/icons/index.js +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +3 -0
- 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 +46 -2
- package/dist/internal/chat/context.d.ts.map +1 -1
- package/dist/internal/chat/context.js +50 -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 +10 -6
- 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 +81 -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/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 +2 -2
- 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/providers/public/components/dialog.d.ts +27 -0
- package/dist/providers/public/components/dialog.d.ts.map +1 -0
- package/dist/providers/public/components/dialog.js +17 -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 +4 -3
- package/docs/llms.txt +711 -35
- package/docs/manifest.json +12 -3
- package/docs/pages/agent-readiness.md +1 -1
- package/docs/pages/ask-ai.md +567 -24
- package/docs/pages/components/dialog.md +74 -0
- package/docs/pages/components/index.md +1 -0
- 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 +2 -1
- package/package.json +5 -2
- package/public-foundation.css +12 -0
- package/template/.env.example +5 -0
- package/template/AGENTS.md +2 -0
- package/template/components/geistdocs/dialog-demo.tsx +44 -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 +567 -24
- package/template/content/docs/components/dialog.mdx +70 -0
- package/template/content/docs/components/index.mdx +1 -0
- package/template/content/docs/components/meta.json +1 -0
- 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
- package/dist/providers/public/components/modal.d.ts +0 -22
- package/dist/providers/public/components/modal.d.ts.map +0 -1
- package/dist/providers/public/components/modal.js +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,8EAA8E;IAC9E,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IACvC;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wDAAwD;AACxD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAU5C;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,EACpD,QAAQ,MAAM,KACb,kBAAkB,GAAG,IAmCvB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,GAAI,MAAM,kBAAkB,WACjC,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,OAAO,KAChB,kBAAkB,GAAG,IAcvB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/B;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C;;;OAGG;IACH,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,sCAAsC;IACtC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,mDAAmD;IACnD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,iDAAiD;IACjD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;IACjC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,2EAA2E;IAC3E,gBAAgB,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IAClD,oDAAoD;IACpD,WAAW,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,sBAAsB,QAAO,gBAyFzC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,gCACC,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,oBAGhC;IACD,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,KAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,IAgB9B,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands issued through the public chat controller before the lazily
|
|
3
|
+
* loaded chat shell can act on them: questions to submit, a page to attach
|
|
4
|
+
* to the next message, and a request to start a new conversation. The
|
|
5
|
+
* provider owns one queue; the active shell drains it once its stored
|
|
6
|
+
* history has loaded and no response is streaming.
|
|
7
|
+
*/
|
|
8
|
+
/** Matches the chat route's `pageContext.url` limit. */
|
|
9
|
+
export const MAX_CHAT_PAGE_URL_CHARS = 2048;
|
|
10
|
+
const MAX_CHAT_PAGE_TITLE_CHARS = 300;
|
|
11
|
+
const initialState = {
|
|
12
|
+
attachedPage: null,
|
|
13
|
+
clearRequested: false,
|
|
14
|
+
pendingAsks: [],
|
|
15
|
+
running: false,
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Reduce a page reference to the site-relative path the chat route resolves
|
|
19
|
+
* against the site's own pages. Relative URLs resolve against `origin`; for
|
|
20
|
+
* absolute URLs only the path is kept, so a production URL still names the
|
|
21
|
+
* page on a preview deployment. Query strings and fragments are dropped.
|
|
22
|
+
* Returns `null` for anything that is not an HTTP(S) URL or path.
|
|
23
|
+
*/
|
|
24
|
+
export const normalizeChatPage = (page, origin) => {
|
|
25
|
+
if (typeof page?.url !== "string") {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const raw = page.url.trim();
|
|
29
|
+
if (!raw) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
let url;
|
|
33
|
+
try {
|
|
34
|
+
url = new URL(raw, origin);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const path = url.pathname;
|
|
43
|
+
if (path.length > MAX_CHAT_PAGE_URL_CHARS) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const title = typeof page.title === "string"
|
|
47
|
+
? page.title.trim().slice(0, MAX_CHAT_PAGE_TITLE_CHARS)
|
|
48
|
+
: "";
|
|
49
|
+
return title ? { title, url: path } : { url: path };
|
|
50
|
+
};
|
|
51
|
+
/** Label for an attached page: its title, falling back to its path. */
|
|
52
|
+
export const getChatPageLabel = (page) => page.title || page.url;
|
|
53
|
+
/**
|
|
54
|
+
* Read the page attachment persisted in a user message's metadata, if any.
|
|
55
|
+
*/
|
|
56
|
+
export const getMessagePageAttachment = (metadata) => {
|
|
57
|
+
const page = metadata?.page;
|
|
58
|
+
if (typeof page !== "object" ||
|
|
59
|
+
page === null ||
|
|
60
|
+
typeof page.url !== "string") {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const { title, url } = page;
|
|
64
|
+
return typeof title === "string" && title ? { title, url } : { url };
|
|
65
|
+
};
|
|
66
|
+
export const createChatCommandQueue = () => {
|
|
67
|
+
let state = initialState;
|
|
68
|
+
let nextId = 1;
|
|
69
|
+
const listeners = new Set();
|
|
70
|
+
const update = (next) => {
|
|
71
|
+
if (next === state) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
state = next;
|
|
75
|
+
for (const listener of listeners) {
|
|
76
|
+
listener();
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
ask: (text) => {
|
|
81
|
+
const trimmed = typeof text === "string" ? text.trim() : "";
|
|
82
|
+
if (!trimmed) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
update({
|
|
86
|
+
...state,
|
|
87
|
+
pendingAsks: [...state.pendingAsks, { id: nextId++, text: trimmed }],
|
|
88
|
+
});
|
|
89
|
+
return true;
|
|
90
|
+
},
|
|
91
|
+
attachPage: (page) => {
|
|
92
|
+
update({
|
|
93
|
+
...state,
|
|
94
|
+
attachedPage: page,
|
|
95
|
+
clearRequested: true,
|
|
96
|
+
pendingAsks: [],
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
beginCommand: () => {
|
|
100
|
+
if (state.running) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
update({ ...state, running: true });
|
|
104
|
+
return true;
|
|
105
|
+
},
|
|
106
|
+
completeClear: () => {
|
|
107
|
+
if (state.clearRequested) {
|
|
108
|
+
update({ ...state, clearRequested: false });
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
detachPage: () => {
|
|
112
|
+
if (state.attachedPage) {
|
|
113
|
+
update({ ...state, attachedPage: null });
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
endCommand: () => {
|
|
117
|
+
if (state.running) {
|
|
118
|
+
update({ ...state, running: false });
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
getState: () => state,
|
|
122
|
+
subscribe: (listener) => {
|
|
123
|
+
listeners.add(listener);
|
|
124
|
+
return () => {
|
|
125
|
+
listeners.delete(listener);
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
takeAttachedPage: () => {
|
|
129
|
+
const page = state.attachedPage;
|
|
130
|
+
if (page) {
|
|
131
|
+
update({ ...state, attachedPage: null });
|
|
132
|
+
}
|
|
133
|
+
return page;
|
|
134
|
+
},
|
|
135
|
+
takeNextAsk: () => {
|
|
136
|
+
const [next, ...rest] = state.pendingAsks;
|
|
137
|
+
if (!next) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
update({ ...state, pendingAsks: rest });
|
|
141
|
+
return next;
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
/** Whether the chat can submit a message or clear without interrupting one. */
|
|
146
|
+
export const isChatIdle = (status) => status === "ready" || status === "error";
|
|
147
|
+
/**
|
|
148
|
+
* What the active chat shell should do next with the queue. A requested
|
|
149
|
+
* clear interrupts a streaming answer (`"stop"`) and runs before any queued
|
|
150
|
+
* question; questions wait for the chat to be idle and for the previous
|
|
151
|
+
* command, in either shell, to settle (`state.running`).
|
|
152
|
+
*/
|
|
153
|
+
export const getNextChatCommand = ({ state, status, }) => {
|
|
154
|
+
const idle = isChatIdle(status);
|
|
155
|
+
if (state.clearRequested && !idle) {
|
|
156
|
+
return "stop";
|
|
157
|
+
}
|
|
158
|
+
if (state.running || !idle) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
if (state.clearRequested) {
|
|
162
|
+
return "clear";
|
|
163
|
+
}
|
|
164
|
+
return state.pendingAsks.length > 0 ? "ask" : null;
|
|
165
|
+
};
|
|
@@ -1,19 +1,63 @@
|
|
|
1
1
|
import type { GeistdocsConfig } from "../../config";
|
|
2
|
+
import type { ChatUser } from "./chat-user";
|
|
3
|
+
import { type ChatCommandQueue, type ChatCommandState } from "./commands";
|
|
4
|
+
import { type ChatSuggestion } from "./options";
|
|
5
|
+
/** Page to attach to the next Ask AI message. */
|
|
6
|
+
export interface GeistdocsChatPage {
|
|
7
|
+
/** Title shown on the attached-page card. Falls back to `url`. */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Site-relative path of the page. For an absolute URL only the path is sent. */
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
/** Public Ask AI controller returned by `useGeistdocsChat`. */
|
|
13
|
+
export interface GeistdocsChatController {
|
|
14
|
+
/**
|
|
15
|
+
* Open the chat and submit `text` as a user message. Waits for the chat to
|
|
16
|
+
* load and for any streaming response to finish. Empty text is ignored.
|
|
17
|
+
*/
|
|
18
|
+
ask: (text: string) => void;
|
|
19
|
+
close: () => void;
|
|
20
|
+
/** `false` when `ai.enabled` is `false`; every action is then a no-op. */
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
open: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Start a new conversation about `page` (default: the current page). The
|
|
26
|
+
* page is sent with the next message only.
|
|
27
|
+
*/
|
|
28
|
+
openWithPage: (page?: GeistdocsChatPage) => void;
|
|
29
|
+
toggle: () => void;
|
|
30
|
+
}
|
|
2
31
|
interface GeistdocsChatContextValue {
|
|
32
|
+
ask: GeistdocsChatController["ask"];
|
|
3
33
|
basePath?: string;
|
|
34
|
+
/** Unvalidated `ai.endpoint`; resolved inside the chat error boundary. */
|
|
35
|
+
chatEndpoint?: string;
|
|
36
|
+
/** Chat panel heading from `ai.title`. Not the site title. */
|
|
37
|
+
chatTitle: string;
|
|
38
|
+
commandState: ChatCommandState;
|
|
39
|
+
/** Queue drained by the active chat shell. */
|
|
40
|
+
commands: ChatCommandQueue;
|
|
4
41
|
enabled: boolean;
|
|
5
42
|
footer?: React.ReactNode;
|
|
6
43
|
hasBeenOpened: boolean;
|
|
44
|
+
/** Milliseconds a stored conversation is kept after its last message. */
|
|
45
|
+
historyRetentionMs: number;
|
|
7
46
|
isOpen: boolean;
|
|
47
|
+
openWithPage: GeistdocsChatController["openWithPage"];
|
|
8
48
|
preloadChat: () => void;
|
|
9
49
|
prewarmEveAgent: boolean;
|
|
10
50
|
prompt: string;
|
|
11
51
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
52
|
setPrompt: React.Dispatch<React.SetStateAction<string>>;
|
|
13
|
-
|
|
53
|
+
setUser: React.Dispatch<React.SetStateAction<ChatUser | null>>;
|
|
54
|
+
suggestions: ChatSuggestion[];
|
|
55
|
+
/** Site title from `config.title`; names the chat history database. */
|
|
14
56
|
title: string;
|
|
57
|
+
/** Signed-in reader set at runtime by `<AskAIUser />`. */
|
|
58
|
+
user: ChatUser | null;
|
|
15
59
|
}
|
|
16
|
-
export declare const
|
|
60
|
+
export declare const useGeistdocsChatContext: () => GeistdocsChatContextValue;
|
|
17
61
|
interface GeistdocsChatProviderProps {
|
|
18
62
|
children: React.ReactNode;
|
|
19
63
|
config: Pick<GeistdocsConfig, "ai" | "basePath" | "title">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/context.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAGtB,MAAM,YAAY,CAAC;AACpB,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,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC;IAC/D,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;CACvB;AAMD,eAAO,MAAM,uBAAuB,iCAQnC,CAAC;AAEF,UAAU,0BAA0B;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,CAAC,CAAC;CAC5D;AAED,eAAO,MAAM,qBAAqB,GAAI,uBAGnC,0BAA0B,4CA4H5B,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useState, } from "react";
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState, useSyncExternalStore, } from "react";
|
|
4
|
+
import { createChatCommandQueue, normalizeChatPage, } from "./commands";
|
|
5
|
+
import { isValidChatHistoryRetentionDays, normalizeChatSuggestions, resolveChatHistoryRetentionMs, resolveChatTitle, } from "./options";
|
|
4
6
|
const CHAT_OPEN_STORAGE_KEY = "geistdocs:chat-open";
|
|
5
7
|
const GeistdocsChatContext = createContext(null);
|
|
6
|
-
export const
|
|
8
|
+
export const useGeistdocsChatContext = () => {
|
|
7
9
|
const context = useContext(GeistdocsChatContext);
|
|
8
10
|
if (!context) {
|
|
9
11
|
throw new Error("Chat controls must be used within GeistdocsProvider.");
|
|
@@ -14,7 +16,29 @@ export const GeistdocsChatProvider = ({ children, config, }) => {
|
|
|
14
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
15
17
|
const [hasBeenOpened, setHasBeenOpened] = useState(false);
|
|
16
18
|
const [prompt, setPrompt] = useState("");
|
|
19
|
+
const [user, setUser] = useState(null);
|
|
17
20
|
const preloadChat = useCallback(() => setHasBeenOpened(true), []);
|
|
21
|
+
const [commands] = useState(createChatCommandQueue);
|
|
22
|
+
const commandState = useSyncExternalStore(commands.subscribe, commands.getState, commands.getState);
|
|
23
|
+
const enabled = config.ai?.enabled !== false;
|
|
24
|
+
const ask = useCallback((text) => {
|
|
25
|
+
if (enabled && commands.ask(text)) {
|
|
26
|
+
setIsOpen(true);
|
|
27
|
+
}
|
|
28
|
+
}, [commands, enabled]);
|
|
29
|
+
const openWithPage = useCallback((page) => {
|
|
30
|
+
if (!enabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const attachment = normalizeChatPage(page ?? { url: window.location.pathname }, window.location.origin);
|
|
34
|
+
if (attachment) {
|
|
35
|
+
commands.attachPage(attachment);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.warn(`Ask AI could not attach the page ${String(page?.url)}: expected a site-relative path or HTTP(S) URL.`);
|
|
39
|
+
}
|
|
40
|
+
setIsOpen(true);
|
|
41
|
+
}, [commands, enabled]);
|
|
18
42
|
useEffect(() => {
|
|
19
43
|
const stored = window.localStorage.getItem(CHAT_OPEN_STORAGE_KEY);
|
|
20
44
|
if (stored !== null) {
|
|
@@ -33,27 +57,49 @@ export const GeistdocsChatProvider = ({ children, config, }) => {
|
|
|
33
57
|
useEffect(() => {
|
|
34
58
|
window.localStorage.setItem(CHAT_OPEN_STORAGE_KEY, String(isOpen));
|
|
35
59
|
}, [isOpen]);
|
|
60
|
+
const retentionDays = config.ai?.history?.retentionDays;
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (!isValidChatHistoryRetentionDays(retentionDays)) {
|
|
63
|
+
console.warn(`ai.history.retentionDays must be 0, a positive number, or Infinity. Received ${String(retentionDays)}; using the default.`);
|
|
64
|
+
}
|
|
65
|
+
}, [retentionDays]);
|
|
36
66
|
const value = useMemo(() => ({
|
|
67
|
+
ask,
|
|
37
68
|
basePath: config.basePath,
|
|
69
|
+
chatEndpoint: config.ai?.endpoint,
|
|
70
|
+
chatTitle: resolveChatTitle(config.ai?.title),
|
|
71
|
+
commands,
|
|
72
|
+
commandState,
|
|
38
73
|
footer: config.ai?.footer,
|
|
39
|
-
enabled
|
|
74
|
+
enabled,
|
|
40
75
|
hasBeenOpened,
|
|
76
|
+
historyRetentionMs: resolveChatHistoryRetentionMs(retentionDays),
|
|
41
77
|
isOpen,
|
|
78
|
+
openWithPage,
|
|
42
79
|
preloadChat,
|
|
43
80
|
prewarmEveAgent: config.ai?.eveAgent?.prewarm === true,
|
|
44
81
|
prompt,
|
|
45
82
|
setIsOpen,
|
|
46
83
|
setPrompt,
|
|
47
|
-
|
|
84
|
+
setUser,
|
|
85
|
+
suggestions: normalizeChatSuggestions(config.ai?.suggestions),
|
|
48
86
|
title: config.title,
|
|
87
|
+
user,
|
|
49
88
|
}), [
|
|
89
|
+
ask,
|
|
90
|
+
commands,
|
|
91
|
+
commandState,
|
|
50
92
|
config.ai,
|
|
51
93
|
config.basePath,
|
|
52
94
|
config.title,
|
|
95
|
+
enabled,
|
|
53
96
|
hasBeenOpened,
|
|
54
97
|
isOpen,
|
|
98
|
+
openWithPage,
|
|
55
99
|
preloadChat,
|
|
56
100
|
prompt,
|
|
101
|
+
retentionDays,
|
|
102
|
+
user,
|
|
57
103
|
]);
|
|
58
104
|
return (_jsx(GeistdocsChatContext.Provider, { value: value, children: children }));
|
|
59
105
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChatStatus, UIMessage } from "ai";
|
|
2
|
+
type SetMessages = (messages: UIMessage[] | ((messages: UIMessage[]) => UIMessage[])) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Copy and, with `ai.messageFeedback`, thumbs up/down buttons for a finished
|
|
5
|
+
* assistant message that has text. Renders nothing for user messages, the
|
|
6
|
+
* message currently streaming, and messages without text.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MessageActions: ({ index, messages, setMessages, status, }: {
|
|
9
|
+
index: number;
|
|
10
|
+
messages: UIMessage[];
|
|
11
|
+
setMessages: SetMessages;
|
|
12
|
+
status: ChatStatus;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=message-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/message-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAyBhD,KAAK,WAAW,GAAG,CACjB,QAAQ,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,CAAC,KAC7D,IAAI,CAAC;AA4JV;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,2CAK5B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,UAAU,CAAC;CACpB,mDA8BA,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { usePathname } from "next/navigation";
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { IconCheck, IconCopy, IconThumbDown, IconThumbUp, } from "#geistdocs-assets/icons";
|
|
6
|
+
import { Button } from "#geistdocs-ui/components/button";
|
|
7
|
+
import { useToasts } from "#geistdocs-ui/components/toasts";
|
|
8
|
+
import { Tooltip } from "#geistdocs-ui/components/tooltip";
|
|
9
|
+
import { cn } from "#geistdocs-ui/utils";
|
|
10
|
+
import { getPublicPath } from "../../config";
|
|
11
|
+
import { useGeistdocsConfig } from "../config-context";
|
|
12
|
+
import { sendChatMessageFeedback } from "../feedback-action";
|
|
13
|
+
import { isActiveAssistantMessage } from "./activity";
|
|
14
|
+
import { buildChatMessageFeedback, readMessageFeedbackVote, withMessageFeedbackVote, } from "./message-feedback";
|
|
15
|
+
import { getMessageMarkdown } from "./message-text";
|
|
16
|
+
const actionButtonClassName = "text-gray-900! hover:text-gray-1000!";
|
|
17
|
+
const CopyMessageButton = ({ markdown }) => {
|
|
18
|
+
const [copied, setCopied] = useState(false);
|
|
19
|
+
const timeoutRef = useRef(null);
|
|
20
|
+
const toast = useToasts();
|
|
21
|
+
useEffect(() => () => {
|
|
22
|
+
if (timeoutRef.current) {
|
|
23
|
+
clearTimeout(timeoutRef.current);
|
|
24
|
+
}
|
|
25
|
+
}, []);
|
|
26
|
+
const copy = async () => {
|
|
27
|
+
try {
|
|
28
|
+
await navigator.clipboard.writeText(markdown);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
toast.error({
|
|
32
|
+
text: error instanceof Error
|
|
33
|
+
? `Failed to copy response: ${error.message}`
|
|
34
|
+
: "Failed to copy response",
|
|
35
|
+
});
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
setCopied(true);
|
|
39
|
+
if (timeoutRef.current) {
|
|
40
|
+
clearTimeout(timeoutRef.current);
|
|
41
|
+
}
|
|
42
|
+
timeoutRef.current = setTimeout(() => setCopied(false), 2000);
|
|
43
|
+
};
|
|
44
|
+
const Icon = copied ? IconCheck : IconCopy;
|
|
45
|
+
return (_jsx(Tooltip, { position: "bottom", text: "Copy response as Markdown", children: _jsxs(Button, { "aria-label": copied ? "Response copied" : "Copy response as Markdown", className: actionButtonClassName, onClick: copy, shape: "square", size: "small", svgOnly: true, typeName: "button", variant: "tertiary", children: [_jsx(Icon, { "aria-hidden": true, size: 14 }), copied ? (_jsx("span", { "aria-live": "polite", className: "sr-only", role: "status", children: "Copied" })) : null] }) }));
|
|
46
|
+
};
|
|
47
|
+
const feedbackOptions = [
|
|
48
|
+
{ icon: IconThumbUp, label: "Helpful", vote: "up" },
|
|
49
|
+
{ icon: IconThumbDown, label: "Not helpful", vote: "down" },
|
|
50
|
+
];
|
|
51
|
+
const MessageFeedbackButtons = ({ messageId, messages, setMessages, vote, }) => {
|
|
52
|
+
const [pendingVote, setPendingVote] = useState(null);
|
|
53
|
+
const { basePath, siteId } = useGeistdocsConfig();
|
|
54
|
+
const pathname = usePathname();
|
|
55
|
+
const toast = useToasts();
|
|
56
|
+
const submit = async (nextVote) => {
|
|
57
|
+
if (vote || pendingVote) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const feedback = buildChatMessageFeedback({
|
|
61
|
+
messageId,
|
|
62
|
+
messages,
|
|
63
|
+
pageUrl: getPublicPath(pathname, basePath),
|
|
64
|
+
vote: nextVote,
|
|
65
|
+
});
|
|
66
|
+
if (!feedback) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setPendingVote(nextVote);
|
|
70
|
+
let success = false;
|
|
71
|
+
try {
|
|
72
|
+
({ success } = await sendChatMessageFeedback({ feedback, siteId }));
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.error("Failed to send Ask AI feedback:", error);
|
|
76
|
+
}
|
|
77
|
+
setPendingVote(null);
|
|
78
|
+
if (!success) {
|
|
79
|
+
toast.error({ text: "Couldn't send feedback. Try again." });
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// Stored in message metadata so the vote persists with chat history.
|
|
83
|
+
setMessages((current) => withMessageFeedbackVote(current, messageId, nextVote));
|
|
84
|
+
toast.success({ text: "Thanks for your feedback" });
|
|
85
|
+
};
|
|
86
|
+
return feedbackOptions.map((option) => {
|
|
87
|
+
const selected = (vote ?? pendingVote) === option.vote;
|
|
88
|
+
const Icon = option.icon;
|
|
89
|
+
return (_jsx(Tooltip, { position: "bottom", text: option.label, children: _jsx(Button, { "aria-label": option.label, "aria-pressed": selected, className: cn(actionButtonClassName, selected && "text-gray-1000! disabled:opacity-100!"), disabled: Boolean(vote || pendingVote), onClick: () => {
|
|
90
|
+
submit(option.vote).catch((error) => {
|
|
91
|
+
console.error("Failed to send Ask AI feedback:", error);
|
|
92
|
+
});
|
|
93
|
+
}, shape: "square", size: "small", svgOnly: true, typeName: "button", variant: "tertiary", children: _jsx(Icon, { "aria-hidden": true, size: 14 }) }) }, option.vote));
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Copy and, with `ai.messageFeedback`, thumbs up/down buttons for a finished
|
|
98
|
+
* assistant message that has text. Renders nothing for user messages, the
|
|
99
|
+
* message currently streaming, and messages without text.
|
|
100
|
+
*/
|
|
101
|
+
export const MessageActions = ({ index, messages, setMessages, status, }) => {
|
|
102
|
+
const { ai } = useGeistdocsConfig();
|
|
103
|
+
const message = messages[index];
|
|
104
|
+
if (message?.role !== "assistant" ||
|
|
105
|
+
isActiveAssistantMessage({ index, messages, status })) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const markdown = getMessageMarkdown(message);
|
|
109
|
+
if (!markdown) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
return (_jsxs("div", { className: "-ml-2 flex items-center gap-0.5", children: [_jsx(CopyMessageButton, { markdown: markdown }), ai?.messageFeedback === true ? (_jsx(MessageFeedbackButtons, { messageId: message.id, messages: messages, setMessages: setMessages, vote: readMessageFeedbackVote(message) })) : null] }));
|
|
113
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { UIMessage } from "ai";
|
|
2
|
+
export type ChatMessageFeedbackVote = "up" | "down";
|
|
3
|
+
/** Ask AI answer feedback, as sent to the central feedback service. */
|
|
4
|
+
export interface ChatMessageFeedback {
|
|
5
|
+
/** The assistant answer, as Markdown. */
|
|
6
|
+
answer: string;
|
|
7
|
+
/**
|
|
8
|
+
* Root-relative, app-public path of the page the reader was on when
|
|
9
|
+
* voting, including `basePath`.
|
|
10
|
+
*/
|
|
11
|
+
pageUrl: string;
|
|
12
|
+
/** The reader's question that the answer responds to. */
|
|
13
|
+
question: string;
|
|
14
|
+
/** URLs of the sources shown for the answer. */
|
|
15
|
+
sources: string[];
|
|
16
|
+
vote: ChatMessageFeedbackVote;
|
|
17
|
+
}
|
|
18
|
+
/** Longest question or answer text sent with Ask AI feedback. */
|
|
19
|
+
export declare const CHAT_FEEDBACK_TEXT_LIMIT = 4000;
|
|
20
|
+
/** Most source URLs sent with Ask AI feedback. */
|
|
21
|
+
export declare const CHAT_FEEDBACK_SOURCE_LIMIT = 10;
|
|
22
|
+
/** The feedback service rejects `url` values over 1,024 characters. */
|
|
23
|
+
export declare const CHAT_FEEDBACK_URL_LIMIT = 1024;
|
|
24
|
+
/** The feedback service rejects `note` values over 16,384 characters. */
|
|
25
|
+
export declare const CHAT_FEEDBACK_NOTE_LIMIT = 16384;
|
|
26
|
+
/** First line of every Ask AI feedback note, for feedback triage. */
|
|
27
|
+
export declare const CHAT_FEEDBACK_NOTE_PREFIX = "[Ask AI]";
|
|
28
|
+
export declare const CHAT_FEEDBACK_EMOJI: Record<ChatMessageFeedbackVote, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Shorten `value` to at most `limit` characters, ending with an ellipsis
|
|
31
|
+
* when shortened. Never splits a surrogate pair.
|
|
32
|
+
*/
|
|
33
|
+
export declare const capText: (value: string, limit: number) => string;
|
|
34
|
+
export declare const isChatMessageFeedbackVote: (value: unknown) => value is ChatMessageFeedbackVote;
|
|
35
|
+
/** The vote stored on a message by `withMessageFeedbackVote`, if any. */
|
|
36
|
+
export declare const readMessageFeedbackVote: (message: Pick<UIMessage, "metadata">) => ChatMessageFeedbackVote | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Record `vote` in the metadata of the message with `messageId`, keeping
|
|
39
|
+
* every other metadata key (such as the eve stream position) so the vote
|
|
40
|
+
* persists with stored chat history without changing later chat requests.
|
|
41
|
+
*/
|
|
42
|
+
export declare const withMessageFeedbackVote: <Message extends UIMessage>(messages: Message[], messageId: string, vote: ChatMessageFeedbackVote) => Message[];
|
|
43
|
+
/**
|
|
44
|
+
* Validate and cap feedback before it crosses a trust boundary. Server
|
|
45
|
+
* actions accept arbitrary input, so the server re-runs this on whatever the
|
|
46
|
+
* browser sent. Returns `null` for input that is not answer feedback.
|
|
47
|
+
*/
|
|
48
|
+
export declare const normalizeChatMessageFeedback: (input: unknown) => ChatMessageFeedback | null;
|
|
49
|
+
/**
|
|
50
|
+
* Collect feedback for the assistant message with `messageId`. Returns
|
|
51
|
+
* `null` when the message is missing, is not an assistant message, or has no
|
|
52
|
+
* text to rate.
|
|
53
|
+
*/
|
|
54
|
+
export declare const buildChatMessageFeedback: ({ messageId, messages, pageUrl, vote, }: {
|
|
55
|
+
messageId: string;
|
|
56
|
+
messages: UIMessage[];
|
|
57
|
+
pageUrl: string;
|
|
58
|
+
vote: ChatMessageFeedbackVote;
|
|
59
|
+
}) => ChatMessageFeedback | null;
|
|
60
|
+
/**
|
|
61
|
+
* The `note` sent to the feedback service. Its first line starts with
|
|
62
|
+
* `CHAT_FEEDBACK_NOTE_PREFIX` and the vote emoji, so triage can tell Ask AI
|
|
63
|
+
* feedback from page feedback, then summarizes the question on one line
|
|
64
|
+
* because the service titles the issue with the note's first words. The
|
|
65
|
+
* answer comes last so the note limit can only ever shorten the answer.
|
|
66
|
+
*/
|
|
67
|
+
export declare const formatChatMessageFeedbackNote: (feedback: ChatMessageFeedback) => string;
|
|
68
|
+
//# sourceMappingURL=message-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-feedback.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/message-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,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