Allow referencing other apps (#692)
- [x] Update chat_stream_handlers - [x] Update token handlers - [x] Update HomeChatInput - [x] update lexical chat input: do not allow referencing same app (current app, or other already selected apps) - [x] I don't think smart context will work on this... - [x] Enter doesn't clear...
This commit is contained in:
13
src/shared/parse_mention_apps.ts
Normal file
13
src/shared/parse_mention_apps.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// Helper function to parse app mentions from prompt
|
||||
export function parseAppMentions(prompt: string): string[] {
|
||||
// Match @app:AppName patterns in the prompt (supports letters, digits, underscores, and hyphens, but NOT spaces)
|
||||
const mentionRegex = /@app:([a-zA-Z0-9_-]+)/g;
|
||||
const mentions: string[] = [];
|
||||
let match;
|
||||
|
||||
while ((match = mentionRegex.exec(prompt)) !== null) {
|
||||
mentions.push(match[1]);
|
||||
}
|
||||
|
||||
return mentions;
|
||||
}
|
||||
Reference in New Issue
Block a user