Remove unused plain text prompt generation method from PromptGenerator
This commit is contained in:
@@ -107,32 +107,7 @@ 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
|
||||||
* @param files Map of file paths to content and token counts
|
* @param files Map of file paths to content and token counts
|
||||||
|
|||||||
Reference in New Issue
Block a user