* Generate bash shell completion suggestions
(input: string, cursorOffset: number)
| 209 | * Generate bash shell completion suggestions |
| 210 | */ |
| 211 | async 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 |
no test coverage detected