MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / loadCandidates

Function loadCandidates

packages/cli/src/components/input-bar.tsx:424–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

422
423 let ignore = false;
424 const loadCandidates = async () => {
425 const nextCandidates = await getMentionCandidates(activeMention.query);
426 if (ignore) return;
427
428 setMentionCandidates(nextCandidates);
429 setMentionSelectedIndex((currentIndex) => {
430 if (nextCandidates.length === 0) {
431 return 0;
432 }
433 return Math.min(currentIndex, nextCandidates.length - 1);
434 });
435 };
436
437 void loadCandidates();
438

Callers 1

InputBarFunction · 0.85

Calls 1

getMentionCandidatesFunction · 0.85

Tested by

no test coverage detected