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

Function updateTextBufferState

extensions/cli/src/ui/hooks/useUserInput.ts:118–141  ·  view source on GitHub ↗
(options: TextBufferStateOptions)

Source from the content-addressed store, hash-verified

116}
117
118export function updateTextBufferState(options: TextBufferStateOptions) {
119 const {
120 handled: _handled,
121 textBuffer,
122 setInputText,
123 setCursorPosition,
124 updateSlashCommandState,
125 updateFileSearchState,
126 updateBashModeState,
127 inputHistory,
128 } = options;
129
130 // Skip state updates during rapid input mode to avoid conflicts with timer-based updates
131 if (!textBuffer.isInRapidInputMode()) {
132 const newText = textBuffer.text;
133 const newCursor = textBuffer.cursor;
134 setInputText(newText);
135 setCursorPosition(newCursor);
136 updateSlashCommandState(newText, newCursor);
137 updateFileSearchState(newText, newCursor);
138 updateBashModeState(newText);
139 inputHistory.resetNavigation();
140 }
141}

Callers 1

UserInputFunction · 0.85

Calls 5

updateSlashCommandStateFunction · 0.85
updateFileSearchStateFunction · 0.85
updateBashModeStateFunction · 0.85
isInRapidInputModeMethod · 0.80
resetNavigationMethod · 0.80

Tested by

no test coverage detected