@waniwani/sdk 0.7.0 → 0.7.1
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/chat/index.d.ts +5 -0
- package/dist/chat/index.js +6 -6
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/styles.css +1 -1
- package/package.json +1 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
1
2
|
import * as react from 'react';
|
|
2
3
|
import { RefObject } from 'react';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -64,6 +65,8 @@ interface ChatBaseProps {
|
|
|
64
65
|
apiKey?: string;
|
|
65
66
|
/** Chat API endpoint URL. Defaults to WaniWani hosted endpoint */
|
|
66
67
|
api?: string;
|
|
68
|
+
/** Pre-loaded messages to display when the chat mounts. */
|
|
69
|
+
initialMessages?: ai.UIMessage[];
|
|
67
70
|
/** Initial greeting shown before user types */
|
|
68
71
|
welcomeMessage?: string;
|
|
69
72
|
/**
|
|
@@ -213,6 +216,8 @@ interface ChatHandle {
|
|
|
213
216
|
reset: () => void;
|
|
214
217
|
/** Scroll to the chat input, focus it, and show a highlight glow */
|
|
215
218
|
focus: () => void;
|
|
219
|
+
/** Current chat messages */
|
|
220
|
+
messages: ai.UIMessage[];
|
|
216
221
|
}
|
|
217
222
|
/** @deprecated Use ChatBarProps instead */
|
|
218
223
|
type ChatWidgetProps = ChatBarProps;
|