Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Command/Keybinding/
UnregisterExtensionKeybindings.rs

1//! Tauri command - remove keybindings registered by a given extension.
2//! Stub returns success; pending real implementation that filters by
3//! source identifier and clears the affected resolution cache.
4
5use std::sync::Arc;
6
7use CommonLibrary::{Environment::Requires::Requires, Keybinding::KeybindingProvider::KeybindingProvider};
8use serde_json::{Value, json};
9use tauri::{AppHandle, Manager, Wry, command};
10
11use crate::{RunTime::ApplicationRunTime::ApplicationRunTime as Runtime, dev_log};
12
13#[command]
14pub async fn UnregisterExtensionKeybindings(
15	ApplicationHandle:AppHandle<Wry>,
16
17	ExtensionIdentifier:String,
18) -> Result<Value, String> {
19	dev_log!("keybinding", "unregistering keybindings for extension: {}", ExtensionIdentifier);
20
21	let RunTime = ApplicationHandle.state::<Arc<Runtime>>().inner().clone();
22
23	let _Provider:Arc<dyn KeybindingProvider> = RunTime.Environment.Require();
24
25	Ok(json!({ "success": true }))
26}