Skip to content

Commit 6a65646

Browse files
committed
Clarify and refine edit format instructions for consistency and accessibility needs
1 parent 1fc48b8 commit 6a65646

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎packages/vscode/src/constants/edit-format-instructions.ts‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const intro = `Whenever showing a new, updated, renamed or deleted file, provide a brief explanation, then print 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\`), followed by a file within a markdown code block, when necessary.`
22

3-
export const EDIT_FORMAT_INSTRUCTIONS_WHOLE = `${intro}, followed by a markdown code block with full contents—as I have a disability which means I can't type and need to be able to just copy and paste. Example:
3+
export const EDIT_FORMAT_INSTRUCTIONS_WHOLE = `${intro} You must show file contents in full—as I have a disability which means I can't type and need to be able to just copy and paste. Example:
44
Updated the greeting text.
55
66
### Updated file: \`src/examples/hello.py\`
@@ -12,19 +12,23 @@ def show_greeting():
1212
print(GREETING)
1313
\`\`\``
1414

15-
export const EDIT_FORMAT_INSTRUCTIONS_TRUNCATED = `${intro}, followed by a markdown code block with truncated contents—as a space saving measure unchanged parts should be hidden behind ellipsis comments, e.g. "# ... ". Example:
15+
export const EDIT_FORMAT_INSTRUCTIONS_TRUNCATED = `${intro} As a space saving measure, replace unchanged function bodies with ellipsis comments, e.g. "# ...". Example:
1616
Updated the greeting text.
1717
1818
### Updated file: \`src/examples/hello.py\`
1919
2020
\`\`\`python
21+
DURATION = 5
2122
GREETING = "Hello, World!"
2223
24+
def get_duration():
25+
# ...
26+
2327
def show_greeting():
24-
# ... the function remains unchanged
28+
# ...
2529
\`\`\``
2630

27-
export const EDIT_FORMAT_INSTRUCTIONS_DIFF = `${intro}, followed by a unified diff within a markdown code block. Example:
31+
export const EDIT_FORMAT_INSTRUCTIONS_DIFF = `${intro} Whenever showing changes to the original files, use the Unified Diff format. Example:
2832
Updated the greeting text.
2933
3034
### Updated file: \`src/examples/hello.py\`
@@ -40,7 +44,7 @@ Updated the greeting text.
4044
print(GREETING)
4145
\`\`\``
4246

43-
export const EDIT_FORMAT_INSTRUCTIONS_BEFORE_AFTER = `${intro}, followed by a markdown code block showing the original and updated code snippets with Git-style merge conflict markers. Example:
47+
export const EDIT_FORMAT_INSTRUCTIONS_BEFORE_AFTER = `${intro} Whenever showing changes to the original files, use Git-style merge conflict markers. Example:
4448
Updated the greeting text.
4549
4650
### Updated file: \`src/examples/hello.py\`

0 commit comments

Comments
 (0)