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::providers::base::{ConfigKey, ModelInfo, ProviderMetadata, ProviderType};
|
||||||
use goose::session::{Session, SessionInsights, SessionType, SystemInfo};
|
use goose::session::{Session, SessionInsights, SessionType, SystemInfo};
|
||||||
use rmcp::model::{
|
use rmcp::model::{
|
||||||
Annotations, Content, EmbeddedResource, Icon, ImageContent, JsonObject, RawAudioContent,
|
Annotations, Content, EmbeddedResource, Icon, IconTheme, ImageContent, JsonObject,
|
||||||
RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent,
|
RawAudioContent, RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent,
|
||||||
ResourceContents, Role, TaskSupport, TextContent, Tool, ToolAnnotations, ToolExecution,
|
ResourceContents, Role, TaskSupport, TextContent, Tool, ToolAnnotations, ToolExecution,
|
||||||
};
|
};
|
||||||
use utoipa::{OpenApi, ToSchema};
|
use utoipa::{OpenApi, ToSchema};
|
||||||
@@ -378,6 +378,7 @@ derive_utoipa!(Annotations as AnnotationsSchema);
|
|||||||
derive_utoipa!(ResourceContents as ResourceContentsSchema);
|
derive_utoipa!(ResourceContents as ResourceContentsSchema);
|
||||||
derive_utoipa!(JsonObject as JsonObjectSchema);
|
derive_utoipa!(JsonObject as JsonObjectSchema);
|
||||||
derive_utoipa!(Icon as IconSchema);
|
derive_utoipa!(Icon as IconSchema);
|
||||||
|
derive_utoipa!(IconTheme as IconThemeSchema);
|
||||||
|
|
||||||
#[derive(OpenApi)]
|
#[derive(OpenApi)]
|
||||||
#[openapi(
|
#[openapi(
|
||||||
@@ -577,6 +578,7 @@ derive_utoipa!(Icon as IconSchema);
|
|||||||
SystemInfo,
|
SystemInfo,
|
||||||
Conversation,
|
Conversation,
|
||||||
IconSchema,
|
IconSchema,
|
||||||
|
IconThemeSchema,
|
||||||
goose::session::extension_data::ExtensionData,
|
goose::session::extension_data::ExtensionData,
|
||||||
super::routes::schedule::CreateScheduleRequest,
|
super::routes::schedule::CreateScheduleRequest,
|
||||||
super::routes::schedule::UpdateScheduleRequest,
|
super::routes::schedule::UpdateScheduleRequest,
|
||||||
|
|||||||
@@ -5549,9 +5549,35 @@
|
|||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"theme": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/IconTheme"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"IconTheme": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"light"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"dark"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"ImageContent": {
|
"ImageContent": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -549,8 +549,13 @@ export type Icon = {
|
|||||||
mimeType?: string;
|
mimeType?: string;
|
||||||
sizes?: Array<string>;
|
sizes?: Array<string>;
|
||||||
src: string;
|
src: string;
|
||||||
|
theme?: IconTheme | {
|
||||||
|
[key: string]: unknown;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type IconTheme = 'light' | 'dark';
|
||||||
|
|
||||||
export type ImageContent = {
|
export type ImageContent = {
|
||||||
_meta?: {
|
_meta?: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
|
|||||||
Reference in New Issue
Block a user