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

Function handleNewLine

extensions/cli/src/ui/UserInput.tsx:607–621  ·  view source on GitHub ↗
(input: string, key: any)

Source from the content-addressed store, hash-verified

605 };
606
607 const handleNewLine = (input: string, key: any): boolean => {
608 if (input === "\r" || input === "\\\r") {
609 const handled = textBuffer.handleInput("\n", key);
610 if (handled) {
611 const newText = textBuffer.text;
612 const newCursor = textBuffer.cursor;
613 setInputText(newText);
614 setCursorPosition(newCursor);
615 updateSlashCommandState(newText, newCursor);
616 updateFileSearchState(newText, newCursor);
617 }
618 return true;
619 }
620 return false;
621 };
622
623 const handleEscapeKey = (key: any): boolean => {
624 if (!key.escape) return false;

Callers 1

UserInputFunction · 0.85

Calls 3

updateSlashCommandStateFunction · 0.85
updateFileSearchStateFunction · 0.85
handleInputMethod · 0.80

Tested by

no test coverage detected