fix(tom): read messages from config (#12634)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Create Minor Release PR / release (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test TLS Backend (rustls-tls) (push) Has been cancelled
Canary / bundle-macos-arm64 (push) Has been cancelled
Canary / bundle-macos-x64 (push) Has been cancelled
Canary / bundle-windows (push) Has been cancelled
Canary / bundle-windows-cuda (push) Has been cancelled
Canary / Release (push) Has been cancelled
Canary / build-cli-linux (push) Has been cancelled
CI / goose ACP npm packages (push) Has been cancelled
CI / Check and Test GDK Agent Crates on wasm32 (push) Has been cancelled
CI / Check goose-sdk UniFFI (push) Has been cancelled
CI / Test Kotlin GDK package (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Build Lean ACP Binary (push) Has been cancelled
CI / Build and Test TLS Backend (native-tls) (push) Has been cancelled
CI / Build and Test Roaming Feature (push) Has been cancelled
CI / Check MSRV (push) Has been cancelled
CI / Check Generated Schemas are Up-to-Date (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
CI / Test Desktop Updater Install (ubuntu-latest) (push) Has been cancelled
CI / Test Desktop Updater Install (windows-latest) (push) Has been cancelled
MCP Conformance / Conformance 2025-11-25 / 0.1.16 (push) Has been cancelled
MCP Conformance / Conformance 2025-11-25 / 0.2.0-alpha.10 (push) Has been cancelled
MCP Conformance / Conformance 2026-07-28 / 0.2.0-alpha.10 (push) Has been cancelled
Live Provider Tests / changes (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
Unused Dependencies / machete (push) Has been cancelled
CI / Check GDK Release Configuration (push) Has been cancelled
CI / Check GDK API Reference is Up-to-Date (push) Has been cancelled
Create Minor Release PR / check-version-bump-pr (push) Has been cancelled
Buzz automation / test (push) Has been cancelled
Canary / Prepare Version (push) Has been cancelled
Canary / Upload Install Script (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
CI / changes (push) Has been cancelled
Prepare GDK release / Create or update GDK release PR (push) Has been cancelled
MCP Conformance / Build Conformance Binaries (push) Has been cancelled
Live Provider Tests / check-fork (push) Has been cancelled
Publish Docker Image / docker (push) Has been cancelled

This commit is contained in:
Douwe Osinga 2026-10-02 15:03:24 +00:00 • committed by GitHub
parent aa294302fe
commit 591edd47cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<String> {
let mut parts = Vec::new();
if let Ok(text) = std::env::var("GOOSE_MOIM_MESSAGE_TEXT") {
if let Ok(text) = Config::global().get_param::<String>("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::<String>("GOOSE_MOIM_MESSAGE_FILE") {
let expanded = shellexpand::tilde(&path);
if let Some(content) = read_bounded(&expanded).await {
if !content.trim().is_empty() {