Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity send_to_user messages now show and T3 MCP tool labels resolve #38956

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/38956/headopened View on GitHub

Showing 12 changed files with 39 additions and 6 deletions (loading 9).

x
0 of 12 viewed, 12 left
15 additions and 3 deletionsapps/server/src/mcp/toolkits/message/handlers.tsModified
View file
@@ -1,13 +1,25 @@
+import * as McpProviderSessions from "@t3tools/provider-core/server/McpProviderSessions";
+import { SEND_TO_USER_TOOL_NAME } from "@t3tools/shared/toolOutput";
import * as Effect from "effect/Effect";
​
+import * as McpInvocationContext from "../../McpInvocationContext.ts";
import * as McpToolAccess from "../../McpToolAccess.ts";
import { MessageToolkit } from "./tools.ts";
​
const handlers = {
send_to_user: McpToolAccess.actsAsCaller((input) =>
- Effect.succeed({
- sentMessage: input.message,
- message: "Shown to the user. Don't repeat it.",
+ Effect.gen(function* () {
+ const scope = yield* McpInvocationContext.McpInvocationContext;
+ const { thread } = yield* McpInvocationContext.requireThreadScope(
+ scope,
+ SEND_TO_USER_TOOL_NAME,
+ );
+ const mcpSessions = yield* McpProviderSessions.McpProviderSessions;
+ yield* mcpSessions.recordSentMessage(thread.threadId, input.message);
+ return {
+ sentMessage: input.message,
+ message: "Shown to the user. Don't repeat it.",
+ };
}),
),
} satisfies McpToolAccess.Handlers<typeof MessageToolkit.tools>;