Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

feat(realtime): Settings control for voice idle auto-disconnect (rt-9 follow-up, commit 2/2)

Chaitanya Girid0cba98748be
diff --git a/src/renderer/src/components/SettingsModal.tsx b/src/renderer/src/components/SettingsModal.tsx
index 5edf00df..45898700 100644
--- a/src/renderer/src/components/SettingsModal.tsx
+++ b/src/renderer/src/components/SettingsModal.tsx
@@ -244,6 +244,10 @@ export function SettingsModal({ config, onClose }: SettingsModalProps) {
const [showGroqKey, setShowGroqKey] = useState(false);
const [freeflowBusy, setFreeflowBusy] = useState(false);
const [freeflowNote, setFreeflowNote] = useState('');
+ // rt-9 idle-tunable: realtime voice idle auto-disconnect window (ms); 0 = never.
+ const [idleDisconnectMs, setIdleDisconnectMs] = useState<number>(
+ (config as HarnessConfig).realtimeIdleDisconnectMs ?? 180_000
+ );
// Re-seed every editable field from the on-disk config when the modal opens.
// App's `config` prop is loaded once and never refreshed after a save, so
@@ -269,6 +273,7 @@ export function SettingsModal({ config, onClose }: SettingsModalProps) {
setFreeflowEnabled(cc.freeflowEnabled ?? false);
setGroqKey(cc.groqApiKey ?? '');
setFreeflowModel(cc.freeflowModel ?? 'whisper-large-v3-turbo');
+ setIdleDisconnectMs((c as HarnessConfig).realtimeIdleDisconnectMs ?? 180_000);
}).catch(() => { /* keep prop-seeded values */ });
window.cth.kgStatus().then((s) => { if (alive) setKgDocCount(s.docCount); })
.catch(() => { /* status unavailable */ });
@@ -1208,6 +1213,32 @@ export function SettingsModal({ config, onClose }: SettingsModalProps) {
</div>
<RealtimeDevicePicker />
<CostHud />
+ {/* rt-9 idle-tunable: how long an idle voice session stays open before
+ it auto-closes. The spend cap remains the real runaway guard. */}
+ <label style={{ display: 'flex', flexDirection: 'column', gap: 4, width: 280 }}>
+ <span style={slackLabelStyle}>Idle auto-disconnect</span>
+ <select
+ value={String(idleDisconnectMs)}
+ onChange={(e) => {
+ const v = Number(e.target.value);
+ setIdleDisconnectMs(v);
+ void window.cth.updateConfig({ realtimeIdleDisconnectMs: v });
+ }}
+ style={{ ...slackInputStyle, fontFamily: 'var(--cth-font-mono)' }}
+ >
+ <option value="30000">30 seconds</option>
+ <option value="60000">1 minute</option>
+ <option value="120000">2 minutes</option>
+ <option value="180000">3 minutes</option>
+ <option value="300000">5 minutes</option>
+ <option value="600000">10 minutes</option>
+ <option value="0">Off (never)</option>
+ </select>
+ <span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
+ How long the voice session stays open with no talking before it auto-closes.
+ The spend cap still stops a runaway session even when this is off.
+ </span>
+ </label>
</div>
</>
)}
diff --git a/src/renderer/src/store/config.ts b/src/renderer/src/store/config.ts
index 92b88c32..48ea9175 100644
--- a/src/renderer/src/store/config.ts
+++ b/src/renderer/src/store/config.ts
@@ -87,6 +87,9 @@ export interface HarnessConfig {
freeflowEnabled?: boolean;
groqApiKey?: string;
freeflowModel?: string;
+ /** Realtime voice idle auto-disconnect (ms); default 180000 (3 min), 0 = never.
+ * Tuned in Settings → Realtime Michael; the cost cap stays the runaway guard. */
+ realtimeIdleDisconnectMs?: number;
costCapUsd?: number;
/** Hard total-token ceiling across active agents (the user-facing budget). */
costCapTokens?: number;