| "use strict"; |
| Object.defineProperty(exports, "__esModule", { value: true }); |
| exports.Inputs = void 0; |
| class Inputs { |
| systemMessage; |
| title; |
| description; |
| rawSummary; |
| shortSummary; |
| filename; |
| fileContent; |
| fileDiff; |
| patches; |
| diff; |
| commentChain; |
| comment; |
| suggestion; |
| error; |
| taskDescription; |
| codebaseStructure; |
| remedyContext; |
| constructor(systemMessage = '', title = 'no title provided', description = 'no description provided', rawSummary = '', shortSummary = '', filename = '', fileContent = 'file contents cannot be provided', fileDiff = 'file diff cannot be provided', patches = '', diff = 'no diff', commentChain = 'no other comments on this patch', comment = 'no comment provided', suggestion = '', error = '', taskDescription = '', codebaseStructure = '', remedyContext = '') { |
| this.systemMessage = systemMessage; |
| this.title = title; |
| this.description = description; |
| this.rawSummary = rawSummary; |
| this.shortSummary = shortSummary; |
| this.filename = filename; |
| this.fileContent = fileContent; |
| this.fileDiff = fileDiff; |
| this.patches = patches; |
| this.diff = diff; |
| this.commentChain = commentChain; |
| this.comment = comment; |
| this.suggestion = suggestion; |
| this.error = error; |
| this.taskDescription = taskDescription; |
| this.codebaseStructure = codebaseStructure; |
| this.remedyContext = remedyContext; |
| } |
| clone() { |
| return new Inputs(this.systemMessage, this.title, this.description, this.rawSummary, this.shortSummary, this.filename, this.fileContent, this.fileDiff, this.patches, this.diff, this.commentChain, this.comment, this.suggestion, this.error, this.taskDescription, this.codebaseStructure, this.remedyContext); |
| } |
| render(content) { |
| if (!content) { |
| return ''; |
| } |
| if (this.systemMessage) { |
| content = content.replace('$system_message', this.systemMessage); |
| } |
| if (this.title) { |
| content = content.replace('$title', this.title); |
| } |
| if (this.description) { |
| content = content.replace('$description', this.description); |
| } |
| if (this.rawSummary) { |
| content = content.replace('$raw_summary', this.rawSummary); |
| } |
| if (this.shortSummary) { |
| content = content.replace('$short_summary', this.shortSummary); |
| } |
| if (this.filename) { |
| content = content.replace('$filename', this.filename); |
| } |
| if (this.fileContent) { |
| content = content.replace('$file_content', this.fileContent); |
| } |
| if (this.fileDiff) { |
| content = content.replace('$file_diff', this.fileDiff); |
| } |
| if (this.patches) { |
| content = content.replace('$patches', this.patches); |
| } |
| if (this.diff) { |
| content = content.replace('$diff', this.diff); |
| } |
| if (this.taskDescription) { |
| content = content.replace('$task_description', this.taskDescription); |
| } |
| if (this.codebaseStructure) { |
| content = content.replace('$codebase_structure', this.codebaseStructure); |
| } |
| if (this.commentChain) { |
| content = content.replace('$comment_chain', this.commentChain); |
| } |
| if (this.comment) { |
| content = content.replace('$comment', this.comment); |
| } |
| if (this.suggestion) { |
| content = content.replace('$suggestion', this.suggestion); |
| } |
| if (this.error) { |
| content = content.replace('$error', this.error); |
| } |
| if (this.remedyContext) { |
| content = content.replace('$remedy_context', this.remedyContext); |
| } |
| return content; |
| } |
| } |
| exports.Inputs = Inputs; |
| |