aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_daemon/search/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/turtle/src/atuin_daemon/search/index.rs')
-rw-r--r--crates/turtle/src/atuin_daemon/search/index.rs13
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