( originalCode: string, newCode: string, llm: ILLM, )
| 45 | } |
| 46 | |
| 47 | function constructApplyPrompt( |
| 48 | originalCode: string, |
| 49 | newCode: string, |
| 50 | llm: ILLM, |
| 51 | ) { |
| 52 | const template = llm.promptTemplates?.apply ?? defaultApplyPrompt; |
| 53 | const rendered = llm.renderPromptTemplate(template, [], { |
| 54 | original_code: originalCode, |
| 55 | new_code: newCode, |
| 56 | }); |
| 57 | |
| 58 | return rendered; |
| 59 | } |
| 60 | |
| 61 | export async function* addIndentation( |
| 62 | diffLineGenerator: AsyncGenerator<DiffLine>, |
no test coverage detected