Backport: Agentic Shell Command Execution (v1.0.0 → v1.0.8) #66
@ -325,6 +325,7 @@ pub async fn initiate_oauth(
|
||||
let app_data_dir = app_state.app_data_dir.clone();
|
||||
let integration_webviews = app_state.integration_webviews.clone();
|
||||
let mcp_connections = app_state.mcp_connections.clone();
|
||||
let pending_approvals = app_state.pending_approvals.clone();
|
||||
|
||||
tokio::spawn(async move {
|
||||
let app_state_for_callback = AppState {
|
||||
@ -333,9 +334,7 @@ pub async fn initiate_oauth(
|
||||
app_data_dir,
|
||||
integration_webviews,
|
||||
mcp_connections,
|
||||
pending_approvals: Arc::new(tokio::sync::Mutex::new(
|
||||
std::collections::HashMap::new(),
|
||||
)),
|
||||
pending_approvals,
|
||||
};
|
||||
while let Some(callback) = callback_rx.recv().await {
|
||||
tracing::info!("Received OAuth callback for state: {}", callback.state);
|
||||
|
||||
@ -97,11 +97,16 @@ pub fn activate_kubeconfig(id: String, state: State<'_, AppState>) -> Result<(),
|
||||
.map_err(|e| format!("Failed to deactivate configs: {e}"))?;
|
||||
|
||||
// Activate the specified config
|
||||
db.execute(
|
||||
"UPDATE kubeconfig_files SET is_active = 1 WHERE id = ?1",
|
||||
params![&id],
|
||||
)
|
||||
.map_err(|e| format!("Failed to activate config: {e}"))?;
|
||||
let rows_updated = db
|
||||
.execute(
|
||||
"UPDATE kubeconfig_files SET is_active = 1 WHERE id = ?1",
|
||||
params![&id],
|
||||
)
|
||||
.map_err(|e| format!("Failed to activate config: {e}"))?;
|
||||
|
||||
if rows_updated == 0 {
|
||||
return Err(format!("Kubeconfig with id '{}' not found", id));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user