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

Function insertTextAtCursor

src/components/PromptInput/PromptInput.tsx:1247–1253  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

1245 return input;
1246 }, []);
1247 function insertTextAtCursor(text: string) {
1248 // Push current state to buffer before inserting
1249 pushToBuffer(input, cursorOffset, pastedContents);
1250 const newInput = input.slice(0, cursorOffset) + text + input.slice(cursorOffset);
1251 trackAndSetInput(newInput);
1252 setCursorOffset(cursorOffset + text.length);
1253 }
1254 const doublePressEscFromEmpty = useDoublePress(() => {}, () => onShowMessageSelector());
1255
1256 // Function to get the queued command for editing. Returns true if commands were popped.

Callers 4

onImagePasteFunction · 0.85
onTextPasteFunction · 0.85
onIdeAtMentionedFunction · 0.85
insertWithSpacingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected