diff options
| author | Sandy Tao <[email protected]> | 2025-08-05 17:37:44 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-06 00:37:44 +0000 |
| commit | 59bde4a612df81db901110d396afe1c19f4308a7 (patch) | |
| tree | d10621d51364f8a946ec5bc4377512535f054ded /packages/cli/src | |
| parent | 02f7e48c51efab542d734ea23bec3ef375cd3d7d (diff) | |
fix(core) Fix not resetting when after first get out of completion suggestions (#5635)
Co-authored-by: Jacob Richman <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Diffstat (limited to 'packages/cli/src')
| -rw-r--r-- | packages/cli/src/ui/hooks/useAtCompletion.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/cli/src/ui/hooks/useAtCompletion.ts b/packages/cli/src/ui/hooks/useAtCompletion.ts index eaa2a5e6..e63a707f 100644 --- a/packages/cli/src/ui/hooks/useAtCompletion.ts +++ b/packages/cli/src/ui/hooks/useAtCompletion.ts @@ -127,6 +127,13 @@ export function useAtCompletion(props: UseAtCompletionProps): void { // Reacts to user input (`pattern`) ONLY. useEffect(() => { if (!enabled) { + // reset when first getting out of completion suggestions + if ( + state.status === AtCompletionStatus.READY || + state.status === AtCompletionStatus.ERROR + ) { + dispatch({ type: 'RESET' }); + } return; } if (pattern === null) { |
