Skip to content

Commit fffa718

Browse files
committed
test: fix test now that image fix went in
1 parent cce4f64 commit fffa718

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

packages/opencode/test/session/message-v2.test.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,6 @@ describe("session.message-v2.toModelMessage", () => {
264264
role: "user",
265265
content: [{ type: "text", text: "run tool" }],
266266
},
267-
{
268-
role: "user",
269-
content: [
270-
{ type: "text", text: "Tool bash returned an attachment:" },
271-
{
272-
type: "file",
273-
mediaType: "image/png",
274-
filename: "attachment.png",
275-
data: "https://example.com/attachment.png",
276-
},
277-
],
278-
},
279267
{
280268
role: "assistant",
281269
content: [
@@ -297,7 +285,21 @@ describe("session.message-v2.toModelMessage", () => {
297285
type: "tool-result",
298286
toolCallId: "call-1",
299287
toolName: "bash",
300-
output: { type: "text", value: "ok" },
288+
output: {
289+
type: "json",
290+
value: {
291+
output: "ok",
292+
attachments: [
293+
{
294+
...basePart(assistantID, "file-1"),
295+
type: "file",
296+
mime: "image/png",
297+
filename: "attachment.png",
298+
url: "https://example.com/attachment.png",
299+
},
300+
],
301+
},
302+
},
301303
providerOptions: { openai: { tool: "meta" } },
302304
},
303305
],

0 commit comments

Comments
 (0)