Show notifications on primary screen by default (#27665)

By default, agent notifications now display only on your primary screen.
You can optionally configure them to display on all screens (or not to
display at all).

Release Notes:

- N/A
This commit is contained in:
Richard Feldman 2025-03-30 14:33:20 -04:00 committed by GitHub
parent 9f8776d1af
commit 342acdd080
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 226 additions and 198 deletions

View file

@ -26,6 +26,15 @@ pub enum AssistantDockPosition {
Bottom,
}
#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum NotifyWhenAgentWaiting {
#[default]
PrimaryScreen,
AllScreens,
Never,
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
#[serde(tag = "name", rename_all = "snake_case")]
pub enum AssistantProviderContentV1 {
@ -74,7 +83,7 @@ pub struct AssistantSettings {
pub default_profile: Arc<str>,
pub profiles: IndexMap<Arc<str>, AgentProfile>,
pub always_allow_tool_actions: bool,
pub notify_when_agent_waiting: bool,
pub notify_when_agent_waiting: NotifyWhenAgentWaiting,
}
impl AssistantSettings {
@ -394,10 +403,10 @@ pub struct AssistantSettingsContentV2 {
///
/// Default: false
always_allow_tool_actions: Option<bool>,
/// Whether to show a popup notification when the agent is waiting for user input.
/// Where to show a popup notification when the agent is waiting for user input.
///
/// Default: true
notify_when_agent_waiting: Option<bool>,
/// Default: "primary_screen"
notify_when_agent_waiting: Option<NotifyWhenAgentWaiting>,
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]