Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
refactor: unified model selector
Gabriel Stein681228f613ac
diff --git a/assets/README.md b/src/assets/README.mdsimilarity index 100%rename from assets/README.mdrename to src/assets/README.mddiff --git a/assets/dmg-background.png b/src/assets/dmg-background.pngsimilarity index 100%rename from assets/dmg-background.pngrename to src/assets/dmg-background.pngdiff --git a/assets/icon.icns b/src/assets/icon.icnssimilarity index 100%rename from assets/icon.icnsrename to src/assets/icon.icnsdiff --git a/assets/icon.ico b/src/assets/icon.icosimilarity index 100%rename from assets/icon.icorename to src/assets/icon.icodiff --git a/assets/icon.png b/src/assets/icon.pngsimilarity index 100%rename from assets/icon.pngrename to src/assets/icon.pngdiff --git a/assets/[email protected] b/src/assets/[email protected]similarity index 100%rename from assets/[email protected]rename to src/assets/[email protected]diff --git a/src/assets/icons/providers/anthropic.svg b/src/assets/icons/providers/anthropic.svgnew file mode 100644index 000000000..5b81844cb--- /dev/null+++ b/src/assets/icons/providers/anthropic.svg@@ -0,0 +1 @@+<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Anthropic</title><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/gemini.svg b/src/assets/icons/providers/gemini.svgnew file mode 100644index 000000000..f1cf35757--- /dev/null+++ b/src/assets/icons/providers/gemini.svg@@ -0,0 +1 @@+<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-fill-0)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-fill-1)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-fill-2)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-fill-0" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-fill-1" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-fill-2" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/llama.svg b/src/assets/icons/providers/llama.svgnew file mode 100644index 000000000..01fed4c95--- /dev/null+++ b/src/assets/icons/providers/llama.svg@@ -0,0 +1 @@+<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Meta</title><path d="M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z" fill="url(#lobe-icons-meta-fill-0)"></path><path d="M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z" fill="url(#lobe-icons-meta-fill-1)"></path><path d="M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z" fill="url(#lobe-icons-meta-fill-2)"></path><path d="M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z" fill="url(#lobe-icons-meta-fill-3)"></path><path d="M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z" fill="url(#lobe-icons-meta-fill-4)"></path><path d="M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z" fill="url(#lobe-icons-meta-fill-5)"></path><path d="M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z" fill="#0082FB"></path><path d="M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z" fill="url(#lobe-icons-meta-fill-6)"></path><path d="M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z" fill="#0082FB"></path><path d="M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z" fill="url(#lobe-icons-meta-fill-7)"></path><path d="M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z" fill="url(#lobe-icons-meta-fill-8)"></path><path d="M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z" fill="url(#lobe-icons-meta-fill-9)"></path><path d="M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z" fill="url(#lobe-icons-meta-fill-10)"></path><path d="M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z" fill="url(#lobe-icons-meta-fill-11)"></path><path d="M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z" fill="url(#lobe-icons-meta-fill-12)"></path><defs><linearGradient id="lobe-icons-meta-fill-0" x1="75.897%" x2="26.312%" y1="89.199%" y2="12.194%"><stop offset=".06%" stop-color="#0867DF"></stop><stop offset="45.39%" stop-color="#0668E1"></stop><stop offset="85.91%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-1" x1="21.67%" x2="97.068%" y1="75.874%" y2="23.985%"><stop offset="13.23%" stop-color="#0064DF"></stop><stop offset="99.88%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-2" x1="38.263%" x2="60.895%" y1="89.127%" y2="16.131%"><stop offset="1.47%" stop-color="#0072EC"></stop><stop offset="68.81%" stop-color="#0064DF"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-3" x1="47.032%" x2="52.15%" y1="90.19%" y2="15.745%"><stop offset="7.31%" stop-color="#007CF6"></stop><stop offset="99.43%" stop-color="#0072EC"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-4" x1="52.155%" x2="47.591%" y1="58.301%" y2="37.004%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#007CF6"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-5" x1="37.689%" x2="61.961%" y1="12.502%" y2="63.624%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-6" x1="34.808%" x2="62.313%" y1="68.859%" y2="23.174%"><stop offset="27.99%" stop-color="#007FF8"></stop><stop offset="91.41%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-7" x1="43.762%" x2="57.602%" y1="6.235%" y2="98.514%"><stop offset="0%" stop-color="#0082FB"></stop><stop offset="99.95%" stop-color="#0081FA"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-8" x1="60.055%" x2="39.88%" y1="4.661%" y2="69.077%"><stop offset="6.19%" stop-color="#0081FA"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-9" x1="30.282%" x2="61.081%" y1="59.32%" y2="33.244%"><stop offset="0%" stop-color="#027AF3"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-10" x1="20.433%" x2="82.112%" y1="50.001%" y2="50.001%"><stop offset="0%" stop-color="#0377EF"></stop><stop offset="99.94%" stop-color="#0279F1"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-11" x1="40.303%" x2="72.394%" y1="35.298%" y2="57.811%"><stop offset=".19%" stop-color="#0471E9"></stop><stop offset="100%" stop-color="#0377EF"></stop></linearGradient><linearGradient id="lobe-icons-meta-fill-12" x1="32.254%" x2="68.003%" y1="19.719%" y2="84.908%"><stop offset="27.65%" stop-color="#0867DF"></stop><stop offset="100%" stop-color="#0471E9"></stop></linearGradient></defs></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/mistral.svg b/src/assets/icons/providers/mistral.svgnew file mode 100644index 000000000..84cea871b--- /dev/null+++ b/src/assets/icons/providers/mistral.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="256" height="233" viewBox="0 0 256 233"><path d="M186.182 0h46.545v46.545h-46.545z"/><path fill="#F7D046" d="M209.455 0H256v46.545h-46.545z"/><path d="M0 0h46.545v46.545H0zm0 46.545h46.545V93.09H0zm0 46.546h46.545v46.545H0zm0 46.545h46.545v46.545H0zm0 46.546h46.545v46.545H0z"/><path fill="#F7D046" d="M23.273 0h46.545v46.545H23.273z"/><path fill="#F2A73B" d="M209.455 46.545H256V93.09h-46.545zm-186.182 0h46.545V93.09H23.273z"/><path d="M139.636 46.545h46.545V93.09h-46.545z"/><path fill="#F2A73B" d="M162.909 46.545h46.545V93.09h-46.545zm-93.091 0h46.545V93.09H69.818z"/><path fill="#EE792F" d="M116.364 93.091h46.545v46.545h-46.545zm46.545 0h46.545v46.545h-46.545zm-93.091 0h46.545v46.545H69.818z"/><path d="M93.091 139.636h46.545v46.545H93.091z"/><path fill="#EB5829" d="M116.364 139.636h46.545v46.545h-46.545z"/><path fill="#EE792F" d="M209.455 93.091H256v46.545h-46.545zm-186.182 0h46.545v46.545H23.273z"/><path d="M186.182 139.636h46.545v46.545h-46.545z"/><path fill="#EB5829" d="M209.455 139.636H256v46.545h-46.545z"/><path d="M186.182 186.182h46.545v46.545h-46.545z"/><path fill="#EB5829" d="M23.273 139.636h46.545v46.545H23.273z"/><path fill="#EA3326" d="M209.455 186.182H256v46.545h-46.545zm-186.182 0h46.545v46.545H23.273z"/></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/openai-oss.svg b/src/assets/icons/providers/openai-oss.svgnew file mode 100644index 000000000..d061efc50--- /dev/null+++ b/src/assets/icons/providers/openai-oss.svg@@ -0,0 +1 @@+<?xml version="1.0" encoding="UTF-8"?><svg id="logosandtypes_com" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><defs><style>.cls-1{fill:none;}</style></defs><g id="Layer_3"><path id="Layer_3-2" class="cls-1" d="M0,0H150V150H0V0Z"/></g><path d="M132.17,62.55c3.02-9.09,1.97-19.04-2.87-27.3-7.28-12.67-21.91-19.19-36.19-16.12-12.45-13.85-33.77-14.98-47.62-2.53-4.4,3.95-7.67,8.99-9.51,14.61-9.38,1.92-17.48,7.8-22.23,16.12-7.36,12.65-5.69,28.61,4.13,39.46-3.03,9.09-1.99,19.04,2.84,27.3,7.29,12.67,21.93,19.19,36.22,16.12,6.36,7.16,15.49,11.23,25.07,11.18,14.64,.01,27.62-9.44,32.09-23.38,9.38-1.93,17.48-7.8,22.23-16.12,7.27-12.63,5.59-28.5-4.16-39.33Zm-50.16,70.1c-5.85,0-11.51-2.04-15.99-5.79l.79-.45,26.57-15.34c1.35-.79,2.17-2.23,2.18-3.79v-37.46l11.23,6.5c.11,.06,.19,.16,.21,.29v31.04c-.03,13.79-11.2,24.96-24.99,24.99Zm-53.71-22.94c-2.93-5.06-3.98-10.99-2.97-16.76l.79,.47,26.59,15.34c1.34,.79,3,.79,4.34,0l32.49-18.73v12.97c0,.14-.07,.26-.18,.34l-26.91,15.52c-11.96,6.89-27.24,2.79-34.14-9.15Zm-7-57.87c2.95-5.09,7.61-8.98,13.15-10.97v31.57c-.02,1.55,.81,2.99,2.16,3.76l32.33,18.65-11.23,6.5c-.12,.07-.27,.07-.39,0l-26.86-15.49c-11.93-6.92-16.03-22.18-9.15-34.14v.13Zm92.28,21.44l-32.43-18.83,11.21-6.47c.12-.07,.27-.07,.39,0l26.86,15.52c11.95,6.9,16.05,22.18,9.15,34.13-2.9,5.03-7.47,8.9-12.92,10.93v-31.57c-.05-1.55-.91-2.96-2.26-3.71Zm11.18-16.81l-.79-.47-26.54-15.47c-1.35-.79-3.02-.79-4.37,0l-32.46,18.73v-12.97c-.01-.13,.05-.27,.16-.34l26.86-15.49c11.97-6.9,27.27-2.78,34.16,9.19,2.91,5.06,3.97,10.97,2.98,16.72v.11Zm-70.29,22.99l-11.23-6.47c-.11-.07-.19-.18-.21-.32v-30.96c.02-13.82,11.23-25,25.05-24.98,5.83,0,11.48,2.05,15.96,5.78l-.79,.45-26.57,15.34c-1.35,.79-2.17,2.23-2.18,3.79l-.03,37.38Zm6.1-13.15l14.47-8.34,14.49,8.34v16.68l-14.44,8.34-14.49-8.34-.03-16.68Z"/></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/openai.svg b/src/assets/icons/providers/openai.svgnew file mode 100644index 000000000..d061efc50--- /dev/null+++ b/src/assets/icons/providers/openai.svg@@ -0,0 +1 @@+<?xml version="1.0" encoding="UTF-8"?><svg id="logosandtypes_com" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><defs><style>.cls-1{fill:none;}</style></defs><g id="Layer_3"><path id="Layer_3-2" class="cls-1" d="M0,0H150V150H0V0Z"/></g><path d="M132.17,62.55c3.02-9.09,1.97-19.04-2.87-27.3-7.28-12.67-21.91-19.19-36.19-16.12-12.45-13.85-33.77-14.98-47.62-2.53-4.4,3.95-7.67,8.99-9.51,14.61-9.38,1.92-17.48,7.8-22.23,16.12-7.36,12.65-5.69,28.61,4.13,39.46-3.03,9.09-1.99,19.04,2.84,27.3,7.29,12.67,21.93,19.19,36.22,16.12,6.36,7.16,15.49,11.23,25.07,11.18,14.64,.01,27.62-9.44,32.09-23.38,9.38-1.93,17.48-7.8,22.23-16.12,7.27-12.63,5.59-28.5-4.16-39.33Zm-50.16,70.1c-5.85,0-11.51-2.04-15.99-5.79l.79-.45,26.57-15.34c1.35-.79,2.17-2.23,2.18-3.79v-37.46l11.23,6.5c.11,.06,.19,.16,.21,.29v31.04c-.03,13.79-11.2,24.96-24.99,24.99Zm-53.71-22.94c-2.93-5.06-3.98-10.99-2.97-16.76l.79,.47,26.59,15.34c1.34,.79,3,.79,4.34,0l32.49-18.73v12.97c0,.14-.07,.26-.18,.34l-26.91,15.52c-11.96,6.89-27.24,2.79-34.14-9.15Zm-7-57.87c2.95-5.09,7.61-8.98,13.15-10.97v31.57c-.02,1.55,.81,2.99,2.16,3.76l32.33,18.65-11.23,6.5c-.12,.07-.27,.07-.39,0l-26.86-15.49c-11.93-6.92-16.03-22.18-9.15-34.14v.13Zm92.28,21.44l-32.43-18.83,11.21-6.47c.12-.07,.27-.07,.39,0l26.86,15.52c11.95,6.9,16.05,22.18,9.15,34.13-2.9,5.03-7.47,8.9-12.92,10.93v-31.57c-.05-1.55-.91-2.96-2.26-3.71Zm11.18-16.81l-.79-.47-26.54-15.47c-1.35-.79-3.02-.79-4.37,0l-32.46,18.73v-12.97c-.01-.13,.05-.27,.16-.34l26.86-15.49c11.97-6.9,27.27-2.78,34.16,9.19,2.91,5.06,3.97,10.97,2.98,16.72v.11Zm-70.29,22.99l-11.23-6.47c-.11-.07-.19-.18-.21-.32v-30.96c.02-13.82,11.23-25,25.05-24.98,5.83,0,11.48,2.05,15.96,5.78l-.79,.45-26.57,15.34c-1.35,.79-2.17,2.23-2.18,3.79l-.03,37.38Zm6.1-13.15l14.47-8.34,14.49,8.34v16.68l-14.44,8.34-14.49-8.34-.03-16.68Z"/></svg>\ No newline at end of filediff --git a/src/assets/icons/providers/qwen.svg b/src/assets/icons/providers/qwen.svgnew file mode 100644index 000000000..d936758bf--- /dev/null+++ b/src/assets/icons/providers/qwen.svg@@ -0,0 +1,13 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 300 300">+ <!-- Generator: Adobe Illustrator 29.2.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 116) -->+ <defs>+ <style>+ .st0 {+ fill: #5f62ac;+ fill-rule: evenodd;+ }+ </style>+ </defs>+ <path class="st0" d="M191.4,122.7c.6,0,.7.3.4.7l-10.1,17.7-31.5,55.4c0,.3-.3.3-.6.3s-.4,0-.6-.3l-41.7-72.7c-.3-.4,0-.6.3-.6h2.7l81.2-.3h-.1ZM115.5,25.9c-.3,0-.4,0-.6.3l-34.6,60.6c-.3.6-.9.9-1.6.9h-34.6c-.7,0-.9.3-.4.9l70.1,122.6c.3.4.1.7-.4.7h-33.7c-1,0-1.9.6-2.4,1.6l-15.9,27.9c-.6.9-.3,1.5.9,1.5h69c.6,0,1,.3,1.2.9l16.9,29.7c.6,1,1,1,1.6,0l60.4-105.7,9.5-16.6c0-.3.3-.3.6-.3s.4,0,.6.3l17.2,30.6c.3.4.7.7,1.3.7l33.4-.3c.1,0,.3,0,.4-.3v-.4l-35-61.5c-.3-.4-.3-.9,0-1.3l3.6-6.1,13.5-23.9c.3-.4,0-.7-.4-.7H116.1c-.7,0-.9-.3-.4-.9l17.4-30.3c.3-.4.3-.9,0-1.3l-16.5-28.9c0-.3-.3-.4-.6-.4h-.4ZM156.9,21.2c4.8,8.3,9.5,16.6,14.1,25.1.4.7,1,1,1.9,1h67c2.1,0,3.9,1.3,5.3,4l17.5,31c2.2,4,3,5.8.3,10.1-3.1,5.2-6.2,10.4-9.2,15.7l-4.5,8c-1.3,2.4-2.7,3.4-.4,6.2l32.1,56c2.1,3.6,1.3,5.9-.4,9.4-5.3,9.5-10.7,18.9-16.2,28.2-1.9,3.3-4.3,4.5-8.2,4.5-9.4-.1-18.7,0-28.1.1-.4,0-.7.3-1,.6-10.8,19.2-21.7,38.2-32.7,57.2-2.1,3.6-4.6,4.5-8.8,4.5h-36.4c-2.5,0-4.3-1-5.6-3.3l-16.2-28.1c-.1-.4-.6-.6-1-.6h-61.8c-3.4.3-6.7,0-9.6-1l-19.3-33.4c-1.2-2.2-1.2-4.3,0-6.5l14.5-25.5c.4-.7.4-1.6,0-2.4-7.6-13.2-15.1-26.3-22.6-39.5l-9.5-16.8c-1.9-3.7-2.1-5.9,1.2-11.6,5.6-9.8,11.1-19.6,16.8-29.4,1.6-2.8,3.7-4,7-4h31.3c.6,0,1-.3,1.3-.7l33.8-59.1c1.2-1.9,2.8-3,5-3h19.2l12.3-.3c4.2,0,8.8.4,10.8,4.2v-.6Z"/>+</svg>\ No newline at end of filediff --git a/src/components/AIModelSelector.tsx b/src/components/AIModelSelector.tsxdeleted file mode 100644index ec4272587..000000000--- a/src/components/AIModelSelector.tsx+++ /dev/null@@ -1,211 +0,0 @@-import React, { useState, useEffect } from 'react';-import { Button } from './ui/button';-import { Input } from './ui/input';-import { Select } from './ui/select';-import { LocalModelManager } from './LocalModelManager';-import ApiKeyInput from './ui/ApiKeyInput';-import { AI_MODES, detectModeFromModel } from '../config/aiProvidersConfig';-import { Cloud, HardDrive } from 'lucide-react';--interface AIModelSelectorProps {- currentModel: string;- onModelChange: (model: string) => void;- onProviderChange: (provider: string) => void;- openaiApiKey: string;- setOpenaiApiKey: (key: string) => void;- anthropicApiKey: string;- setAnthropicApiKey: (key: string) => void;- pasteFromClipboard: (setter: (value: string) => void) => void;- showAlertDialog: (dialog: { title: string; description: string }) => void;-}--export default function AIModelSelector({- currentModel,- onModelChange,- onProviderChange,- openaiApiKey,- setOpenaiApiKey,- anthropicApiKey,- setAnthropicApiKey,- pasteFromClipboard,- showAlertDialog,-}: AIModelSelectorProps) {- // Detect current mode and provider from the selected model- const detected = detectModeFromModel(currentModel);- const [selectedMode, setSelectedMode] = useState<'cloud' | 'local'>(detected?.mode || 'cloud');- const [selectedProvider, setSelectedProvider] = useState(detected?.providerId || 'openai');-- // Get available providers for the selected mode- const currentMode = AI_MODES.find(mode => mode.id === selectedMode);- const currentProvider = currentMode?.providers.find(p => p.id === selectedProvider);-- useEffect(() => {- // Update parent when provider changes- onProviderChange(selectedProvider);- }, [selectedProvider, onProviderChange]);-- const handleModeChange = (newMode: 'cloud' | 'local') => {- setSelectedMode(newMode);-- // Select first provider in the new mode- const mode = AI_MODES.find(m => m.id === newMode);- if (mode && mode.providers.length > 0) {- const firstProvider = mode.providers[0];- setSelectedProvider(firstProvider.id);-- // Select first model in the provider- if (firstProvider.models.length > 0) {- onModelChange(firstProvider.models[0].value);- }- }- };-- const handleProviderChange = (newProvider: string) => {- setSelectedProvider(newProvider);-- // Select first model in the new provider- const provider = currentMode?.providers.find(p => p.id === newProvider);- if (provider && provider.models.length > 0) {- onModelChange(provider.models[0].value);- }- };-- return (- <div className="space-y-4">- {/* Cloud vs Local Selection */}- <div className="space-y-3 p-4 bg-gray-50 border border-gray-200 rounded-xl">- <h4 className="font-medium text-gray-900">AI Mode</h4>- <div className="grid grid-cols-2 gap-3">- <button- onClick={() => handleModeChange('cloud')}- className={`flex items-center justify-center gap-2 p-3 rounded-lg border-2 transition-all ${- selectedMode === 'cloud'- ? 'border-blue-500 bg-blue-50 text-blue-700'- : 'border-gray-200 bg-white text-gray-600 hover:border-gray-300'- }`}- >- <Cloud size={20} />- <span className="font-medium">Cloud AI</span>- </button>- <button- onClick={() => handleModeChange('local')}- className={`flex items-center justify-center gap-2 p-3 rounded-lg border-2 transition-all ${- selectedMode === 'local'- ? 'border-purple-500 bg-purple-50 text-purple-700'- : 'border-gray-200 bg-white text-gray-600 hover:border-gray-300'- }`}- >- <HardDrive size={20} />- <span className="font-medium">Local AI</span>- </button>- </div>- <p className="text-xs text-gray-600">- {selectedMode === 'cloud'- ? 'Fast and powerful, requires internet and API keys'- : 'Private and offline, runs on your device'}- </p>- </div>-- {/* Provider Selection */}- <div className="space-y-3 p-4 bg-blue-50 border border-blue-200 rounded-xl">- <h4 className="font-medium text-blue-900">AI Provider</h4>- <select- value={selectedProvider}- onChange={(e) => handleProviderChange(e.target.value)}- className="w-full text-sm border border-blue-300 rounded-md p-2 bg-white focus:border-blue-500 focus:ring-1 focus:ring-blue-500"- >- {currentMode?.providers.map(provider => (- <option key={provider.id} value={provider.id}>- {provider.name}- </option>- ))}- </select>- </div>-- {/* Model Selection */}- {selectedMode === 'cloud' ? (- <div className="space-y-3 p-4 bg-indigo-50 border border-indigo-200 rounded-xl">- <h4 className="font-medium text-indigo-900">AI Model</h4>- <select- value={currentModel}- onChange={(e) => onModelChange(e.target.value)}- className="w-full text-sm border border-indigo-300 rounded-md p-2 bg-white focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500"- >- {currentProvider?.models.map(model => (- <option key={model.value} value={model.value}>- {model.label} - {model.description}- </option>- ))}- </select>- <p className="text-xs text-indigo-600">- Different models offer varying levels of quality and speed- </p>- </div>- ) : (- <div className="space-y-3">- <h4 className="font-medium text-purple-900 px-4">Available Models</h4>- {/* For local models, we'll show the current provider's models info */}- <div className="bg-purple-50 border border-purple-200 rounded-xl p-4">- <p className="text-sm text-purple-800 mb-3">- {selectedProvider === 'qwen' && 'Qwen models offer excellent multilingual support and reasoning capabilities.'}- {selectedProvider === 'mistral' && 'Mistral models are known for their efficiency and strong performance.'}- {selectedProvider === 'llama' && 'Meta Llama models provide state-of-the-art open-source AI capabilities.'}- </p>- <p className="text-xs text-purple-600">- Download and manage models below- </p>- </div>- </div>- )}-- {/* API Key Input for Cloud Providers */}- {selectedMode === 'cloud' && selectedProvider === 'openai' && (- <div className="space-y-3 p-4 bg-blue-50 border border-blue-200 rounded-xl">- <h4 className="font-medium text-blue-900">OpenAI API Key</h4>- <ApiKeyInput- apiKey={openaiApiKey}- setApiKey={setOpenaiApiKey}- helpText="Get your API key from platform.openai.com"- />- </div>- )}-- {selectedMode === 'cloud' && selectedProvider === 'anthropic' && (- <div className="space-y-3 p-4 bg-purple-50 border border-purple-200 rounded-xl">- <h4 className="font-medium text-purple-900">Anthropic API Key</h4>- <div className="flex gap-2">- <Input- type="password"- placeholder="sk-ant-..."- value={anthropicApiKey}- onChange={(e) => setAnthropicApiKey(e.target.value)}- className="flex-1 text-sm border-purple-300 focus:border-purple-500"- />- <Button- variant="outline"- size="sm"- onClick={() => pasteFromClipboard(setAnthropicApiKey)}- className="border-purple-300 text-purple-700 hover:bg-purple-50"- >- Paste- </Button>- </div>- <p className="text-xs text-purple-600">- Get your API key from console.anthropic.com- </p>- </div>- )}-- {/* Local Model Manager */}- {selectedMode === 'local' && (- <div className="space-y-4">- <LocalModelManager- filterProvider={selectedProvider}- onModelSelect={onModelChange}- selectedModel={currentModel}- />- </div>- )}- </div>- );-}\ No newline at end of filediff --git a/src/components/AIModelSelectorEnhanced.tsx b/src/components/AIModelSelectorEnhanced.tsxnew file mode 100644index 000000000..ebc90084f--- /dev/null+++ b/src/components/AIModelSelectorEnhanced.tsx@@ -0,0 +1,490 @@+import React, { useState, useEffect } from 'react';+import { Button } from './ui/button';+import { Input } from './ui/input';+import { Cloud, Lock, Brain, Zap, Globe, Cpu, Download, Check } from 'lucide-react';+import ApiKeyInput from './ui/ApiKeyInput';+import { UnifiedModelPickerCompact } from './UnifiedModelPicker';+import { REASONING_PROVIDERS } from '../utils/languages';+import { modelRegistry } from '../models/ModelRegistry';++interface AIModelSelectorEnhancedProps {+ useReasoningModel: boolean;+ setUseReasoningModel: (value: boolean) => void;+ reasoningModel: string;+ setReasoningModel: (model: string) => void;+ localReasoningProvider: string;+ setLocalReasoningProvider: (provider: string) => void;+ openaiApiKey: string;+ setOpenaiApiKey: (key: string) => void;+ anthropicApiKey: string;+ setAnthropicApiKey: (key: string) => void;+ geminiApiKey: string;+ setGeminiApiKey: (key: string) => void;+ pasteFromClipboard: (setter: (value: string) => void) => void;+ showAlertDialog: (dialog: { title: string; description: string }) => void;+}++// Provider Icon Component+const ProviderIcon = ({ provider }: { provider: string }) => {+ const iconClass = "w-5 h-5";+ const [svgError, setSvgError] = React.useState(false);++ // Default fallback icons for each provider+ const getFallbackIcon = () => {+ switch (provider) {+ // Cloud providers+ case 'openai': return <Brain className={iconClass} />;+ case 'anthropic': return <Zap className={iconClass} />;+ case 'gemini': return <Globe className={iconClass} />;+ // Local providers+ case 'qwen': return <Brain className={iconClass} />;+ case 'mistral': return <Zap className={iconClass} />;+ case 'llama': return <Cpu className={iconClass} />;+ case 'openai-oss': return <Globe className={iconClass} />;+ default: return <Brain className={iconClass} />;+ }+ };++ // Try to load SVG if it exists and we haven't had an error+ if (!svgError) {+ return (+ <>+ <img+ src={`/assets/icons/providers/${provider}.svg`}+ alt={`${provider} icon`}+ className={iconClass}+ onError={() => setSvgError(true)}+ style={{ display: svgError ? 'none' : 'block' }}+ />+ {svgError && getFallbackIcon()}+ </>+ );+ }++ return getFallbackIcon();+};++export default function AIModelSelectorEnhanced({+ useReasoningModel,+ setUseReasoningModel,+ reasoningModel,+ setReasoningModel,+ localReasoningProvider,+ setLocalReasoningProvider,+ openaiApiKey,+ setOpenaiApiKey,+ anthropicApiKey,+ setAnthropicApiKey,+ geminiApiKey,+ setGeminiApiKey,+ pasteFromClipboard,+ showAlertDialog,+}: AIModelSelectorEnhancedProps) {+ const [selectedMode, setSelectedMode] = useState<'cloud' | 'local'>('cloud');+ const [selectedCloudProvider, setSelectedCloudProvider] = useState('openai');+ const [selectedLocalProvider, setSelectedLocalProvider] = useState('qwen');+ const [downloadedModels, setDownloadedModels] = useState<Set<string>>(new Set());+ const [downloadingModel, setDownloadingModel] = useState<string | null>(null);++ const cloudProviders = ['openai', 'anthropic', 'gemini'];+ const localProviders = modelRegistry.getAllProviders().map(p => p.id);++ // Initialize based on current provider+ useEffect(() => {+ if (localProviders.includes(localReasoningProvider)) {+ setSelectedMode('local');+ setSelectedLocalProvider(localReasoningProvider);+ } else if (cloudProviders.includes(localReasoningProvider)) {+ setSelectedMode('cloud');+ setSelectedCloudProvider(localReasoningProvider);+ }++ // Check downloaded models+ checkDownloadedModels();+ }, []);++ // Check which models are downloaded+ const checkDownloadedModels = async () => {+ try {+ const result = await window.electronAPI?.modelGetAll?.();+ if (result && Array.isArray(result)) {+ const downloaded = new Set(result.filter(m => m.isDownloaded).map(m => m.id));+ setDownloadedModels(downloaded);+ }+ } catch (error) {+ console.error('Failed to check downloaded models:', error);+ }+ };++ // Handle model download with minimal code+ const downloadModel = async (modelId: string) => {+ setDownloadingModel(modelId);+ try {+ await window.electronAPI?.modelDownload?.(modelId);+ setDownloadedModels(prev => new Set([...prev, modelId]));+ if (!reasoningModel) setReasoningModel(modelId);+ } catch (error) {+ console.error('Download failed:', error);+ } finally {+ setDownloadingModel(null);+ }+ };++ const handleModeChange = async (newMode: 'cloud' | 'local') => {+ setSelectedMode(newMode);++ if (newMode === 'cloud') {+ // Switch to cloud mode+ setLocalReasoningProvider(selectedCloudProvider);+ const provider = REASONING_PROVIDERS[selectedCloudProvider as keyof typeof REASONING_PROVIDERS];+ if (provider?.models?.length > 0) {+ setReasoningModel(provider.models[0].value);+ }+ } else {+ // Switch to local mode+ setLocalReasoningProvider(selectedLocalProvider);+ const provider = modelRegistry.getProvider(selectedLocalProvider);+ if (provider?.models?.length > 0) {+ setReasoningModel(provider.models[0].id);+ }+ }+ };++ const handleCloudProviderChange = (provider: string) => {+ setSelectedCloudProvider(provider);+ setLocalReasoningProvider(provider);+ // Update model to first available+ const providerData = REASONING_PROVIDERS[provider as keyof typeof REASONING_PROVIDERS];+ if (providerData?.models?.length > 0) {+ setReasoningModel(providerData.models[0].value);+ }+ };++ const handleLocalProviderChange = (provider: string) => {+ setSelectedLocalProvider(provider);+ setLocalReasoningProvider(provider);+ // Update model to first available+ const providerData = modelRegistry.getProvider(provider);+ if (providerData?.models?.length > 0) {+ setReasoningModel(providerData.models[0].id);+ }+ };++ const getProviderColor = (provider: string) => {+ const colors: Record<string, string> = {+ 'openai': 'green',+ 'anthropic': 'purple',+ 'gemini': 'blue',+ 'qwen': 'indigo',+ 'mistral': 'orange',+ 'llama': 'blue',+ 'openai-oss': 'teal'+ };+ return colors[provider] || 'gray';+ };++ return (+ <div className="space-y-6">+ {/* Enable/Disable Toggle */}+ <div className="flex items-center justify-between p-4 bg-green-50 border border-green-200 rounded-xl">+ <div>+ <label className="text-sm font-medium text-green-800">+ Enable AI Text Enhancement+ </label>+ <p className="text-xs text-green-700">+ Use AI to automatically improve transcription quality+ </p>+ </div>+ <label className="relative inline-flex items-center cursor-pointer">+ <input+ type="checkbox"+ className="sr-only"+ checked={useReasoningModel}+ onChange={(e) => setUseReasoningModel(e.target.checked)}+ />+ <div className={`w-11 h-6 bg-gray-200 rounded-full transition-colors duration-200 ${+ useReasoningModel ? "bg-green-600" : "bg-gray-300"+ }`}>+ <div className={`absolute top-0.5 left-0.5 bg-white border border-gray-300 rounded-full h-5 w-5 transition-transform duration-200 ${+ useReasoningModel ? "translate-x-5" : "translate-x-0"+ }`} />+ </div>+ </label>+ </div>++ {useReasoningModel && (+ <>+ {/* Cloud vs Local Selection */}+ <div className="grid grid-cols-1 md:grid-cols-2 gap-3">+ <button+ onClick={() => handleModeChange('cloud')}+ className={`p-4 border-2 rounded-xl text-left transition-all cursor-pointer ${+ selectedMode === 'cloud'+ ? "border-indigo-500 bg-indigo-50"+ : "border-neutral-200 bg-white hover:border-neutral-300"+ }`}+ >+ <div className="flex items-center justify-between mb-2">+ <div className="flex items-center gap-3">+ <Cloud className="w-6 h-6 text-blue-600" />+ <h4 className="font-medium text-neutral-900">Cloud AI</h4>+ </div>+ <span className="text-xs text-green-600 bg-green-100 px-2 py-1 rounded-full">+ Powerful+ </span>+ </div>+ <p className="text-sm text-neutral-600">+ Advanced models via API. Fast and capable, requires internet.+ </p>+ </button>++ <button+ onClick={() => handleModeChange('local')}+ className={`p-4 border-2 rounded-xl text-left transition-all cursor-pointer ${+ selectedMode === 'local'+ ? "border-indigo-500 bg-indigo-50"+ : "border-neutral-200 bg-white hover:border-neutral-300"+ }`}+ >+ <div className="flex items-center justify-between mb-2">+ <div className="flex items-center gap-3">+ <Lock className="w-6 h-6 text-purple-600" />+ <h4 className="font-medium text-neutral-900">Local AI</h4>+ </div>+ <span className="text-xs text-blue-600 bg-blue-100 px-2 py-1 rounded-full">+ Private+ </span>+ </div>+ <p className="text-sm text-neutral-600">+ Runs on your device. Complete privacy, works offline.+ </p>+ </button>+ </div>++ {/* Provider Content */}+ {selectedMode === 'cloud' ? (+ <div className="space-y-4">+ {/* Cloud Provider Tabs */}+ <div className="border border-gray-200 rounded-xl overflow-hidden">+ <div className="flex bg-gray-50 border-b border-gray-200">+ {cloudProviders.map((provider) => {+ const isSelected = selectedCloudProvider === provider;+ const color = getProviderColor(provider);+ return (+ <button+ key={provider}+ onClick={() => handleCloudProviderChange(provider)}+ className={`flex-1 flex items-center justify-center gap-2 px-4 py-3 font-medium transition-all ${+ isSelected+ ? `text-${color}-700 border-b-2`+ : 'text-gray-600 hover:bg-gray-100'+ }`}+ style={isSelected ? {+ borderBottomColor: `rgb(99 102 241)`,+ backgroundColor: 'rgb(238 242 255)'+ } : {}}+ >+ <ProviderIcon provider={provider} />+ <span>{REASONING_PROVIDERS[provider as keyof typeof REASONING_PROVIDERS]?.name}</span>+ </button>+ );+ })}+ </div>++ <div className="p-4">+ {/* Use UnifiedModelPickerCompact for cloud models */}+ <div className="space-y-3">+ <h4 className="text-sm font-medium text-gray-700">Select Model</h4>+ <UnifiedModelPickerCompact+ models={REASONING_PROVIDERS[selectedCloudProvider as keyof typeof REASONING_PROVIDERS]?.models || []}+ selectedModel={reasoningModel}+ onModelSelect={setReasoningModel}+ />+ </div>++ {/* API Key Configuration */}+ <div className="mt-4 pt-4 border-t border-gray-200">+ {selectedCloudProvider === 'openai' && (+ <div className="space-y-3">+ <h4 className="font-medium text-gray-900">API Configuration</h4>+ <ApiKeyInput+ apiKey={openaiApiKey}+ setApiKey={setOpenaiApiKey}+ helpText="Get your API key from platform.openai.com"+ />+ </div>+ )}++ {selectedCloudProvider === 'anthropic' && (+ <div className="space-y-3">+ <h4 className="font-medium text-gray-900">API Configuration</h4>+ <div className="flex gap-2">+ <Input+ type="password"+ placeholder="sk-ant-..."+ value={anthropicApiKey}+ onChange={(e) => setAnthropicApiKey(e.target.value)}+ className="flex-1 text-sm"+ />+ <Button+ variant="outline"+ size="sm"+ onClick={() => pasteFromClipboard(setAnthropicApiKey)}+ >+ Paste+ </Button>+ </div>+ <p className="text-xs text-gray-600">+ Get your API key from console.anthropic.com+ </p>+ </div>+ )}++ {selectedCloudProvider === 'gemini' && (+ <div className="space-y-3">+ <h4 className="font-medium text-gray-900">API Configuration</h4>+ <div className="flex gap-2">+ <Input+ type="password"+ placeholder="AIza..."+ value={geminiApiKey}+ onChange={(e) => setGeminiApiKey(e.target.value)}+ className="flex-1 text-sm"+ />+ <Button+ variant="outline"+ size="sm"+ onClick={() => pasteFromClipboard(setGeminiApiKey)}+ >+ Paste+ </Button>+ </div>+ <p className="text-xs text-gray-600">+ Get your API key from makersuite.google.com/app/apikey+ </p>+ </div>+ )}+ </div>+ </div>+ </div>+ </div>+ ) : (+ <div className="space-y-4">+ {/* Local Provider Tabs */}+ <div className="border border-gray-200 rounded-xl overflow-hidden">+ <div className="flex bg-gray-50 border-b border-gray-200 overflow-x-auto">+ {localProviders.map((provider) => {+ const isSelected = selectedLocalProvider === provider;+ const providerData = modelRegistry.getProvider(provider);+ return (+ <button+ key={provider}+ onClick={() => handleLocalProviderChange(provider)}+ className={`flex items-center justify-center gap-2 px-4 py-3 font-medium transition-all whitespace-nowrap ${+ isSelected+ ? 'text-purple-700 border-b-2'+ : 'text-gray-600 hover:bg-gray-100'+ }`}+ style={isSelected ? {+ borderBottomColor: 'rgb(147 51 234)',+ backgroundColor: 'rgb(250 245 255)'+ } : {}}+ >+ <ProviderIcon provider={provider} />+ <span>{providerData?.name}</span>+ </button>+ );+ })}+ </div>++ {/* Local Model List with Download */}+ <div className="p-4">+ <div className="space-y-3">+ <h4 className="text-sm font-medium text-gray-700">Available Models</h4>+ {(() => {+ const provider = modelRegistry.getProvider(selectedLocalProvider);+ if (!provider || !provider.models) {+ return <p className="text-sm text-gray-500">No models available for this provider</p>;+ }++ return (+ <div className="space-y-2">+ {provider.models.map((model) => {+ const isDownloaded = downloadedModels.has(model.id);+ const isDownloading = downloadingModel === model.id;+ const isSelected = reasoningModel === model.id;++ return (+ <div+ key={model.id}+ className={`p-3 rounded-lg border-2 transition-all ${+ isSelected+ ? 'border-purple-500 bg-purple-50'+ : 'border-gray-200 bg-white hover:border-gray-300'+ }`}+ >+ <div className="flex items-center justify-between">+ <div className="flex-1">+ <div className="font-medium text-gray-900">{model.name}</div>+ <div className="text-xs text-gray-600 mt-1">{model.description}</div>+ <div className="flex items-center gap-2 mt-1">+ <span className="text-xs text-gray-500">Size: {model.size}</span>+ {isDownloaded && (+ <span className="text-xs text-green-600 bg-green-100 px-2 py-0.5 rounded">+ <Check className="inline w-3 h-3 mr-1" />+ Downloaded+ </span>+ )}+ {model.recommended && (+ <span className="text-xs text-blue-600 bg-blue-100 px-2 py-0.5 rounded">+ Recommended+ </span>+ )}+ </div>+ </div>+ <div className="flex gap-2">+ {isDownloaded ? (+ !isSelected && (+ <Button+ size="sm"+ variant="outline"+ onClick={() => setReasoningModel(model.id)}+ >+ Select+ </Button>+ )+ ) : (+ <Button+ size="sm"+ variant="default"+ disabled={isDownloading}+ onClick={() => downloadModel(model.id)}+ >+ {isDownloading ? (+ <>Downloading...</>+ ) : (+ <>+ <Download className="w-3 h-3 mr-1" />+ Download+ </>+ )}+ </Button>+ )}+ </div>+ </div>+ </div>+ );+ })}+ </div>+ );+ })()}+ </div>+ </div>+ </div>+ </div>+ )}+ </>+ )}+ </div>+ );+}\ No newline at end of filediff --git a/src/components/LocalModelManager.tsx b/src/components/LocalModelManager.tsxdeleted file mode 100644index 418679cb1..000000000--- a/src/components/LocalModelManager.tsx+++ /dev/null@@ -1,16 +0,0 @@-import React from "react";-import UnifiedModelPicker from "./UnifiedModelPicker";-import { useSettings } from "../hooks/useSettings";--export function LocalModelManager() {- const { reasoningModel, setReasoningModel } = useSettings();-- return (- <UnifiedModelPicker- selectedModel={reasoningModel}- onModelSelect={setReasoningModel}- modelType="llm"- variant="settings"- />- );-}\ No newline at end of filediff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex 9e818c24b..f5c5b0c60 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -15,8 +15,7 @@ import { useClipboard } from "../hooks/useClipboard";import { REASONING_PROVIDERS } from "../utils/languages";import LanguageSelector from "./ui/LanguageSelector";import PromptStudio from "./ui/PromptStudio";-import { LocalModelManager } from "./LocalModelManager";-import AIModelSelector from "./AIModelSelector";+import AIModelSelectorEnhanced from "./AIModelSelectorEnhanced";const InteractiveKeyboard = React.lazy(() => import("./ui/Keyboard"));export type SettingsSectionType =@@ -755,182 +754,27 @@ export default function SettingsPage({This handles commands like "scratch that", creates proper lists,and fixes obvious errors while preserving your natural tone.</p>--- <div className="flex items-center justify-between p-4 bg-green-50 border border-green-200 rounded-xl">- <div>- <label className="text-sm font-medium text-green-800">- Enable AI Text Enhancement- </label>- <p className="text-xs text-green-700">- Use AI to automatically improve transcription quality- </p>- </div>- <label className="relative inline-flex items-center cursor-pointer">- <input- type="checkbox"- className="sr-only"- checked={useReasoningModel}- onChange={(e) => {- const enabled = e.target.checked;- setUseReasoningModel(enabled);- updateReasoningSettings({ useReasoningModel: enabled });- }}- />- <div- className={`w-11 h-6 bg-gray-200 rounded-full transition-colors duration-200 ${- useReasoningModel ? "bg-green-600" : "bg-gray-300"- }`}- >- <div- className={`absolute top-0.5 left-0.5 bg-white border border-gray-300 rounded-full h-5 w-5 transition-transform duration-200 ${- useReasoningModel ? "translate-x-5" : "translate-x-0"- }`}- ></div>- </div>- </label>- </div></div>- {useReasoningModel && (- <>- <div className="space-y-4 p-4 bg-blue-50 border border-blue-200 rounded-xl">- <h4 className="font-medium text-blue-900">AI Provider</h4>- <select- value={localReasoningProvider}- onChange={async (e) => {- const newProvider = e.target.value;- setLocalReasoningProvider(newProvider);-- // Update the model to the first model of the new provider- const firstModel = REASONING_PROVIDERS[newProvider as keyof typeof REASONING_PROVIDERS]?.models[0];- if (firstModel) {- setReasoningModel(firstModel.value);- }-- // If switching to local, show a warning if llama.cpp is not available- if (newProvider === "local") {- const isAvailable = await window.electronAPI?.checkLocalReasoningAvailable?.();- if (!isAvailable) {- showAlertDialog({- title: "Local AI Setup Required",- description: "To use local AI models, you need to install llama.cpp and download at least one model. Check the Local AI Models section below for setup instructions.",- });- }- }- }}- className="w-full text-sm border border-blue-300 rounded-md p-2 bg-white focus:border-blue-500 focus:ring-1 focus:ring-blue-500"- >- {Object.entries(REASONING_PROVIDERS).map(- ([id, provider]) => (- <option key={id} value={id}>- {provider.name}- </option>- )- )}- </select>- </div>-- <div className="space-y-4 p-4 bg-indigo-50 border border-indigo-200 rounded-xl">- <h4 className="font-medium text-indigo-900">AI Model</h4>- <select- value={reasoningModel}- onChange={(e) => setReasoningModel(e.target.value)}- className="w-full text-sm border border-indigo-300 rounded-md p-2 bg-white focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500"- >- {REASONING_PROVIDERS[- localReasoningProvider as keyof typeof REASONING_PROVIDERS- ]?.models.map((model) => (- <option key={model.value} value={model.value}>- {model.label} - {model.description}- </option>- ))}- </select>- <p className="text-xs text-indigo-600">- Different models offer varying levels of quality and speed- </p>- </div>-- {localReasoningProvider === "openai" && (- <div className="space-y-4 p-4 bg-blue-50 border border-blue-200 rounded-xl">- <h4 className="font-medium text-blue-900">- OpenAI API Key- </h4>- <ApiKeyInput- apiKey={openaiApiKey}- setApiKey={setOpenaiApiKey}- helpText="Same as your transcription API key"- />- </div>- )}-- {localReasoningProvider === "anthropic" && (- <div className="space-y-4 p-4 bg-purple-50 border border-purple-200 rounded-xl">- <h4 className="font-medium text-purple-900">- Anthropic API Key- </h4>- <div className="flex gap-2">- <Input- type="password"- placeholder="sk-ant-..."- value={anthropicApiKey}- onChange={(e) => setAnthropicApiKey(e.target.value)}- className="flex-1 text-sm border-purple-300 focus:border-purple-500"- />- <Button- variant="outline"- size="sm"- onClick={() =>- pasteFromClipboardWithFallback(setAnthropicApiKey)- }- className="border-purple-300 text-purple-700 hover:bg-purple-50"- >- Paste- </Button>- </div>- <p className="text-xs text-purple-600">- Get your API key from console.anthropic.com- </p>- </div>- )}-- {localReasoningProvider === "gemini" && (- <div className="space-y-4 p-4 bg-blue-50 border border-blue-200 rounded-xl">- <h4 className="font-medium text-blue-900">- Google Gemini API Key- </h4>- <div className="flex gap-2">- <Input- type="password"- placeholder="AIza..."- value={geminiApiKey}- onChange={(e) => setGeminiApiKey(e.target.value)}- className="flex-1 text-sm border-blue-300 focus:border-blue-500"- />- <Button- variant="outline"- size="sm"- onClick={() =>- pasteFromClipboardWithFallback(setGeminiApiKey)- }- className="border-blue-300 text-blue-700 hover:bg-blue-50"- >- Paste- </Button>- </div>- <p className="text-xs text-blue-600">- Get your API key from makersuite.google.com/app/apikey- </p>- </div>- )}-- {localReasoningProvider === "local" && (- <div className="space-y-4">- <LocalModelManager />- </div>- )}- </>- )}+ <AIModelSelectorEnhanced+ useReasoningModel={useReasoningModel}+ setUseReasoningModel={(value) => {+ setUseReasoningModel(value);+ updateReasoningSettings({ useReasoningModel: value });+ }}+ reasoningModel={reasoningModel}+ setReasoningModel={setReasoningModel}+ localReasoningProvider={localReasoningProvider}+ setLocalReasoningProvider={setLocalReasoningProvider}+ openaiApiKey={openaiApiKey}+ setOpenaiApiKey={setOpenaiApiKey}+ anthropicApiKey={anthropicApiKey}+ setAnthropicApiKey={setAnthropicApiKey}+ geminiApiKey={geminiApiKey}+ setGeminiApiKey={setGeminiApiKey}+ pasteFromClipboard={pasteFromClipboardWithFallback}+ showAlertDialog={showAlertDialog}+ /><Button onClick={saveReasoningSettings} className="w-full">Save AI Model Settingsdiff --git a/src/components/UnifiedModelPicker.tsx b/src/components/UnifiedModelPicker.tsxindex 67a38ecae..401e7fd92 100644--- a/src/components/UnifiedModelPicker.tsx+++ b/src/components/UnifiedModelPicker.tsx@@ -98,6 +98,49 @@ function formatETA(seconds: number): string {return `${minutes}m ${remainingSeconds}s`;}+// Export the compact variant for cloud models+export function UnifiedModelPickerCompact({+ selectedModel,+ onModelSelect,+ models,+ className = "",+}: {+ selectedModel: string;+ onModelSelect: (modelId: string) => void;+ models: Array<{ value: string; label: string; description?: string }>;+ className?: string;+}) {+ return (+ <div className={`space-y-2 ${className}`}>+ {models.map((model) => (+ <button+ key={model.value}+ onClick={() => onModelSelect(model.value)}+ className={`w-full p-3 rounded-lg border-2 text-left transition-all ${+ selectedModel === model.value+ ? 'border-indigo-500 bg-indigo-50'+ : 'border-gray-200 bg-white hover:border-gray-300'+ }`}+ >+ <div className="flex items-center justify-between">+ <div>+ <div className="font-medium text-gray-900">{model.label}</div>+ {model.description && (+ <div className="text-xs text-gray-600 mt-1">{model.description}</div>+ )}+ </div>+ {selectedModel === model.value && (+ <span className="text-xs text-indigo-600 bg-indigo-100 px-2 py-1 rounded-full font-medium">+ ✓ Selected+ </span>+ )}+ </div>+ </button>+ ))}+ </div>+ );+}+export default function UnifiedModelPicker({selectedModel,onModelSelect,diff --git a/src/helpers/tray.js b/src/helpers/tray.jsindex 049f76cf3..686ea2295 100644--- a/src/helpers/tray.js+++ b/src/helpers/tray.js@@ -44,7 +44,6 @@ class TrayManager {const iconPath = path.join(__dirname,"..",- "..","assets",);diff --git a/src/models/ModelRegistry.ts b/src/models/ModelRegistry.tsindex aec24109f..089211c22 100644--- a/src/models/ModelRegistry.ts+++ b/src/models/ModelRegistry.ts@@ -264,16 +264,6 @@ ${text}<|eot_id|><|start_header_id|>assistant<|end_header_id|>contextLength: 128000,recommended: true,},- {- id: 'gpt-oss-20b-q5_k_m',- name: 'GPT-OSS 20B (Q5)',- size: '14.7GB',- sizeBytes: 15783559168,- description: 'Higher quality OpenAI model',- fileName: 'openai_gpt-oss-20b-Q5_K_M.gguf',- quantization: 'q5_k_m',- contextLength: 128000,- },],formatPrompt(text: string, systemPrompt: string): string {// GPT-OSS uses ChatML format