Commit ac12cf2
committed
fix: Enter key sends message when slash input matches no registered command
the Enter guard in the message composer checked !showCommands, but
showCommands is set to true whenever the input is a single word
starting with /. this blocked Enter from sending even when the typed
slash-word matched zero registered commands -- the dropdown was not
visible, yet the key was swallowed. this is a bug because it prevents
users from sending LLM-directed slash commands (e.g. /podcast, /admin)
that are not registered as Chainlit UI commands.
fix: only block Enter when the command dropdown is actually rendered,
i.e. when showCommands is true AND filteredCommands is non-empty. no
change in behavior when the slash-word matches a registered command --
the dropdown still captures Enter for selection as before.1 parent 5effb66 commit ac12cf2
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
0 commit comments