Build in the review tool.
This commit is contained in:
@@ -13,6 +13,7 @@ const Settings = @import("Settings.zig");
|
||||
const Window = @import("Window.zig");
|
||||
const appearance = @import("appearance.zig");
|
||||
const icons = @import("icons.zig");
|
||||
const review = @import("review.zig");
|
||||
|
||||
/// libghostty-vt logs unimplemented sequences at debug level, which is very
|
||||
/// chatty against a real shell. Keep the app's own warnings and errors.
|
||||
@@ -29,6 +30,11 @@ pub fn main() u8 {
|
||||
// of it. A no-op if the app never got as far as activating.
|
||||
defer Settings.deinit();
|
||||
|
||||
// Also before the allocator, and after the window: the review server owns
|
||||
// threads, and stopping it waits for the ones still inside a request rather
|
||||
// than freeing the memory they are reading. A no-op if it never started.
|
||||
defer review.deinit();
|
||||
|
||||
// Non-unique so every launch is its own process. The default GApplication
|
||||
// behavior hands off to an already-running instance over D-Bus, which for
|
||||
// a terminal means a second launch silently does nothing visible here and
|
||||
@@ -55,6 +61,12 @@ fn onActivate(app: *adw.Application, _: ?*anyopaque) callconv(.c) void {
|
||||
// for one by name.
|
||||
icons.init();
|
||||
|
||||
// Before the window, because every tab is announced to the server as it is
|
||||
// created and every terminal is handed the endpoint of the tab it opens in.
|
||||
// Started unconditionally rather than on the first review pane, so an agent
|
||||
// running in a tab has a `PLAYPEN_REVIEW_URL` from the moment it starts.
|
||||
review.init(gpa.allocator());
|
||||
|
||||
const window = Window.create(gpa.allocator(), app) catch |err| {
|
||||
std.log.err("failed to create window: {s}", .{@errorName(err)});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user