feat: persist and restore TUI state across restarts
The main TUI now loads state on startup — search history restored as inert entries, saved chat rooms rejoined on the server, and incomplete downloads (including failed/timed-out ones) automatically re-enqueued — and saves a diffed snapshot each loop tick and on exit, so only changed files are rewritten.
This commit is contained in:
@@ -243,12 +243,16 @@ fn run_default_tui(
|
||||
|
||||
persist_credentials(&outcome, config_path, file_config, &secret_store);
|
||||
|
||||
let store = persist::paths::state_dir()
|
||||
.map(persist::state::StateStore::new);
|
||||
|
||||
launch_main_tui(
|
||||
terminal,
|
||||
Arc::new(outcome.client),
|
||||
resolved.download_dir.clone(),
|
||||
resolved.max_concurrent_downloads,
|
||||
Duration::from_secs(resolved.search_timeout),
|
||||
store,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user