diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:44:15 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:44:15 +0200 |
| commit | 4930f050c56660c245e5976979babb66aea7bfd5 (patch) | |
| tree | 1a0cc823da65c4258f4434be98e92f814ae4fce2 /crates/daemon/src/aclient/history/mod.rs | |
| parent | chore: Commit (diff) | |
| download | atuin-4930f050c56660c245e5976979babb66aea7bfd5.zip | |
chore: Last big refactoring
Diffstat (limited to 'crates/daemon/src/aclient/history/mod.rs')
| -rw-r--r-- | crates/daemon/src/aclient/history/mod.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/crates/daemon/src/aclient/history/mod.rs b/crates/daemon/src/aclient/history/mod.rs index f9afa5e9..ae7654a6 100644 --- a/crates/daemon/src/aclient/history/mod.rs +++ b/crates/daemon/src/aclient/history/mod.rs @@ -1,4 +1,3 @@ -use regex::RegexSet; use rmp::decode::DecodeStringError; use rmp::decode::ValueReadError; use rmp::{Marker, decode::Bytes}; @@ -18,28 +17,6 @@ const HISTORY_RECORD_VERSION_V0: u16 = 0; const HISTORY_RECORD_VERSION_V1: u16 = 1; const HISTORY_VERSION: &str = HISTORY_VERSION_V1; const HISTORY_TAG: &str = "history"; -const HISTORY_AUTHOR_ENV: &str = "ATUIN_HISTORY_AUTHOR"; -const HISTORY_INTENT_ENV: &str = "ATUIN_HISTORY_INTENT"; - -#[derive(Debug, Clone, PartialEq, Eq, sqlx::FromRow)] -pub(crate) struct HistoryStats { - /// The command that was ran after this one in the session - pub(crate) next: Option<History>, - - /// The command that was ran before this one in the session - pub(crate) previous: Option<History>, - - /// How many times has this command been ran? - pub(crate) total: u64, - - pub(crate) average_duration: u64, - - pub(crate) exits: Vec<(i64, i64)>, - - pub(crate) day_of_week: Vec<(String, i64)>, - - pub(crate) duration_over_time: Vec<(String, i64)>, -} trait HistoryExt: Sized { fn serialize(&self) -> Result<DecryptedData>; @@ -47,7 +24,6 @@ trait HistoryExt: Sized { fn deserialize_v0(bytes: &[u8]) -> Result<Self>; fn deserialize_v1(bytes: &[u8]) -> Result<Self>; fn deserialize(bytes: &[u8], version: &str) -> Result<Self>; - fn success(&self) -> bool; } impl HistoryExt for History { @@ -248,18 +224,6 @@ impl HistoryExt for History { _ => bail!("unknown version {version:?}"), } } - - #[expect(unused)] - fn success(&self) -> bool { - self.exit == 0 || self.duration == -1 - } -} - -#[derive(Debug, Copy, Clone)] -struct SettingsFilter<'a> { - pub history: &'a RegexSet, - pub cwd: &'a RegexSet, - pub secrets: bool, } #[cfg(test)] |
