@stainless-api/docs-ai-chat 0.1.0-beta.56 → 0.1.0-beta.58
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/CHANGELOG.md +19 -0
- package/ambient.d.ts +6 -0
- package/package.json +3 -3
- package/src/DocsChat.tsx +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @stainless-api/docs-ai-chat
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.58
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f22893c: Add interactive examples to ai chat
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [f22893c]
|
|
12
|
+
- @stainless-api/ai-chat@0.1.0-beta.13
|
|
13
|
+
|
|
14
|
+
## 0.1.0-beta.57
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [7701d8f]
|
|
19
|
+
- Updated dependencies [5460e81]
|
|
20
|
+
- @stainless-api/docs-ui@0.1.0-beta.87
|
|
21
|
+
|
|
3
22
|
## 0.1.0-beta.56
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/ambient.d.ts
CHANGED
|
@@ -2,3 +2,9 @@ declare module '*.module.css' {
|
|
|
2
2
|
const classes: { [key: string]: string };
|
|
3
3
|
export default classes;
|
|
4
4
|
}
|
|
5
|
+
|
|
6
|
+
declare module 'virtual:stl-docs-ai-chat-examples' {
|
|
7
|
+
import type { ExamplePrompt } from '@stainless-api/ai-chat/src/types';
|
|
8
|
+
|
|
9
|
+
export const examples: ExamplePrompt[] | undefined;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-ai-chat",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.58",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"react": ">=19.0.0",
|
|
10
10
|
"react-dom": ">=19.0.0",
|
|
11
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
11
|
+
"@stainless-api/docs-ui": "0.1.0-beta.87"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@streamparser/json-whatwg": "^0.0.22",
|
|
15
15
|
"zod": "^4.3.6",
|
|
16
|
-
"@stainless-api/ai-chat": "0.1.0-beta.
|
|
16
|
+
"@stainless-api/ai-chat": "0.1.0-beta.13"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/react": "19.2.14",
|
package/src/DocsChat.tsx
CHANGED
|
@@ -4,6 +4,10 @@ import { setResponseMetadata, submitResponseFeedback } from './api';
|
|
|
4
4
|
import { useSyncExternalStore } from 'react';
|
|
5
5
|
import { useChat } from './hook';
|
|
6
6
|
|
|
7
|
+
const examplesPromise = import('virtual:stl-docs-ai-chat-examples')
|
|
8
|
+
.then((mod) => mod.examples)
|
|
9
|
+
.catch(() => undefined);
|
|
10
|
+
|
|
7
11
|
function onCopyMessage(spanId: string) {
|
|
8
12
|
setResponseMetadata(spanId, { copied_to_clipboard: 'true' }).catch(() => {});
|
|
9
13
|
}
|
|
@@ -48,6 +52,8 @@ export default function DocsChat({
|
|
|
48
52
|
sendMessage={sendMessage}
|
|
49
53
|
rateMessage={rateMessage}
|
|
50
54
|
onCopyMessage={onCopyMessage}
|
|
55
|
+
siteTitle={siteTitle}
|
|
56
|
+
promptExamples={examplesPromise}
|
|
51
57
|
supportsPanel={supportsPanel}
|
|
52
58
|
/>
|
|
53
59
|
);
|