Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): let Stop end commands that outlived their turn #13388

Mergedjuliusmarmingemerged 5 commits intomain fromrefs/pull/13388/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 61 additions and 1 deletion.

x
0 of 2 viewed, 2 left
38 additions and 0 deletionsapps/server/src/provider/Layers/AntigravityAdapter.test.tsModified
View file
@@ -775,6 +775,44 @@
}),
​
+ it.effect("stops commands left running after a turn when the idle turn is stopped", () =>
+ Effect.gen(function* () {
+ const h = yield* makeHarness();
+ yield* h.adapter.startSession({
+ threadId,
+ cwd: process.cwd(),
+ runtimeMode: "approval-required",
+ });
+ const sending = yield* h.adapter
+ .sendTurn({ threadId, input: "Start a watcher" })
+ .pipe(Effect.forkChild);
+ const prompt = yield* h.nextPrompt;
+ yield* h.emitNative({
+ _tag: "ToolCallUpdated",
+ toolCall: {
+ toolCallId: "watcher-1",
+ kind: "execute",
+ status: "inProgress",
+ command: "tail -f log",
+ data: {},
+ },
+ rawPayload: {},
+ });
+ yield* Deferred.succeed(prompt.result, { stopReason: "end_turn" });
+ yield* Fiber.join(sending);
+ const started = yield* h.waitForEvent((event) => event.type === "task.started");