Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

452 B
Raw Blame
import type { VoiceInputState } from '@cindy/voice-input-core';

export function isVoiceInputEventScopeActive(state: VoiceInputState): boolean {
  return state === 'listening' || state === 'submitting' || state === 'refining';
}

export function shouldHandleVoiceInputEvent(
  ownedRunId: string | null,
  eventRunId: string,
  acceptUnownedEvent = false,
): boolean {
  if (ownedRunId) return eventRunId === ownedRunId;
  return acceptUnownedEvent;
}