feat-filter-ignore #1
@@ -107,31 +107,6 @@ export class PromptGenerator {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user