Refactor: Enhance @-command, Autocomplete, and Input Stability (#279)

This commit is contained in:
Allen Hutchison
2025-05-07 12:30:32 -07:00
committed by GitHub
parent 4649026312
commit 6b3ef9f939
5 changed files with 104 additions and 89 deletions

View File

@@ -13,8 +13,8 @@
* @returns True if the query looks like an '@' command, false otherwise.
*/
export const isAtCommand = (query: string): boolean =>
// Check if starts with @ OR has a space, then @, then a non-space character.
query.startsWith('@') || /\s@\S/.test(query);
// Check if starts with @ OR has a space, then @
query.startsWith('@') || /\s@/.test(query);
/**
* Checks if a query string potentially represents an '/' command.