mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
Register IconTheme in OpenAPI schema after rmcp 1.5.0 upgrade (#8621)
Signed-off-by: jh-block <jhugo@block.xyz>
This commit is contained in:
@@ -10,8 +10,8 @@ use goose::permission::permission_confirmation::{Permission, PrincipalType};
|
||||
use goose::providers::base::{ConfigKey, ModelInfo, ProviderMetadata, ProviderType};
|
||||
use goose::session::{Session, SessionInsights, SessionType, SystemInfo};
|
||||
use rmcp::model::{
|
||||
Annotations, Content, EmbeddedResource, Icon, ImageContent, JsonObject, RawAudioContent,
|
||||
RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent,
|
||||
Annotations, Content, EmbeddedResource, Icon, IconTheme, ImageContent, JsonObject,
|
||||
RawAudioContent, RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent,
|
||||
ResourceContents, Role, TaskSupport, TextContent, Tool, ToolAnnotations, ToolExecution,
|
||||
};
|
||||
use utoipa::{OpenApi, ToSchema};
|
||||
@@ -378,6 +378,7 @@ derive_utoipa!(Annotations as AnnotationsSchema);
|
||||
derive_utoipa!(ResourceContents as ResourceContentsSchema);
|
||||
derive_utoipa!(JsonObject as JsonObjectSchema);
|
||||
derive_utoipa!(Icon as IconSchema);
|
||||
derive_utoipa!(IconTheme as IconThemeSchema);
|
||||
|
||||
#[derive(OpenApi)]
|
||||
#[openapi(
|
||||
@@ -577,6 +578,7 @@ derive_utoipa!(Icon as IconSchema);
|
||||
SystemInfo,
|
||||
Conversation,
|
||||
IconSchema,
|
||||
IconThemeSchema,
|
||||
goose::session::extension_data::ExtensionData,
|
||||
super::routes::schedule::CreateScheduleRequest,
|
||||
super::routes::schedule::UpdateScheduleRequest,
|
||||
|
||||
@@ -5549,9 +5549,35 @@
|
||||
},
|
||||
"src": {
|
||||
"type": "string"
|
||||
},
|
||||
"theme": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IconTheme"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"IconTheme": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"light"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dark"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ImageContent": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -549,8 +549,13 @@ export type Icon = {
|
||||
mimeType?: string;
|
||||
sizes?: Array<string>;
|
||||
src: string;
|
||||
theme?: IconTheme | {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
|
||||
export type IconTheme = 'light' | 'dark';
|
||||
|
||||
export type ImageContent = {
|
||||
_meta?: {
|
||||
[key: string]: unknown;
|
||||
|
||||
Reference in New Issue
Block a user