mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-26 21:03:58 +02:00
feat: add desktop notifications for run completion
Show native OS notifications when a session run completes, fails, or needs approval while the app window is unfocused. Clicking a notification focuses the window and selects the relevant session. Includes a toggle in Settings > Appearance to enable/disable notifications (enabled by default). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -257,6 +257,11 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
|
||||
return this.workspace;
|
||||
}
|
||||
|
||||
/** Returns the in-memory workspace without loading from disk. Used for synchronous checks. */
|
||||
getCachedWorkspace(): WorkspaceState | undefined {
|
||||
return this.workspace;
|
||||
}
|
||||
|
||||
async dispose(): Promise<void> {
|
||||
this.ptyManager.dispose();
|
||||
await this.sidecar.dispose();
|
||||
@@ -503,6 +508,12 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
|
||||
return this.persistAndBroadcast(workspace);
|
||||
}
|
||||
|
||||
async setNotificationsEnabled(enabled: boolean): Promise<WorkspaceState> {
|
||||
const workspace = await this.loadWorkspace();
|
||||
workspace.settings.notificationsEnabled = enabled;
|
||||
return this.persistAndBroadcast(workspace);
|
||||
}
|
||||
|
||||
async describeTerminal(): Promise<TerminalSnapshot | undefined> {
|
||||
return this.ptyManager.getSnapshot();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user