| 1 | //! `/transcript` command. |
| 2 | |
| 3 | use crate::commands::traits::{CommandInfo, RegisterCommand}; |
| 4 | use crate::localization::MessageId; |
| 5 | use crate::tui::app::{App, AppAction}; |
| 6 | |
| 7 | use super::CommandResult; |
| 8 | |
| 9 | pub(in crate::commands) const COMMAND_INFO: CommandInfo = CommandInfo { |
| 10 | name: "transcript", |
| 11 | aliases: &[], |
| 12 | usage: "/transcript", |
| 13 | // Reuse the keybinding description so the command palette and shortcut |
| 14 | // catalog describe the same live-transcript surface in every locale. |
| 15 | description_id: MessageId::KbLiveTranscript, |
| 16 | }; |
| 17 | |
| 18 | pub(in crate::commands) struct TranscriptCmd; |
| 19 | |
| 20 | impl RegisterCommand for TranscriptCmd { |
| 21 | fn info() -> &'static CommandInfo { |
| 22 | &COMMAND_INFO |
| 23 | } |
| 24 | |
| 25 | fn execute(_app: &mut App, _arg: Option<&str>) -> CommandResult { |
| 26 | CommandResult::action(AppAction::OpenLiveTranscript) |
| 27 | } |
| 28 | } |
| 29 |