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

Method expandAllPasteBlocks

extensions/cli/src/ui/TextBuffer.ts:219–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218 // Called on Enter to expand full pasted content before submission
219 expandAllPasteBlocks(): void {
220 for (const [placeholder, originalContent] of this._pasteMap.entries()) {
221 const regex = new RegExp(this.escapeRegex(placeholder), "g");
222 // Normalize line endings to prevent terminal display issues
223 const normalizedContent = originalContent
224 .replace(/\r\n/g, "\n")
225 .replace(/\r/g, "\n");
226 this._text = this._text.replace(regex, normalizedContent);
227 }
228 this._pasteMap.clear();
229 }
230
231 // Add image to buffer and return placeholder
232 addImage(imageBuffer: Buffer): string {

Callers 3

handleEnterKeyFunction · 0.80
TextBuffer.test.tsFile · 0.80
EditMessageSelectorFunction · 0.80

Calls 3

escapeRegexMethod · 0.95
replaceMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected