fix(plugin): preserve tool attachments (#27157)
This commit is contained in:
parent
159964b172
commit
cb511f78ff
3 changed files with 68 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue