File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
packages/opencode/test/session Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff 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 ] ,
You can’t perform that action at this time.
0 commit comments