|
|
@@ -264,18 +264,6 @@ describe("session.message-v2.toModelMessage", () => {
|
|
|
role: "user",
|
|
|
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: [
|
|
|
@@ -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" } },
|
|
|
},
|
|
|
],
|