#[derive(Debug, Clone)]
pub enum Msg {
Tick,
RequestQuit,
RequestStage { path: String },
RequestUnstage { path: String },
RequestCommit {
message: String,
amend: bool,
},
RequestPush { force: bool },
RequestRebaseContinue {
message: Option<String>,
author_name: Option<String>,
author_email: Option<String>,
},
RequestRebaseAbort,
StageStarted { path: String },
StageSuccess { path: String },
StageFailed { path: String, error: String },
CommitStarted,
CommitSuccess { hash: String },
CommitFailed { error: String },
RebaseStarted,
RebaseSuccess { outcome: RebaseOutcome },
RebaseFailed { error: String },
StatusRefreshed { entries: Vec<StatusEntryData> },
StatusRefreshFailed { error: String },
DiffComputed { path: String, content: String, truncated: bool },
NavigateUp,
NavigateDown,
NavigateTop,
NavigateBottom,
PageUp,
PageDown,
FocusNext,
FocusPrev,
ToggleHelp,
ShowThemePicker,
HideThemePicker,
ApplyTheme { name: String },
SetFeedback { message: Option<String> },
SetError { error: Option<String>, guidance: Option<String> },
ClearError,
StartCommitInput,
CancelCommitInput,
UpdateCommitInput { text: String },
CharInput { ch: char },
Backspace,
}
#[derive(Debug, Clone)]
pub enum RebaseOutcome {
Completed,
PausedForEdit,
PausedForReword { commit_hash: String, current_message: String },
Conflicts { files: Vec<String> },
}
#[derive(Debug, Clone)]
pub struct StatusEntryData {
pub path: String,
pub staged: bool,
pub unstaged: bool,
pub conflict: bool,
}