@waniwani/sdk 0.4.9-beta.7 → 0.4.9-beta.8
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 +8 -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,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { RefObject } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import { ContentBlock } from '@modelcontextprotocol/sdk/types.js';
|
|
4
5
|
|
|
@@ -133,6 +134,11 @@ interface ChatCardProps extends ChatBaseProps {
|
|
|
133
134
|
interface ChatHandle {
|
|
134
135
|
/** Programmatically send a user message into the chat */
|
|
135
136
|
sendMessage: (text: string) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Send a user message and wait for the assistant response to complete.
|
|
139
|
+
* Returns the final assistant message. Useful for eval/testing flows.
|
|
140
|
+
*/
|
|
141
|
+
sendMessageAndWait: (text: string) => Promise<unknown>;
|
|
136
142
|
/** Scroll to the chat input, focus it, and show a highlight glow */
|
|
137
143
|
focus: () => void;
|
|
138
144
|
}
|
|
@@ -143,6 +149,8 @@ declare const ChatBar: react.ForwardRefExoticComponent<ChatBarProps & react.RefA
|
|
|
143
149
|
|
|
144
150
|
type EvalPanelProps = {
|
|
145
151
|
api?: string;
|
|
152
|
+
/** Ref to the ChatCard or ChatBar so eval turns flow through the chat UI */
|
|
153
|
+
chatRef?: RefObject<ChatHandle | null>;
|
|
146
154
|
};
|
|
147
155
|
/**
|
|
148
156
|
* Dev-only evaluation panel for replaying recorded sessions and asserting tool usage.
|