pub fn generate_commit_message_with_chain(
diff: &str,
registry: &AgentRegistry,
runtime: &mut PipelineRuntime<'_>,
agents: &[String],
template_context: &TemplateContext,
workspace: &dyn Workspace,
prompt_history: &HashMap<String, String>,
) -> Result<CommitMessageResult>Expand description
Generate a commit message with fallback chain support.
Tries each agent in the chain sequentially until one succeeds. Uses the minimum budget across all agents in the chain for truncation to ensure the diff fits all potential fallback agents.
§Arguments
diff- The diff to generate a commit message forregistry- Agent registry for resolving agent configsruntime- Pipeline runtime for executionagents- Chain of agents to try in order (first agent tried first)template_context- Template context for prompt generationworkspace- Workspace for file operationsprompt_history- History of prompts for replay detection
§Returns
Ok(CommitMessageResult)- If any agent in the chain succeedsErr- If all agents in the chain fail