You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/prompt-templates.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ By convention, store your templates in the `.giv/templates/` folder in your proj
33
33
```
34
34
.giv/
35
35
├── templates/
36
-
│ ├── summary.md
37
-
│ ├── announcement.md
38
-
│ └── message.md
36
+
│ ├── summary_prompt.md
37
+
│ ├── announcement_prompt.md
38
+
│ └── message_prompt.md
39
39
├── src/
40
40
```
41
41
@@ -51,17 +51,16 @@ Follow these steps to create or customize a prompt template:
51
51
2.**Copy or Create File:** In `templates/`, create a new file named `<subcommand>_prompt.md`, or copy an existing template from the `templates/` directory of this repository.
52
52
3.**Insert Tokens:** Open the file and place tokens where dynamic content should appear. Use headers, paragraphs, or lists for structure.
53
53
4.**Save & Reference:** Save the file. When running `giv`, use the `--prompt-file` option to point to your template:
grep -E '^[[:space:]]*name[[:space:]]*=[[:space:]]*"[^"]+"'"${file}"| sed -E 's/^[[:space:]]*name[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/'| head -n1 &&
188
+
# Single quotes
189
+
grep -E "^[[:space:]]*name[[:space:]]*=[[:space:]]*'[^']+'""${file}"| sed -E "s/^[[:space:]]*name[[:space:]]*=[[:space:]]*'([^']+)'.*/\1/"| head -n1
grep -E '^[[:space:]]*rootProject\.name[[:space:]]*=[[:space:]]*"[^"]+"'"${file}"| sed -E 's/^[[:space:]]*rootProject\.name[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/'| head -n1 &&
200
+
# Single quotes
201
+
grep -E "^[[:space:]]*rootProject\.name[[:space:]]*=[[:space:]]*'[^']+'""${file}"| sed -E "s/^[[:space:]]*rootProject\.name[[:space:]]*=[[:space:]]*'([^']+)'.*/\1/"| head -n1
202
+
;;
203
+
pom.xml)
204
+
awk -F'[<>]''/<name>/ {print $3; exit}'"${file}"
205
+
;;
206
+
*)
207
+
echo"Unknown project file type: ${file}">&2
208
+
return 1
209
+
;;
210
+
esac
211
+
return
212
+
fi
213
+
done
214
+
}
215
+
162
216
# Extract version string from a line (preserving v if present)
163
217
parse_version() {
164
218
#printf 'Parsing version from: %s\n' "$1" >&2
@@ -259,11 +313,11 @@ generate_remote() {
259
313
260
314
# Escape for JSON (replace backslash, double quote, and control characters)
261
315
# Use json_escape to safely encode the prompt as a JSON string
0 commit comments