H4: string and path settings controls, live completion and tooltip settings

- Settings dialog: every string setting gets a text field with in-place
  hints (quotes or spaces around a path, control characters, length);
  keys ending in path/executable also get "Browse…" through the dialog
  plugin's native picker (new desktop IPC pick_file). git.executable
  from M4.1 gets the control without UI changes.
- settings.open {section?, query?} for agents and live checks.
- New keys editor.completion.autoPopup, editor.completion.delayMs and
  editor.hover.delayMs; the assist module reads them live through
  CodeMirror compartments.
- Tests: engine settings test, control/engine key lists, Vitest for the
  controls and the live wiring. Docs: architecture, ui-parity, parity
  Settings row, gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-25 13:10:19 +01:00
parent b0f8550aeb
commit 197d5b7d27
19 changed files with 1149 additions and 41 deletions

View file

@ -79,7 +79,8 @@ fn run(args: &args::Args) -> Result<(), String> {
engine_execute,
engine_execute_waiting,
engine_list_commands,
engine_ready
engine_ready,
pick_file
])
.setup(move |app| {
let setup_host = setup_slot.get().ok_or("the host is not ready")?;
@ -235,6 +236,19 @@ fn engine_ready(host: tauri::State<'_, Arc<Host>>) {
host.replay_to_window();
}
/// IPC: shows the native file picker for a path setting's "Browse…"
/// button and returns the chosen file, or `None` when the user cancels or
/// picks something that is not a local path. `async` keeps the blocking
/// picker off the main thread. The frontend stores the path through
/// `settings.set`, so the setting itself stays an engine command.
#[tauri::command(async)]
fn pick_file(app: tauri::AppHandle, title: String) -> Option<String> {
use tauri_plugin_dialog::DialogExt;
let picked = app.dialog().file().set_title(title).blocking_pick_file()?;
let path = picked.into_path().ok()?;
Some(path.to_string_lossy().into_owned())
}
#[cfg(test)]
mod tests {
use super::*;