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

Method handleInput

extensions/cli/src/ui/TextBuffer.ts:562–587  ·  view source on GitHub ↗
(input: string, key: Key)

Source from the content-addressed store, hash-verified

560 }
561
562 handleInput(input: string, key: Key): boolean {
563 // Handle bracketed paste sequences first
564 if (this.handleBracketedPaste(input)) {
565 return true;
566 }
567
568 // If we're in paste mode, accumulate the pasted content but DON'T insert it yet
569 if (this._inPasteMode) {
570 this._pasteBuffer += input;
571 // Don't insert text during paste mode - wait until paste ends
572 return true;
573 }
574
575 // Handle special keys (option, ctrl, meta, arrows, delete)
576 if (this.handleSpecialKeys(input, key)) {
577 return true;
578 }
579
580 // Handle regular text input
581 const isOptionKey = input.startsWith("\u001b") && input.length > 1;
582 if (input && input.length >= 1 && !key.ctrl && !key.meta && !isOptionKey) {
583 return this.handleTextInput(input);
584 }
585
586 return false;
587 }
588
589 // Helper method to render text with cursor
590 renderWithCursor(placeholder?: string): {

Callers 4

handleNewLineFunction · 0.80
UserInputFunction · 0.80
TextBuffer.test.tsFile · 0.80
EditMessageSelectorFunction · 0.80

Calls 3

handleBracketedPasteMethod · 0.95
handleSpecialKeysMethod · 0.95
handleTextInputMethod · 0.95

Tested by

no test coverage detected