mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-19 18:35:18 +02:00
fixed review comments
This commit is contained in:
parent
5d78d66b00
commit
a0a7933a7c
8 changed files with 53 additions and 76 deletions
|
|
@ -28,15 +28,6 @@ export const AssistantContentPart = z.union([
|
|||
ToolCallPart,
|
||||
]);
|
||||
|
||||
// Metadata about an attached file or image
|
||||
export const Attachment = z.object({
|
||||
type: z.enum(["file", "image"]), // extensible — could add "url", "audio" later
|
||||
path: z.string(), // absolute file path
|
||||
filename: z.string(), // display name ("photo.png")
|
||||
mediaType: z.string(), // MIME type ("image/png", "text/plain")
|
||||
size: z.number().optional(), // bytes
|
||||
});
|
||||
|
||||
// A piece of user-typed text within a content array
|
||||
export const UserTextPart = z.object({
|
||||
type: z.literal("text"),
|
||||
|
|
@ -46,7 +37,10 @@ export const UserTextPart = z.object({
|
|||
// An attachment within a content array
|
||||
export const UserAttachmentPart = z.object({
|
||||
type: z.literal("attachment"),
|
||||
attachment: Attachment,
|
||||
path: z.string(), // absolute file path
|
||||
filename: z.string(), // display name ("photo.png")
|
||||
mimeType: z.string(), // MIME type ("image/png", "text/plain")
|
||||
size: z.number().optional(), // bytes
|
||||
});
|
||||
|
||||
// Any single part of a user message (text or attachment)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue