fix(cli): allow @ file selector on slash command lines (#16370)

This commit is contained in:
Gal Zahavi
2026-01-13 14:01:30 -08:00
committed by GitHub
parent b518125c46
commit b2e866585d
4 changed files with 28 additions and 9 deletions
+11 -6
View File
@@ -18,7 +18,10 @@ import chalk from 'chalk';
import stringWidth from 'string-width';
import { useShellHistory } from '../hooks/useShellHistory.js';
import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
import {
useCommandCompletion,
CompletionMode,
} from '../hooks/useCommandCompletion.js';
import type { Key } from '../hooks/useKeypress.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { keyMatchers, Command } from '../keyMatchers.js';
@@ -1045,11 +1048,13 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
scrollOffset={activeCompletion.visibleStartIndex}
userInput={buffer.text}
mode={
buffer.text.startsWith('/') &&
!reverseSearchActive &&
!commandSearchActive
? 'slash'
: 'reverse'
completion.completionMode === CompletionMode.AT
? 'reverse'
: buffer.text.startsWith('/') &&
!reverseSearchActive &&
!commandSearchActive
? 'slash'
: 'reverse'
}
expandedIndex={expandedSuggestionIndex}
/>