aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index ae4295bd..ddf5c39c 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -7,6 +7,15 @@ use crate::detect::AgentState;
use crate::layout::{PaneId, PaneInfo, SplitBorder};
use crate::selection::Selection;
+pub(crate) type InstalledPluginRegistry =
+ std::collections::HashMap<String, crate::api::schema::InstalledPluginInfo>;
+
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub(crate) struct PluginPaneRecord {
+ pub plugin_id: String,
+ pub entrypoint: String,
+}
+
// ---------------------------------------------------------------------------
// Selection autoscroll types
// ---------------------------------------------------------------------------
@@ -1384,6 +1393,14 @@ pub struct AppState {
pub agent_manifest_update_status: crate::detect::manifest_update::ManifestUpdateStatus,
/// Result messages from the latest integration install action.
pub integration_install_messages: Vec<String>,
+ /// Installed or linked plugins known to this running Herdr instance.
+ pub(crate) installed_plugins: InstalledPluginRegistry,
+ /// Pane ids opened through the plugin pane API.
+ pub(crate) plugin_panes: std::collections::HashMap<PaneId, PluginPaneRecord>,
+ /// Recent plugin action/event command executions.
+ pub(crate) plugin_command_logs: Vec<crate::api::schema::PluginCommandLogInfo>,
+ pub(crate) next_plugin_command_log_id: u64,
+ pub(crate) plugin_commands_in_flight: usize,
/// Highlight state for the bottom-right global launcher menu.
pub global_menu: MenuListState,
/// Resolved host terminal default colors for theming embedded panes.
@@ -1714,6 +1731,11 @@ impl AppState {
agent_manifest_update_status:
crate::detect::manifest_update::ManifestUpdateStatus::default(),
integration_install_messages: Vec::new(),
+ installed_plugins: std::collections::HashMap::new(),
+ plugin_panes: std::collections::HashMap::new(),
+ plugin_command_logs: Vec::new(),
+ next_plugin_command_log_id: 1,
+ plugin_commands_in_flight: 0,
global_menu: MenuListState::new(0),
host_terminal_theme: TerminalTheme::default(),
session_dirty: false,