feat(tui-go): slash command menu in the chat input
Typing `/` as the first char of a chat line opens the command palette inline (opencode-style), instead of typing a literal slash; mid-line `/` stays literal. Factors openPalette() (shared with the `p` key) and advertises `/ cmds` in the insert-mode footer when the line is empty. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -221,6 +221,10 @@ func (m Model) renderFooter() string {
|
||||
switch {
|
||||
case m.editMode == ModeInsert:
|
||||
hints = []string{hint("enter", "send"), hint("esc", "normal"), hint("↑↓", "history")}
|
||||
// The `/` command menu only triggers on an empty chat line (mid-line `/` is literal).
|
||||
if m.inputMode == ModeRouter && m.inputBuffer == "" {
|
||||
hints = append(hints, hint("/", "cmds"))
|
||||
}
|
||||
case m.displayState() == StateApproval:
|
||||
// Approval actions live in the band itself; the footer offers navigation only.
|
||||
hints = []string{hint("l", "back"), hint("e", "events"), hint("q", "quit")}
|
||||
|
||||
Reference in New Issue
Block a user