diff options
Diffstat (limited to 'crates/atuin-daemon/src')
| -rw-r--r-- | crates/atuin-daemon/src/client.rs | 2 | ||||
| -rw-r--r-- | crates/atuin-daemon/src/server.rs | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/crates/atuin-daemon/src/client.rs b/crates/atuin-daemon/src/client.rs index 05067bda..3b76a680 100644 --- a/crates/atuin-daemon/src/client.rs +++ b/crates/atuin-daemon/src/client.rs @@ -103,6 +103,8 @@ impl HistoryClient { hostname: h.hostname, session: h.session, timestamp: h.timestamp.unix_timestamp_nanos() as u64, + author: h.author, + intent: h.intent.unwrap_or_default(), }; Ok(self.client.start_history(req).await?.into_inner()) diff --git a/crates/atuin-daemon/src/server.rs b/crates/atuin-daemon/src/server.rs index 9622d2b6..826d6191 100644 --- a/crates/atuin-daemon/src/server.rs +++ b/crates/atuin-daemon/src/server.rs @@ -69,7 +69,7 @@ impl HistorySvc for HistoryService { ) })?; - let h: History = History::daemon() + let mut h: History = History::daemon() .timestamp(timestamp) .command(req.command) .cwd(req.cwd) @@ -77,6 +77,12 @@ impl HistorySvc for HistoryService { .hostname(req.hostname) .build() .into(); + if !req.author.trim().is_empty() { + h.author = req.author; + } + if !req.intent.trim().is_empty() { + h.intent = Some(req.intent); + } // The old behaviour had us inserting half-finished history records into the database // The new behaviour no longer allows that. |
