core: add 'command finished' notifications

Fixes #8991

Uses OSC 133 esc sequences to keep track of how long commands take to
execute. If the user chooses, commands that take longer than a user
specified limit will trigger a notification. The user can choose between
a bell notification or a desktop notification.
This commit is contained in:
Jeffrey C. Ollie
2025-10-01 23:48:08 -05:00
parent 9c8d2e577e
commit 07124dba64
12 changed files with 366 additions and 25 deletions

View File

@@ -1054,6 +1054,11 @@ pub const StreamHandler = struct {
pub inline fn endOfInput(self: *StreamHandler) !void {
self.terminal.markSemanticPrompt(.command);
self.surfaceMessageWriter(.start_command_timer);
}
pub inline fn endOfCommand(self: *StreamHandler, exit_code: ?u8) !void {
self.surfaceMessageWriter(.{ .stop_command_timer = exit_code });
}
pub fn reportPwd(self: *StreamHandler, url: []const u8) !void {