Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-grok): steer queued messages into a running Grok turn #37335

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/37335/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 111 additions and 37 deletions (loading 1).

x
0 of 4 viewed, 4 left
17 additions and 0 deletionsapps/server/src/orchestration-v2/CommandPolicy.test.tsModified
View file
@@ -234,6 +234,23 @@
});
​
+// regression: #37326 a steered Grok follow-up waits for the turn to end instead of interjecting
+it("steers a Grok follow-up into its running turn without restarting it", () => {
+ const grok = makeGrokAcpAdapterFlavor(
+ { makeRuntime: () => Effect.never } as unknown as Parameters<
+ typeof makeGrokAcpAdapterFlavor
+ >[0],
+ "/home/ada",
+ ).capabilities;
+ const mode = CommandPolicy.resolveMessageDispatchIntent(
+ dispatchProjection(grok),
+ { type: "start_immediately" },
+ "steer",
+ );
+ assert.strictEqual(mode.type, "steer_active");
+ assert.isTrue(grok.turns.supportsActiveSteering);
+});
+​
it.each(["/compact", " /LOGOUT "])("queues a steer sent while %s runs", (text) => {
const projection = dispatchProjection(baseCapabilities);
const maintenance = {
59 additions and 36 deletionspackages/provider-acp/src/server/adapter.tsModified
View file
@@ -501,14 +501,16 @@
/**