@waniwani/sdk 0.9.7 → 0.9.9
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 +17 -1
- package/dist/chat/index.js +7 -7
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/next-js/index.js +3 -3
- package/dist/chat/next-js/index.js.map +1 -1
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/index.js.map +1 -1
- package/package.json +1 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -250,6 +250,15 @@ type ModelContextUpdate = {
|
|
|
250
250
|
structuredContent?: Record<string, unknown>;
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Per-tool definition metadata, keyed by tool name. The chat UI caches the
|
|
255
|
+
* MCP `tools/list` response here so widget resolution can happen by tool
|
|
256
|
+
* name (spec-canonical) rather than by inspecting every tool call result.
|
|
257
|
+
*/
|
|
258
|
+
type ToolDefinitionsMap = Record<string, {
|
|
259
|
+
_meta?: Record<string, unknown>;
|
|
260
|
+
}>;
|
|
261
|
+
|
|
253
262
|
type McpAppDisplayMode = "inline" | "pip" | "fullscreen";
|
|
254
263
|
interface McpAppFrameProps {
|
|
255
264
|
resourceUri: string;
|
|
@@ -295,8 +304,15 @@ interface McpAppFrameProps {
|
|
|
295
304
|
onDisplayModeChange?: (mode: McpAppDisplayMode) => void;
|
|
296
305
|
/** When true, the iframe fills its container (fullscreen mode). */
|
|
297
306
|
isFullscreen?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Cached tool catalog keyed by tool name. Passed through so that
|
|
309
|
+
* follow-up `tools/call` requests from the widget iframe can be
|
|
310
|
+
* correctly classified as widget-producing (spec-canonical definition
|
|
311
|
+
* lookup) vs. plain (result text auto-injected).
|
|
312
|
+
*/
|
|
313
|
+
toolDefinitions?: ToolDefinitionsMap;
|
|
298
314
|
}
|
|
299
|
-
declare function McpAppFrame({ resourceUri, toolInput, toolResult, resourceEndpoint, chatSessionId, isDark, className, autoHeight, onOpenLink, onFollowUp, onCallTool, onDisplayModeChange, isFullscreen, }: McpAppFrameProps): react_jsx_runtime.JSX.Element;
|
|
315
|
+
declare function McpAppFrame({ resourceUri, toolInput, toolResult, resourceEndpoint, chatSessionId, isDark, className, autoHeight, onOpenLink, onFollowUp, onCallTool, onDisplayModeChange, isFullscreen, toolDefinitions, }: McpAppFrameProps): react_jsx_runtime.JSX.Element;
|
|
300
316
|
|
|
301
317
|
declare const ChatCard: react.ForwardRefExoticComponent<ChatCardProps & react.RefAttributes<ChatHandle>>;
|
|
302
318
|
|