diff --git a/crates/goose/src/agents/platform_extensions/tom.rs b/crates/goose/src/agents/platform_extensions/tom.rs index c5e88b5a47..6263b915db 100644 --- a/crates/goose/src/agents/platform_extensions/tom.rs +++ b/crates/goose/src/agents/platform_extensions/tom.rs @@ -1,6 +1,7 @@ use crate::agents::extension::PlatformExtensionContext; use crate::agents::mcp_client::{Error, McpClientTrait}; use crate::agents::tool_execution::ToolCallContext; +use crate::config::Config; use anyhow::Result; use async_trait::async_trait; use rmcp::model::{ @@ -64,13 +65,13 @@ impl McpClientTrait for TomClient { async fn get_moim(&self, _session_id: &str) -> Option { let mut parts = Vec::new(); - if let Ok(text) = std::env::var("GOOSE_MOIM_MESSAGE_TEXT") { + if let Ok(text) = Config::global().get_param::("GOOSE_MOIM_MESSAGE_TEXT") { if !text.trim().is_empty() { parts.push(truncate_utf8(text)); } } - if let Ok(path) = std::env::var("GOOSE_MOIM_MESSAGE_FILE") { + if let Ok(path) = Config::global().get_param::("GOOSE_MOIM_MESSAGE_FILE") { let expanded = shellexpand::tilde(&path); if let Some(content) = read_bounded(&expanded).await { if !content.trim().is_empty() {