Skip to content

Your team of AI agents, on your Mac, Windows or Linux. Agents that talk in channels, write code, review each other and use your tools, on the Claude Code, Codex, OpenCode or Pi you already have. Anything that touches the real world waits for your yes.

Space the dictation settings, and turn toggles on in the accent color (#124)

Brunob7bdd4f0326c
diff --git a/src/renderer/src/components/Harness.tsx b/src/renderer/src/components/Harness.tsx
index 8c05c9d..11e9f3e 100644
--- a/src/renderer/src/components/Harness.tsx
+++ b/src/renderer/src/components/Harness.tsx
@@ -3,7 +3,7 @@
// providers they have logins for. Here they pick which ones the agents use,
// test them, and pick models from what each harness offers.
import { L } from '../../../shared/lang'
-import { useEffect, useState, type ReactNode } from 'react'
+import { useEffect, useId, useState, type ReactNode } from 'react'
import {
ACCOUNT_ENGINES,
addAccount,
@@ -203,6 +203,7 @@ export function HarnessList(): ReactNode {
function HarnessRow({ engine, st, picked, toggle }: { engine: EngineId; st: EngineStatus; picked: boolean; toggle: () => void }): ReactNode {
const [testing, setTesting] = useState(false)
+ const checkId = useId()
const [model, setModel] = useState('')
const [result, setResult] = useState<{ ok: boolean; message: string } | null>(null)
// No terminal could be opened: the command, for the person to run.
@@ -225,15 +226,16 @@ function HarnessRow({ engine, st, picked, toggle }: { engine: EngineId; st: Engi
return (
<div className={`harness ${picked ? 'is-picked' : ''} ${st.soon ? 'is-soon' : ''}`}>
<div className="harness__head">
- <button className={`harness__check ${picked ? 'is-on' : ''}`} disabled={!!st.soon || !st.installed} onClick={toggle} aria-label={L(`Usar o ${ENGINES[engine].label}`, `Use ${ENGINES[engine].label}`)}>
+ <button id={checkId} className={`harness__check ${picked ? 'is-on' : ''}`} disabled={!!st.soon || !st.installed} onClick={toggle} aria-label={L(`Usar o ${ENGINES[engine].label}`, `Use ${ENGINES[engine].label}`)}>
{picked && <Icon name="check" size={12} />}
</button>
- <div className="grow">
+ {/* The name is the check's label: a click on it is a click on the check, disabled when it is. */}
+ <label className="grow harness__name" htmlFor={checkId}>
<strong>{ENGINES[engine].label}</strong>
<span className="harness__account">
{!st.installed ? L('Não instalado', 'Not installed') : st.account ?? (st.loggedIn ? L('Pronto', 'Ready') : L('Falta entrar', 'Not signed in'))}
</span>
- </div>
+ </label>
{st.soon ? (
<span className="tag">{L('em breve', 'coming soon')}</span>
) : found && st.route ? (
diff --git a/src/renderer/src/components/Pages.tsx b/src/renderer/src/components/Pages.tsx
index e17e633..4f0e9f1 100644
--- a/src/renderer/src/components/Pages.tsx
+++ b/src/renderer/src/components/Pages.tsx
@@ -1804,48 +1804,50 @@ function VoiceCard(): ReactNode {
return (
<Card title={L('Ditado', 'Dictation')} lead={L('Fale em vez de digitar: clique no microfone do campo de mensagem, ou ⌥ Espaço no Mac e Ctrl+Espaço nos outros, e clique de novo para terminar. O áudio vira texto neste computador, sem internet, e o texto fica no campo para você revisar antes de enviar.', 'Speak instead of typing: click the microphone in the message field, or ⌥ Space on a Mac and Ctrl+Space elsewhere, and click again to finish. The audio becomes text on this computer, offline, and the text stays in the field for you to review before sending.')}>
{status && !status.ready && <VoiceSetup status={status} />}
- {status?.ready && (
- <div className="voice-on">
- <p className="small">
- <Icon name="check" size={13} />{' '}
- {status.ownModel
- ? L(`Ativado, com o modelo ${choice(status.ownModel).name} (${choice(status.ownModel).size}).`, `On, with the ${choice(status.ownModel).name} model (${choice(status.ownModel).size}).`)
- : L(`Ativado, com o modelo que já estava instalado: ${status.model?.split(/[\\/]/).pop()}.`, `On, with the model already installed: ${status.model?.split(/[\\/]/).pop()}.`)}
- </p>
- {status.downloading ? (
- <VoiceSetup status={status} />
- ) : (
- status.ownModel && (
- <div className="row">
- <button className="btn btn--sm" onClick={() => void voiceDownload(other)}>
- {L(`Trocar pelo ${choice(other).name} (${choice(other).size})`, `Switch to ${choice(other).name} (${choice(other).size})`)}
- </button>
- <button className="btn btn--ghost btn--sm" onClick={() => void voiceRemoveModel(status.ownModel!)}>
- {L('Remover o modelo', 'Remove the model')}
- </button>
- </div>
- )
- )}
- {status.error && <p className="field__error">{status.error}</p>}
- </div>
- )}
- <label className="row row--center small">
- <input type="checkbox" checked={!voice?.hidden} onChange={(e) => save({ hidden: !e.target.checked })} />
- {L('Mostrar o microfone no campo de mensagem', 'Show the microphone in the message field')}
- </label>
- <details className="voice-advanced">
- <summary className="small muted">{L('Avançado', 'Advanced')}</summary>
+ <div className="voice-prefs">
+ {status?.ready && (
+ <div className="voice-on">
+ <p className="small">
+ <Icon name="check" size={13} />{' '}
+ {status.ownModel
+ ? L(`Ativado, com o modelo ${choice(status.ownModel).name} (${choice(status.ownModel).size}).`, `On, with the ${choice(status.ownModel).name} model (${choice(status.ownModel).size}).`)
+ : L(`Ativado, com o modelo que já estava instalado: ${status.model?.split(/[\\/]/).pop()}.`, `On, with the model already installed: ${status.model?.split(/[\\/]/).pop()}.`)}
+ </p>
+ {status.downloading ? (
+ <VoiceSetup status={status} />
+ ) : (
+ status.ownModel && (
+ <div className="row">
+ <button className="btn btn--sm" onClick={() => void voiceDownload(other)}>
+ {L(`Trocar pelo ${choice(other).name} (${choice(other).size})`, `Switch to ${choice(other).name} (${choice(other).size})`)}
+ </button>
+ <button className="btn btn--ghost btn--sm" onClick={() => void voiceRemoveModel(status.ownModel!)}>
+ {L('Remover o modelo', 'Remove the model')}
+ </button>
+ </div>
+ )
+ )}
+ {status.error && <p className="field__error">{status.error}</p>}
+ </div>
+ )}
<label className="row row--center small">
- <input type="checkbox" checked={!!voice?.detect} onChange={(e) => save({ detect: e.target.checked })} />
- {L('Detectar o idioma, em vez de usar o do app', 'Detect the language, instead of using the app’s')}
+ <input type="checkbox" checked={!voice?.hidden} onChange={(e) => save({ hidden: !e.target.checked })} />
+ {L('Mostrar o microfone no campo de mensagem', 'Show the microphone in the message field')}
</label>
- <Field label={L('Caminho do whisper-cli', 'Path to whisper-cli')} hint={status?.bin && !voice?.bin ? L(`Em uso: ${status.bin}`, `In use: ${status.bin}`) : L('Opcional: sem isso, o app usa o que veio com ele.', 'Optional: without it, the app uses the one it came with.')}>
- <input defaultValue={voice?.bin ?? ''} placeholder="/opt/homebrew/bin/whisper-cli" onBlur={(e) => save({ bin: e.target.value.trim() || undefined })} />
- </Field>
- <Field label={L('Caminho do modelo', 'Path to the model')} hint={status?.model && !voice?.model ? L(`Em uso: ${status.model}`, `In use: ${status.model}`) : L('Opcional: um modelo ggml (.bin) que você já tenha.', 'Optional: a ggml model (.bin) you already have.')} error={error}>
- <input defaultValue={voice?.model ?? ''} placeholder="/caminho/para/ggml-large-v3-turbo.bin" onBlur={(e) => save({ model: e.target.value.trim() || undefined })} />
- </Field>
- </details>
+ <details className="voice-advanced">
+ <summary className="small muted">{L('Avançado', 'Advanced')}</summary>
+ <label className="row row--center small">
+ <input type="checkbox" checked={!!voice?.detect} onChange={(e) => save({ detect: e.target.checked })} />
+ {L('Detectar o idioma, em vez de usar o do app', 'Detect the language, instead of using the app’s')}
+ </label>
+ <Field label={L('Caminho do whisper-cli', 'Path to whisper-cli')} hint={status?.bin && !voice?.bin ? L(`Em uso: ${status.bin}`, `In use: ${status.bin}`) : L('Opcional: sem isso, o app usa o que veio com ele.', 'Optional: without it, the app uses the one it came with.')}>
+ <input defaultValue={voice?.bin ?? ''} placeholder="/opt/homebrew/bin/whisper-cli" onBlur={(e) => save({ bin: e.target.value.trim() || undefined })} />
+ </Field>
+ <Field label={L('Caminho do modelo', 'Path to the model')} hint={status?.model && !voice?.model ? L(`Em uso: ${status.model}`, `In use: ${status.model}`) : L('Opcional: um modelo ggml (.bin) que você já tenha.', 'Optional: a ggml model (.bin) you already have.')} error={error}>
+ <input defaultValue={voice?.model ?? ''} placeholder="/caminho/para/ggml-large-v3-turbo.bin" onBlur={(e) => save({ model: e.target.value.trim() || undefined })} />
+ </Field>
+ </details>
+ </div>
</Card>
)
}
diff --git a/src/renderer/src/styles.css b/src/renderer/src/styles.css
index faad712..f6b3fff 100644
--- a/src/renderer/src/styles.css
+++ b/src/renderer/src/styles.css
@@ -2024,7 +2024,7 @@ h3 {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle.is-on {
- background: var(--ok);
+ background: var(--accent);
}
.toggle.is-on::after {
transform: translateX(14px);
@@ -4579,6 +4579,9 @@ table.csv th {
display: block;
font-size: 14px;
}
+.harness__check:not(:disabled) + .harness__name {
+ cursor: pointer;
+}
.harness__account {
display: block;
font-size: 12.5px;
@@ -7844,10 +7847,14 @@ button.wk-pill.is-on { box-shadow: 0 0 0 1.5px var(--k); background: color-mix(i
.voice-setup__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.voice-on { display: grid; gap: 8px; }
.voice-on p { margin: 0; display: flex; align-items: center; gap: 6px; }
-.voice-advanced { display: grid; gap: 10px; }
+/* The card doesn't space its children: the model's line, the microphone and Avançado get a gap here. */
+.voice-prefs { display: grid; gap: 14px; }
+/* Closed, the folded part keeps no room: the gap only between what shows when it's open. */
+.voice-advanced[open] { display: grid; gap: 10px; }
.voice-advanced summary { cursor: pointer; }
.voice-pop > .btn { justify-self: start; }
.voice-btn.is-recording { animation: voice-pulse 1.6s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 22%, transparent); } }
.voice-clock { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--danger); white-space: nowrap; }
.voice-clock i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
+