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

Function onIdeAtMentioned

src/components/PromptInput/PromptInput.tsx:1283–1297  ·  view source on GitHub ↗
(atMentioned: IDEAtMentioned)

Source from the content-addressed store, hash-verified

1281 // Insert the at-mentioned reference (the file and, optionally, a line range) when
1282 // we receive an at-mentioned notification the IDE.
1283 const onIdeAtMentioned = function (atMentioned: IDEAtMentioned) {
1284 logEvent('tengu_ext_at_mentioned', {});
1285 let atMentionedText: string;
1286 const relativePath = path.relative(getCwd(), atMentioned.filePath);
1287 if (atMentioned.lineStart && atMentioned.lineEnd) {
1288 atMentionedText = atMentioned.lineStart === atMentioned.lineEnd ? `@${relativePath}#L${atMentioned.lineStart} ` : `@${relativePath}#L${atMentioned.lineStart}-${atMentioned.lineEnd} `;
1289 } else {
1290 atMentionedText = `@${relativePath} `;
1291 }
1292 const cursorChar = input[cursorOffset - 1] ?? ' ';
1293 if (!/\s/.test(cursorChar)) {
1294 atMentionedText = ` ${atMentionedText}`;
1295 }
1296 insertTextAtCursor(atMentionedText);
1297 };
1298 useIdeAtMentioned(mcpClients, onIdeAtMentioned);
1299
1300 // Handler for chat:undo - undo last edit

Callers

nothing calls this directly

Calls 3

logEventFunction · 0.85
getCwdFunction · 0.85
insertTextAtCursorFunction · 0.85

Tested by

no test coverage detected