wip: in-progress changes (grid, config, wizard, settings, pty) before session-persistence
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -422,6 +422,11 @@ pub async fn health(state: BridgeState<'_>) -> Result<Value, String> {
|
||||
data_of(state.request(Cmd::Health).await.map_err(|e| e.to_string())?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn which_agents(state: BridgeState<'_>, candidates: Vec<String>) -> Result<Value, String> {
|
||||
data_of(state.request(Cmd::WhichAgents { candidates }).await.map_err(|e| e.to_string())?)
|
||||
}
|
||||
|
||||
// ---- Update check ----
|
||||
|
||||
/// Where the GUI looks for the published app version. Overridable via
|
||||
@@ -481,6 +486,25 @@ pub fn open_external(url: String) -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// List the user's installed font families (CoreText) so Settings can offer any of
|
||||
/// them for the terminal. Hidden system families (".SF NS" etc.) are dropped; the
|
||||
/// result is de-duplicated and sorted case-insensitively.
|
||||
#[tauri::command]
|
||||
pub fn list_fonts() -> Vec<String> {
|
||||
use std::collections::BTreeSet;
|
||||
let names = core_text::font_collection::get_family_names();
|
||||
let mut set: BTreeSet<String> = BTreeSet::new();
|
||||
for name in names.iter() {
|
||||
let s = name.to_string();
|
||||
if !s.is_empty() && !s.starts_with('.') {
|
||||
set.insert(s);
|
||||
}
|
||||
}
|
||||
let mut v: Vec<String> = set.into_iter().collect();
|
||||
v.sort_by_key(|s| s.to_lowercase());
|
||||
v
|
||||
}
|
||||
|
||||
// ---- Settings commands ----
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in New Issue
Block a user