aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/client
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-23 23:54:25 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-23 23:54:25 +0200
commit106dca20fef667ef4605528d51c2b9968731242a (patch)
tree2c422d17434311022dc52ea2d98f1245b9af560d /crates/turtle/src/client
parentCargo.toml: 20.0.0 -> 20.0.1 (diff)
downloadatuin-106dca20fef667ef4605528d51c2b9968731242a.zip
daemon/api: Remove `add_history`
This request is a footgun, as it will leave commands that never return (e.g. `shutdown`, `exit`, etc.) unrecorded.
Diffstat (limited to '')
-rw-r--r--crates/turtle/src/client/mod.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/turtle/src/client/mod.rs b/crates/turtle/src/client/mod.rs
index 28289652..531d8597 100644
--- a/crates/turtle/src/client/mod.rs
+++ b/crates/turtle/src/client/mod.rs
@@ -7,7 +7,6 @@ use hyper_util::rt::TokioIo;
use tokio::net::UnixStream;
-use crate::generated::history::AddHistoryRequest;
use crate::generated::{
self, DAEMON_PROTOCOL_VERSION,
control::{
@@ -235,29 +234,6 @@ impl HistoryClient {
Ok(self.client.end_history(req).await?.into_inner())
}
- pub async fn add_history(
- &mut self,
- h: History,
- duration: std::time::Duration,
- exit: i64,
- ) -> Result<EndHistoryReply> {
- let req = AddHistoryRequest {
- start: Some(StartHistoryRequest {
- timestamp: time_to_proto_timestamp(h.timestamp),
- command: h.command,
- cwd: h.cwd,
- session: h.session,
- hostname: h.hostname,
- author: h.author,
- intent: h.intent,
- }),
- exit,
- duration: std_to_proto_duration(duration),
- };
-
- Ok(self.client.add_history(req).await?.into_inner())
- }
-
pub async fn history(&mut self, range: Option<Range>) -> Result<Vec<History>> {
let req = HistoryRequest {
range: range.map(|r| generated::history::Range {