Skip to content

Commit 710b4bd

Browse files
committed
Polish.
1 parent 53dea15 commit 710b4bd

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

crates/action-pipeline/src/action_pipeline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl ActionPipeline {
433433
{
434434
debug!(
435435
"Subscribing terminal notifications ({} enabled)",
436-
color::property("notifier.notifications"),
436+
color::property("notifier.terminalNotifications"),
437437
);
438438

439439
self.emitter

crates/notifier/src/notifications.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
use moon_common::is_ci;
42
use notify_rust::{Notification, Timeout};
53
use std::sync::OnceLock;
@@ -45,8 +43,8 @@ fn configure_application(notification: &mut Notification) {
4543

4644
// Try and use Windows Terminal as the app ID,
4745
// otherwise this will fallback to legacy PowerShell
48-
if *APP_ID.get_or_init(|| find_command_on_path("wt").is_some())
49-
|| env::var("WT_SESSION").is_ok()
46+
if env::var("WT_SESSION").is_ok()
47+
|| *APP_ID.get_or_init(|| find_command_on_path("wt").is_some())
5048
{
5149
notification.app_id("Microsoft.WindowsTerminal_8wekyb3d8bbwe!App");
5250
}
@@ -71,13 +69,8 @@ pub fn notify_terminal(title: impl AsRef<str>, description: impl AsRef<str>) ->
7169
trace!("Sending terminal notification");
7270

7371
match notification.show() {
74-
Ok(handle) => {
72+
Ok(_) => {
7573
trace!("Sent terminal notification");
76-
77-
#[cfg(all(unix, not(target_os = "macos")))]
78-
{
79-
handle.on_close(|reason| trace!("Closed terminal notification: {:?}", reason));
80-
}
8174
}
8275
Err(error) => {
8376
debug!("Failed to send terminal notification: {error}");

packages/types/src/workspace-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export interface NotifierConfig {
215215
*
216216
* @default 'never'
217217
*/
218-
notifications: NotifierEventType | null;
218+
terminalNotifications: NotifierEventType | null;
219219
/**
220220
* Whether webhook requests require acknowledgment (2xx response).
221221
*
@@ -735,7 +735,7 @@ export interface PartialNotifierConfig {
735735
*
736736
* @default 'never'
737737
*/
738-
notifications?: NotifierEventType | null;
738+
terminalNotifications?: NotifierEventType | null;
739739
/**
740740
* Whether webhook requests require acknowledgment (2xx response).
741741
*

website/static/schemas/workspace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@
513513
"description": "Configures how and where notifications are sent.",
514514
"type": "object",
515515
"properties": {
516-
"notifications": {
517-
"title": "notifications",
516+
"terminalNotifications": {
517+
"title": "terminalNotifications",
518518
"description": "Display an OS notification for certain pipeline events.",
519519
"default": "never",
520520
"anyOf": [

0 commit comments

Comments
 (0)