Skip to content

fix(tui): make /speak slash command dispatch immediately#2496

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-broken-speak-command-13eadbce
Apr 23, 2026
Merged

fix(tui): make /speak slash command dispatch immediately#2496
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-broken-speak-command-13eadbce

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 23, 2026

Problem

Typing /speak in the chat input did nothing — the text was silently forwarded to the agent as a regular message instead of starting speech-to-text transcription.

Root cause

commands.Parser.Parse only dispatches slash commands that have Immediate: true:

if item.SlashCommand == cmd && item.Immediate {
    return item.Execute(arg)
}

Every session slash command (/clear, /new, /exit, /yolo, …) sets Immediate: true, but speakCommand in pkg/tui/commands/speak_darwin.go was missing the flag, so /speak fell through to the regular message path.

Fix

  • Set Immediate: true on the /speak command. Starting transcription is a local UI action that does not interrupt any ongoing stream, consistent with the other session slash commands.
  • Add a darwin-only regression test asserting that parser.Parse("/speak") returns a command that emits StartSpeakMsg.

Validation

  • go build ./...
  • go test ./pkg/tui/commands/...
  • mise lint

The /speak command was missing Immediate: true, so Parser.Parse silently ignored it and the input was forwarded to the agent as a regular message instead of starting speech-to-text transcription. Mark it Immediate like every other session slash command and add a darwin-only regression test.

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner April 23, 2026 09:25
@dgageot dgageot merged commit 45f74a1 into docker:main Apr 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants