Remove unused plain text prompt generation method from PromptGenerator

This commit is contained in:
2025-03-13 08:29:43 +00:00
parent 7eb0d49d07
commit 5bb5236d3a

View File

@@ -107,31 +107,6 @@ export class PromptGenerator {
return this.generateXMLPrompt(filteredContents, settings); return this.generateXMLPrompt(filteredContents, settings);
} }
/**
* Generate a plain text prompt
* @param files Map of file paths to content and token counts
* @param settings Settings to apply
* @returns Plain text prompt
*/
private static generatePlainPrompt(files: Map<string, { content: string; tokens: number }>, settings: PrompterSettings): string {
let promptText = '';
let totalTokenCount = 0;
for (const [filePath, { content, tokens }] of files) {
const fileName = path.basename(filePath);
totalTokenCount += tokens;
promptText += `File: ${fileName}\n`;
promptText += `${content}\n`;
promptText += '\n';
}
if (settings.tokenCalculationEnabled) {
promptText += `\nEstimated token count: ${totalTokenCount}`;
}
return promptText;
}
/** /**
* Generate an XML formatted prompt following the new schema format * Generate an XML formatted prompt following the new schema format