From 173820c3048045054890fe54fec99aa767a95d4f Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Mon, 13 Jul 2026 19:51:40 +0300 Subject: [PATCH] fix(#574): hide desktop/CLI-only slash commands from mobile suggestions (#582) * fix(#575): drop description text from slash-command suggestions * fix(#575): show /stop and /interrupt in slash-command menu * fix(#574): hide desktop/CLI-only slash commands from mobile suggestion menu Recreate hiddenSlashDisplay blocklist removed in 1f322e3 with the 33 cli_only/TUI-only commands that don't function on mobile (issue #574). /stop and /interrupt intentionally remain visible (they work on mobile, #575). --------- Co-authored-by: M57 Co-authored-by: M57 --- .../m57/hermescontrol/ui/chat/ChatScreen.kt | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt index 0a63fdb8..aed5c013 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt @@ -717,8 +717,47 @@ private fun ChatInputBar( elevation = CardDefaults.cardElevation(defaultElevation = 6.dp), ) { Column { - // All catalog commands are offered in the suggestion menu - val commandNames = commandCatalog.pairs.map { it[0] } + // Commands hidden from the suggestion menu — desktop/CLI-only and + // TUI-only commands that don't function on mobile (issue #574). + // Source of truth: backend `cli_only` / TUI-only flags in the catalog. + val hiddenSlashDisplay = + setOf( + "/clear", + "/redraw", + "/history", + "/save", + "/prompt", + "/snapshot", + "/handoff", + "/journey", + "/config", + "/statusbar", + "/timestamps", + "/verbose", + "/skin", + "/indicator", + "/busy", + "/tools", + "/toolsets", + "/skills", + "/pet", + "/hatch", + "/cron", + "/reload", + "/browser", + "/plugins", + "/billing", + "/platforms", + "/copy", + "/paste", + "/image", + "/quit", + // TUI-only extras (meaningless outside the TUI) + "/compact", + "/logs", + "/mouse", + ) + val commandNames = commandCatalog.pairs.map { it[0] }.filter { it !in hiddenSlashDisplay } androidx.compose.animation.AnimatedVisibility( visible = inputText.startsWith("/") && !inputText.contains(" "),