feat(agentcompany-rust): scaffold native shell and runtime bridge
This commit is contained in:
1 parent
34814b4dfd
commit
2cddf89717
40 files changed
+11300
-3
No files matched your search
@@ -0,0 +1,13 @@
|
||||
use domain::SectionId;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum AppAction {
|
||||
SelectSection(SectionId),
|
||||
SelectRun(Option<String>),
|
||||
SelectApproval(Option<String>),
|
||||
SelectMessage(Option<String>),
|
||||
SelectDocument(Option<String>),
|
||||
SelectWorkspace(Option<String>),
|
||||
Status(String),
|
||||
ClearStatus,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
pub mod actions;
|
||||
pub mod state;
|
||||
|
||||
pub use actions::AppAction;
|
||||
pub use state::AppState;
|
||||
@@ -0,0 +1,22 @@
|
||||
use domain::SectionId;
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct AppState {
|
||||
pub section: SectionId,
|
||||
pub selected_run_id: Option<String>,
|
||||
pub selected_approval_id: Option<String>,
|
||||
pub selected_message_id: Option<String>,
|
||||
pub selected_document_id: Option<String>,
|
||||
pub selected_workspace_id: Option<String>,
|
||||
pub status_line: Option<String>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn set_status(&mut self, value: impl Into<String>) {
|
||||
self.status_line = Some(value.into());
|
||||
}
|
||||
|
||||
pub fn clear_status(&mut self) {
|
||||
self.status_line = None;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user