mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
fix: remove conflicting suggestions visibility notifications
Remove duplicate useEffect that was causing suggestions visibility state to diverge from the actual active completion. The original useEffect at line 760 already correctly tracks activeCompletion.showSuggestions, which dynamically selects the current active completion source (regular, reverse search, or command search). The removed useEffect used OR logic across all three completion sources, which caused hasSuggestionsVisible in AppContainer to flip incorrectly during command-search mode when background completion state changed. This fix ensures Tab key blocking/unblocking happens at the correct times on Windows.
This commit is contained in:
parent
9a6aafa721
commit
2fe9cbcd17
1 changed files with 0 additions and 16 deletions
|
|
@ -188,22 +188,6 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||
}
|
||||
}, [showEscapePrompt, onEscapePromptChange]);
|
||||
|
||||
// Notify parent component about suggestions visibility changes
|
||||
useEffect(() => {
|
||||
if (onSuggestionsVisibilityChange) {
|
||||
const hasSuggestions =
|
||||
completion.showSuggestions ||
|
||||
reverseSearchCompletion.showSuggestions ||
|
||||
commandSearchCompletion.showSuggestions;
|
||||
onSuggestionsVisibilityChange(hasSuggestions);
|
||||
}
|
||||
}, [
|
||||
completion.showSuggestions,
|
||||
reverseSearchCompletion.showSuggestions,
|
||||
commandSearchCompletion.showSuggestions,
|
||||
onSuggestionsVisibilityChange,
|
||||
]);
|
||||
|
||||
// Clear escape prompt timer on unmount
|
||||
useEffect(
|
||||
() => () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue