MCPcopy Create free account
hub / github.com/anus-dev/ANUS / fetchAndSetSuggestions

Function fetchAndSetSuggestions

packages/cli/src/ui/hooks/useSlashCompletion.ts:132–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131 if (isArgumentCompletion) {
132 const fetchAndSetSuggestions = async () => {
133 setIsLoadingSuggestions(true);
134 const argString = rawParts.slice(depth).join(' ');
135 const results =
136 (await leafCommand!.completion!(commandContext, argString)) || [];
137 const finalSuggestions = results.map((s) => ({ label: s, value: s }));
138 setSuggestions(finalSuggestions);
139 setIsLoadingSuggestions(false);
140 };
141 fetchAndSetSuggestions();
142 return;
143 }

Callers 1

useSlashCompletionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected