From 25fac4ff8d394f69351618177c82d5b4b315c0ac Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Tue, 2 Jun 2026 23:18:23 -0400 Subject: [PATCH] refactor: move thinking content types to goose-types Signed-off-by: Jack Amadeo --- crates/goose-types/src/lib.rs | 11 +++++++++++ crates/goose/src/conversation/message.rs | 12 +----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/crates/goose-types/src/lib.rs b/crates/goose-types/src/lib.rs index 0c6cdbcac0f2..8c17568ec500 100644 --- a/crates/goose-types/src/lib.rs +++ b/crates/goose-types/src/lib.rs @@ -48,6 +48,17 @@ impl fmt::Display for ThinkingEffort { } } +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] +pub struct ThinkingContent { + pub thinking: String, + pub signature: String, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] +pub struct RedactedThinkingContent { + pub data: String, +} + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProviderUsage { pub model: String, diff --git a/crates/goose/src/conversation/message.rs b/crates/goose/src/conversation/message.rs index 83ab93211909..1173392f292e 100644 --- a/crates/goose/src/conversation/message.rs +++ b/crates/goose/src/conversation/message.rs @@ -2,6 +2,7 @@ use crate::conversation::tool_result_serde; use crate::mcp_utils::{extract_text_from_resource, ToolResult}; use crate::utils::sanitize_unicode_tags; use chrono::Utc; +pub use goose_types::{RedactedThinkingContent, ThinkingContent}; use rmcp::model::{ AnnotateAble, CallToolRequestParams, CallToolResult, Content, ImageContent, JsonObject, PromptMessage, PromptMessageContent, PromptMessageRole, RawContent, RawImageContent, @@ -220,17 +221,6 @@ pub struct ActionRequired { pub data: ActionRequiredData, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] -pub struct ThinkingContent { - pub thinking: String, - pub signature: String, -} - -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] -pub struct RedactedThinkingContent { - pub data: String, -} - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] #[serde(rename_all = "camelCase")] pub struct FrontendToolRequest {