Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): link_pull_request asks a subagent to end with its PR report #25151

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromfeat/child-pr-report-nextopened View on GitHub

Showing 3 changed files with 32 additions and 3 deletions.

x
0 of 3 viewed, 3 left
20 additions and 1 deletionapps/server/src/mcp/toolkits/pullRequests/handlers.test.tsModified
View file
@@ -32,7 +32,7 @@
import * as McpToolAccessTestkit from "../../McpToolAccess.testkit.ts";
import { listThreadPullRequests } from "./handlers.ts";
import * as PullRequestsHandlers from "./handlers.ts";
-import { PullRequestsToolkit } from "./tools.ts";
+import { CHILD_PULL_REQUEST_REPORT_NEXT, PullRequestsToolkit } from "./tools.ts";
​
const PROJECT_ID = ProjectId.make("project-1");
const THREAD_ID = ThreadId.make("thread-1");
@@ -353,6 +353,25 @@
}),
​
+ it.effect("asks a subagent thread to end with its PR report after it links", () =>
+ Effect.gen(function* () {
+ const harness = yield* makeHarness({
+ thread: {
+ ...makeThread([]),
+ lineage: {
+ rootThreadId: ThreadId.make("parent"),
+ parentThreadId: ThreadId.make("parent"),
+ relationshipToParent: "subagent",
+ },
+ },
+ });
+ const result = yield* harness.call("link_pull_request", {
+ url: "https://github.com/t3tools/t3code/pull/124",
+ });
+ expect(result).toMatchObject({ number: 124, next: CHILD_PULL_REQUEST_REPORT_NEXT });