aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-30 23:58:15 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-30 23:58:34 +0300
commitfc4e1bbf6b0fa2ec37445a5b72356514c7c6be6a (patch)
tree93af04af44a4dcc062a7886c51d70641c1903144 /src/client
parentd477341e6af816ff4396042b084a0378ef437b4a (diff)
perf: reduce sidebar git polling overhead
refs #353
Diffstat (limited to 'src/client')
-rw-r--r--src/client/mod.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 3e146f47..0a1b9507 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -31,9 +31,9 @@ use tracing::{debug, info, warn};
use crate::protocol::render_ansi;
use crate::protocol::{
- self, AttachScrollDirection, AttachScrollSource, ClientKeybindings, ClientMessage, NotifyKind,
- RenderEncoding, ServerMessage, MAX_CLIPBOARD_IMAGE_PAYLOAD, MAX_FRAME_SIZE,
- MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION,
+ self, AttachScrollDirection, AttachScrollSource, ClientKeybindings, ClientLaunchMode,
+ ClientMessage, NotifyKind, RenderEncoding, ServerMessage, MAX_CLIPBOARD_IMAGE_PAYLOAD,
+ MAX_FRAME_SIZE, MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION,
};
use crate::server::socket_paths::client_socket_path;
@@ -420,6 +420,7 @@ fn do_handshake(
cell_width_px: u32,
cell_height_px: u32,
requested_encoding: RenderEncoding,
+ direct_attach_requested: bool,
) -> Result<RenderEncoding, ClientError> {
stream
.set_nonblocking(false)
@@ -434,6 +435,11 @@ fn do_handshake(
cell_height_px,
requested_encoding,
keybindings: requested_keybindings(),
+ launch_mode: if direct_attach_requested {
+ ClientLaunchMode::TerminalAttach
+ } else {
+ ClientLaunchMode::App
+ },
};
protocol::write_message(stream, &hello)
.map_err(|e| ClientError::ConnectionFailed(io::Error::other(e.to_string())))?;
@@ -549,6 +555,7 @@ fn run_client_with_mode(
cell_width_px,
cell_height_px,
requested_encoding,
+ direct_attach_requested,
) {
Ok(encoding) => encoding,
Err(err) => {