aipack 0.8.25

Command Agent runner to accelerate production coding with genai.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::tui::core::{AppState, UiAction};

impl AppState {
	pub fn action(&self) -> Option<&UiAction> {
		self.core.do_action.as_ref()
	}

	pub fn set_action(&mut self, action: impl Into<UiAction>) {
		let action = action.into();
		self.core.do_action = Some(action);
		self.trigger_redraw();
	}

	pub fn clear_action(&mut self) {
		self.core.do_action = None;
	}
}