@@ -15,6 +15,7 @@ import { cn } from "@hypr/utils";
1515
1616import { useBillingAccess } from "../../../../billing" ;
1717import { useConfigValues } from "../../../../config/use-config" ;
18+ import { useSTTConnection } from "../../../../hooks/useSTTConnection" ;
1819import * as settings from "../../../../store/tinybase/settings" ;
1920import { getProviderSelectionBlockers , requiresEntitlement } from "../shared/eligibility" ;
2021import { HealthCheckForConnection } from "./health" ;
@@ -27,6 +28,16 @@ export function SelectProviderAndModel() {
2728 ] as const ) ;
2829 const billing = useBillingAccess ( ) ;
2930 const configuredProviders = useConfiguredMapping ( ) ;
31+ const { local : sttLocal } = useSTTConnection ( ) ;
32+ const sttServerStatus = sttLocal . data ?. status ;
33+
34+ const isLocalSttModel =
35+ current_stt_provider === "hyprnote" &&
36+ ! ! current_stt_model &&
37+ current_stt_model !== "cloud" ;
38+
39+ const isUnreachable = isLocalSttModel && sttServerStatus === "unreachable" ;
40+ const isNotConfigured = ! current_stt_provider || ! current_stt_model ;
3041
3142 const handleSelectProvider = settings . UI . useSetValueCallback (
3243 "current_stt_provider" ,
@@ -72,7 +83,7 @@ export function SelectProviderAndModel() {
7283 className = { cn ( [
7384 "flex flex-col gap-4" ,
7485 "p-4 rounded-xl border border-neutral-200" ,
75- ! ! current_stt_provider && ! ! current_stt_model ? "bg-neutral -50" : "bg-red -50" ,
86+ isNotConfigured || isUnreachable ? "bg-red -50" : "bg-neutral -50" ,
7687 ] ) }
7788 >
7889 < div className = "flex flex-row items-center gap-4" >
@@ -184,14 +195,23 @@ export function SelectProviderAndModel() {
184195 { current_stt_provider && current_stt_model && < HealthCheckForConnection /> }
185196 </ div >
186197
187- { ( ! current_stt_provider || ! current_stt_model ) && (
198+ { isNotConfigured && (
188199 < div className = "flex items-center gap-2 pt-2 border-t border-red-200" >
189200 < span className = "text-sm text-red-600" >
190201 < strong className = "font-medium" > Transcription model</ strong > is needed to make
191202 Hyprnote listen to your conversations.
192203 </ span >
193204 </ div >
194205 ) }
206+
207+ { isUnreachable && (
208+ < div className = "flex items-center gap-2 pt-2 border-t border-red-200" >
209+ < span className = "text-sm text-red-600" >
210+ < strong className = "font-medium" > Transcription model</ strong > { " " }
211+ failed to start. Please try again.
212+ </ span >
213+ </ div >
214+ ) }
195215 </ div >
196216 </ div >
197217 ) ;
0 commit comments