Skip to content

Commit eb30007

Browse files
authored
feat: support for Trae (#488)
* feat: support for Trae * fmt
1 parent f66e0b0 commit eb30007

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/fig_integrations/src/vscode/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ pub static VARIANTS: &[VSCodeVariant] = &[
8686
application_name: "Positron",
8787
cli_executable_name: "positron",
8888
},
89+
VSCodeVariant {
90+
bundle_identifier: "com.trae.app",
91+
config_folder_name: ".trae",
92+
application_support_folder_name: "Trae",
93+
application_name: "Trae",
94+
cli_executable_name: "trae",
95+
},
8996
];
9097

9198
pub fn variants_installed() -> Vec<VSCodeVariant> {

crates/fig_util/src/terminal.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub const MACOS_TERMINALS: &[Terminal] = &[
2626
Terminal::Windsurf,
2727
Terminal::Ghostty,
2828
Terminal::Positron,
29+
Terminal::Trae,
2930
];
3031

3132
/// Terminals that Linux supports
@@ -165,6 +166,8 @@ pub enum Terminal {
165166
Ghostty,
166167
/// Positron
167168
Positron,
169+
/// Trae
170+
Trae,
168171

169172
/// Custom terminal to support user/custom entries
170173
Custom(CustomTerminal),
@@ -206,6 +209,7 @@ impl fmt::Display for Terminal {
206209
Terminal::Guake => write!(f, "Guake"),
207210
Terminal::Ghostty => write!(f, "Ghostty"),
208211
Terminal::Positron => write!(f, "Positron"),
212+
Terminal::Trae => write!(f, "Trae"),
209213
Terminal::Custom(custom_terminal) => write!(f, "{}", custom_terminal.name),
210214
}
211215
}
@@ -371,6 +375,7 @@ impl Terminal {
371375
Terminal::Guake => "guake".into(),
372376
Terminal::Ghostty => "ghostty".into(),
373377
Terminal::Positron => "positron".into(),
378+
Terminal::Trae => "trae".into(),
374379
Terminal::Custom(custom_terminal) => custom_terminal.id.clone().into(),
375380
}
376381
}
@@ -399,6 +404,7 @@ impl Terminal {
399404
Terminal::Windsurf => Some("com.exafunction.windsurf".into()),
400405
Terminal::Ghostty => Some("com.mitchellh.ghostty".into()),
401406
Terminal::Positron => Some("co.posit.positron".into()),
407+
Terminal::Trae => Some("com.trae.app".into()),
402408
Terminal::Custom(custom_terminal) => custom_terminal.macos.bundle_id.clone().map(Cow::Owned),
403409
_ => None,
404410
}
@@ -425,6 +431,7 @@ impl Terminal {
425431
"com.exafunction.windsurf" => Terminal::Windsurf,
426432
"com.mitchellh.ghostty" => Terminal::Ghostty,
427433
"co.posit.positron" => Terminal::Positron,
434+
"com.trae.app" => Terminal::Trae,
428435
// TODO: the following line does not account for Android Studio
429436
_ if bundle.starts_with("com.jetbrains.") | bundle.starts_with("com.google.") => {
430437
Terminal::IntelliJ(IntelliJVariant::from_bundle_id(bundle))
@@ -473,6 +480,7 @@ impl Terminal {
473480
| Terminal::Cursor
474481
| Terminal::CursorNightly
475482
| Terminal::Windsurf
483+
| Terminal::Trae
476484
) || self.as_custom().is_some_and(|c| c.macos.xterm)
477485
}
478486

@@ -500,6 +508,7 @@ impl Terminal {
500508
Terminal::Guake => &["guake"],
501509
Terminal::Ghostty => &["ghostty"],
502510
Terminal::Positron => &["positron"],
511+
Terminal::Trae => &["trae"],
503512

504513
Terminal::Ssh => &["sshd"],
505514
Terminal::Tmux => &["tmux", "tmux: server"],
@@ -566,6 +575,7 @@ impl Terminal {
566575
| Terminal::Cursor
567576
| Terminal::CursorNightly
568577
| Terminal::Windsurf
578+
| Terminal::Trae
569579
)
570580
}
571581

0 commit comments

Comments
 (0)