The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(settings): correct import paths for moved panel components
Steven Enamakel7308b358ba70
diff --git a/app/src/components/settings/panels/ComposioTriagePanel.tsx b/app/src/components/settings/panels/ComposioTriagePanel.tsxindex 49bea51afd..47d8214ea5 100644--- a/app/src/components/settings/panels/ComposioTriagePanel.tsx+++ b/app/src/components/settings/panels/ComposioTriagePanel.tsx@@ -6,8 +6,16 @@ import {openhumanGetComposioTriggerSettings,openhumanUpdateComposioTriggerSettings,} from '../../../utils/tauriCommands';-import { Button, Card, CenteredLoadingState, Field, StatusLine, Switch, TextField } from '../../ui';-import { Spinner } from '../../ui/icons';+import {+ Button,+ Card,+ CenteredLoadingState,+ Field,+ Spinner,+ StatusLine,+ Switch,+ TextField,+} from '../../ui';import SettingsPanel from '../layout/SettingsPanel';interface ComposioTriagePanelProps {@@ -94,12 +102,7 @@ const ComposioTriagePanel = ({ embedded = false }: ComposioTriagePanelProps = {}return wrap(<Cardtitle={t('composio.triageTitle')}- description={- <>- {t('composio.triageDesc')} <code className="font-mono">OPENHUMAN_TRIGGER_TRIAGE_DISABLED</code>{' '}- {t('composio.envVarOverrides')}- </>- }+ description={`${t('composio.triageDesc')} OPENHUMAN_TRIGGER_TRIAGE_DISABLED ${t('composio.envVarOverrides')}`}data-testid="composio-triage-card"><FieldhtmlFor="switch-triage-disabled"diff --git a/app/src/components/settings/panels/TokenUsagePanel.tsx b/app/src/components/settings/panels/TokenUsagePanel.tsxindex 86c0535508..6784c916df 100644--- a/app/src/components/settings/panels/TokenUsagePanel.tsx+++ b/app/src/components/settings/panels/TokenUsagePanel.tsx@@ -10,14 +10,9 @@ import {type TokenjuiceSettingsPatch,updateTokenjuiceSettings,} from '../../../utils/tauriCommands/tokenjuice';-import Button from '../../ui/Button';-import {- SettingsNumberField,- SettingsRow,- SettingsSection,- SettingsStatusLine,- SettingsSwitch,-} from '../controls';+import { RefreshCw, RotateCcw } from 'lucide-react';++import { Button, Card, Field, NumberField, StatusLine, Switch } from '../../ui';import SettingsPanel from '../layout/SettingsPanel';function formatInt(n: number): string {@@ -42,13 +37,40 @@ interface StatTileProps {}const StatTile = ({ label, value, hint }: StatTileProps) => (- <div className="rounded-2xl border border-line p-4 bg-linear-to-br from-surface to-surface-subtle">- <div className="text-xs font-medium text-content-muted">{label}</div>- <div className="mt-1 text-2xl font-semibold text-content tabular-nums">{value}</div>- {hint && <div className="mt-0.5 text-xs text-content-faint">{hint}</div>}+ <div className="rounded-lg bg-surface-muted px-3 py-2.5">+ <div className="text-xs text-content-muted">{label}</div>+ <div className="mt-0.5 text-xl font-semibold tabular-nums text-content">{value}</div>+ {hint && <div className="mt-0.5 truncate text-xs text-content-faint">{hint}</div>}</div>);+interface ToggleRowProps {+ id: string;+ label: string;+ description: string;+ checked: boolean;+ disabled: boolean;+ onChange: (next: boolean) => void;+}++/** One labelled switch row; the label is wired to the switch through `htmlFor`. */+const ToggleRow = ({ id, label, description, checked, disabled, onChange }: ToggleRowProps) => (+ <Field+ htmlFor={id}+ label={label}+ description={description}+ control={+ <Switch+ id={id}+ checked={checked}+ disabled={disabled}+ onCheckedChange={onChange}+ aria-label={label}+ />+ }+ />+);+interface TokenUsagePanelProps {/** When true, render without the SettingsPanel chrome (used when embedded as* a tab inside the Usage & limits surface). */@@ -147,16 +169,34 @@ const TokenUsagePanel = ({ embedded = false }: TokenUsagePanelProps = {}) => {const total = savings?.total;const body = (- <>+ <div className="space-y-4">{/* ── Savings statistics ─────────────────────────────────────────── */}- <SettingsSection+ <Cardtitle={t('settings.tokenUsage.savingsTitle')}description={savings? t('settings.tokenUsage.attributedTo').replace('{model}', savings.attributionModel): undefined+ }+ headerRight={+ <div className="flex gap-2">+ <Button+ variant="secondary"+ size="sm"+ leadingIcon={<RefreshCw className="h-3.5 w-3.5" aria-hidden />}+ onClick={() => void loadSavings()}>+ {t('settings.tokenUsage.refresh')}+ </Button>+ <Button+ variant="secondary"+ size="sm"+ leadingIcon={<RotateCcw className="h-3.5 w-3.5" aria-hidden />}+ onClick={() => void onReset()}>+ {t('settings.tokenUsage.reset')}+ </Button>+ </div>}>- <div className="grid grid-cols-2 md:grid-cols-4 gap-3 px-1">+ <div className="grid grid-cols-2 gap-2 p-4 lg:grid-cols-4"><StatTilelabel={t('settings.tokenUsage.tokensSaved')}value={total ? formatInt(total.tokensSaved) : '—'}@@ -182,15 +222,15 @@ const TokenUsagePanel = ({ embedded = false }: TokenUsagePanelProps = {}) => {</div>{savings && Object.keys(savings.byCompressor).length > 0 && (- <div className="px-1 mt-3">- <div className="text-xs font-medium text-content-muted mb-1.5">+ <div className="px-4 py-3">+ <div className="mb-1 text-xs font-medium text-content-muted">{t('settings.tokenUsage.byCompressor')}</div>- <div className="rounded-xl border border-line divide-y divide-line-subtle">+ <div className="divide-y divide-line-subtle">{Object.entries(savings.byCompressor).sort((a, b) => b[1].tokensSaved - a[1].tokensSaved).map(([name, b]) => (- <div key={name} className="flex items-center justify-between px-3 py-2 text-sm">+ <div key={name} className="flex items-center justify-between py-1.5 text-sm"><span className="font-mono text-content-secondary">{name}</span><span className="tabular-nums text-content-muted">{formatInt(b.tokensSaved)} tok · {formatUsd(b.costSavedUsd)}@@ -200,150 +240,99 @@ const TokenUsagePanel = ({ embedded = false }: TokenUsagePanelProps = {}) => {</div></div>)}-- <div className="px-1 mt-3 flex items-center gap-2">- <Button variant="secondary" size="sm" onClick={() => void loadSavings()}>- {t('settings.tokenUsage.refresh')}- </Button>- <Button variant="secondary" size="sm" onClick={() => void onReset()}>- {t('settings.tokenUsage.reset')}- </Button>- </div>- </SettingsSection>+ </Card>{/* ── Compression toggles ────────────────────────────────────────── */}- <SettingsSection+ <Cardtitle={t('settings.tokenUsage.compressionTitle')}description={t('settings.tokenUsage.compressionDesc')}>- <div className="rounded-xl border border-line divide-y divide-line-subtle">- <SettingsRow- label={t('settings.tokenUsage.routerEnabled')}- description={t('settings.tokenUsage.routerEnabledDesc')}- control={- <SettingsSwitch- id="tj-router-enabled"- checked={settings?.router_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ router_enabled: v })}- aria-label={t('settings.tokenUsage.routerEnabled')}- />- }- />- <SettingsRow- label={t('settings.tokenUsage.search')}- description={t('settings.tokenUsage.searchDesc')}- control={- <SettingsSwitch- id="tj-search-enabled"- checked={settings?.search_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ search_enabled: v })}- aria-label={t('settings.tokenUsage.search')}- />- }- />- <SettingsRow- label={t('settings.tokenUsage.code')}- description={t('settings.tokenUsage.codeDesc')}- control={- <SettingsSwitch- id="tj-code-enabled"- checked={settings?.code_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ code_enabled: v })}- aria-label={t('settings.tokenUsage.code')}- />- }- />- <SettingsRow- label={t('settings.tokenUsage.html')}- description={t('settings.tokenUsage.htmlDesc')}- control={- <SettingsSwitch- id="tj-html-enabled"- checked={settings?.html_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ html_enabled: v })}- aria-label={t('settings.tokenUsage.html')}- />- }- />- <SettingsRow- label={t('settings.tokenUsage.ml')}- description={t('settings.tokenUsage.mlDesc')}- control={- <SettingsSwitch- id="tj-ml-enabled"- checked={settings?.ml_compression_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ ml_compression_enabled: v })}- aria-label={t('settings.tokenUsage.ml')}- />- }- />- </div>- </SettingsSection>+ <ToggleRow+ id="tj-router-enabled"+ label={t('settings.tokenUsage.routerEnabled')}+ description={t('settings.tokenUsage.routerEnabledDesc')}+ checked={settings?.router_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ router_enabled: v })}+ />+ <ToggleRow+ id="tj-search-enabled"+ label={t('settings.tokenUsage.search')}+ description={t('settings.tokenUsage.searchDesc')}+ checked={settings?.search_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ search_enabled: v })}+ />+ <ToggleRow+ id="tj-code-enabled"+ label={t('settings.tokenUsage.code')}+ description={t('settings.tokenUsage.codeDesc')}+ checked={settings?.code_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ code_enabled: v })}+ />+ <ToggleRow+ id="tj-html-enabled"+ label={t('settings.tokenUsage.html')}+ description={t('settings.tokenUsage.htmlDesc')}+ checked={settings?.html_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ html_enabled: v })}+ />+ <ToggleRow+ id="tj-ml-enabled"+ label={t('settings.tokenUsage.ml')}+ description={t('settings.tokenUsage.mlDesc')}+ checked={settings?.ml_compression_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ ml_compression_enabled: v })}+ />+ </Card>{/* ── CCR cache ──────────────────────────────────────────────────── */}- <SettingsSection- title={t('settings.tokenUsage.ccrTitle')}- description={t('settings.tokenUsage.ccrDesc')}>- <div className="rounded-xl border border-line divide-y divide-line-subtle">- <SettingsRow- label={t('settings.tokenUsage.ccrEnabled')}- description={t('settings.tokenUsage.ccrEnabledDesc')}- control={- <SettingsSwitch- id="tj-ccr-enabled"- checked={settings?.ccr_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ ccr_enabled: v })}- aria-label={t('settings.tokenUsage.ccrEnabled')}- />- }- />- <SettingsRow- stacked- label={t('settings.tokenUsage.ccrMinTokens')}- description={t('settings.tokenUsage.ccrMinTokensDesc')}- control={- <SettingsNumberField- id="tj-ccr-min-tokens"- value={minTokensInput}- onChange={setMinTokensInput}- onCommit={commitMinTokens}- min={0}- max={1000000}- unit={t('settings.tokenUsage.tokensUnit')}- disabled={settings === null}- aria-label={t('settings.tokenUsage.ccrMinTokens')}- />- }- />- <SettingsRow- label={t('settings.tokenUsage.ccrDisk')}- description={t('settings.tokenUsage.ccrDiskDesc')}- control={- <SettingsSwitch- id="tj-ccr-disk"- checked={settings?.ccr_disk_enabled ?? false}- disabled={settings === null}- onCheckedChange={v => void patch({ ccr_disk_enabled: v })}- aria-label={t('settings.tokenUsage.ccrDisk')}- />- }- />- </div>- <div className="px-1 mt-2">- <SettingsStatusLine- saving={saving}- savedNote={savedNote}- error={error}- savingLabel={t('settings.tokenUsage.saving')}- />- </div>- </SettingsSection>- </>+ <Card title={t('settings.tokenUsage.ccrTitle')} description={t('settings.tokenUsage.ccrDesc')}>+ <ToggleRow+ id="tj-ccr-enabled"+ label={t('settings.tokenUsage.ccrEnabled')}+ description={t('settings.tokenUsage.ccrEnabledDesc')}+ checked={settings?.ccr_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ ccr_enabled: v })}+ />+ <Field+ htmlFor="tj-ccr-min-tokens"+ label={t('settings.tokenUsage.ccrMinTokens')}+ description={t('settings.tokenUsage.ccrMinTokensDesc')}+ control={+ <NumberField+ id="tj-ccr-min-tokens"+ value={minTokensInput}+ onChange={setMinTokensInput}+ onCommit={commitMinTokens}+ min={0}+ max={1000000}+ unit={t('settings.tokenUsage.tokensUnit')}+ disabled={settings === null}+ aria-label={t('settings.tokenUsage.ccrMinTokens')}+ />+ }+ />+ <ToggleRow+ id="tj-ccr-disk"+ label={t('settings.tokenUsage.ccrDisk')}+ description={t('settings.tokenUsage.ccrDiskDesc')}+ checked={settings?.ccr_disk_enabled ?? false}+ disabled={settings === null}+ onChange={v => void patch({ ccr_disk_enabled: v })}+ />+ </Card>++ <StatusLine+ saving={saving}+ savedNote={savedNote}+ error={error}+ savingLabel={t('settings.tokenUsage.saving')}+ />+ </div>);if (embedded) return body;diff --git a/app/src/components/settings/panels/VoicePanelProviderChips.tsx b/app/src/components/settings/panels/VoicePanelProviderChips.tsxindex 976e27b5bf..35a2058eb1 100644--- a/app/src/components/settings/panels/VoicePanelProviderChips.tsx+++ b/app/src/components/settings/panels/VoicePanelProviderChips.tsx@@ -71,12 +71,8 @@ const ProviderRow = ({<div className="min-w-0 flex-1"><div className="text-sm font-semibold text-content">{label}</div><div className="mt-1 flex flex-wrap items-center gap-1.5">- {capability !== 'tts' && (- <Badge variant="neutral">{t('voice.providers.cap.stt')}</Badge>- )}- {capability !== 'stt' && (- <Badge variant="neutral">{t('voice.providers.cap.tts')}</Badge>- )}+ {capability !== 'tts' && <Badge variant="neutral">{t('voice.providers.cap.stt')}</Badge>}+ {capability !== 'stt' && <Badge variant="neutral">{t('voice.providers.cap.tts')}</Badge>}{status}</div></div>diff --git a/app/src/components/settings/panels/ai/DefaultModelRow.tsx b/app/src/components/settings/panels/ai/DefaultModelRow.tsxindex 593a57cdfd..0baef6c44c 100644--- a/app/src/components/settings/panels/ai/DefaultModelRow.tsx+++ b/app/src/components/settings/panels/ai/DefaultModelRow.tsx@@ -55,7 +55,8 @@ export const DefaultModelRow = ({<RouteButtonproviderSlug="openhuman"provider={t('settings.ai.managedSourceLabel')}- model={pinned ?? t('settings.ai.routing.defaultModelUnset')}+ model={pinned}+ placeholder={t('settings.ai.routing.defaultModelUnset')}onClick={() => setPickerOpen(true)}data-testid="default-model-change"/>diff --git a/app/src/components/settings/panels/ai/RouteButton.tsx b/app/src/components/settings/panels/ai/RouteButton.tsxindex b1dd62f5a7..cfb9a43ad8 100644--- a/app/src/components/settings/panels/ai/RouteButton.tsx+++ b/app/src/components/settings/panels/ai/RouteButton.tsx@@ -14,12 +14,16 @@ export const RouteButton = ({providerSlug,provider,model,+ placeholder,onClick,'data-testid': testId,}: {providerSlug: string | null;provider: string;- model: string;+ /** The pinned model id, or null when nothing is pinned. */+ model: string | null;+ /** Shown (in the prose face, not mono) when `model` is null. */+ placeholder: string;onClick: () => void;'data-testid'?: string;}) => (diff --git a/app/src/components/settings/panels/ai/WorkloadRow.tsx b/app/src/components/settings/panels/ai/WorkloadRow.tsxindex 35ee15f7ed..983810380e 100644--- a/app/src/components/settings/panels/ai/WorkloadRow.tsx+++ b/app/src/components/settings/panels/ai/WorkloadRow.tsx@@ -101,7 +101,8 @@ export const WorkloadRow = ({<RouteButtonproviderSlug={provider ? providerSlug : null}provider={provider ?? t('settings.ai.routing.selectProvider')}- model={model || t('settings.ai.routing.chooseModel')}+ model={model || null}+ placeholder={t('settings.ai.routing.chooseModel')}onClick={onCustomClick}/></TableCell>diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex 7f1b3aced5..0fea41e245 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -5861,6 +5861,9 @@ const en: TranslationMap = {'settings.composio.modeManagedDesc':'OpenHuman proxies tool calls through our backend (recommended). Auth is brokered; you never paste a Composio API key. Webhooks are fully routed.','settings.composio.routingMode': 'Routing mode',+ 'settings.composio.statusManaged': 'Managed',+ 'settings.composio.statusDirect': 'Direct',+ 'settings.composio.statusNoKey': 'No API key','settings.composio.saveErrorNoKey': 'Failed to save. Direct mode requires a non-empty API key.','settings.composio.invalidApiKey': 'Invalid Composio API key.','settings.composio.saving': 'Saving…',diff --git a/app/src/pages/settings/voice/PttSettingsPanel.tsx b/app/src/pages/settings/voice/PttSettingsPanel.tsxindex 178a838a21..62fba0fcc0 100644--- a/app/src/pages/settings/voice/PttSettingsPanel.tsx+++ b/app/src/pages/settings/voice/PttSettingsPanel.tsx@@ -217,7 +217,9 @@ const PttSettingsPanel = () => {</p>)}{captureError && (- <p className="text-xs text-coral-600 dark:text-coral-300" data-testid="ptt-shortcut-error">+ <p+ className="text-xs text-coral-600 dark:text-coral-300"+ data-testid="ptt-shortcut-error">{captureError}</p>)}