From 955511a89f4c5fe0ec998a79b69543f5a8bdd13c Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Mon, 13 Jul 2026 19:20:28 +0300 Subject: [PATCH] [enhancement] fix(#575): drop description text from slash-command suggestions (#581) * fix(#575): drop description text from slash-command suggestions * fix(#575): show /stop and /interrupt in slash-command menu --------- Co-authored-by: M57 --- .../m57/hermescontrol/ui/chat/ChatScreen.kt | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 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 24a956d2..0a63fdb8 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,11 +717,8 @@ private fun ChatInputBar( elevation = CardDefaults.cardElevation(defaultElevation = 6.dp), ) { Column { - // Build command list from dynamic catalog (pairs = [name, description]) - val allCommands = commandCatalog.pairs.associate { (name, desc) -> name to desc } - // Commands hidden from suggestion menu (still work when manually typed) - val hiddenSlashDisplay = setOf("/stop", "/interrupt") - val commandNames = allCommands.keys.filter { it !in hiddenSlashDisplay } + // All catalog commands are offered in the suggestion menu + val commandNames = commandCatalog.pairs.map { it[0] } androidx.compose.animation.AnimatedVisibility( visible = inputText.startsWith("/") && !inputText.contains(" "), @@ -747,24 +744,13 @@ private fun ChatInputBar( modifier = Modifier.heightIn(max = 200.dp), ) { items(filteredCommands, key = { it }) { cmd -> - val description = allCommands[cmd] ?: "" DropdownMenuItem( text = { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - ) { - Text( - cmd, - fontWeight = androidx.compose.ui.text.font.FontWeight.Bold, - color = MaterialTheme.colorScheme.primary, - ) - Text( - description, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } + Text( + cmd, + fontWeight = androidx.compose.ui.text.font.FontWeight.Bold, + color = MaterialTheme.colorScheme.primary, + ) }, onClick = { onInputChange(cmd) }, )