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:
Will Chen
2025-08-13 16:22:49 -07:00
committed by GitHub
parent 76054c6db7
commit a6dca76d29
16 changed files with 5755 additions and 3013 deletions

View 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;
}