Update prompts.
This commit is contained in:
44
prompts/summarize_staged.prompt
Executable file
44
prompts/summarize_staged.prompt
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
SYSTEM_PROMPT_FILE="$SCRIPT_DIR/coder.md"
|
||||
PROMPT='
|
||||
Summarize the changes made in this diff, given the diff and the after code.
|
||||
The rest of the code repository is not provided.
|
||||
|
||||
OUTPUT FORMAT:
|
||||
|
||||
```
|
||||
# Digest
|
||||
|
||||
one liner detailing what has been changed
|
||||
|
||||
# Summary
|
||||
|
||||
short paragraph summary of the changes made in the diff
|
||||
|
||||
# Details
|
||||
|
||||
detailed breakdown of the changes, grouped by topic
|
||||
```
|
||||
'
|
||||
|
||||
MODEL="gemini-3-flash-preview"
|
||||
FALLBACK="claude-sonnet-4.6"
|
||||
|
||||
context() {
|
||||
git diff --name-only --cached | xargs -I {} echo -i "{}" | xargs code2prompt .
|
||||
}
|
||||
|
||||
diff() {
|
||||
git diff --cached
|
||||
}
|
||||
|
||||
aicli \
|
||||
-m "$MODEL" \
|
||||
-b "$FALLBACK" \
|
||||
-sf "$SYSTEM_PROMPT_FILE" \
|
||||
-p "$PROMPT" \
|
||||
-p "DIFF:\n\n$(diff)" \
|
||||
-p "AFTER CODE:\n\n$(context)" |
|
||||
glow -p
|
||||
Reference in New Issue
Block a user