Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(opencode): keep image file blocks in V2 tool results #21796

Closedfixfon(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/21796/headopened View on GitHub

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

x
0 of 3 viewed, 3 left
159 additions and 2 deletionsapps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.tsModified
View file
@@ -47,6 +47,7 @@
OPENCODE_PROVIDER,
t3McpServerName,
} from "@t3tools/provider-opencode/testing";
+import { toolOutputImages } from "@t3tools/shared/toolOutput";
import { resolveAttachmentPath } from "../../attachmentStore.ts";
import { openCode2ReplayRuntime } from "./OpenCode2AdapterV2.testkit.ts";
import {
@@ -2296,6 +2297,10 @@
active: Record<string, unknown>,
ended?: "succeeded",
assistant: Record<string, unknown> = {},
+ tool: { readonly name: string; readonly content: ReadonlyArray<unknown> } = {
+ name: "shell",
+ content: [{ type: "text", text: "GAP" }],
+ },
) => [
{ type: "runtime_exit", status: "success" } as const,
out("event.subscribe"),
@@ -2318,12 +2323,12 @@
type: "tool",
id: "call_gap",
- name: "shell",
+ name: tool.name,
executed: true,
state: {
status: "completed",