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

Function onMentionCommand

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

Source from the content-addressed store, hash-verified

345 };
346
347 const onMentionCommand = async () => {
348 const { replacement } = await getCommand().replaceWord(
349 getMentionReplacement,
350 onUpdate,
351 );
352 const mention = replacement.trim().substring(1);
353 updateQuery(mention);
354 };
355
356 /**
357 * 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