feat-filter-ignore #1

Merged
abhishekbhakat merged 9 commits from feat-filter-ignore into main 2025-03-17 07:23:37 +00:00
Showing only changes of commit 5bb5236d3a - Show all commits

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