@stainless-api/docs-ai-chat 0.1.0-beta.57 → 0.1.0-beta.59

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @stainless-api/docs-ai-chat
2
2
 
3
+ ## 0.1.0-beta.59
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [af5a5d7]
8
+ - @stainless-api/docs-ui@0.1.0-beta.88
9
+
10
+ ## 0.1.0-beta.58
11
+
12
+ ### Minor Changes
13
+
14
+ - f22893c: Add interactive examples to ai chat
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [f22893c]
19
+ - @stainless-api/ai-chat@0.1.0-beta.13
20
+
3
21
  ## 0.1.0-beta.57
4
22
 
5
23
  ### 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.57",
3
+ "version": "0.1.0-beta.59",
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.87"
11
+ "@stainless-api/docs-ui": "0.1.0-beta.88"
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.12"
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
  );