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 { | |
| 157 | 157 | .cwd = cwd, | |
| 158 | 158 | .created_at = @intCast(std.time.timestamp()), | |
| 159 | 159 | .is_task_mode = true, | |
| 160 | - | .task_command = cmd_args_raw.items, | |
| 161 | 160 | .leader_client_fd = undefined, | |
| 162 | 161 | }; | |
| 163 | 162 | daemon.socket_path = socket.getSocketPath(alloc, cfg.socket_dir, sesh) catch |err| switch (err) { |
| ... | ... | @@ -393,7 +392,6 @@ const Daemon = struct { | |
| 393 | 392 | is_task_mode: bool = false, // flag for when session is run as a task | |
| 394 | 393 | task_exit_code: ?u8 = null, // null = running or n/a, set when task completes | |
| 395 | 394 | task_ended_at: ?u64 = null, // timestamp when task exited | |
| 396 | - | task_command: ?[]const []const u8 = null, | |
| 397 | 395 | pty_write_buf: std.ArrayList(u8) = .empty, | |
| 398 | 396 | ||
| 399 | 397 | const EnsureSessionResult = struct { |
| ... | ... | @@ -806,7 +804,7 @@ const Daemon = struct { | |
| 806 | 804 | // shell-special characters so the displayed command is copy-pasteable. | |
| 807 | 805 | var cmd_buf: [ipc.MAX_CMD_LEN]u8 = undefined; | |
| 808 | 806 | var cmd_len: u16 = 0; | |
| 809 | - | const cur_cmd = self.command orelse self.task_command; | |
| 807 | + | const cur_cmd = self.command; | |
| 810 | 808 | if (cur_cmd) |args| { | |
| 811 | 809 | for (args, 0..) |arg, i| { | |
| 812 | 810 | const quoted = if (util.shellNeedsQuoting(arg)) |