1use anyhow::Result;
2use gpui::App;
3use schemars::JsonSchema;
4use serde_derive::{Deserialize, Serialize};
5use settings::{Settings, SettingsSources, SettingsUi};
6
7#[derive(Deserialize, Debug)]
8pub struct CallSettings {
9 pub mute_on_join: bool,
10 pub share_on_join: bool,
11}
12
13/// Configuration of voice calls in Zed.
14#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUi)]
15pub struct CallSettingsContent {
16 /// Whether the microphone should be muted when joining a channel or a call.
17 ///
18 /// Default: false
19 pub mute_on_join: Option<bool>,
20
21 /// Whether your current project should be shared when joining an empty channel.
22 ///
23 /// Default: false
24 pub share_on_join: Option<bool>,
25}
26
27impl Settings for CallSettings {
28 const KEY: Option<&'static str> = Some("calls");
29
30 type FileContent = CallSettingsContent;
31
32 fn load(sources: SettingsSources<Self::FileContent>, _: &mut App) -> Result<Self> {
33 sources.json_merge()
34 }
35
36 fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
37}