Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): notify parents when delegated children need approval #20928

ClosedLenoridev(GitHub profile, opens in a new tab)wants to merge 16 commits intomain fromrefs/pull/20928/headopened View on GitHub

Showing 7 changed files with 72 additions and 21 deletions (loading 5).

x
0 of 7 viewed, 7 left
25 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -1843,6 +1843,27 @@
wake,
completeSibling,
} = yield* queueCompletionWakeBesideRunningSibling("sibling-queued-cancel");
+ const questionMessageId = MessageId.make("sibling-queued-cancel-question");
+ yield* orchestrator.dispatch({
+ type: "message.dispatch",
+ commandId: CommandId.make("sibling-queued-cancel-question"),
+ threadId,
+ messageId: questionMessageId,
+ text: "Delegated task has a question",
+ notification: {
+ source: {
+ kind: "delegated_task",
+ taskIds: [sibling.id],
+ childThreadId: sibling.childThreadId!,
+ },
+ outcome: "updated",
+ summary: "Delegated task has a question",
+ },
+ attachments: [],
+ dispatchMode: { type: "queue_after_active" },
+ createdBy: "agent",
+ creationSource: "server",
+ });
const cancelled = yield* orchestrator.dispatch({
type: "queued-run.cancel",
commandId: CommandId.make("sibling-queued-cancel-cancel"),
@@ -1867,6 +1888,10 @@