fix(plugin): preserve tool attachments (#27157)

This commit is contained in:
Aiden Cline
2026-05-12 16:23:15 -05:00
committed by GitHub
parent 159964b172
commit cb511f78ff
3 changed files with 68 additions and 2 deletions

View File

@@ -27,7 +27,21 @@ type AskInput = {
metadata: { [key: string]: any }
}
export type ToolResult = string | { output: string; metadata?: { [key: string]: any } }
export type ToolAttachment = {
type: "file"
mime: string
url: string
filename?: string
}
export type ToolResult =
| string
| {
title?: string
output: string
metadata?: { [key: string]: any }
attachments?: ToolAttachment[]
}
export function tool<Args extends z.ZodRawShape>(input: {
description: string