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

Function onMentionCommand

packages/shared/src/hooks/input/useMarkdownInput.ts:345–352  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343 };
344
345 const onMentionCommand = async () => {
346 const { replacement } = await getCommand().replaceWord(
347 getMentionReplacement,
348 onUpdate,
349 );
350 const mention = replacement.trim().substring(1);
351 updateQuery(mention);
352 };
353
354 /**
355 * Checks if the current cursor position contains a valid mention pattern (@username)

Callers

nothing calls this directly

Calls 2

updateQueryFunction · 0.85
replaceWordMethod · 0.80

Tested by

no test coverage detected