From ab7b1d78bf037bfbab5b5b2f61de8a0c65b53f55 Mon Sep 17 00:00:00 2001 From: Ryan Vogel Date: Mon, 30 Mar 2026 07:33:30 -0400 Subject: [PATCH] Update settings --- packages/mobile-voice/src/app/index.tsx | 398 ++++++++++++------------ packages/opencode/src/cli/cmd/serve.ts | 4 - 2 files changed, 197 insertions(+), 205 deletions(-) diff --git a/packages/mobile-voice/src/app/index.tsx b/packages/mobile-voice/src/app/index.tsx index 94293873ca..1fb77f3b20 100644 --- a/packages/mobile-voice/src/app/index.tsx +++ b/packages/mobile-voice/src/app/index.tsx @@ -3392,7 +3392,7 @@ export default function DictationScreen() { - Whisper models + Settings Default: {WHISPER_MODEL_LABELS[defaultWhisperModel]} setWhisperSettingsOpen(false)}> @@ -3400,35 +3400,51 @@ export default function DictationScreen() { - {__DEV__ ? ( - [styles.settingsDevButton, pressed && styles.clearButtonPressed]} - > - Dev: Replay onboarding - - ) : null} + + + DEVELOPMENT: + {__DEV__ ? ( + [styles.settingsTextRow, pressed && styles.clearButtonPressed]} + > + Replay onboarding + Run + + ) : ( + + Available in development builds. + + )} + + + + GENERAL: + + Default model + {WHISPER_MODEL_LABELS[defaultWhisperModel]} + - - Transcription - setTranscriptionMode("bulk")} disabled={isRecording || isTranscribingBulk} style={({ pressed }) => [ - styles.settingsModeButton, - transcriptionMode === "bulk" && styles.settingsModeButtonActive, + styles.settingsTextRow, (isRecording || isTranscribingBulk) && styles.settingsInlinePressableDisabled, pressed && styles.clearButtonPressed, ]} > + + On Release + Transcribe after release + - On Release + {transcriptionMode === "bulk" ? "Selected" : "Use"} @@ -3436,114 +3452,112 @@ export default function DictationScreen() { onPress={() => setTranscriptionMode("realtime")} disabled={isRecording || isTranscribingBulk} style={({ pressed }) => [ - styles.settingsModeButton, - transcriptionMode === "realtime" && styles.settingsModeButtonActive, + styles.settingsTextRow, (isRecording || isTranscribingBulk) && styles.settingsInlinePressableDisabled, pressed && styles.clearButtonPressed, ]} > + + Realtime + Transcribe while you speak + - Realtime + {transcriptionMode === "realtime" ? "Selected" : "Use"} - - - {WHISPER_MODELS.map((modelID) => { - const installed = installedWhisperModels.includes(modelID) - const isDefault = defaultWhisperModel === modelID - const isDownloading = downloadingModelID === modelID - const actionDisabled = (downloadingModelID !== null && !isDownloading) || isTranscribingBulk - const rowLabel = isDefault ? `${modelID} · default` : modelID - const actionIcon = isDownloading ? "…" : installed ? "✓" : "↓" - const downloadPct = Math.round(Math.max(0, Math.min(1, downloadProgress)) * 100) - const actionLabel = isDownloading - ? "Downloading" - : installed - ? isDefault - ? "Selected" - : "Select" - : "Download" - const sizeLabel = formatWhisperModelSize(WHISPER_MODEL_SIZES[modelID]) + + MODELS: + {WHISPER_MODELS.map((modelID) => { + const installed = installedWhisperModels.includes(modelID) + const isDefault = defaultWhisperModel === modelID + const isDownloading = downloadingModelID === modelID + const actionDisabled = (downloadingModelID !== null && !isDownloading) || isTranscribingBulk + const downloadPct = Math.round(Math.max(0, Math.min(1, downloadProgress)) * 100) + const actionLabel = isDownloading + ? `${downloadPct}%` + : installed + ? isDefault + ? "Selected" + : "Select" + : "Download" + const sizeLabel = formatWhisperModelSize(WHISPER_MODEL_SIZES[modelID]) + const rowMeta = [sizeLabel, installed ? "installed" : null, isDefault ? "default" : null] + .filter(Boolean) + .join(" · ") - return ( - - { - if (installed) { - void handleSelectWhisperModel(modelID) - } - }} - onLongPress={() => { - if (!installed || isDownloading) return - Alert.alert("Delete model?", `Remove ${modelID} from this device?`, [ - { text: "Cancel", style: "cancel" }, - { - text: "Delete", - style: "destructive", - onPress: () => { - void handleDeleteWhisperModel(modelID) + return ( + + { + if (installed) { + void handleSelectWhisperModel(modelID) + } + }} + onLongPress={() => { + if (!installed || isDownloading) return + Alert.alert("Delete model?", `Remove ${modelID} from this device?`, [ + { text: "Cancel", style: "cancel" }, + { + text: "Delete", + style: "destructive", + onPress: () => { + void handleDeleteWhisperModel(modelID) + }, }, - }, - ]) - }} - delayLongPress={350} - disabled={!installed || actionDisabled || isPreparingWhisperModel} - style={({ pressed }) => [ - styles.settingsInlineLabelPressable, - (!installed || actionDisabled || isPreparingWhisperModel) && - styles.settingsInlinePressableDisabled, - pressed && styles.clearButtonPressed, - ]} - > - {rowLabel} - + ]) + }} + delayLongPress={350} + disabled={!installed || actionDisabled || isPreparingWhisperModel} + style={({ pressed }) => [ + styles.settingsInlineLabelPressable, + (!installed || actionDisabled || isPreparingWhisperModel) && + styles.settingsInlinePressableDisabled, + pressed && styles.clearButtonPressed, + ]} + > + {modelID} + {rowMeta} + - {sizeLabel} - - { - if (isDownloading) return - if (installed) { - void handleSelectWhisperModel(modelID) - return - } - void handleDownloadWhisperModel(modelID) - }} - disabled={actionDisabled || (installed && isPreparingWhisperModel)} - accessibilityLabel={actionLabel} - style={({ pressed }) => [ - styles.settingsInlineIconButton, - (actionDisabled || (installed && isPreparingWhisperModel)) && - styles.settingsInlinePressableDisabled, - pressed && styles.clearButtonPressed, - ]} - > - {isDownloading ? ( - - {downloadPct} - - ) : ( + { + if (isDownloading) return + if (installed) { + void handleSelectWhisperModel(modelID) + return + } + void handleDownloadWhisperModel(modelID) + }} + disabled={actionDisabled || (installed && isPreparingWhisperModel)} + accessibilityLabel={actionLabel} + style={({ pressed }) => [ + styles.settingsInlineTextActionPressable, + (actionDisabled || (installed && isPreparingWhisperModel)) && + styles.settingsInlinePressableDisabled, + pressed && styles.clearButtonPressed, + ]} + > - {actionIcon} + {actionLabel} - )} - - - ) - })} + + + ) + })} + @@ -4044,13 +4058,13 @@ const styles = StyleSheet.create({ backgroundColor: "#121212", paddingHorizontal: 16, paddingTop: 12, - gap: 12, }, settingsTop: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12, + marginBottom: 4, }, settingsTitleBlock: { flex: 1, @@ -4058,7 +4072,7 @@ const styles = StyleSheet.create({ }, settingsTitle: { color: "#F1F1F1", - fontSize: 18, + fontSize: 20, fontWeight: "700", }, settingsSubtitle: { @@ -4071,73 +4085,73 @@ const styles = StyleSheet.create({ fontSize: 15, fontWeight: "700", }, - settingsDevButton: { - alignSelf: "flex-start", - borderRadius: 8, - borderWidth: 1, - borderColor: "#574D2B", - backgroundColor: "#2A2619", - paddingHorizontal: 10, - paddingVertical: 6, - }, - settingsDevButtonText: { - color: "#EADDAE", - fontSize: 12, - fontWeight: "700", - }, - settingsModeRow: { - flexDirection: "row", - alignItems: "center", - justifyContent: "space-between", - gap: 10, - borderWidth: 1, - borderColor: "#2B2B2B", - borderRadius: 10, - paddingHorizontal: 10, - paddingVertical: 8, - backgroundColor: "#171717", - }, - settingsModeLabel: { - color: "#D2D2D2", - fontSize: 12, - fontWeight: "600", - letterSpacing: 0.2, - }, - settingsModeControls: { - flexDirection: "row", - alignItems: "center", - gap: 8, - }, - settingsModeButton: { - borderRadius: 8, - borderWidth: 1, - borderColor: "#3A3A3A", - paddingHorizontal: 10, - paddingVertical: 6, - backgroundColor: "#1E1E1E", - }, - settingsModeButtonActive: { - borderColor: "#6B3A31", - backgroundColor: "#3D231E", - }, - settingsModeButtonText: { - color: "#B9B9B9", - fontSize: 12, - fontWeight: "600", - }, - settingsModeButtonTextActive: { - color: "#FFD8D2", - }, settingsScroll: { flex: 1, }, settingsContent: { + gap: 24, paddingBottom: 24, }, + settingsSection: { + gap: 0, + }, + settingsSectionLabel: { + color: "#7D7D7D", + fontSize: 11, + fontWeight: "700", + letterSpacing: 1.05, + marginBottom: 6, + }, + settingsTextRow: { + minHeight: 46, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + gap: 12, + borderBottomWidth: 1, + borderBottomColor: "#242424", + paddingVertical: 10, + }, + settingsMutedText: { + color: "#868686", + fontSize: 12, + fontWeight: "500", + }, + settingsOptionCopy: { + flex: 1, + minWidth: 0, + gap: 2, + }, + settingsTextRowTitle: { + color: "#ECECEC", + fontSize: 14, + fontWeight: "600", + }, + settingsTextRowMeta: { + color: "#8D8D8D", + fontSize: 12, + fontWeight: "500", + }, + settingsTextRowValue: { + color: "#BDBDBD", + fontSize: 13, + fontWeight: "600", + maxWidth: "55%", + textAlign: "right", + }, + settingsTextRowAction: { + color: "#B8B8B8", + fontSize: 12, + fontWeight: "700", + letterSpacing: 0.2, + }, + settingsTextRowActionActive: { + color: "#FFD8D2", + }, settingsInlineRow: { flexDirection: "row", alignItems: "center", - minHeight: 44, + minHeight: 52, borderBottomWidth: 1, borderBottomColor: "#242424", }, @@ -4146,58 +4160,40 @@ const styles = StyleSheet.create({ minWidth: 0, paddingVertical: 10, paddingRight: 12, + gap: 2, }, settingsInlinePressableDisabled: { opacity: 0.55, }, settingsInlineName: { color: "#E7E7E7", - fontSize: 13, + fontSize: 14, fontWeight: "600", }, - settingsInlineSize: { + settingsInlineMeta: { color: "#8F8F8F", fontSize: 12, fontWeight: "500", - minWidth: 64, + }, + settingsInlineTextActionPressable: { + marginLeft: 8, + paddingVertical: 8, + paddingHorizontal: 2, + alignItems: "flex-end", + justifyContent: "center", + }, + settingsInlineTextAction: { + color: "#D0D0D0", + fontSize: 12, + fontWeight: "700", + minWidth: 72, textAlign: "right", }, - settingsInlineIconButton: { - width: 36, - height: 36, - marginLeft: 8, - alignItems: "center", - justifyContent: "center", - }, - settingsInlineIcon: { - color: "#D0D0D0", - fontSize: 17, - fontWeight: "700", - lineHeight: 19, - }, - settingsInlineIconInstalled: { + settingsInlineTextActionInstalled: { color: "#E2B1A8", }, - settingsInlineIconDownloading: { + settingsInlineTextActionDownloading: { color: "#FFD7CE", - fontWeight: "700", - }, - settingsDownloadCircle: { - width: 24, - height: 24, - borderRadius: 12, - borderWidth: 2, - borderColor: "#FF6A57", - alignItems: "center", - justifyContent: "center", - backgroundColor: "#2A1715", - }, - settingsDownloadCircleText: { - color: "#FFD9D2", - fontSize: 9, - fontWeight: "700", - letterSpacing: -0.1, - lineHeight: 10, }, scanRoot: { flex: 1, diff --git a/packages/opencode/src/cli/cmd/serve.ts b/packages/opencode/src/cli/cmd/serve.ts index b898f0156e..5cc7ca4069 100644 --- a/packages/opencode/src/cli/cmd/serve.ts +++ b/packages/opencode/src/cli/cmd/serve.ts @@ -165,10 +165,6 @@ export const ServeCommand = cmd({ }) console.log("scan qr code in mobile app or phone camera") console.log(code) - console.log("qr link") - console.log(link) - console.log("qr payload") - console.log(JSON.stringify(pair, null, 2)) } }