Hide Local (Whisper) mode option when using cloud-only sidecar
All checks were successful
Tests / Python Backend Tests (push) Successful in 6s
Tests / Frontend Tests (push) Successful in 7s
Tests / Rust Sidecar Tests (push) Successful in 2m3s

- Expose is_cloud_only flag in /api/status response
- Add isCloudOnly to backend store state
- Conditionally hide Local (Whisper) radio button in Settings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Developer
2026-04-10 19:24:01 -07:00
parent 8df1ab9817
commit f0b5890eba
3 changed files with 11 additions and 0 deletions

View File

@@ -453,6 +453,7 @@
/>
Managed Service
</label>
{#if !backendStore.isCloudOnly}
<label>
<input
type="radio"
@@ -462,6 +463,7 @@
/>
Local (Whisper)
</label>
{/if}
</div>
{#if remoteMode === "byok"}
<div class="field">

View File

@@ -19,6 +19,7 @@ interface BackendState {
wsConnection: WebSocket | null;
version: string;
lastError: string;
isCloudOnly: boolean;
}
let state = $state<BackendState>({
@@ -30,6 +31,7 @@ let state = $state<BackendState>({
wsConnection: null,
version: "1.4.0",
lastError: "",
isCloudOnly: false,
});
let reconnectTimer: ReturnType<typeof setTimeout> | null = null;
@@ -72,6 +74,9 @@ async function pollStatus() {
if (data.version) {
state.version = data.version;
}
if (data.is_cloud_only !== undefined) {
state.isCloudOnly = data.is_cloud_only;
}
}
} catch {
// API not ready yet, will retry
@@ -285,6 +290,9 @@ export const backendStore = {
get lastError() {
return state.lastError;
},
get isCloudOnly() {
return state.isCloudOnly;
},
get apiBaseUrl() {
return `http://localhost:${state.port}`;
},