MCPcopy Index your code
hub / github.com/continuedev/continue / nodeSurroundedInLazyBlocks

Function nodeSurroundedInLazyBlocks

core/edit/lazy/deterministic.ts:110–126  ·  view source on GitHub ↗
(
  parser: Parser,

  file: string,
  filename: string,
)

Source from the content-addressed store, hash-verified

108}
109
110function nodeSurroundedInLazyBlocks(
111 parser: Parser,
112
113 file: string,
114 filename: string,
115): { newTree: Parser.Tree; newFile: string } | undefined {
116 const ext = path.extname(filename).slice(1);
117 const language = LANGUAGES[ext];
118 if (language) {
119 const newFile = `${language.singleLineComment} ... existing code ...\n\n${file}\n\n${language.singleLineComment} ... existing code...`;
120 const newTree = parser.parse(newFile);
121
122 return { newTree, newFile };
123 }
124
125 return undefined;
126}
127
128// TODO: If we don't have high confidence, return undefined to fall back to slower methods
129export async function deterministicApplyLazyEdit({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected