diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
| commit | 71d8744b41dec56d835e30f531b96fede5d610a1 (patch) | |
| tree | 31e2a06fdcfd467d12454cde8be5a477765701b5 /core/exec.zig | |
| parent | eae5736ad923731135dd35b3783c90a3358bd0fa (diff) | |
| parent | 4569aefd55d04f434f2e2ed5e6e4a511a414cdc7 (diff) | |
| download | pardes-71d8744b41dec56d835e30f531b96fede5d610a1.tar.gz pardes-71d8744b41dec56d835e30f531b96fede5d610a1.zip | |
integration: the one client loop that the soak runs, with the tape as the handle a step is given: pardes-runners-b (10b: runtime/client.zig run by the terminal's client, the window's and the soak; a client's clipboard and links its own frontend's; an input sent before it is applied) and pardes-handle-1 (the handle's steps 0 to 2: p.tape, the directory listing and the file system read through the tape they are handed), merged without a conflict; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/exec.zig')
| -rw-r--r-- | core/exec.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/exec.zig b/core/exec.zig index 3f3b16a7..0e09e175 100644 --- a/core/exec.zig +++ b/core/exec.zig @@ -423,19 +423,19 @@ pub fn missingDir(p: *Pardes, dir: []const u8) bool { // the shell would start: no command or terminal runs there, and none // is made to say `exit 127`. const local = @import("fs.zig").localPath(dir) orelse return std.mem.startsWith(u8, dir, "/n/"); - return kindOf(local) != .directory; + return kindOf(p.tape, local) != .directory; } /// What `path` is on this host, null when it is not there; the turn out /// while it asks (it may be inside a mount this editor serves). -pub fn kindOf(path: []const u8) ?std.Io.File.Kind { +pub fn kindOf(tape: *pardes.tape.Tape, path: []const u8) ?std.Io.File.Kind { var buf: [4096]u8 = undefined; const z = std.fmt.bufPrintSentinel(&buf, "{s}", .{path}, 0) catch return null; - return pardes.tape.site(.kind, null, kindHost, .{z}); + return tape.site(.kind, null, kindHost, .{z}); } -fn kindHost(z: [:0]const u8) ?std.Io.File.Kind { - const stat = @import("fs.zig").statPath(std.Io.Threaded.global_single_threaded.io(), z, .{}) catch return null; +fn kindHost(io: std.Io, z: [:0]const u8) ?std.Io.File.Kind { + const stat = @import("fs.zig").statPath(io, z, .{}) catch return null; return stat.kind; } @@ -1039,18 +1039,18 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[] var text: pardes.Kind.Buf(340) = .{}; return p.reportFailure(v.active, text.print("Shell: {s}", .{refused})); } - if (!p.settings.apply(setting, want, p.sessionHome())) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?); + if (!p.settings.apply(p.tape, setting, want, p.sessionHome())) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?); }, // Bare, each says its value, as acme's Tab says the width. inline .tab, .callstack_depth => |_, tag| if (arg == null) { var said: pardes.Kind.Buf(40) = .{}; return p.setMessage(v.active, said.print("{s} {d}", .{ setting.word, @field(p.settings, @tagName(tag)) })); - } else if (!p.settings.apply(setting, arg, p.sessionHome())) { + } else if (!p.settings.apply(p.tape, setting, arg, p.sessionHome())) { var said: pardes.Kind.Buf(96) = .{}; p.reportFailure(v.active, said.print("{s}{s}: takes {s}", .{ setting.word, if (tag == .tab) ": invalid tab width" else "", comptime config.Runtime.takes(tag).? })); }, // Said with what it takes: its words, its range. - else => if (!p.settings.apply(setting, arg, p.sessionHome())) { + else => if (!p.settings.apply(p.tape, setting, arg, p.sessionHome())) { var buf: [160]u8 = undefined; var text: std.Io.Writer = .fixed(&buf); // A list of values too long for the row is cut. |
