docs: clarify herdr pane split and wait output usage

This commit is contained in:
Ogulcan Celik
2026-04-07 02:48:13 +03:00
parent 06f01df93d
commit 5e05460816
9 changed files with 203 additions and 31 deletions
+11 -2
View File
@@ -248,6 +248,15 @@ fn handle_request(request: Request, api_tx: &ApiRequestSender) -> String {
}
}
fn output_match_read_source(
source: &crate::api::schema::ReadSource,
) -> crate::api::schema::ReadSource {
match source {
crate::api::schema::ReadSource::Recent => crate::api::schema::ReadSource::RecentUnwrapped,
other => other.clone(),
}
}
fn wait_for_output(
request_id: String,
params: crate::api::schema::PaneWaitForOutputParams,
@@ -279,7 +288,7 @@ fn wait_for_output(
id: format!("{request_id}:read"),
method: Method::PaneRead(crate::api::schema::PaneReadParams {
pane_id: params.pane_id.clone(),
source: params.source.clone(),
source: output_match_read_source(&params.source),
lines: params.lines,
strip_ansi: params.strip_ansi,
}),
@@ -587,7 +596,7 @@ impl ActiveOutputMatchedSubscription {
let read = pane_read(
format!("{}:read", self.request_prefix),
&self.pane_id,
self.source.clone(),
output_match_read_source(&self.source),
self.lines,
self.strip_ansi,
api_tx,
+1
View File
@@ -197,6 +197,7 @@ pub struct PaneReleaseAgentParams {
pub enum ReadSource {
Visible,
Recent,
RecentUnwrapped,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]