mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
Apply argument comment lint across codex-rs
This commit is contained in:
@@ -62,9 +62,11 @@ pub async fn determine_streamable_http_auth_status(
|
||||
|
||||
/// Attempt to determine whether a streamable HTTP MCP server advertises OAuth login.
|
||||
pub async fn supports_oauth_login(url: &str) -> Result<bool> {
|
||||
Ok(discover_streamable_http_oauth(url, None, None)
|
||||
.await?
|
||||
.is_some())
|
||||
Ok(discover_streamable_http_oauth(
|
||||
url, /*http_headers=*/ None, /*env_http_headers=*/ None,
|
||||
)
|
||||
.await?
|
||||
.is_some())
|
||||
}
|
||||
|
||||
pub async fn discover_streamable_http_oauth(
|
||||
|
||||
@@ -92,10 +92,10 @@ pub async fn perform_oauth_login(
|
||||
headers,
|
||||
scopes,
|
||||
oauth_resource,
|
||||
true,
|
||||
/*launch_browser=*/ true,
|
||||
callback_port,
|
||||
callback_url,
|
||||
None,
|
||||
/*timeout_secs=*/ None,
|
||||
)
|
||||
.await?
|
||||
.finish()
|
||||
@@ -126,7 +126,7 @@ pub async fn perform_oauth_login_return_url(
|
||||
headers,
|
||||
scopes,
|
||||
oauth_resource,
|
||||
false,
|
||||
/*launch_browser=*/ false,
|
||||
callback_port,
|
||||
callback_url,
|
||||
timeout_secs,
|
||||
|
||||
@@ -734,19 +734,25 @@ impl RmcpClient {
|
||||
params: Option<serde_json::Value>,
|
||||
) -> Result<()> {
|
||||
self.refresh_oauth_if_needed().await;
|
||||
self.run_service_operation("notifications/custom", None, move |service| {
|
||||
let params = params.clone();
|
||||
async move {
|
||||
service
|
||||
.send_notification(ClientNotification::CustomNotification(CustomNotification {
|
||||
method: method.to_string(),
|
||||
params,
|
||||
extensions: Extensions::new(),
|
||||
}))
|
||||
.await
|
||||
}
|
||||
.boxed()
|
||||
})
|
||||
self.run_service_operation(
|
||||
"notifications/custom",
|
||||
/*timeout=*/ None,
|
||||
move |service| {
|
||||
let params = params.clone();
|
||||
async move {
|
||||
service
|
||||
.send_notification(ClientNotification::CustomNotification(
|
||||
CustomNotification {
|
||||
method: method.to_string(),
|
||||
params,
|
||||
extensions: Extensions::new(),
|
||||
},
|
||||
))
|
||||
.await
|
||||
}
|
||||
.boxed()
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
self.persist_oauth_tokens().await;
|
||||
Ok(())
|
||||
@@ -759,7 +765,7 @@ impl RmcpClient {
|
||||
) -> Result<ServerResult> {
|
||||
self.refresh_oauth_if_needed().await;
|
||||
let response = self
|
||||
.run_service_operation("requests/custom", None, move |service| {
|
||||
.run_service_operation("requests/custom", /*timeout=*/ None, move |service| {
|
||||
let params = params.clone();
|
||||
async move {
|
||||
service
|
||||
|
||||
Reference in New Issue
Block a user