Commit 6eea0f6

Eric Bower  ·  2026-04-12 13:23:59 -0400 EDT
parent fbf0171
chore: dont show task_command because it is unreliable

We just don't have a great way to send [][]u8 over ipc because
we are using structs with fixed size fields that are converted to/from
via std.mem.asBytes.  This means we have to convert the command from [][]u8
to []u8 but that makes our daemon struct fields complicated.

Instead, just rely on looking at the zmx history to understand the command
that was run.
1 files changed,  +1, -3
+1, -3
......@@ -157,7 +157,6 @@ pub fn main() !void {
157157 .cwd = cwd,
158158 .created_at = @intCast(std.time.timestamp()),
159159 .is_task_mode = true,
160- .task_command = cmd_args_raw.items,
161160 .leader_client_fd = undefined,
162161 };
163162 daemon.socket_path = socket.getSocketPath(alloc, cfg.socket_dir, sesh) catch |err| switch (err) {
......@@ -393,7 +392,6 @@ const Daemon = struct {
393392 is_task_mode: bool = false, // flag for when session is run as a task
394393 task_exit_code: ?u8 = null, // null = running or n/a, set when task completes
395394 task_ended_at: ?u64 = null, // timestamp when task exited
396- task_command: ?[]const []const u8 = null,
397395 pty_write_buf: std.ArrayList(u8) = .empty,
398396
399397 const EnsureSessionResult = struct {
......@@ -806,7 +804,7 @@ const Daemon = struct {
806804 // shell-special characters so the displayed command is copy-pasteable.
807805 var cmd_buf: [ipc.MAX_CMD_LEN]u8 = undefined;
808806 var cmd_len: u16 = 0;
809- const cur_cmd = self.command orelse self.task_command;
807+ const cur_cmd = self.command;
810808 if (cur_cmd) |args| {
811809 for (args, 0..) |arg, i| {
812810 const quoted = if (util.shellNeedsQuoting(arg))