Skip to content

Commit 87e6daf

Browse files
committed
fix: update threejs-server to use sendMessage
1 parent 59c9771 commit 87e6daf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/threejs-server/src/mcp-app-wrapper.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface WidgetProps<TToolInput = Record<string, unknown>> {
3030
/** Call a tool on the MCP server */
3131
callServerTool: App["callServerTool"];
3232
/** Send a message to the host's chat */
33-
message: App["message"];
33+
sendMessage: App["sendMessage"];
3434
/** Request the host to open a URL */
3535
openLink: App["openLink"];
3636
/** Send log messages to the host */
@@ -77,8 +77,8 @@ function McpAppWrapper() {
7777
(params, options) => app!.callServerTool(params, options),
7878
[app],
7979
);
80-
const message = useCallback<App["message"]>(
81-
(params, options) => app!.message(params, options),
80+
const sendMessage = useCallback<App["sendMessage"]>(
81+
(params, options) => app!.sendMessage(params, options),
8282
[app],
8383
);
8484
const openLink = useCallback<App["openLink"]>(
@@ -105,7 +105,7 @@ function McpAppWrapper() {
105105
toolResult={toolResult}
106106
hostContext={hostContext}
107107
callServerTool={callServerTool}
108-
message={message}
108+
sendMessage={sendMessage}
109109
openLink={openLink}
110110
sendLog={sendLog}
111111
/>

examples/threejs-server/src/threejs-app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default function ThreeJSApp({
142142
toolResult: _toolResult,
143143
hostContext: _hostContext,
144144
callServerTool: _callServerTool,
145-
message: _message,
145+
sendMessage: _sendMessage,
146146
openLink: _openLink,
147147
sendLog: _sendLog,
148148
}: ThreeJSAppProps) {

0 commit comments

Comments
 (0)