Skip to content

Commit 926cb33

Browse files
authored
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.
1 parent a2fc90a commit 926cb33

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/rmcp/src/model.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,13 @@ pub enum Reference {
12271227
impl Reference {
12281228
/// Create a prompt reference
12291229
pub fn for_prompt(name: impl Into<String>) -> Self {
1230-
Self::Prompt(PromptReference { name: name.into() })
1230+
// Not accepting `title` currently as it'll break the API
1231+
// Until further decision, keep it `None`, modify later
1232+
// if required, add `title` to the API
1233+
Self::Prompt(PromptReference {
1234+
name: name.into(),
1235+
title: None,
1236+
})
12311237
}
12321238

12331239
/// Create a resource reference

0 commit comments

Comments
 (0)