// Name: Extract PromptResponse from Clipboard // Description: Replaces clipboard text with content inside <promptResponse> tags if found. // Author: tayiorbeii // GitHub: tayiorbeii import "@johnlindquist/kit" const text = await paste() const regex = /<promptResponse\b[^>]*>([\s\S]*?)<\/promptResponse>/gi let match: RegExpExecArray | null const contents: string[] = [] while ((match = regex.exec(text)) !== null) { contents.push(match[1].trim()) } if (contents.length === 0) { await notify('No <promptResponse> tags found in clipboard') exit() } const result = contents.join('\n\n') await copy(result) await notify('Clipboard replaced with <promptResponse> content')