diff options
| author | Aiden Cline <[email protected]> | 2026-01-16 00:11:21 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2026-01-16 00:11:30 -0600 |
| commit | fffa718f5ef80ae9e49bb6b6aef55ecb8f947e77 (patch) | |
| tree | 712d29d53d0f40d282168a2ef2e58bf898ea711a | |
| parent | cce4f64e0b4cff67f49a1fcb5d88421679c9a9f5 (diff) | |
| download | opencode-fffa718f5ef80ae9e49bb6b6aef55ecb8f947e77.tar.gz opencode-fffa718f5ef80ae9e49bb6b6aef55ecb8f947e77.zip | |
test: fix test now that image fix went in
| -rw-r--r-- | packages/opencode/test/session/message-v2.test.ts | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/packages/opencode/test/session/message-v2.test.ts b/packages/opencode/test/session/message-v2.test.ts index f069f6ba6..4b9f3bf19 100644 --- a/packages/opencode/test/session/message-v2.test.ts +++ b/packages/opencode/test/session/message-v2.test.ts @@ -265,18 +265,6 @@ 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" } } }, @@ -297,7 +285,21 @@ describe("session.message-v2.toModelMessage", () => { type: "tool-result", toolCallId: "call-1", toolName: "bash", - output: { type: "text", value: "ok" }, + 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", + }, + ], + }, + }, providerOptions: { openai: { tool: "meta" } }, }, ], |
