Release v0.1.4
✨ Smart Prompt Auto-Completion
Custom prompts just got a lot easier! gcop-rs now automatically appends missing required sections to your prompts.
Commit Prompts
Just write your instructions - gcop-rs handles the rest:
[commit]
custom_prompt = "Generate commit message in Chinese, be concise"If {diff} is missing, gcop-rs automatically appends the diff and context sections.
Review Prompts
For reviews, gcop-rs will:
- Append
{diff}section if missing - Always append JSON output format specification
[review]
custom_prompt = "Review for security vulnerabilities, focus on SQL injection"No need to write the JSON format yourself - it's automatically added.
🔍 Verbose Mode Shows Full Prompts
Use -v to see the complete prompt sent to LLM, including auto-completed sections:
gcop-rs -v commit
gcop-rs -v reviewThis helps debug custom prompts and understand what the AI actually receives.
🐛 Fixed JSON Response Parsing
Fixed a bug in clean_json_response where the chain of unwrap_or(response) calls would incorrectly fall back to the original response instead of the intermediate result.
Now uses defensive parsing that extracts content between the first { and last }, making it robust against various LLM response formats:
// Now handles any wrapper format:
// "Sure! Here's the JSON: ```json {...} ``` Hope this helps!"
// → Correctly extracts {...}📦 Installation
cargo install gcop-rsOr build from source:
git clone https://github.com/AptS-1547/gcop-rs.git
cd gcop-rs
cargo build --release