Skip to content

Commit 0750e1f

Browse files
committed
Rename system section headers to output formatting
1 parent 63774be commit 0750e1f

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _Accurate and fast multi-file edits in a single response._
5050
# Files
5151
[full contents of selected files with paths]
5252
53-
# System
53+
# Output formatting
5454
[edit format instructions (~250 tokens)]
5555
5656
---
@@ -104,7 +104,7 @@ _Select files relevant to a natural language query._
104104
# Files
105105
[broad file selection]
106106
107-
# System
107+
# Output formatting
108108
[response format instructions]
109109
110110
---

‎apps/editor/src/constants/instructions.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const code_at_cursor_instructions_for_prompt_view = (params: {
55
file_path: string
66
row: number
77
column: number
8-
}) => `# System
8+
}) => `# Output formatting
99
1010
Your response must begin with a markdown heading identifying the file and the cursor position, followed by a markdown code block containing the replacement text, followed by a brief explanation. The heading must be: "### Code at cursor: \`${
1111
params.file_path
@@ -51,7 +51,7 @@ export const commit_message_instructions =
5151
export const find_relevant_files_instructions =
5252
'Find a complete set of files relevant to the following query. Include the primary files as well as any structural files.'
5353

54-
export const find_relevant_files_format = `# System
54+
export const find_relevant_files_format = `# Output formatting
5555
5656
Your response must contain paths of relevant files enclosed in "relevant-files" and "file-path" XML tags. Don't send anything else. Example:
5757
@@ -61,7 +61,7 @@ Your response must contain paths of relevant files enclosed in "relevant-files"
6161
<file-path>src/welcome.ts</file-path>
6262
</relevant-files>`
6363

64-
export const find_relevant_files_format_for_prompt_view = `# System
64+
export const find_relevant_files_format_for_prompt_view = `# Output formatting
6565
6666
Your response must begin with "**Relevant files:**", then list paths one under another, followed by a brief explanation. Example:
6767

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const handle_autofill = async (params: {
182182
const edit_format_instructions =
183183
config.get<string>(instructions_key) || default_instructions
184184
if (edit_format_instructions) {
185-
formatted_system_instructions = `# System\n\n${edit_format_instructions}`
185+
formatted_system_instructions = `# Output formatting\n\n${edit_format_instructions}`
186186
}
187187
} else if (
188188
params.prompt_view_provider.web_prompt_type == 'find-relevant-files'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const handle_copy_prompt = async (params: {
146146
const edit_format_instructions =
147147
config.get<string>(instructions_key) || default_instructions
148148
if (edit_format_instructions) {
149-
formatted_system_instructions = `# System\n\n${edit_format_instructions}`
149+
formatted_system_instructions = `# Output formatting\n\n${edit_format_instructions}`
150150
}
151151
} else if (is_in_find_relevant_files_prompt_type) {
152152
formatted_system_instructions = find_relevant_files_format_for_prompt_view

‎apps/editor/src/views/prompt/backend/message-handlers/handle-make-api-call.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export const handle_make_api_call = async (
325325

326326
let formatted_system_instructions = ''
327327
if (edit_format_instructions) {
328-
formatted_system_instructions = `# System\n\n${edit_format_instructions}`
328+
formatted_system_instructions = `# Output formatting\n\n${edit_format_instructions}`
329329
}
330330

331331
system_instructions =

‎apps/editor/src/views/prompt/backend/message-handlers/handle-preview-web-configuration.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const handle_preview_web_configuration = async (
130130
const edit_format_instructions =
131131
config.get<string>(instructions_key) || default_instructions
132132
if (edit_format_instructions) {
133-
formatted_system_instructions = `# System\n\n${edit_format_instructions}`
133+
formatted_system_instructions = `# Output formatting\n\n${edit_format_instructions}`
134134
}
135135
} else if (prompt_view_provider.web_prompt_type == 'find-relevant-files') {
136136
formatted_system_instructions = find_relevant_files_format_for_prompt_view

‎apps/editor/src/views/prompt/backend/message-handlers/utils/intelligent-update-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const process_file = async (params: {
120120
message: 'start',
121121
data: { file_path: params.file_path }
122122
})
123-
const content = `# Task\n\n${intelligent_update_task_instructions}\n\n# File\n\n${params.file_content}\n\n# System\n\n${intelligent_update_edit_format_instructions}\n\n# Task\n\n${intelligent_update_task_instructions}\n\n# Changes\n\n${params.instruction}`
123+
const content = `# Task\n\n${intelligent_update_task_instructions}\n\n# File\n\n${params.file_content}\n\n# Output formatting\n\n${intelligent_update_edit_format_instructions}\n\n# Task\n\n${intelligent_update_task_instructions}\n\n# Changes\n\n${params.instruction}`
124124

125125
const messages = [
126126
{

0 commit comments

Comments
 (0)