(input)
| 225 | } |
| 226 | |
| 227 | async writeSteps(input) { |
| 228 | if (!this.isEnabled) return |
| 229 | if (!this.minifiedHtml) throw new Error('No HTML context provided') |
| 230 | |
| 231 | const snippets = [] |
| 232 | |
| 233 | const response = await this.createCompletion(this.prompts.writeStep(this.minifiedHtml, input)) |
| 234 | if (!response) return |
| 235 | snippets.push(...this.config.response(response)) |
| 236 | |
| 237 | debug(snippets[0]) |
| 238 | |
| 239 | return snippets[0] |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | function parseCodeBlocks(response) { |
no test coverage detected