fix: updated system prompt to have correct indentations (#1139)

* updated system prompt to have correct indentations

* removed a section
This commit is contained in:
Anirban Kar
2025-01-22 01:59:07 +05:30
committed by GitHub
parent 0ad4aa56d3
commit 46f15bdde6
3 changed files with 59 additions and 113 deletions

View File

@@ -96,15 +96,10 @@ function createFilesContext(files: FileMap) {
return '';
}
const codeWithLinesNumbers = dirent.content
.split('\n')
.map((v, i) => `${i + 1}|${v}`)
.join('\n');
return `<file path="${path}">\n${codeWithLinesNumbers}\n</file>`;
return `<file path="${path}">\n${dirent.content}\n</file>`;
});
return `Below are the code files present in the webcontainer:\ncode format:\n<line number>|<line content>\n <codebase>${fileContexts.join('\n\n')}\n\n</codebase>`;
return `Below are the code files present in the webcontainer:\n <codebase>\n${fileContexts.join('\n\n')}\n</codebase>`;
}
function extractPropertiesFromMessage(message: Message): { model: string; provider: string; content: string } {