MCPcopy Create free account
hub / github.com/continuedev/continue / constructEditPrompt

Function constructEditPrompt

core/edit/streamDiffLines.ts:29–45  ·  view source on GitHub ↗
(
  prefix: string,
  highlighted: string,
  suffix: string,
  llm: ILLM,
  userInput: string,
  language: string | undefined,
)

Source from the content-addressed store, hash-verified

27import { recursiveStream } from "./recursiveStream";
28
29function constructEditPrompt(
30 prefix: string,
31 highlighted: string,
32 suffix: string,
33 llm: ILLM,
34 userInput: string,
35 language: string | undefined,
36): string | ChatMessage[] {
37 const template = llm.promptTemplates?.edit ?? gptEditPrompt;
38 return llm.renderPromptTemplate(template, [], {
39 userInput,
40 prefix,
41 codeToEdit: highlighted,
42 suffix,
43 language: language ?? "",
44 });
45}
46
47function constructApplyPrompt(
48 originalCode: string,

Callers 1

streamDiffLinesFunction · 0.85

Calls 1

renderPromptTemplateMethod · 0.80

Tested by

no test coverage detected