cmd

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package cmd provides additional CLI commands for ai-commit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSummarizeCmd

func NewSummarizeCmd(setupAIEnvironment func() (context.Context, context.CancelFunc, *config.Config, ai.AIClient, error)) *cobra.Command

NewSummarizeCmd creates the "summarize" command. The setupAIEnvironment function is passed from main so that we reuse the existing environment setup.

func SummarizeCommits

func SummarizeCommits(ctx context.Context, aiClient ai.AIClient, cfg *config.Config) error

SummarizeCommits lists all commits, allows the user to select one via fzf, retrieves its diff, builds a prompt, gets the summary from the AI provider, and prints it.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL