Skip to content

Commit 1ab7ac6

Browse files
committed
Refactor prompt and summary files for tera
- Renamed and updated files to use tera for prompt formatting
1 parent 672592d commit 1ab7ac6

File tree

9 files changed

+175
-61
lines changed

9 files changed

+175
-61
lines changed

Cargo.lock

Lines changed: 152 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ serde_json = "1.0.92"
3232
simple_logger = "4.0.0"
3333
strum = "0.24.1"
3434
strum_macros = "0.24.3"
35+
tera = { version = "1.17.1", default-features = false }
3536
tiktoken-rs = "0.1.2"
3637
tokio = { version = "1.25.0", features = ["full"] }
37-
toml = "0.7.1"
38+
toml = "0.7.2"
3839
which = "4.4.0"

e2e/test_githook.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -eu
33

44
(
5+
rm -rf test_dir_foo4
56
mkdir test_dir_foo4
67
cd test_dir_foo4
78
git init
@@ -17,4 +18,4 @@ set -eu
1718

1819
cat $TEMPFILE
1920
)
20-
rm -rf test_dir_foo4
21+
rm -rf test_dir_foo4

e2e/test_install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -eu
33

44
(
5+
rm -rf test_dir_foo
56
mkdir test_dir_foo
67
cd test_dir_foo
78
git init
@@ -16,6 +17,7 @@ rm -rf test_dir_foo ;
1617
#############################
1718

1819
(
20+
rm -rf test_dir_foo2
1921
mkdir test_dir_foo2
2022
cd test_dir_foo2
2123
git init
@@ -28,6 +30,7 @@ rm -rf test_dir_foo2
2830
#############################
2931

3032
(
33+
rm -rf test_dir_foo3
3134
mkdir test_dir_foo3
3235
cd test_dir_foo3
3336
# no git init

prompts/summarize_commit.prompt.txt renamed to prompts/summarize_commit.tera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Write the most important bullet points. The list should not be more than a few b
99

1010
THE FILE SUMMARIES:
1111
```
12-
<SUMMARY_POINTS>
12+
{{ summary_points }}
1313
```
1414

1515
Remember to write only the most important points and do not write more than a few bullet points.

prompts/summarize_file_diff.prompt.txt renamed to prompts/summarize_file_diff.tera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ It is given only as an example of appropriate comments.
4141

4242
THE GIT DIFF TO BE SUMMARIZED:
4343
```
44-
<FILE_DIFF>
44+
{{ file_diff }}
4545
```
4646

4747
THE SUMMARY:

prompts/title_commit.prompt.txt renamed to prompts/title_commit.tera

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ Schedule all GitHub actions on all OSs
1717

1818
THE FILE SUMMARIES:
1919
```
20-
<SUMMARY_POINTS>
20+
{{ summary_points }}
2121
```
2222

2323
Remember to write only one line, no more than 50 characters.
24-
THE PULL REQUEST TITLE:
25-
24+
THE PULL REQUEST TITLE:

0 commit comments

Comments
 (0)