Fix preset value (#933)

This commit is contained in:
Will Chen
2025-08-13 17:25:21 -07:00
committed by GitHub
parent b8362a74a7
commit 4bc961ffb4
4 changed files with 81 additions and 8 deletions

View File

@@ -1,11 +1,13 @@
export const MENTION_REGEX = /@app:([a-zA-Z0-9_-]+)/g;
// 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) {
while ((match = MENTION_REGEX.exec(prompt)) !== null) {
mentions.push(match[1]);
}