mirror of
https://github.com/Pull-Pal/pull-pal.git
synced 2024-11-03 01:38:33 -04:00
d92efcb7e9
improve prompt templates to get response in yaml format and make parsing easier also add debug file functionality so that exact input, prompts, and output can be easily seen for every request
36 lines
970 B
Cheetah
36 lines
970 B
Cheetah
File:
|
|
- name: {{ .File.Path }}:
|
|
contents:
|
|
```
|
|
{{ .File.Contents }}
|
|
```
|
|
|
|
Diff:
|
|
```
|
|
{{ .Diff }}
|
|
```
|
|
|
|
Comment:
|
|
{{ .Contents }}
|
|
|
|
The above is information about a comment left on a file. The diff contains information about the precise location of the comment.
|
|
|
|
First, determine if the comment is a question or a request for changes.
|
|
If the comment is a question, come up with an answer, and respond exactly as outlined directly below "Response Template A".
|
|
If the comment is a request, modify the file provided at the beginning of the message, and respond exactly as outlined directly below "Response Template B".
|
|
For either response template, respond in a parseable YAML format. Respond only with YAML, and nothing else.
|
|
|
|
Response Template A:
|
|
responseType: 0
|
|
response: |
|
|
[your answer]
|
|
|
|
Response Template B:
|
|
responseType: 1
|
|
file:
|
|
path: {{ .File.Path }}
|
|
contents: |
|
|
[new {{ .File.Path }} contents]
|
|
response: |
|
|
[additional context about your changes]
|