Skip to content

Commit 428f584

Browse files
committed
Remove preloaded context requirement from agent patch repair prompt and docs
- to 'patch repair' in `README.md`, add 'agent' variant ├── README.md └── apps └── editor └── src ├── constants │ └── instructions.ts └── views └── prompt └── backend └── message-handlers └── handle-patch-repair.ts
1 parent 09f9d6b commit 428f584

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,33 @@ Apply the attached changes to the file without explanations or any other text.
422422

423423
</details>
424424

425+
<details>
426+
<summary>AGENT</summary>
427+
428+
```
429+
# File: `[FILE PATH]`
430+
431+
[ORIGINAL FILE CONTENT]
432+
433+
[MALFORMED EDITS]
434+
435+
# Output formatting
436+
437+
Your response must begin with a markdown heading identifying the file, followed by a markdown code block containing the updated file. The heading must be: "### Patch repair: `path/to/file.ext`". Example:
438+
439+
[EXAMPLE]
440+
441+
# Requirements
442+
443+
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
444+
445+
# Task
446+
447+
Apply the attached changes to the file without explanations or any other text.
448+
```
449+
450+
</details>
451+
425452
## Commands
426453

427454
### Code at Cursor

‎apps/editor/src/views/prompt/backend/message-handlers/handle-patch-repair.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const handle_patch_repair = async (params: {
255255
}
256256
cli_prompt += `# Output formatting\n\n`
257257
cli_prompt += `${patch_repair_format_instructions}\n\n`
258-
cli_prompt += `# Requirements\n\n- ${cli_edit_ask_requirements.preloaded_context}\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n\n`
258+
cli_prompt += `# Requirements\n\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n\n`
259259
cli_prompt += `# Task\n\n${patch_repair_task_instructions}`
260260

261261
const config_codeWebChat = vscode.workspace.getConfiguration('codeWebChat')

0 commit comments

Comments
 (0)