Skip to main content

Mountain/Command/Keybinding/
GetUserKeybindings.rs

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