Add a getUserAgent MCP method (#3320)

This will allow the extension to pass this user agent + a suffix for its
requests
This commit is contained in:
Gabriel Peal
2025-09-08 10:30:13 -07:00
committed by GitHub
parent 0525b48baa
commit 5c1416d99b
6 changed files with 73 additions and 0 deletions

View File

@@ -137,6 +137,10 @@ pub enum ClientRequest {
#[serde(rename = "id")]
request_id: RequestId,
},
GetUserAgent {
#[serde(rename = "id")]
request_id: RequestId,
},
/// Execute a command (argv vector) under the server's sandbox.
ExecOneOffCommand {
#[serde(rename = "id")]
@@ -339,6 +343,12 @@ pub struct GetAuthStatusResponse {
pub auth_token: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, TS)]
#[serde(rename_all = "camelCase")]
pub struct GetUserAgentResponse {
pub user_agent: String,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, TS)]
#[serde(rename_all = "camelCase")]
pub struct GetUserSavedConfigResponse {