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

Function addHighlightedCodeToContext

extensions/vscode/src/util/addCode.ts:94–106  ·  view source on GitHub ↗
(
  webviewProtocol: VsCodeWebviewProtocol | undefined,
)

Source from the content-addressed store, hash-verified

92}
93
94export async function addHighlightedCodeToContext(
95 webviewProtocol: VsCodeWebviewProtocol | undefined,
96) {
97 // the passed argument below was set to true in https://github.com/continuedev/continue/pull/6711
98 // which would add the entire file contents when selection is empty
99 // some of this behaviour is reverted and needs further investigation
100 const rangeInFileWithContents = getRangeInFileWithContents(false);
101 if (rangeInFileWithContents) {
102 webviewProtocol?.request("highlightedCode", {
103 rangeInFileWithContents,
104 });
105 }
106}
107
108export async function addEntireFileToContext(
109 uri: vscode.Uri,

Callers 1

getCommandsMapFunction · 0.90

Calls 2

requestMethod · 0.65

Tested by

no test coverage detected