lumen/src/command/list.rs
Huang Rui 9c8db9f6b9
feat(prompts): Add customizable prompt configuration
- Add prompt configuration support for explain, draft, and operate
- Update command execution to pass prompt configs to providers
- Add default prompt configs and fallback to built-in prompts

Signed-off-by: Huang Rui <vowstar@gmail.com>
2025-06-21 17:47:43 +08:00

30 lines
711 B
Rust

use async_trait::async_trait;
use crate::{
config::configuration::LumenConfig,
error::LumenError,
git_entity::{commit::Commit, GitEntity},
provider::LumenProvider,
};
use super::{explain::ExplainCommand, Command, LumenCommand};
pub struct ListCommand;
#[async_trait]
impl Command for ListCommand {
async fn execute(
&self,
provider: &LumenProvider,
config: &LumenConfig,
) -> Result<(), LumenError> {
let sha = LumenCommand::get_sha_from_fzf()?;
let git_entity = GitEntity::Commit(Commit::new(sha)?);
ExplainCommand {
git_entity,
query: None,
}
.execute(provider, config)
.await
}
}