Skip to content

Fix dictation prompt initialization order #9

@adolago

Description

@adolago

Problem

Dictation command labels and hints are accessed before initialization, causing a TDZ crash when the prompt mounts.

Proposed fix

  • In packages/agent-core/src/cli/cmd/tui/component/prompt/index.tsx, move dictationKey, dictationCommandLabel, dictationCommandDisabled, dictationHintLabel, and dictationHintColor above the first command.register call.

Acceptance criteria

  • The TUI prompt loads without a ReferenceError for dictation fields.
  • Dictation command labels render based on the current dictation state.

Test plan

  • cd packages/agent-core
  • bun dev -- --no-daemon --agent zee --prompt "List my calendar events today."

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions