From 926cb3384550221887e34f8729055c4e7da65a76 Mon Sep 17 00:00:00 2001 From: sktrpathi <42913098+ByteBaker@users.noreply.github.com> Date: Mon, 8 Sep 2025 13:06:36 +0530 Subject: [PATCH] fix: build issue due to missing struct field (#427) Commit 452fe2c broke `Reference::for_prompt` where it missed the field `title` for `struct PromptReference`, which broke the build. This commit fixes that. --- crates/rmcp/src/model.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/rmcp/src/model.rs b/crates/rmcp/src/model.rs index 6bd90b5..e9151a3 100644 --- a/crates/rmcp/src/model.rs +++ b/crates/rmcp/src/model.rs @@ -1227,7 +1227,13 @@ pub enum Reference { impl Reference { /// Create a prompt reference pub fn for_prompt(name: impl Into) -> Self { - Self::Prompt(PromptReference { name: name.into() }) + // Not accepting `title` currently as it'll break the API + // Until further decision, keep it `None`, modify later + // if required, add `title` to the API + Self::Prompt(PromptReference { + name: name.into(), + title: None, + }) } /// Create a resource reference