extensions: add a display name field (#1759)
This commit is contained in:
@@ -134,7 +134,12 @@ impl Capabilities {
|
||||
);
|
||||
Box::new(McpClient::new(service))
|
||||
}
|
||||
ExtensionConfig::Builtin { name, timeout } => {
|
||||
#[allow(unused_variables)]
|
||||
ExtensionConfig::Builtin {
|
||||
name,
|
||||
display_name,
|
||||
timeout,
|
||||
} => {
|
||||
// For builtin extensions, we run the current executable with mcp and extension name
|
||||
let cmd = std::env::current_exe()
|
||||
.expect("should find the current executable")
|
||||
|
||||
@@ -78,6 +78,7 @@ pub enum ExtensionConfig {
|
||||
Builtin {
|
||||
/// The name used to identify this extension
|
||||
name: String,
|
||||
display_name: Option<String>, // needed for the UI
|
||||
timeout: Option<u64>,
|
||||
},
|
||||
}
|
||||
@@ -86,6 +87,7 @@ impl Default for ExtensionConfig {
|
||||
fn default() -> Self {
|
||||
Self::Builtin {
|
||||
name: config::DEFAULT_EXTENSION.to_string(),
|
||||
display_name: Some(config::DEFAULT_DISPLAY_NAME.to_string()),
|
||||
timeout: Some(config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user