Skip to content

Commit f18e0b6

Browse files
dingfelikensave
authored andcommitted
fix: tests for rmcp type changes (#3037)
1 parent 656022f commit f18e0b6

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

crates/chat-cli/src/cli/chat/cli/prompts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,15 +2462,19 @@ mod tests {
24622462
let prompt1 = rmcp::model::Prompt {
24632463
name: "test_prompt".to_string(),
24642464
description: Some("Test description".to_string()),
2465+
title: None,
2466+
icons: None,
24652467
arguments: Some(vec![
24662468
PromptArgument {
24672469
name: "arg1".to_string(),
24682470
description: Some("First argument".to_string()),
2471+
title: None,
24692472
required: Some(true),
24702473
},
24712474
PromptArgument {
24722475
name: "arg2".to_string(),
24732476
description: None,
2477+
title: None,
24742478
required: Some(false),
24752479
},
24762480
]),

crates/chat-cli/src/cli/chat/cli/reply.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
use clap::Args;
22
use crossterm::execute;
3-
use crossterm::style::{self, Color};
3+
use crossterm::style::{
4+
self,
5+
Color,
6+
};
47

58
use super::editor::open_editor;
6-
use crate::cli::chat::{ChatError, ChatSession, ChatState};
9+
use crate::cli::chat::{
10+
ChatError,
11+
ChatSession,
12+
ChatState,
13+
};
714

815
/// Arguments to the `/reply` command.
916
#[deny(missing_docs)]

crates/chat-cli/src/cli/chat/tool_manager.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,8 @@ mod tests {
21132113
let prompt = rmcp::model::Prompt {
21142114
name: "test_prompt".to_string(),
21152115
description: Some("Test description".to_string()),
2116+
title: None,
2117+
icons: None,
21162118
arguments: None,
21172119
};
21182120

@@ -2126,7 +2128,7 @@ mod tests {
21262128
prompt_get: prompt,
21272129
};
21282130

2129-
let bundles = vec![&bundle1, &bundle2];
2131+
let bundles = [&bundle1, &bundle2];
21302132

21312133
// Test finding specific server
21322134
let found = bundles.iter().find(|b| b.server_name == "server1");

0 commit comments

Comments
 (0)