use crate::palette::command::{CommandCategory, CommandDef, CommandId};
use crate::app::Action;
pub fn file_operations_commands() -> Vec<CommandDef> {
vec![
CommandDef {
id: CommandId::OpenInEditor,
name: "Open in editor",
key: "e",
category: CommandCategory::FileOperations,
description: "Open selected file in editor",
action_factory: |_| Some(Action::OpenInEditor),
is_enabled: |state| !state.status_selected_path.is_empty(),
keywords: &["open", "editor", "file"],
},
CommandDef {
id: CommandId::LoadFullDiff,
name: "Load full diff",
key: "L",
category: CommandCategory::FileOperations,
description: "Load full diff (remove truncation)",
action_factory: |_| Some(Action::LoadFullDiff),
is_enabled: |_| true,
keywords: &["load", "full", "diff"],
},
]
}