Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): slash commands sent during a turn wait instead of steering #32633

Closedjuliusmarmingewants to merge 7 commits intomain fromrefs/pull/32633/headopened View on GitHub

Showing 6 changed files with 94 additions and 67 deletions (loading 4).

x
0 of 6 viewed, 6 left
67 additions and 67 deletionsapps/server/src/orchestration-v2/CommandPolicy.test.tsModified
View file
@@ -63,25 +63,30 @@
} as unknown as OrchestrationV2ThreadProjection;
​
+function resolveDispatch(
+ projection: OrchestrationV2ThreadProjection,
+ dispatchMode: Parameters<typeof CommandPolicy.resolveMessageDispatchIntent>[1]["dispatchMode"],
+ deliveryIntent?: "auto" | "steer" | "restart",
+ text = "next",
+) {
+ return CommandPolicy.resolveMessageDispatchIntent(projection, {
+ dispatchMode,
+ ...(deliveryIntent === undefined ? {} : { deliveryIntent }),
+ text,
+ attachments: [],
+ });
+}
+​
it("resolves automatic message delivery from authoritative provider capabilities", () => {
+ assert.deepEqual(resolveDispatch(dispatchProjection(), { type: "start_immediately" }, "auto"), {
+ type: "start_immediately",
+ });
assert.deepEqual(
- CommandPolicy.resolveMessageDispatchIntent(
- dispatchProjection(),
- { type: "start_immediately" },
- "auto",
- ),
- { type: "start_immediately" },
- );