diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 15:24:24 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 15:33:45 +0300 |
| commit | 36a1b7f86444871f0c38ff36510a6e3c2eec48c6 (patch) | |
| tree | 4a2d100eef7f26af7feaa93ce661423c3994c54e /src/app/mod.rs | |
| parent | 8d13492926829c5cf0ea42c8613344cd65ff59fa (diff) | |
feat: distribute agent detection manifests
Diffstat (limited to 'src/app/mod.rs')
| -rw-r--r-- | src/app/mod.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs index 35ab92b1..c0af6754 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -107,6 +107,7 @@ pub struct App { pub(crate) next_resize_poll: Instant, pub(crate) next_animation_tick: Option<Instant>, pub(crate) next_auto_update_check: Option<Instant>, + pub(crate) next_agent_manifest_update_check: Option<Instant>, pub(crate) agent_metadata_deadline: Option<Instant>, pub(crate) pending_agent_resume_deadline: Option<Instant>, pub(crate) selection_autoscroll_deadline: Option<Instant>, @@ -398,6 +399,8 @@ impl App { state::Mode::Navigate }; + let agent_manifest_summaries = crate::detect::manifest::reload_manifests(); + let mut state = AppState { terminals: std::collections::HashMap::new(), direct_attach_resize_locks: std::collections::HashSet::new(), @@ -535,6 +538,8 @@ impl App { original_theme: None, }, integration_recommendations: crate::integration::integration_recommendations(), + agent_manifest_summaries, + agent_manifest_update_status: crate::detect::manifest_update::load_status(), integration_install_messages: Vec::new(), global_menu: state::MenuListState::new(0), host_terminal_theme: crate::terminal_theme::TerminalTheme::default(), @@ -557,6 +562,10 @@ impl App { if auto_updates_enabled(no_session) { let update_tx = event_tx.clone(); std::thread::spawn(move || crate::update::auto_update(update_tx)); + let manifest_update_tx = event_tx.clone(); + std::thread::spawn(move || { + crate::detect::manifest_update::auto_update(manifest_update_tx) + }); } let last_focus = state.active.and_then(|idx| { @@ -585,6 +594,8 @@ impl App { next_animation_tick: None, next_auto_update_check: auto_updates_enabled(no_session) .then_some(Instant::now() + AUTO_UPDATE_CHECK_INTERVAL), + next_agent_manifest_update_check: auto_updates_enabled(no_session) + .then_some(Instant::now() + AUTO_UPDATE_CHECK_INTERVAL), agent_metadata_deadline: None, pending_agent_resume_deadline: None, session_save_deadline: None, @@ -635,6 +646,15 @@ impl App { let pane_id_aliases = crate::persist::handoff_pane_aliases(snapshot, &workspaces); app.no_session = false; + if auto_updates_enabled(app.no_session) { + let now = Instant::now(); + app.next_auto_update_check = app + .state + .update_available + .is_none() + .then_some(now + AUTO_UPDATE_CHECK_INTERVAL); + app.next_agent_manifest_update_check = Some(now + AUTO_UPDATE_CHECK_INTERVAL); + } app.state.detach_exits = false; app.state.pane_id_aliases = pane_id_aliases; app.state.workspaces = workspaces; |
