diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-12 01:54:21 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-12 01:54:21 +0200 |
| commit | bbdf38018b47328b5faa2cef635c37095045be72 (patch) | |
| tree | 8983817d547551ae12508a8ae8731b622d990af4 /crates/turtle/src/atuin_daemon/search | |
| parent | feat(server): Make user stuff stateless (diff) | |
| download | atuin-bbdf38018b47328b5faa2cef635c37095045be72.zip | |
feat(server): Really make users stateless (with tests)
This commit also remove another load of unneeded features.
Diffstat (limited to 'crates/turtle/src/atuin_daemon/search')
| -rw-r--r-- | crates/turtle/src/atuin_daemon/search/index.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/turtle/src/atuin_daemon/search/index.rs b/crates/turtle/src/atuin_daemon/search/index.rs index 446d7992..a23b3133 100644 --- a/crates/turtle/src/atuin_daemon/search/index.rs +++ b/crates/turtle/src/atuin_daemon/search/index.rs @@ -14,8 +14,7 @@ use std::{ use crate::atuin_client::settings::Search; use crate::{ - atuin_client::history::{History, is_known_agent}, - atuin_daemon::components::search::with_trailing_slash, + atuin_client::history::History, atuin_daemon::components::search::with_trailing_slash, }; use atuin_nucleo::{Injector, Nucleo, pattern}; use dashmap::DashMap; @@ -195,7 +194,11 @@ impl CommandData { /// Check if any invocation matches a directory prefix (workspace/git root). /// O(n) where n = number of unique directories for this command. - pub(crate) fn has_invocation_in_workspace(&self, prefix: &str, interner: &ThreadedRodeo) -> bool { + pub(crate) fn has_invocation_in_workspace( + &self, + prefix: &str, + interner: &ThreadedRodeo, + ) -> bool { self.directories .iter() .any(|&spur| interner.resolve(&spur).starts_with(prefix)) @@ -289,10 +292,6 @@ impl SearchIndex { /// If the command already exists, updates its invocation data. /// If it's a new command, adds it to both the map and Nucleo. pub(crate) fn add_history(&self, history: &History) { - if is_known_agent(&history.author) { - return; - } - let command = history.command.as_str(); // DashMap with Arc<str> keys can be looked up with &str via Borrow trait |
