Launch local editor for paths

This commit is contained in:
slhx agent
2026-06-21 12:03:26 +02:00
parent b076d1a35a
commit 047bae94af
2 changed files with 269 additions and 22 deletions
+17
View File
@@ -327,6 +327,23 @@ pub const Client = struct {
return self.saved_bytes orelse Error.NothingSaved;
}
pub fn snapshotBytesAlloc(self: *const Client, allocator: std.mem.Allocator) ![]u8 {
const snap = try self.session.snapshot();
return allocator.dupe(u8, snap.bytes);
}
pub fn requestedQuit(self: *const Client) bool {
return self.quit;
}
pub fn clearQuit(self: *Client) void {
self.quit = false;
}
pub fn setStatusMessage(self: *Client, message: []const u8) void {
self.message = message;
}
fn addRepoFile(self: *Client, payload: []const u8) !void {
const separator = std.mem.indexOfScalar(u8, payload, '=') orelse {
self.message = "diagnostic:unsupported_file:invalid_repo_file_payload";