Skip to content

Commit d11d62e

Browse files
committed
Update file path examples in edit format instructions to use markdown headings
1 parent f450a64 commit d11d62e

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

‎apps/editor/src/constants/edit-format-instructions.ts‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const intro = `Whenever showing a new, updated, renamed, or deleted file, provide a brief explanation, then print the path in a markdown heading (e.g. - New file: \`src/examples/hello.py\`, - Updated file: \`src/examples/hello.py\`, - Renamed file: \`src/examples/hello.py\` (old) \`src/welcome.py\` (new), - Deleted file: \`src/examples/hello.py\`)`
1+
const intro = `Whenever showing a new, updated, renamed, or deleted file, provide a brief explanation, then print the path in a markdown heading (e.g. ### New file: \`src/examples/hello.py\`, ### Updated file: \`src/examples/hello.py\`, ### Renamed file: \`src/examples/hello.py\` (old) \`src/welcome.py\` (new), ### Deleted file: \`src/examples/hello.py\`)`
22

33
export const EDIT_FORMAT_INSTRUCTIONS_WHOLE = `${intro}, followed by a markdown code block with the file's FULL (from cover to cover) contents. Example:
44
Updated the greeting text.
55
6-
- Updated file: \`src/examples/hello.py\`
6+
### Updated file: \`src/examples/hello.py\`
77
88
\`\`\`python
99
GREETING = "Hello, World!"
@@ -14,7 +14,7 @@ def show_greeting():
1414
1515
Created a simple calculator with addition and subtraction.
1616
17-
- Created file: \`src/examples/calculator.py\`
17+
### Created file: \`src/examples/calculator.py\`
1818
1919
\`\`\`python
2020
def add(a, b):
@@ -24,14 +24,14 @@ def subtract(a, b):
2424
return a - b
2525
\`\`\`
2626
27-
- Deleted file: \`src/examples/weekdays.py\`
27+
### Deleted file: \`src/examples/weekdays.py\`
2828
29-
- Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
29+
### Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
3030

3131
export const EDIT_FORMAT_INSTRUCTIONS_TRUNCATED = `${intro}, followed by a markdown code block with file's contents. As a space saving measure, truncate blocks like unchanged function bodies (code inside {}) by replacing with ellipsis comments. Example:
3232
Updated the greeting text.
3333
34-
- Updated file: \`src/examples/hello.js\`
34+
### Updated file: \`src/examples/hello.js\`
3535
3636
\`\`\`javascript
3737
const DURATION = 5;
@@ -48,7 +48,7 @@ function showGreeting() {
4848
4949
Updated the purpose text.
5050
51-
- Updated file: \`src/README.md\`
51+
### Updated file: \`src/README.md\`
5252
5353
\`\`\`markdown
5454
## Purpose
@@ -66,7 +66,7 @@ Greet user saying "Hello, World!", for a duration of 5 seconds.
6666
6767
Created a simple calculator with addition and subtraction.
6868
69-
- Created file: \`src/examples/calculator.js\`
69+
### Created file: \`src/examples/calculator.js\`
7070
7171
\`\`\`javascript
7272
function add(a, b) {
@@ -78,14 +78,14 @@ function subtract(a, b) {
7878
}
7979
\`\`\`
8080
81-
- Deleted file: \`src/examples/weekdays.js\`
81+
### Deleted file: \`src/examples/weekdays.js\`
8282
83-
- Renamed file: \`src/examples/math-tools.js\` (old) \`src/examples/calculator.js\` (new)`
83+
### Renamed file: \`src/examples/math-tools.js\` (old) \`src/examples/calculator.js\` (new)`
8484

8585
export const EDIT_FORMAT_INSTRUCTIONS_DIFF = `${intro}, followed by a unified diff within a markdown code block. Example:
8686
Updated the greeting text.
8787
88-
- Updated file: \`src/examples/hello.py\`
88+
### Updated file: \`src/examples/hello.py\`
8989
9090
\`\`\`diff
9191
--- a/src/examples/hello.py
@@ -101,7 +101,7 @@ Updated the greeting text.
101101
102102
Created a simple calculator with addition and subtraction.
103103
104-
- Created file: \`src/examples/calculator.py\`
104+
### Created file: \`src/examples/calculator.py\`
105105
106106
\`\`\`python
107107
def add(a, b):
@@ -111,14 +111,14 @@ def subtract(a, b):
111111
return a - b
112112
\`\`\`
113113
114-
- Deleted file: \`src/examples/weekdays.py\`
114+
### Deleted file: \`src/examples/weekdays.py\`
115115
116-
- Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
116+
### Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
117117

118118
export const EDIT_FORMAT_INSTRUCTIONS_SEARCH_REPLACE = `${intro}, followed by a markdown code block showing the original and updated code snippets with Git-style merge conflict syntax. Example:
119119
Changed greeting to wishes.
120120
121-
- Updated file: \`src/examples/hello.py\`
121+
### Updated file: \`src/examples/hello.py\`
122122
123123
\`\`\`python
124124
<<<<<<< SEARCH
@@ -137,7 +137,7 @@ WISHES = "Have a nice day!"
137137
138138
Created a simple calculator with addition and subtraction.
139139
140-
- Created file: \`src/examples/calculator.py\`
140+
### Created file: \`src/examples/calculator.py\`
141141
142142
\`\`\`python
143143
def add(a, b):
@@ -147,6 +147,6 @@ def subtract(a, b):
147147
return a - b
148148
\`\`\`
149149
150-
- Deleted file: \`src/examples/weekdays.py\`
150+
### Deleted file: \`src/examples/weekdays.py\`
151151
152-
- Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
152+
### Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`

0 commit comments

Comments
 (0)