Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): T3 MCP tools take explicit thread and project targets #15219

Mergedjuliusmarmingemerged 9 commits intomain fromrefs/pull/15219/headmerged by juliusmarminge View on GitHub

Showing 43 changed files with 10 additions and 10 deletions (loading 40).

x
0 of 43 viewed, 43 left
3 additions and 3 deletionsapps/server/src/mcp/toolkits/attachment/handlers.tsModified
View file
@@ -47,7 +47,7 @@
}),
t3_thread_send_attachments: (input) =>
Effect.gen(function* () {
- const { caller, projection, scope } = yield* readWritableThread(input.threadId, ["messages"]);
+ const { caller, projection } = yield* readWritableThread(input.threadId, ["messages"]);
if (projection.thread.archivedAt !== null)
return yield* new OrchestratorMcpFailure({
code: "invalid_request",
@@ -60,11 +60,11 @@
const commandId = yield* newCommandId();
const messageId = MessageId.make(commandId);
const result = yield* ThreadMessageIntake.sendToThread({
- projectId: caller.projectId,
+ projectId: projection.thread.projectId,
threadId: projection.thread.id,
commandId,
messageId,
- senderThreadId: scope.threadId,
+ ...(caller === undefined ? {} : { senderThreadId: caller.id }),
text: input.message ?? "",
attachments,
mode: "auto",
1 addition and 1 deletionapps/server/src/mcp/toolkits/attachment/tools.tsModified
View file
@@ -47,7 +47,7 @@
const AttachmentSendTool = Tool.make("t3_thread_send_attachments", {