use super::ui_state::ChatMode;
use crate::command::chat::error::ChatError;
use crate::command::chat::storage::ToolCallItem;
#[allow(dead_code)]
pub enum Action {
SendMessage,
InsertChar(char),
DeleteChar,
DeleteForward,
MoveCursor(CursorDirection),
ClearInput,
AtPopupActivate,
AtPopupClose,
AtPopupFilter(String),
AtPopupNavigate(CursorDirection),
AtPopupConfirm,
FilePopupActivate,
FilePopupClose,
FilePopupFilter(String),
FilePopupNavigate(CursorDirection),
FilePopupConfirm,
SkillPopupActivate,
SkillPopupClose,
SkillPopupFilter(String),
SkillPopupNavigate(CursorDirection),
SkillPopupConfirm,
StreamChunk,
ToolCallRequest(Vec<ToolCallItem>),
StreamDone,
StreamError(ChatError),
StreamCancelled,
StreamRetrying {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
error: String,
},
StreamCompacting,
StreamCompacted {
messages_before: usize,
},
ExecutePendingTool,
RejectPendingTool,
RejectPendingToolWithReason(String),
AllowAndExecutePendingTool,
AskNavigate(CursorDirection),
AskOptionNavigate(CursorDirection),
AskSingleSelect,
AskToggleMultiSelect,
AskInputChar(char),
AskDeleteChar,
AskSubmitAnswer,
AskCancel,
ToolInteractNavigate(CursorDirection),
ToolInteractInputChar(char),
ToolInteractDeleteChar,
ToolInteractConfirm,
EnterMode(ChatMode),
ExitToChat,
Scroll(CursorDirection),
PageScroll(CursorDirection),
BrowseNavigate(CursorDirection),
BrowseFineScroll(CursorDirection),
BrowseCopyMessage,
BrowseInputChar(char),
BrowseDeleteChar,
BrowseClearFilter,
BrowseToggleRole,
ConfigNavigate(CursorDirection),
ConfigSwitchProvider(CursorDirection),
ConfigEnter,
ConfigEditChar(char),
ConfigEditDelete,
ConfigEditDeleteForward,
ConfigEditMoveCursor(CursorDirection),
ConfigEditMoveHome,
ConfigEditMoveEnd,
ConfigEditClearLine,
ConfigEditSubmit,
ConfigAddProvider,
ConfigDeleteProvider,
ConfigSetActiveProvider,
ConfigSwitchTab(CursorDirection),
ToggleMenuNavigate(CursorDirection),
ToggleMenuToggle,
ToggleMenuEnableAll,
ToggleMenuDisableAll,
CompactExemptToggle,
ModelSelectNavigate(CursorDirection),
ModelSelectConfirm,
ThemeSelectNavigate(CursorDirection),
ThemeSelectConfirm,
StartArchiveConfirm,
ArchiveConfirmEditName,
ArchiveConfirmMoveCursor(CursorDirection),
ArchiveConfirmInputChar(char),
ArchiveConfirmDeleteChar,
ArchiveWithDefault,
ArchiveWithCustom,
ClearSession,
ListSessions,
SwitchSession { session_id: String },
NewSession,
LoadSessionList,
SessionListNavigate(CursorDirection),
RestoreSession,
DeleteSession,
NewSessionFromList,
RespawnTeammate { name: String },
SessionStateRestored,
StartArchiveList,
ArchiveListNavigate(CursorDirection),
RestoreArchive,
DeleteArchive,
SwitchModel,
SwitchTheme,
CancelStream,
CancelToolsOnly,
ShowToast(String, bool),
TickToast,
SaveConfig,
CopyLastAiReply,
ShowHelp,
OpenLogWindows,
Quit,
ToggleExpandTools,
}
#[derive(Debug, Clone, Copy)]
pub enum CursorDirection {
Up,
Down,
}