summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-01-16 09:34:00 -0600
committerAiden Cline <[email protected]>2026-01-16 09:34:00 -0600
commitd510bd52a4990501f15f73dc01e1186b76014c09 (patch)
treecf283282bcf1927a84bf33ec19574e85fff2bcdf
parente0a854f03518ee1580ff30395fa090cda03bdbc0 (diff)
downloadopencode-d510bd52a4990501f15f73dc01e1186b76014c09.tar.gz
opencode-d510bd52a4990501f15f73dc01e1186b76014c09.zip
Revert "test: fix test now that image fix went in"
This reverts commit fffa718f5ef80ae9e49bb6b6aef55ecb8f947e77.
-rw-r--r--packages/opencode/test/session/message-v2.test.ts28
1 files changed, 13 insertions, 15 deletions
diff --git a/packages/opencode/test/session/message-v2.test.ts b/packages/opencode/test/session/message-v2.test.ts
index 4b9f3bf19..f069f6ba6 100644
--- a/packages/opencode/test/session/message-v2.test.ts
+++ b/packages/opencode/test/session/message-v2.test.ts
@@ -265,6 +265,18 @@ describe("session.message-v2.toModelMessage", () => {
content: [{ type: "text", text: "run tool" }],
},
{
+ role: "user",
+ content: [
+ { type: "text", text: "Tool bash returned an attachment:" },
+ {
+ type: "file",
+ mediaType: "image/png",
+ filename: "attachment.png",
+ data: "https://example.com/attachment.png",
+ },
+ ],
+ },
+ {
role: "assistant",
content: [
{ type: "text", text: "done", providerOptions: { openai: { assistant: "meta" } } },
@@ -285,21 +297,7 @@ describe("session.message-v2.toModelMessage", () => {
type: "tool-result",
toolCallId: "call-1",
toolName: "bash",
- output: {
- type: "json",
- value: {
- output: "ok",
- attachments: [
- {
- ...basePart(assistantID, "file-1"),
- type: "file",
- mime: "image/png",
- filename: "attachment.png",
- url: "https://example.com/attachment.png",
- },
- ],
- },
- },
+ output: { type: "text", value: "ok" },
providerOptions: { openai: { tool: "meta" } },
},
],