Implement camera preview functionality and enhance AssistantPage

- Add a new `useCameraPreview` hook for managing camera access and video stream handling.
- Integrate camera preview capabilities into the AssistantPage, allowing users to toggle video stream visibility.
- Introduce a new toggle for enabling visual understanding, which activates the video stream preview alongside voice functionalities.
- Update the DebugDrawer component to support switching between chat and video views based on the visual understanding setting.
- Refactor related components to accommodate the new camera features and improve user interaction during debugging.
This commit is contained in:
Xin Wang
2026-07-06 14:08:15 +08:00
parent 809b634420
commit d6b04d71a0
3 changed files with 531 additions and 181 deletions

View File

@@ -558,3 +558,5 @@ export function useVoicePreview(
audioRef,
};
}
export type VoicePreview = ReturnType<typeof useVoicePreview>;