Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-acp): multi-line acp-mcp-call fallbacks project as T3 tool calls #43731

Closedjuliusmarmingewants to merge 5 commits intomain fromrefs/pull/43731/headopened View on GitHub

Showing 5 changed files with 154 additions and 2 deletions (loading 3).

x
0 of 5 viewed, 5 left
129 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -42,6 +42,7 @@
import * as HostProcess from "@t3tools/shared/HostProcess";
import { deriveBlockedOnThreadWait } from "@t3tools/shared/orchestrationV2PendingBackgroundWork";
import { resolveSelfInvocation } from "@t3tools/shared/nodeRuntime";
+import { htmlRenderFromToolItem } from "@t3tools/shared/toolOutput";
import * as DateTime from "effect/DateTime";
import * as Deferred from "effect/Deferred";
import * as Duration from "effect/Duration";
@@ -4736,6 +4737,134 @@
}).pipe(Effect.provide(layerTest)),
+ it.effect("shows the page an acp-mcp-call html_render fallback published through stdin", () =>
+ Effect.gen(function* () {
+ const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
+ const mockAgentPath = yield* bundledMockAgentPath;
+ const mcpSessions = yield* McpProviderSessions.McpProviderSessions;
+ type Runtime = AcpSessionRuntime.AcpSessionRuntime["Service"];
+ let handler: Parameters<Runtime["handleSessionUpdate"]>[0] | undefined;
+ const instanceId = ProviderInstanceId.make("acp-html-render-stdin");
+ const threadId = ThreadId.make("thread-acp-html-render-stdin");
+ const page = { attachmentId: `${threadId}-page-html`, title: "Report", height: 300 };
+ const pageInput = {
+ html: "<p>Report</p>",
+ path: "/abs/page.html",
+ title: "Report",
+ height: 300,
+ };
+ const adapter = yield* makeAcpAdapterV2({