feat: confirmation dialog for deeplinks (#783)

This commit is contained in:
lily-de
2025-01-26 11:15:40 -05:00
committed by GitHub
parent b1d3b7d31d
commit 4548710f2f
5 changed files with 179 additions and 15 deletions
@@ -0,0 +1,14 @@
export function extractCommand(link: string): string {
const url = new URL(link);
const cmd = url.searchParams.get('cmd') || 'Unknown Command';
const args = url.searchParams.getAll('arg').map(decodeURIComponent);
// Combine the command and its arguments into a reviewable format
return `${cmd} ${args.join(' ')}`.trim();
}
export function extractExtensionName(link: string): string {
const url = new URL(link);
const name = url.searchParams.get('name');
return name ? decodeURIComponent(name) : 'Unknown Extension';
}