MCPcopy Create free account
hub / github.com/dailydotdev/apps / onApplyMention

Function onApplyMention

packages/shared/src/hooks/input/useMarkdownInput.ts:316–325  ·  view source on GitHub ↗
(mention: UserShortProfile)

Source from the content-addressed store, hash-verified

314 };
315
316 const onApplyMention = async (mention: UserShortProfile) => {
317 const textareaCommand = getCommand();
318 const getReplacement = () => ({ replacement: `@${mention.username} ` });
319 await textareaCommand.replaceWord(
320 getReplacement,
321 onUpdate,
322 CursorType.Adjacent,
323 );
324 updateQuery(undefined);
325 };
326
327 const onApplyEmoji = async (emoji: string) => {
328 const textareaCommand = getCommand();

Callers 1

onKeyDownFunction · 0.85

Calls 2

updateQueryFunction · 0.85
replaceWordMethod · 0.80

Tested by

no test coverage detected