mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Refactor useGeminiStream to pull slash commands and passthrough comma… (#215)
* Refactor useGeminiStream to pull slash commands and passthrough commands into their own processors. * whitespace lint errors. * Add sugestions from code review.
This commit is contained in:
@@ -15,3 +15,12 @@
|
||||
export const isPotentiallyAtCommand = (query: string): boolean =>
|
||||
// Check if starts with @ OR has a space, then @, then a non-space character.
|
||||
query.startsWith('@') || /\s@\S/.test(query);
|
||||
|
||||
/**
|
||||
* Checks if a query string represents a slash command (starts with '/').
|
||||
*
|
||||
* @param query The input query string.
|
||||
* @returns True if the query is a slash command, false otherwise.
|
||||
*/
|
||||
export const isSlashCommand = (query: string): boolean =>
|
||||
query.trim().startsWith('/');
|
||||
|
||||
Reference in New Issue
Block a user