MCPcopy Create free account
hub / github.com/Noumena-Network/code / insertTextAtCursor

Function insertTextAtCursor

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

Source from the content-addressed store, hash-verified

981 return input;
982 }, []);
983 function insertTextAtCursor(text: string) {
984 // Push current state to buffer before inserting
985 pushToBuffer(input, cursorOffset, pastedContents);
986 const insertPlan = insertTextAtCursorState({
987 input,
988 cursorOffset,
989 text,
990 });
991 trackAndSetInput(insertPlan.nextInput);
992 setCursorOffset(insertPlan.nextCursorOffset);
993 }
994 const doublePressEscFromEmpty = useDoublePress(() => {}, () => onShowMessageSelector());
995
996 // Function to get the queued command for editing. Returns true if commands were popped.

Callers 4

onIdeAtMentionedFunction · 0.85
insertWithSpacingFunction · 0.85

Calls 1

insertTextAtCursorStateFunction · 0.85

Tested by

no test coverage detected