mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +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:
parent
4793e86f04
commit
28767b369f
4 changed files with 278 additions and 131 deletions
|
|
@ -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('/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue