You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* new `environment_sync_from_user` tool: applies user's unstaged changes
to the env, commits, syncs the env back to the user (bidirectional)
* `git reset --hard` is now done after creating a refless stash, so the
user can bring everything back if something goes wrong
* add `Environment.ApplyPatch`, which currently depends on `patch` being
available in the environment
* clean up all the git code that wasn't using helpers
Signed-off-by: Alex Suraci <suraci.alex@gmail.com>
Copy file name to clipboardExpand all lines: mcpserver/tools.go
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ import (
10
10
"log/slog"
11
11
"os"
12
12
"os/signal"
13
+
"strings"
13
14
"syscall"
14
15
15
16
"dagger.io/dagger"
@@ -143,6 +144,8 @@ func init() {
143
144
EnvironmentAddServiceTool,
144
145
145
146
EnvironmentCheckpointTool,
147
+
148
+
EnvironmentSyncFromUserTool,
146
149
)
147
150
}
148
151
@@ -824,3 +827,44 @@ Supported schemas are:
824
827
returnmcp.NewToolResultText(fmt.Sprintf("Service added and started successfully: %s", string(output))), nil
825
828
},
826
829
}
830
+
831
+
varEnvironmentSyncFromUserTool=&Tool{
832
+
Definition: newEnvironmentTool(
833
+
"environment_sync_from_user",
834
+
"Apply the user's unstaged changes to the environment and apply the environment's to the user's local worktree. ONLY RUN WHEN EXPLICITLY REQUESTED BY THE USER.",
0 commit comments