refactor(core): simplify location filesystem (#31545)

This commit is contained in:
Dax
2026-06-09 14:28:45 -04:00
committed by GitHub
parent 0777cf1ccf
commit 132ef57272
73 changed files with 1054 additions and 1422 deletions
+7 -6
View File
@@ -93,19 +93,20 @@ export function make<Input extends SchemaType<any>, Output extends SchemaType<an
),
),
Effect.map((output) =>
ToolOutput.make(
output,
config.toModelOutput?.({ input, output }).map((part) =>
({
structured: output,
content:
config.toModelOutput?.({ input, output }).map((part) =>
part.type === "text"
? { type: "text" as const, text: part.text }
: {
type: "file" as const,
source: { type: "data" as const, data: part.data },
uri: `data:${part.mime};base64,${part.data}`,
mime: part.mime,
name: part.name,
},
) ?? (typeof output === "string" ? [{ type: "text", text: output }] : []),
),
) ?? (typeof output === "string" ? [{ type: "text" as const, text: output }] : []),
}),
),
),
),