@stainless-api/docs-ai-chat 0.1.0-beta.44 → 0.1.0-beta.46

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,28 @@
1
1
  # @stainless-api/docs-ai-chat
2
2
 
3
+ ## 0.1.0-beta.46
4
+
5
+ ### Minor Changes
6
+
7
+ - 9d24589: Steelie empty state
8
+ - 5263b85: Loading state for ai chat
9
+
10
+ ### Patch Changes
11
+
12
+ - 9d24589: Various steelie UI fixes
13
+ - Updated dependencies [9d24589]
14
+ - Updated dependencies [9d24589]
15
+ - Updated dependencies [5263b85]
16
+ - @stainless-api/ai-chat@0.1.0-beta.8
17
+
18
+ ## 0.1.0-beta.45
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [6d9933d]
23
+ - @stainless-api/docs-ui@0.1.0-beta.79
24
+ - @stainless-api/ai-chat@0.1.0-beta.7
25
+
3
26
  ## 0.1.0-beta.44
4
27
 
5
28
  ### Patch Changes
@@ -0,0 +1,7 @@
1
+ import 'react';
2
+
3
+ declare module 'react' {
4
+ interface CSSProperties {
5
+ [key: `--${string}`]: string | number;
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ai-chat",
3
- "version": "0.1.0-beta.44",
3
+ "version": "0.1.0-beta.46",
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.78"
11
+ "@stainless-api/docs-ui": "0.1.0-beta.79"
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.6"
16
+ "@stainless-api/ai-chat": "0.1.0-beta.8"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "19.2.14",
package/src/DocsChat.tsx CHANGED
@@ -3,6 +3,19 @@ import type { DocsLanguage } from '@stainless-api/docs-ui/routing';
3
3
  import { setResponseMetadata, submitResponseFeedback } from './api';
4
4
  import { useChat } from './hook';
5
5
 
6
+ function onCopyMessage(spanId: string) {
7
+ setResponseMetadata(spanId, { copied_to_clipboard: 'true' }).catch(() => {});
8
+ }
9
+
10
+ async function rateMessage(spanId: string, rating: 'up' | 'down'): Promise<boolean> {
11
+ try {
12
+ const { success } = await submitResponseFeedback(spanId, { up: 1 as const, down: 0 as const }[rating]);
13
+ return success;
14
+ } catch {
15
+ return false;
16
+ }
17
+ }
18
+
6
19
  export default function DocsChat({
7
20
  projectId,
8
21
  language,
@@ -18,19 +31,6 @@ export default function DocsChat({
18
31
  siteTitle,
19
32
  });
20
33
 
21
- const rateMessage = async (spanId: string, rating: 'up' | 'down'): Promise<boolean> => {
22
- try {
23
- const { success } = await submitResponseFeedback(spanId, { up: 1 as const, down: 0 as const }[rating]);
24
- return success;
25
- } catch {
26
- return false;
27
- }
28
- };
29
-
30
- const onCopyMessage = (spanId: string) => {
31
- setResponseMetadata(spanId, { copied_to_clipboard: 'true' }).catch(() => {});
32
- };
33
-
34
34
  return (
35
35
  <AiChat
36
36
  chatMessages={chatMessages}
package/tsconfig.json CHANGED
@@ -3,5 +3,5 @@
3
3
  "compilerOptions": {
4
4
  "jsx": "react-jsx"
5
5
  },
6
- "include": ["src", "*.d.ts", "plugin.tsx", "*.config.*"]
6
+ "include": ["src", "*.d.ts", "*.config.*", "plugin.tsx"]
7
7
  }