feat(core): Add trailing space when completing an at completion suggestion (#5475)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Sandy Tao 2025-08-04 11:30:59 -07:00 committed by GitHub
parent 02e44e5db2
commit 8ba12269d5
2 changed files with 14 additions and 9 deletions

View file

@ -111,7 +111,7 @@ export function useSlashCompletion(
useEffect(() => {
if (commandIndex === -1 || reverseSearchActive) {
resetCompletionState();
setTimeout(resetCompletionState, 0);
return;
}
@ -631,17 +631,17 @@ export function useSlashCompletion(
) {
suggestionText = ' ' + suggestionText;
}
suggestionText += ' ';
}
suggestionText += ' ';
buffer.replaceRangeByOffset(
logicalPosToOffset(buffer.lines, cursorRow, completionStart.current),
logicalPosToOffset(buffer.lines, cursorRow, completionEnd.current),
suggestionText,
);
resetCompletionState();
},
[cursorRow, resetCompletionState, buffer, suggestions, commandIndex],
[cursorRow, buffer, suggestions, commandIndex],
);
return {