aboutsummaryrefslogtreecommitdiffstats
path: root/crates/daemon/src/components/history.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/daemon/src/components/history.rs')
-rw-r--r--crates/daemon/src/components/history.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/crates/daemon/src/components/history.rs b/crates/daemon/src/components/history.rs
deleted file mode 100644
index b476f627..00000000
--- a/crates/daemon/src/components/history.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-//! History component.
-//!
-//! Handles command history lifecycle (start/end) and provides the History gRPC service.
-
-use crate::{
- aclient::{history::store::HistoryStore, settings::Settings},
- api::server::history::HistoryGrpcService,
-};
-use eyre::Result;
-
-use crate::{
- daemon::{Component, DaemonHandle},
- events::DaemonEvent,
-};
-
-#[tonic::async_trait]
-impl Component for HistoryGrpcService {
- fn name(&self) -> &'static str {
- "history"
- }
-
- async fn start(&mut self, handle: DaemonHandle) -> Result<()> {
- // Create the history store
- let host_id = Settings::host_id().await?;
- let history_store =
- HistoryStore::new(handle.store().clone(), host_id, *handle.encryption_key());
-
- *self.history_store.write().await = Some(history_store);
- *self.handle.write().await = Some(handle);
-
- tracing::info!("history component started");
- Ok(())
- }
-
- async fn handle_event(&mut self, _event: &DaemonEvent) -> Result<()> {
- // History component produces events but doesn't need to react to them
- Ok(())
- }
-
- async fn stop(&mut self) -> Result<()> {
- tracing::info!("history component stopped");
- Ok(())
- }
-}