Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mcp): preserve thread command rejection reasons #15627

Mergedmaria-rcksmerged 3 commits intomain fromrefs/pull/15627/headmerged by maria-rcks View on GitHub

Showing 4 changed files with 79 additions and 7 deletions (loading 1).

x
0 of 4 viewed, 4 left
7 additions and 6 deletionsapps/server/src/mcp/toolkits/thread/handlers.tsModified
View file
@@ -11,6 +11,7 @@
import { modelSelectionCommandType } from "@t3tools/shared/model";
​
import {
+ dispatchFailure,
newCommandId,
readCaller,
readFullAccessCaller,
@@ -45,7 +46,7 @@
const { threads, projection } = yield* readWritableThread(threadId);
const result = yield* threads
.dispatch(command({ commandId: yield* newCommandId(), threadId: projection.thread.id }))
- .pipe(Effect.mapError(unavailable));
+ .pipe(Effect.mapError(dispatchFailure));
return { sequence: result.sequence };
});
​
@@ -131,7 +132,7 @@
createdBy: "agent",
creationSource: "mcp",
- .pipe(Effect.mapError(unavailable));
+ .pipe(Effect.mapError(dispatchFailure));
return { sequence: result.sequence, targetThreadId };
}),
t3_thread_merge_back: (input) =>
@@ -148,7 +149,7 @@