@waniwani/sdk 0.6.1-beta.1 → 0.6.1-beta.11
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 +7 -5
- package/dist/chat/index.js +6 -6
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/next-js/index.js +5 -5
- package/dist/chat/next-js/index.js.map +1 -1
- package/dist/chat/styles.css +1 -1
- package/dist/evals/index.d.ts +1 -81
- package/dist/evals/index.js +1 -7
- package/dist/evals/index.js.map +1 -1
- package/dist/evals/scorers.d.ts +92 -0
- package/dist/evals/scorers.js +8 -0
- package/dist/evals/scorers.js.map +1 -0
- package/dist/mcp/index.d.ts +7 -2
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/react.js +1 -1
- package/dist/mcp-apps-client-PUL4H54S.js +3 -0
- package/dist/mcp-apps-client-PUL4H54S.js.map +1 -0
- package/package.json +7 -2
- package/dist/mcp-apps-client-73TJHVUE.js +0 -3
- package/dist/mcp-apps-client-73TJHVUE.js.map +0 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -209,6 +209,8 @@ interface ChatHandle {
|
|
|
209
209
|
* Returns the final assistant message. Useful for eval/testing flows.
|
|
210
210
|
*/
|
|
211
211
|
sendMessageAndWait: (text: string) => Promise<unknown>;
|
|
212
|
+
/** Clear all messages and start a fresh conversation */
|
|
213
|
+
reset: () => void;
|
|
212
214
|
/** Scroll to the chat input, focus it, and show a highlight glow */
|
|
213
215
|
focus: () => void;
|
|
214
216
|
}
|
|
@@ -217,17 +219,17 @@ type ChatWidgetProps = ChatBarProps;
|
|
|
217
219
|
|
|
218
220
|
declare const ChatBar: react.ForwardRefExoticComponent<ChatBarProps & react.RefAttributes<ChatHandle>>;
|
|
219
221
|
|
|
220
|
-
type
|
|
222
|
+
type ScenarioPanelProps = {
|
|
221
223
|
/** API endpoint to fetch scenarios from
|
|
222
224
|
*
|
|
223
225
|
* @default "/api/waniwani"
|
|
224
226
|
*/
|
|
225
227
|
api?: string;
|
|
226
|
-
/** Ref to the ChatCard or ChatBar so
|
|
228
|
+
/** Ref to the ChatCard or ChatBar so scenario turns flow through the chat UI */
|
|
227
229
|
chatRef: RefObject<ChatHandle | null>;
|
|
228
230
|
};
|
|
229
231
|
/**
|
|
230
|
-
* Dev-only
|
|
232
|
+
* Dev-only scenario panel for replaying recorded scenarios through the chat.
|
|
231
233
|
*
|
|
232
234
|
* This component is automatically tree-shaken from production builds —
|
|
233
235
|
* it returns `null` when `process.env.NODE_ENV === "production"`.
|
|
@@ -235,7 +237,7 @@ type EvalPanelProps = {
|
|
|
235
237
|
* To populate scenarios, set `WANIWANI_EVAL=1` in your `.env` and add
|
|
236
238
|
* scenario files to `evals/scenarios/`.
|
|
237
239
|
*/
|
|
238
|
-
declare function
|
|
240
|
+
declare function ScenarioPanel({ api, chatRef }: ScenarioPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
239
241
|
|
|
240
242
|
type ModelContextContentBlock = ContentBlock;
|
|
241
243
|
type ModelContextUpdate = {
|
|
@@ -319,4 +321,4 @@ declare const DARK_THEME: ChatTheme;
|
|
|
319
321
|
declare function mergeTheme(userTheme?: ChatTheme): Required<ChatTheme>;
|
|
320
322
|
declare function themeToCSSProperties(theme: Required<ChatTheme>): Record<string, string>;
|
|
321
323
|
|
|
322
|
-
export { ChatBar, type ChatBarProps, type ChatBaseProps, ChatCard, type ChatCardProps, ChatEmbed, type ChatEmbedMcpConfig, type ChatEmbedProps, type ChatHandle, type ChatTheme, ChatBar as ChatWidget, type ChatWidgetProps, DARK_THEME, DEFAULT_THEME,
|
|
324
|
+
export { ChatBar, type ChatBarProps, type ChatBaseProps, ChatCard, type ChatCardProps, ChatEmbed, type ChatEmbedMcpConfig, type ChatEmbedProps, type ChatHandle, type ChatTheme, ChatBar as ChatWidget, type ChatWidgetProps, DARK_THEME, DEFAULT_THEME, type McpAppDisplayMode, McpAppFrame, type McpAppFrameProps, ScenarioPanel, type SuggestionsConfig, type WelcomeConfig, mergeTheme, themeToCSSProperties };
|