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

Function generateBashSuggestions

src/hooks/useTypeahead.tsx:211–224  ·  view source on GitHub ↗

* Generate bash shell completion suggestions

(input: string, cursorOffset: number)

Source from the content-addressed store, hash-verified

209 * Generate bash shell completion suggestions
210 */
211async function generateBashSuggestions(input: string, cursorOffset: number): Promise<SuggestionItem[]> {
212 try {
213 if (currentShellCompletionAbortController) {
214 currentShellCompletionAbortController.abort();
215 }
216 currentShellCompletionAbortController = new AbortController();
217 const suggestions = await getShellCompletions(input, cursorOffset, currentShellCompletionAbortController.signal);
218 return suggestions;
219 } catch {
220 // Silent failure - don't break UX
221 logEvent('tengu_shell_completion_failed', {});
222 return [];
223 }
224}
225
226/**
227 * Apply a directory/path completion suggestion to the input

Callers 1

useTypeaheadFunction · 0.85

Calls 2

getShellCompletionsFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected