Skip to content

Commit beb3d2d

Browse files
StiensWoutcodexclaude
committed
refactor(acp): route generic child output chunks in their own branch
Co-authored-by: GPT 6.1 Sol <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent df5f8cf commit beb3d2d

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,9 +2305,6 @@ describe("AcpRegistryAdapterV2", () => {
23052305
assert.equal(nestedTool.turnItem.threadId, row.subagent.childThreadId);
23062306
if (nestedTool.turnItem.type === "dynamic_tool") {
23072307
assert.deepEqual(nestedTool.turnItem.input, { command: "cat nested/package.json" });
2308-
assert.deepEqual(nestedTool.turnItem.output, [
2309-
{ type: "content", content: { type: "text", text: "onetwo" } },
2310-
]);
23112308
assert.equal(nestedTool.turnItem.status, "completed");
23122309
}
23132310
const toolUpdates = nested.flatMap((event) =>

‎packages/provider-acp/src/server/adapter.ts‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5314,14 +5314,22 @@ export const makeAcpAdapterV2 = Effect.fn("makeAcpAdapterV2")(function* (
53145314
}
53155315
return;
53165316
}
5317+
if (update.sessionUpdate === "tool_call_content_chunk") {
5318+
if (subagent !== undefined)
5319+
yield* projectSubagentTool(
5320+
subagent,
5321+
notification.sessionId,
5322+
update,
5323+
undefined,
5324+
context,
5325+
);
5326+
return;
5327+
}
53175328
const isDisplayableAssistantUpdate =
53185329
(update.sessionUpdate === "agent_message_chunk" &&
53195330
acpContentBlockDisplayText(update.content) !== undefined) ||
53205331
(update.sessionUpdate === "agent_message" && update.content !== undefined);
5321-
if (
5322-
!isDisplayableAssistantUpdate &&
5323-
!(subagent !== undefined && update.sessionUpdate === "tool_call_content_chunk")
5324-
) {
5332+
if (!isDisplayableAssistantUpdate) {
53255333
return;
53265334
}
53275335
if (subagent !== undefined) {

0 commit comments

Comments
 (0)