MCPcopy Index your code
hub / github.com/codeaashu/claude-code / acceptSuggestionText

Function acceptSuggestionText

src/hooks/useTypeahead.tsx:1280–1291  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

1278 isActive: isAutocompleteActive && !isModalOverlayActive
1279 });
1280 function acceptSuggestionText(text: string): void {
1281 const detectedMode = getModeFromInput(text);
1282 if (detectedMode !== 'prompt' && onModeChange) {
1283 onModeChange(detectedMode);
1284 const stripped = getValueFromInput(text);
1285 onInputChange(stripped);
1286 setCursorOffset(stripped.length);
1287 } else {
1288 onInputChange(text);
1289 setCursorOffset(text.length);
1290 }
1291 }
1292
1293 // Handle keyboard input for behaviors not covered by keybindings
1294 const handleKeyDown = (e: KeyboardEvent): void => {

Callers 1

handleKeyDownFunction · 0.85

Calls 2

getModeFromInputFunction · 0.85
getValueFromInputFunction · 0.85

Tested by

no test coverage detected