diff options
Diffstat (limited to '')
| -rw-r--r-- | crates/daemon/src/events.rs (renamed from crates/turtle/src/atuin_daemon/events.rs) | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/crates/turtle/src/atuin_daemon/events.rs b/crates/daemon/src/events.rs index d379277d..654e56cb 100644 --- a/crates/turtle/src/atuin_daemon/events.rs +++ b/crates/daemon/src/events.rs @@ -7,36 +7,26 @@ //! External processes (like CLI commands) can also inject events via the //! Control gRPC service. -use crate::atuin_client::history::{History, HistoryId}; -use crate::atuin_common::record::RecordId; +use turtle_api::history::History; /// Events that flow through the daemon's event bus. /// /// Events are broadcast to all components. Each component decides which /// events it cares about in its `handle_event` implementation. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub(crate) enum DaemonEvent { - // ---- History lifecycle ---- /// A command has started running. HistoryStarted(History), /// A command has finished running. HistoryEnded(History), - // ---- Sync ---- - /// Records were synced from the server. - /// - /// The search component uses this to update its index with new history. - RecordsAdded(Vec<RecordId>), - /// Sync completed successfully. SyncCompleted { /// Number of records uploaded. - #[expect(unused)] uploaded: usize, /// Number of records downloaded. - #[expect(unused)] downloaded: usize, }, @@ -49,29 +39,6 @@ pub(crate) enum DaemonEvent { /// Request an immediate sync (external trigger). ForceSync, - // ---- External commands ---- - /// History was pruned - search index needs a full rebuild. - /// - /// Emitted when the user runs `atuin history prune` or similar. - HistoryPruned, - - /// History was rebuilt - search index needs a full rebuild. - /// - /// Emitted when the user runs `atuin store rebuild history` or similar. - HistoryRebuilt, - - /// Specific history items were deleted. - /// - /// The search component should remove these from its index. - HistoryDeleted { - /// IDs of the deleted history entries. - ids: Vec<HistoryId>, - }, - - /// Settings have changed, components should reload if needed. - SettingsReloaded, - - // ---- Lifecycle ---- /// Request graceful shutdown of the daemon. ShutdownRequested, } |
