Skip to content

Commit 210e3f7

Browse files
committed
Add missing constraints
1 parent 06f6273 commit 210e3f7

File tree

2 files changed

+78
-16
lines changed

2 files changed

+78
-16
lines changed

special-pages/pages/new-tab/messages/omnibar_submitChat.notify.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
"$ref": "./types/open-target.json"
1616
},
1717
"modelId": {
18-
"description": "The selected AI model identifier",
18+
"description": "The selected AI model identifier. Optional - if not provided, the backend will use the default model.",
1919
"type": "string"
2020
},
2121
"images": {
22-
"description": "Images to attach to the chat",
22+
"description": "Images to attach to the chat. Optional - maximum 3 images, each up to 5MB. WebP images are converted to PNG.",
2323
"type": "array",
24+
"maxItems": 3,
2425
"items": {
2526
"type": "object",
2627
"required": ["data", "format"],
@@ -30,8 +31,9 @@
3031
"type": "string"
3132
},
3233
"format": {
33-
"description": "Image format, e.g. jpeg, png, webp",
34-
"type": "string"
34+
"description": "Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.",
35+
"type": "string",
36+
"enum": ["jpeg", "png"]
3537
}
3638
}
3739
}

special-pages/pages/new-tab/types/new-tab.ts

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -608,22 +608,82 @@ export interface SubmitChatAction {
608608
chat: string;
609609
target: OpenTarget;
610610
/**
611-
* The selected AI model identifier
611+
* The selected AI model identifier. Optional - if not provided, the backend will use the default model.
612612
*/
613613
modelId?: string;
614614
/**
615-
* Images to attach to the chat
615+
* Images to attach to the chat. Optional - maximum 3 images, each up to 5MB. WebP images are converted to PNG.
616+
*
617+
* @maxItems 3
616618
*/
617-
images?: {
618-
/**
619-
* Base64-encoded image data (without data URL prefix)
620-
*/
621-
data: string;
622-
/**
623-
* Image format, e.g. jpeg, png, webp
624-
*/
625-
format: string;
626-
}[];
619+
images?:
620+
| []
621+
| [
622+
{
623+
/**
624+
* Base64-encoded image data (without data URL prefix)
625+
*/
626+
data: string;
627+
/**
628+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
629+
*/
630+
format: "jpeg" | "png";
631+
}
632+
]
633+
| [
634+
{
635+
/**
636+
* Base64-encoded image data (without data URL prefix)
637+
*/
638+
data: string;
639+
/**
640+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
641+
*/
642+
format: "jpeg" | "png";
643+
},
644+
{
645+
/**
646+
* Base64-encoded image data (without data URL prefix)
647+
*/
648+
data: string;
649+
/**
650+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
651+
*/
652+
format: "jpeg" | "png";
653+
}
654+
]
655+
| [
656+
{
657+
/**
658+
* Base64-encoded image data (without data URL prefix)
659+
*/
660+
data: string;
661+
/**
662+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
663+
*/
664+
format: "jpeg" | "png";
665+
},
666+
{
667+
/**
668+
* Base64-encoded image data (without data URL prefix)
669+
*/
670+
data: string;
671+
/**
672+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
673+
*/
674+
format: "jpeg" | "png";
675+
},
676+
{
677+
/**
678+
* Base64-encoded image data (without data URL prefix)
679+
*/
680+
data: string;
681+
/**
682+
* Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.
683+
*/
684+
format: "jpeg" | "png";
685+
}
686+
];
627687
}
628688
/**
629689
* Generated from @see "../messages/omnibar_submitSearch.notify.json"

0 commit comments

Comments
 (0)