mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix(core) Fix not resetting when after first get out of completion suggestions (#5635)
Co-authored-by: Jacob Richman <jacob314@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -127,6 +127,13 @@ export function useAtCompletion(props: UseAtCompletionProps): void {
|
|||||||
// Reacts to user input (`pattern`) ONLY.
|
// Reacts to user input (`pattern`) ONLY.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
|
// reset when first getting out of completion suggestions
|
||||||
|
if (
|
||||||
|
state.status === AtCompletionStatus.READY ||
|
||||||
|
state.status === AtCompletionStatus.ERROR
|
||||||
|
) {
|
||||||
|
dispatch({ type: 'RESET' });
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pattern === null) {
|
if (pattern === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user