Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): thread PR and CI tools no longer tell agents to pass url or host #41408

Openjuliusmarmingewants to merge 2 commits intomain fromrefs/pull/41408/headopened View on GitHub

Showing 2 changed files with 22 additions and 1 deletion.

x
0 of 2 viewed, 2 left
3 additions and 0 deletionsapps/server/src/mcp/toolkits/pullRequests/handlers.test.tsModified
View file
@@ -400,6 +400,9 @@
.call("link_pull_request", { repository: "tfs/Collection/Project/_git/Repo", number: 124 })
.pipe(Effect.flip);
expect(error).toMatchObject({ _tag: "PullRequestUrlUnavailableError" });
+ // pull_request_read takes no url or host, so its error must not ask for them.
+ const readError = yield* harness.call("pull_request_read", { number: 124 }).pipe(Effect.flip);
+ expect(readError.message).not.toMatch(/\b(url|host)\b/i);
​
const supplied = "https://scm.example.test/tfs/Collection/Project/_git/Repo/pullrequest/123";
const fromUrl = yield* harness.call("link_pull_request", { url: supplied });
19 additions and 1 deletionapps/server/src/mcp/toolkits/pullRequests/handlers.tsModified
View file
@@ -507,6 +507,11 @@
return comments.map((comment) => placed.get(comment)!);
});
​
+ const projectRemoteUnresolved = new PullRequestForgeError({
+ detail:
+ "This thread's project has no recognised remote, so its pull requests cannot be read here.",
+ });
+​
/** The thread's checkout, its project, and the PR the input names (default: the branch's). */
const locate = Effect.fn("PullRequestsToolkit.locate")(function* (input: ThreadPullRequestInput) {
const thread = yield* requireThread(PullRequestForgeError, undefined);
@@ -536,7 +541,20 @@
? null
: { number: branchPullRequest.number, repository: branchPullRequest.repository };