mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix for b/414940078 (#306)
This commit is contained in:
@@ -136,7 +136,7 @@ export function useCompletion(
|
|||||||
|
|
||||||
setSuggestions(filteredSuggestions);
|
setSuggestions(filteredSuggestions);
|
||||||
setShowSuggestions(filteredSuggestions.length > 0);
|
setShowSuggestions(filteredSuggestions.length > 0);
|
||||||
setActiveSuggestionIndex(-1);
|
setActiveSuggestionIndex(filteredSuggestions.length > 0 ? 0 : -1);
|
||||||
setVisibleStartIndex(0);
|
setVisibleStartIndex(0);
|
||||||
setIsLoadingSuggestions(false);
|
setIsLoadingSuggestions(false);
|
||||||
return;
|
return;
|
||||||
@@ -189,7 +189,7 @@ export function useCompletion(
|
|||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setSuggestions(filteredSuggestions);
|
setSuggestions(filteredSuggestions);
|
||||||
setShowSuggestions(filteredSuggestions.length > 0);
|
setShowSuggestions(filteredSuggestions.length > 0);
|
||||||
setActiveSuggestionIndex(-1);
|
setActiveSuggestionIndex(filteredSuggestions.length > 0 ? 0 : -1);
|
||||||
setVisibleStartIndex(0);
|
setVisibleStartIndex(0);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user