@@ -60,6 +60,10 @@ export class PromptCardsWebviewProvider implements vscode.WebviewViewProvider {
6060 this . logger . debug ( `[WebView] openRepository message received for: ${ message . repositoryUrl } ` ) ;
6161 this . openRepository ( message . repositoryUrl ) ;
6262 break ;
63+ case 'openLocalFolder' :
64+ this . logger . debug ( `[WebView] openLocalFolder message received` ) ;
65+ this . openLocalFolder ( ) ;
66+ break ;
6367 default :
6468 this . logger . warn ( `[WebView] Unknown message command: ${ message . command } ` ) ;
6569 }
@@ -158,6 +162,11 @@ export class PromptCardsWebviewProvider implements vscode.WebviewViewProvider {
158162 }
159163 }
160164
165+ private async openLocalFolder ( ) {
166+ // Reuse the existing command from syncManager
167+ await vscode . commands . executeCommand ( 'promptitude.openPromptsFolder' ) ;
168+ }
169+
161170 private _getHtmlForWebview ( webview : vscode . Webview ) {
162171 return `<!DOCTYPE html>
163172<html lang="en">
@@ -992,19 +1001,21 @@ export class PromptCardsWebviewProvider implements vscode.WebviewViewProvider {
9921001 <span class="type-icon">\${typeIcon}</span>
9931002 \${escapeHtml(cleanPromptName(prompt.name))}
9941003 </h3>
1004+ \${prompt.repositoryUrl ? \`
9951005 <div class="card-actions" onclick="event.stopPropagation()">
9961006 <button class="action-btn \${prompt.active ? 'active-btn' : 'inactive-btn'}" onclick="event.stopPropagation(); togglePrompt('\${escapedPath}'); return false;" title="\${prompt.active ? 'Click to deactivate' : 'Click to activate'}">
9971007 \${prompt.active ? '✓ Activated' : '+ Activate'}
9981008 </button>
9991009 </div>
1010+ \` : ''}
10001011 </div>
10011012 <div class="card-description">
10021013 \${escapeHtml(prompt.description || 'No description available')}
10031014 </div>
10041015 <div class="card-repository" onclick="event.stopPropagation()">
10051016 \${prompt.repositoryUrl ?
10061017 \`📦 <a href="#" onclick="openRepository('\${escapeHtml(prompt.repositoryUrl)}'); return false;" title="Open repository in browser">\${escapeHtml(getRepositoryName(prompt.repositoryUrl))} 🔗</a>\` :
1007- \`📦 Local\`
1018+ \`💻 <a href="#" onclick="openLocalFolder(); return false;" title="Open local prompts folder"> Local</a> \`
10081019 }
10091020 </div>
10101021 </div>
@@ -1093,6 +1104,12 @@ export class PromptCardsWebviewProvider implements vscode.WebviewViewProvider {
10931104 });
10941105 }
10951106
1107+ function openLocalFolder() {
1108+ vscode.postMessage({
1109+ command: 'openLocalFolder'
1110+ });
1111+ }
1112+
10961113 // Request initial data
10971114 vscode.postMessage({ command: 'refresh' });
10981115 </script>
0 commit comments