Skip to content

Commit 6c7ab81

Browse files
committed
Change file headers from markdown headings to list items across prompts and parsers
1 parent c71e844 commit 6c7ab81

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ _TAB completions from SOTA reasoning models._
8585
# Files
8686
[full contents of selected files with paths]
8787
88-
## File: `[active file]`
88+
- File: `[active file]`
8989
```
9090
[code before cursor]<missing_text>[prompt]</missing_text>[code after cursor]
9191
```

‎apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/relevant-files-parser/relevant-files-parser.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const parse_relevant_files = (params: {
1010
workspace_files: string[]
1111
}): RelevantFilesItem | null => {
1212
if (
13-
params.response.includes('## File:') ||
13+
params.response.includes('- File:') ||
1414
params.response.includes('### Created file:') ||
1515
params.response.includes('### Updated file:') ||
1616
params.response.includes('### Deleted file:') ||

‎apps/editor/src/context/providers/workspace/modules/token-calculator.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ export class TokenCalculator implements vscode.Disposable {
331331
}
332332

333333
if (is_binary) {
334-
return `## File: \`${display_path}\`\n\nBinary file\n\n`
334+
return `- File: \`${display_path}\`\n\nBinary file\n\n`
335335
} else {
336-
return `## File: \`${display_path}\`\n\n\`\`\`\n${text}\n\`\`\`\n\n`
336+
return `- File: \`${display_path}\`\n\n\`\`\`\n${text}\n\`\`\`\n\n`
337337
}
338338
}
339339

‎apps/editor/src/utils/files-collector.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export class FilesCollector {
101101
}
102102

103103
if (is_binary) {
104-
collected_text += `## File: \`${display_path}\`\n\nBinary file\n\n`
104+
collected_text += `- File: \`${display_path}\`\n\nBinary file\n\n`
105105
} else {
106-
collected_text += `## File: \`${display_path}\`\n\n\`\`\`\n${content}\n\`\`\`\n\n`
106+
collected_text += `- File: \`${display_path}\`\n\n\`\`\`\n${content}\n\`\`\`\n\n`
107107
}
108108
} catch (error) {
109109
console.error(`Error reading file ${file_path}:`, error)

‎apps/editor/src/utils/prompt-builder.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export namespace PromptBuilder {
66
}): string => {
77
const display_path = params.filepath.replace(/\\/g, '/')
88
if (params.is_binary || params.content === undefined) {
9-
return `## File: \`${display_path}\`\n\nBinary file\n\n`
9+
return `- File: \`${display_path}\`\n\nBinary file\n\n`
1010
}
11-
return `## File: \`${display_path}\`\n\n\`\`\`\n${params.content}\n\`\`\`\n\n`
11+
return `- File: \`${display_path}\`\n\n\`\`\`\n${params.content}\n\`\`\`\n\n`
1212
}
1313

1414
export const build_diff_file_context = (params: {

0 commit comments

Comments
 (0)