Mountain/Command/Keybinding/GetUserKeybindings.rs
1
2//! Tauri command - return user-defined keybinding overrides. Stub
3//! returns an empty array; pending persistence layer wired through
4//! `KeybindingProvider`.
5//!
6//! ## Planned
7//!
8//! Hydrate from ApplicationState, including command id, chord, when
9//! clause, source extension, and conflict information for the keyboard
10//! shortcuts UI.
11
12use std::sync::Arc;
13
14use CommonLibrary::{Environment::Requires::Requires, Keybinding::KeybindingProvider::KeybindingProvider};
15use serde_json::{Value, json};
16use tauri::{AppHandle, Manager, Wry, command};
17
18use crate::{RunTime::ApplicationRunTime::ApplicationRunTime as Runtime, dev_log};
19
20#[command]
21pub async fn GetUserKeybindings(ApplicationHandle:AppHandle<Wry>) -> Result<Value, String> {
22 dev_log!("keybinding", "getting user keybindings for UI");
23
24 let RunTime = ApplicationHandle.state::<Arc<Runtime>>().inner().clone();
25
26 let _Provider:Arc<dyn KeybindingProvider> = RunTime.Environment.Require();
27
28 Ok(json!({ "keybindings": [] }))
29}