The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fmt(js): `npm run fix` on merge (#108745)
hermes-seaeye[bot]794981e3d47b
diff --git a/apps/desktop/src/app/chat/composer/hooks/use-voice-live-conversation.ts b/apps/desktop/src/app/chat/composer/hooks/use-voice-live-conversation.tsindex d3d4a02ad49..c8db81ddb2b 100644--- a/apps/desktop/src/app/chat/composer/hooks/use-voice-live-conversation.ts+++ b/apps/desktop/src/app/chat/composer/hooks/use-voice-live-conversation.ts@@ -2,11 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'import { useI18n } from '@/i18n'import { sanitizeTextForSpeech } from '@/lib/speech-text'-import {- type LiveHistoryMessage,- type LiveTranscriptFragment,- VoiceLiveSession-} from '@/lib/voice-live'+import { type LiveHistoryMessage, type LiveTranscriptFragment, VoiceLiveSession } from '@/lib/voice-live'import { isVoiceStopCommand } from '@/lib/voice-stop-word'import { notify, notifyError } from '@/store/notifications'@@ -120,8 +116,28 @@ export function useVoiceLiveConversation({const spokenResponseIdRef = useRef<null | string>(null)const lastToolLabelRef = useRef<null | string>(null)const wasEnabledRef = useRef(enabled)- const latest = useRef({ activeToolLabel, beforeMicOpen, onFatalError, onInterrupt, onStopWord, onSubmit, pendingResponse, consumePendingResponse, seedHistory })- latest.current = { activeToolLabel, beforeMicOpen, onFatalError, onInterrupt, onStopWord, onSubmit, pendingResponse, consumePendingResponse, seedHistory }+ const latest = useRef({+ activeToolLabel,+ beforeMicOpen,+ onFatalError,+ onInterrupt,+ onStopWord,+ onSubmit,+ pendingResponse,+ consumePendingResponse,+ seedHistory+ })+ latest.current = {+ activeToolLabel,+ beforeMicOpen,+ onFatalError,+ onInterrupt,+ onStopWord,+ onSubmit,+ pendingResponse,+ consumePendingResponse,+ seedHistory+ }// eslint-disable-next-line no-restricted-syntax -- legitimate non-atom ref write (see eslint rule comment)useEffect(() => {@@ -316,7 +332,15 @@ export function useVoiceLiveConversation({setStatus('idle')latest.current.onFatalError?.()}- }, [end, refreshStatus, setDelegation, voiceCopy.couldNotStartSession, voiceCopy.liveDelegationFailed, voiceCopy.liveEnded, voiceCopy.liveError])+ }, [+ end,+ refreshStatus,+ setDelegation,+ voiceCopy.couldNotStartSession,+ voiceCopy.liveDelegationFailed,+ voiceCopy.liveEnded,+ voiceCopy.liveError+ ])// Drive the reply back into the voice: stream commentary as Hermes writes// it (sentence-chunked), quiet tool progress as thinking appends, and clear@@ -385,7 +409,10 @@ export function useVoiceLiveConversation({// The submit ack lags: give the turn time to be seen running before// reading "idle and no reply" as a finished turn.- if (!busyRef.current && (turnObservedRef.current || Date.now() - submittedAtRef.current > SUBMIT_SETTLE_GRACE_MS)) {+ if (+ !busyRef.current &&+ (turnObservedRef.current || Date.now() - submittedAtRef.current > SUBMIT_SETTLE_GRACE_MS)+ ) {// Turn settled without a speakable reply (tool-only, error, interrupted).if (spokenLengthRef.current === 0) {session.think(delegationId, 'Hermes finished that request without a spoken result.')diff --git a/apps/desktop/src/app/chat/composer/start-voice-button.tsx b/apps/desktop/src/app/chat/composer/start-voice-button.tsxindex 277a1a8b71f..6100155d071 100644--- a/apps/desktop/src/app/chat/composer/start-voice-button.tsx+++ b/apps/desktop/src/app/chat/composer/start-voice-button.tsx@@ -19,7 +19,15 @@ import { useVoiceEngineName, VoiceEngineRows } from './voice-engine-rows'* button so the primary press stays a single unambiguous action; the tooltip* names the engine so the choice is visible before pressing.*/-export function StartVoiceButton({ disabled, label, onStart }: { disabled: boolean; label: string; onStart: () => void }) {+export function StartVoiceButton({+ disabled,+ label,+ onStart+}: {+ disabled: boolean+ label: string+ onStart: () => void+}) {const { t } = useI18n()const engine = useVoiceEngineName()diff --git a/apps/desktop/src/app/chat/composer/voice-engine-rows.tsx b/apps/desktop/src/app/chat/composer/voice-engine-rows.tsxindex 9471b8e81f4..3282ec8ec78 100644--- a/apps/desktop/src/app/chat/composer/voice-engine-rows.tsx+++ b/apps/desktop/src/app/chat/composer/voice-engine-rows.tsx@@ -1,6 +1,11 @@import { useStore } from '@nanostores/react'-import { DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, dropdownMenuRow } from '@/components/ui/dropdown-menu'+import {+ DropdownMenuLabel,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ dropdownMenuRow+} from '@/components/ui/dropdown-menu'import { useI18n } from '@/i18n'import { triggerHaptic } from '@/lib/haptics'import { notifyError } from '@/store/notifications'@@ -49,7 +54,9 @@ export function VoiceEngineRows({ disabled }: { disabled: boolean }) {<span className="flex min-w-0 flex-col"><span>{c.voiceEngineLive}</span>{liveAvailable ? null : (- <span className="text-muted-foreground truncate text-xs">{status.reason ?? c.voiceEngineLiveNeedsKey}</span>+ <span className="text-muted-foreground truncate text-xs">+ {status.reason ?? c.voiceEngineLiveNeedsKey}+ </span>)}</span></DropdownMenuRadioItem>@@ -67,5 +74,7 @@ export function useVoiceEngineName(): null | string {return null}- return selectedVoiceChatMode(status) === 'gpt-live' ? t.composer.voiceEngineLiveShort : t.composer.voiceEngineChainedShort+ return selectedVoiceChatMode(status) === 'gpt-live'+ ? t.composer.voiceEngineLiveShort+ : t.composer.voiceEngineChainedShort}diff --git a/apps/desktop/src/app/settings/constants.ts b/apps/desktop/src/app/settings/constants.tsindex 3a344aca973..46142dda846 100644--- a/apps/desktop/src/app/settings/constants.ts+++ b/apps/desktop/src/app/settings/constants.ts@@ -255,8 +255,20 @@ export const ENUM_OPTIONS: Record<string, string[]> = {// gpt-live branch (one full-duplex voice model delegating to Hermes).'voice.voice_chat_mode': ['chained', 'gpt-live'],'voice.gpt_live.voice': [- 'marin', 'cedar', 'quartz', 'ripple', 'vesper', 'willow', 'stone', 'gleam', 'meridian',- 'bossa', 'tempo', 'beacon', 'delta', 'cinder'+ 'marin',+ 'cedar',+ 'quartz',+ 'ripple',+ 'vesper',+ 'willow',+ 'stone',+ 'gleam',+ 'meridian',+ 'bossa',+ 'tempo',+ 'beacon',+ 'delta',+ 'cinder'],// OpenAI TTS voices — the union across models (per the OpenAI TTS API// docs). Model-specific narrowing happens in enumOptionsFor():@@ -616,7 +628,8 @@ export const FIELD_DESCRIPTIONS: Record<string, string> = defineFieldCopy({'chained: speech-to-text → Hermes → text-to-speech with the providers below. gpt-live: one full-duplex OpenAI voice model (gpt-live-1) listens and talks, and hands every real request to Hermes — any model you have selected answers with the full toolset. Needs an OpenAI API key; the voice layer bills $0.05 per minute.',gptLive: {voice: 'Voice for GPT-Live mode. Custom voice IDs are accepted.',- instructions: 'Extra sentences for the live voice persona (tone, pace, language). Hermes keeps its own system prompt.'+ instructions:+ 'Extra sentences for the live voice persona (tone, pace, language). Hermes keeps its own system prompt.'}},tts: {diff --git a/apps/desktop/src/lib/voice-live.ts b/apps/desktop/src/lib/voice-live.tsindex aca8e4aae3c..0ddd88581d9 100644--- a/apps/desktop/src/lib/voice-live.ts+++ b/apps/desktop/src/lib/voice-live.ts@@ -485,7 +485,10 @@ export class VoiceLiveSession {track.enabled = !muted}- this.send({ event_id: this.nextEventId(muted ? 'mute' : 'unmute'), type: muted ? 'session.input_audio.mute' : 'session.input_audio.unmute' })+ this.send({+ event_id: this.nextEventId(muted ? 'mute' : 'unmute'),+ type: muted ? 'session.input_audio.mute' : 'session.input_audio.unmute'+ })}/** Graceful close: ask for `session.closed`, tear down after it (or a timeout). */