feat: add TUI ticket role commands

This commit is contained in:
2026-06-06 04:57:10 +09:00
parent eb95722bd0
commit e125ebb374
4 changed files with 371 additions and 17 deletions
+9 -1
View File
@@ -11,7 +11,8 @@ use crate::block::{
};
use crate::cache::FileCache;
use crate::command::{
CommandCandidate, CommandEnvironment, CommandExecution, CommandInputMode, CommandRegistry,
CommandAction, CommandCandidate, CommandEnvironment, CommandExecution, CommandInputMode,
CommandRegistry,
};
use crate::input::InputBuffer;
use crate::scroll::Scroll;
@@ -246,6 +247,7 @@ pub struct App {
pub input_mode: CommandInputMode,
pub command_registry: CommandRegistry,
command_completion_selected: Option<usize>,
pending_command_action: Option<CommandAction>,
pub quit: bool,
/// 2-tap guard for `Ctrl-C` when the Pod is not running. First press
/// records the instant; a second press within the timeout exits the
@@ -314,6 +316,7 @@ impl App {
input_mode: CommandInputMode::Composer,
command_registry: CommandRegistry::default(),
command_completion_selected: None,
pending_command_action: None,
quit: false,
quit_confirm: None,
blocks: Vec::new(),
@@ -1626,9 +1629,14 @@ impl App {
self.rewind_picker = None;
self.rewind_request_pending = true;
}
self.pending_command_action = result.action;
result.method
}
pub fn take_pending_command_action(&mut self) -> Option<CommandAction> {
self.pending_command_action.take()
}
fn push_command_diagnostic(&mut self, message: impl Into<String>) {
self.blocks.push(Block::Alert {
level: AlertLevel::Warn,