) -> Option {
@@ -4701,12 +4707,7 @@ impl Tty7App {
fn render_settings_about(&self, cx: &mut Context) -> AnyElement {
let theme = cx.theme();
- let (foreground, muted_fg, success, warning) = (
- theme.foreground,
- theme.muted_foreground,
- theme.success,
- theme.warning,
- );
+ let (foreground, muted_fg) = (theme.foreground, theme.muted_foreground);
let update_status = cx
.try_global::()
@@ -4721,66 +4722,6 @@ impl Tty7App {
);
let phase_text = localized_update_phase(&update_status.phase);
let check_for_updates = cx.global::().check_for_updates;
- let install_cli_on_path = cx.global::().install_cli_on_path;
- let (explorer_status, explorer_note) = self
- .active_settings()
- .map(|settings| {
- (
- settings.explorer_context_menu_status.clone(),
- settings.explorer_context_menu_note.clone(),
- )
- })
- .unwrap_or((
- Ok(crate::core::explorer_context_menu::Status::Unsupported),
- None,
- ));
- let (
- explorer_status_text,
- explorer_status_color,
- register_label,
- register_disabled,
- unregister_disabled,
- ) = match explorer_status.as_ref() {
- Ok(crate::core::explorer_context_menu::Status::NotRegistered) => (
- t(L10nKey::SettingsExplorerNotRegistered),
- muted_fg,
- t(L10nKey::SettingsExplorerRegister),
- false,
- true,
- ),
- Ok(crate::core::explorer_context_menu::Status::Registered) => (
- t(L10nKey::SettingsExplorerRegistered),
- success,
- t(L10nKey::SettingsExplorerRegister),
- true,
- false,
- ),
- Ok(crate::core::explorer_context_menu::Status::NeedsUpdate) => (
- t(L10nKey::SettingsExplorerNeedsUpdate),
- warning,
- t(L10nKey::SettingsExplorerUpdate),
- false,
- false,
- ),
- Ok(crate::core::explorer_context_menu::Status::Unsupported) => (
- t(L10nKey::SettingsExplorerUnavailable),
- muted_fg,
- t(L10nKey::SettingsExplorerRegister),
- true,
- true,
- ),
- Err(_) => (
- t(L10nKey::SettingsExplorerStatusUnavailable),
- warning,
- t(L10nKey::SettingsExplorerRegister),
- false,
- false,
- ),
- };
- let explorer_feedback = explorer_note
- .as_ref()
- .map(ExplorerContextMenuNote::localized)
- .or_else(|| explorer_status.err());
let logo = Arc::new(Image::from_bytes(
ImageFormat::Png,
@@ -4943,107 +4884,6 @@ impl Tty7App {
),
),
)
- .when(cfg!(windows), |page| {
- page.child(
- v_flex()
- .mt_6()
- .gap_2()
- .child(self.section_rule(cx))
- .child(
- div()
- .text_sm()
- .font_weight(FontWeight::MEDIUM)
- .text_color(foreground)
- .child(t(L10nKey::SettingsExplorerContextMenu)),
- )
- .child(
- div()
- .text_sm()
- .text_color(muted_fg)
- .child(t(L10nKey::SettingsExplorerContextMenuDesc)),
- )
- .child(
- h_flex()
- .gap_2()
- .items_center()
- .child(div().size_2().rounded_full().bg(explorer_status_color))
- .child(
- div()
- .text_sm()
- .text_color(foreground)
- .child(explorer_status_text),
- ),
- )
- .child(
- h_flex()
- .gap_2()
- .child(
- Button::new("explorer-menu-register")
- .label(register_label)
- .small()
- .disabled(register_disabled)
- .on_click(cx.listener(|this, _, _window, cx| {
- this.register_explorer_context_menu(cx)
- })),
- )
- .child(
- Button::new("explorer-menu-unregister")
- .label(t(L10nKey::SettingsExplorerUnregister))
- .small()
- .disabled(unregister_disabled)
- .on_click(cx.listener(|this, _, _window, cx| {
- this.unregister_explorer_context_menu(cx)
- })),
- ),
- )
- .when_some(explorer_feedback, |section, message| {
- section.child(div().text_xs().text_color(muted_fg).child(message))
- })
- .child(
- div()
- .text_xs()
- .text_color(muted_fg)
- .child(t(L10nKey::SettingsExplorerWindows11Note)),
- ),
- )
- })
- .child(
- v_flex()
- .mt_6()
- .gap_2()
- .child(self.section_rule(cx))
- .child(
- div()
- .text_sm()
- .font_weight(FontWeight::MEDIUM)
- .text_color(foreground)
- .child(t(L10nKey::SettingsCommandLine)),
- )
- .child(
- div()
- .text_sm()
- .text_color(muted_fg)
- .child(t(L10nKey::SettingsCommandLineDesc)),
- )
- .child(
- h_flex()
- .gap_2()
- .items_center()
- .child(
- crate::ui::theme::switch("install-cli-on-path", cx)
- .checked(install_cli_on_path)
- .on_click(cx.listener(|this, on: &bool, _w, cx| {
- this.set_install_cli_on_path(*on, cx)
- })),
- )
- .child(
- div()
- .text_sm()
- .text_color(foreground)
- .child(t(L10nKey::SettingsInstallCliOnPath)),
- ),
- ),
- )
.child(
v_flex()
.mt_6()
@@ -5141,7 +4981,7 @@ mod tests {
("bell", Terminal),
("known_hosts", Ssh),
("claude", Agents),
- ("right click", About),
+ ("symlink", Agents),
];
for (query, expected) in cases {
assert_eq!(
@@ -5153,18 +4993,16 @@ mod tests {
}
}
+ /// The `tty7` CLI exists so scripts and coding agents can drive tty7, so it
+ /// lives with the other agent integrations rather than under About.
#[test]
- fn explorer_context_menu_search_entry_uses_localized_keys() {
+ fn command_line_tool_is_searchable_under_agents() {
let entry = settings_search_entries()
.iter()
- .find(|entry| entry.title == L10nKey::SettingsExplorerContextMenu)
- .expect("Explorer settings should be searchable");
+ .find(|entry| entry.title == L10nKey::SettingsSearchCommandLineToolTitle)
+ .expect("the CLI setting should be searchable");
- assert_eq!(entry.section.profile_label(), "settings:about");
- assert_eq!(
- entry.keywords,
- L10nKey::SettingsSearchExplorerContextMenuKeywords
- );
+ assert_eq!(entry.section.profile_label(), "settings:agents");
}
#[test]