Skip to content

feat(voice): improve assistant voice input with provider-based architecture#920

Open
dongaiqiang wants to merge 1 commit intoslopus:mainfrom
dongaiqiang:feat/voice-assistant-provider-pr
Open

feat(voice): improve assistant voice input with provider-based architecture#920
dongaiqiang wants to merge 1 commit intoslopus:mainfrom
dongaiqiang:feat/voice-assistant-provider-pr

Conversation

@dongaiqiang
Copy link
Copy Markdown

Background

This PR improves voice input stability and maintainability in Happy App.

What changed

  • Consolidated voice entry behavior to avoid conflicting button states
  • Refactored voice input logic into a provider-based structure
  • Added strategy-based mode boundary for future extension
  • Added tests for voice mode decision logic

Scope

  • packages/happy-app/sources/components/AgentInput.tsx
  • packages/happy-app/sources/features/custom-asr/SmartVoiceButton.tsx
  • packages/happy-app/sources/features/custom-asr/useCustomASR.ts
  • packages/happy-app/sources/features/voice-input/*

Validation

  • yarn workspace happy-app test run sources/features/voice-input/providers/providerFactory.test.ts ✅ (9/9 passed)
  • Manual test on mobile completed: streaming voice input updates continuously and send/voice behavior is correct
  • yarn workspace happy-app typecheck currently reports additional errors on top of latest upstream/main (outside this PR’s core change path)

Notes

  • No intentional changes to unrelated RPC flow
  • External UX remains consistent while internals are decoupled for future extension

@dongaiqiang
Copy link
Copy Markdown
Author

Thanks for reviewing.

This PR focuses on voice input reliability + provider-based decoupling:

  • single entry behavior
  • provider/strategy boundary
  • tests for mode decision logic

I kept unrelated RPC flow untouched.
Happy to split into smaller PRs if preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants