Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add worktree handoff and status tools to the t3-code MCP server #3754

Mergednsxdavid(GitHub profile, opens in a new tab)merged 5 commits intot3code/codex-turn-mapping fromrefs/pull/3754/headmerged by juliusmarminge View on GitHub

Showing 19 changed files with 163 additions and 0 deletions (loading 16).

x
0 of 19 viewed, 19 left
5 additions and 0 deletionsapps/server/src/git/GitWorkflowService.tsModified
View file
@@ -65,6 +65,7 @@
readonly createWorktree: (
input: VcsCreateWorktreeInput,
) => Effect.Effect<VcsCreateWorktreeResult, GitCommandError>;
+ readonly listLocalBranchNames: (cwd: string) => Effect.Effect<string[], GitCommandError>;
readonly fetchRemote: (input: {
readonly cwd: string;
readonly remoteName: string;
@@ -299,6 +300,10 @@
ensureGitCommand("GitWorkflowService.createWorktree", input.cwd).pipe(
Effect.andThen(git.createWorktree(input)),
+ listLocalBranchNames: (cwd) =>
+ ensureGitCommand("GitWorkflowService.listLocalBranchNames", cwd).pipe(
+ Effect.andThen(git.listLocalBranchNames(cwd)),
+ ),
fetchRemote: (input) =>
ensureGitCommand("GitWorkflowService.fetchRemote", input.cwd).pipe(
Effect.andThen(git.fetchRemote(input)),
22 additions and 0 deletionsapps/server/src/mcp/toolkits/worktree/handlers.tsAdded
View file
@@ -0,0 +1,22 @@
+import * as Effect from "effect/Effect";
+​
+import { McpInvocationContext } from "../../McpInvocationContext.ts";
+import { WorktreeMcpService } from "../../WorktreeMcpService.ts";
+import { WorktreeToolkit } from "./tools.ts";
+​