personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add one-click confirm button for speaker voiceprint matches

Added a ✓ confirm button next to the match badge on sentence rows where match score >= 50%. Clicking it calls the existing saveVoiceprint() with the matched entity name, bypassing the dropdown. Includes green button styling (spk-btn-confirm), double-click prevention via disabled state, and success/error feedback through existing showStatus() pattern.

+34 -1
+34 -1
apps/speakers/workspace.html
··· 297 297 cursor: not-allowed; 298 298 } 299 299 300 + .spk-btn-confirm { 301 + background: #16a34a; 302 + color: #fff; 303 + font-size: 11px; 304 + padding: 2px 8px; 305 + margin-left: 6px; 306 + vertical-align: middle; 307 + } 308 + 309 + .spk-btn-confirm:hover { 310 + background: #15803d; 311 + } 312 + 313 + .spk-btn-confirm:disabled { 314 + background: #86efac; 315 + cursor: not-allowed; 316 + } 317 + 300 318 .spk-select-small { 301 319 padding: 4px 8px; 302 320 border: 1px solid #d1d5db; ··· 808 826 if (match) { 809 827 const scorePct = Math.round(match.score * 100); 810 828 const scoreClass = match.score >= 0.7 ? 'high' : match.score >= 0.5 ? 'med' : 'low'; 811 - matchHtml = `<span class="spk-match-label spk-match-${scoreClass}">${escapeHtml(match.entity)} ${scorePct}%</span>`; 829 + const confirmBtn = match.score >= 0.5 830 + ? `<button class="spk-btn spk-btn-confirm spk-confirm-match-btn" data-entity="${escapeHtml(match.entity)}" title="Confirm ${escapeHtml(match.entity)}">&#10003;</button>` 831 + : ''; 832 + matchHtml = `<span class="spk-match-label spk-match-${scoreClass}">${escapeHtml(match.entity)} ${scorePct}%</span>${confirmBtn}`; 812 833 } 813 834 814 835 return ` ··· 896 917 897 918 if (!entityName || entityName === '__new__') return; 898 919 920 + saveVoiceprint(entityName, source, sentenceId, row); 921 + }); 922 + }); 923 + 924 + // Confirm match button 925 + detailPanel.querySelectorAll('.spk-confirm-match-btn').forEach(btn => { 926 + btn.addEventListener('click', () => { 927 + const row = btn.closest('.spk-sentence'); 928 + const sentenceId = parseInt(row.dataset.id); 929 + const entityName = btn.dataset.entity; 930 + 931 + btn.disabled = true; 899 932 saveVoiceprint(entityName, source, sentenceId, row); 900 933 }); 901 934 });