Skip to content

Commit

Permalink
context_servers: Document settings (#20907)
Browse files Browse the repository at this point in the history
This PR documents the settings type for context servers so that the
documentation shows up when editing the `settings.json` file.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Nov 20, 2024
1 parent 973498e commit 41fd918
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/context_servers/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,21 @@ use crate::{

#[derive(Deserialize, Serialize, Default, Clone, PartialEq, Eq, JsonSchema, Debug)]
pub struct ContextServerSettings {
/// Settings for context servers used in the Assistant.
#[serde(default)]
pub context_servers: HashMap<Arc<str>, ServerConfig>,
}

#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, JsonSchema, Debug, Default)]
pub struct ServerConfig {
/// The command to run this context server.
///
/// This will override the command set by an extension.
pub command: Option<ServerCommand>,
/// The settings for this context server.
///
/// Consult the documentation for the context server to see what settings
/// are supported.
#[schemars(schema_with = "server_config_settings_json_schema")]
pub settings: Option<serde_json::Value>,
}
Expand Down

0 comments on commit 41fd918

Please sign in to comment.