Skip to content

A simple command-line tool that automatically generates a concise title and a detailed description of PR.

License

Notifications You must be signed in to change notification settings

ishikawa/sum-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sum-diff

Summarize your changes into a concise title and a detailed description.

sum-diff is a simple command-line tool that automatically generates a concise title and a detailed description by analyzing the current git branch, including:

  • Branch name
  • Code changes (git diff)

Installation

Install using pipx:

# Download and unzip
$ unzip sum-diff.zip
$ pipx install ./sum-diff

# Install nightly from GitHub
$ pipx install git+https://github.com/ishikawa/sum-diff

API Key

sum-diff uses Anthropic's Claude 3.5 Sonnet to generate the output. Obtain an API key from Anthropic's console and set it as an environment variable:

$ export ANTHROPIC_API_KEY=sk-ant-...

Usage

After making changes to your project and before creating a PR, run the sum-diff command to have the AI generate a title and description for your PR.

$ sum-diff

The command will take a few seconds to process and then output the title and description. For example:

Add `while` statement support to compiler

This PR introduces support for `while` loops in the compiler, enhancing the language's control flow capabilities.

Key changes:
- Add `While` token and parsing logic in `tokenizer.rs`
- Implement `WhileStmt` struct and parsing in `parser.rs`
- Add code generation for `while` loops in `asm.rs`
- Update `LocalVarAllocator` to handle `while` statements in `allocator.rs`
- Add test cases for `while` loops in `test.sh`

The implementation follows the existing pattern for control flow statements, such as `if` statements. The `while` loop consists of a condition and a body, which are evaluated and executed accordingly.

Example of the new `while` loop syntax:

```rust
i = 0;
while (i < 20)
  i = i + 1;
return i;
```

This PR completes the basic control flow structures for the compiler, allowing for more complex program logic to be expressed in the language.

About

A simple command-line tool that automatically generates a concise title and a detailed description of PR.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages