From 5a9b9a40771e94cbefee8fe8940f06bbc51aede1 Mon Sep 17 00:00:00 2001 From: ByteBaker <42913098+ByteBaker@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:31:06 +0530 Subject: [PATCH] fix: build issue due to missing struct field 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 6bd90b588..e9151a3e7 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