Aiden Cline 3 miesięcy temu
rodzic
commit
d65f09b82a
1 zmienionych plików z 17 dodań i 1 usunięć
  1. 17 1
      packages/opencode/test/session/message-v2.test.ts

+ 17 - 1
packages/opencode/test/session/message-v2.test.ts

@@ -297,7 +297,23 @@ describe("session.message-v2.toModelMessage", () => {
             type: "tool-result",
             toolCallId: "call-1",
             toolName: "bash",
-            output: { type: "text", value: "ok" },
+            output: {
+              type: "json",
+              value: {
+                attachments: [
+                  {
+                    id: "file-1",
+                    sessionID: "session",
+                    messageID: "m-assistant",
+                    type: "file",
+                    mime: "image/png",
+                    filename: "attachment.png",
+                    url: "https://example.com/attachment.png",
+                  },
+                ],
+                output: "ok",
+              },
+            },
             providerOptions: { openai: { tool: "meta" } },
           },
         ],