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

Method insertText

extensions/cli/src/ui/TextBuffer.ts:46–54  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

44 }
45
46 insertText(text: string): void {
47 // Normalize line endings to prevent terminal display issues
48 const normalizedText = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
49 this._text =
50 this._text.slice(0, this._cursor) +
51 normalizedText +
52 this._text.slice(this._cursor);
53 this._cursor += normalizedText.length;
54 }
55
56 deleteCharAt(position: number): void {
57 if (position >= 0 && position < this._text.length) {

Callers 8

addImageMethod · 0.95
handleBracketedPasteMethod · 0.95
finalizeRapidInputMethod · 0.95
handleTextInputMethod · 0.95
selectItemFunction · 0.80
addKeyboardShortcutsFunction · 0.80
ImagePaste.test.tsFile · 0.80
TextBuffer.test.tsFile · 0.80

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected