feat: 实现观察模式,支持持续场景监控(US-05/US-10)
- 新增 useObservationMode Hook:定时 5s 采帧,similarity < 0.85 触发变化回调 - useVisionSession 新增 dialogue/observation 模式切换 - App Footer 加观察模式切换按钮(激活时蓝色脉冲) - 视频区左上角显示'👁️ 观察中'绿色角标 - 观察模式下画面变化自动发送 query Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,9 @@ function App() {
|
||||
config,
|
||||
updateConfig,
|
||||
stats,
|
||||
mode,
|
||||
isObserving,
|
||||
toggleMode,
|
||||
startSession,
|
||||
stopSession,
|
||||
interrupt,
|
||||
@@ -72,6 +75,9 @@ function App() {
|
||||
{config.detailLevel === "high" && (
|
||||
<div className="detail-badge">HD</div>
|
||||
)}
|
||||
{isObserving && (
|
||||
<div className="observation-badge">👁️ 观察中</div>
|
||||
)}
|
||||
{isSpeaking && <div className="vad-indicator">🎤 正在聆听...</div>}
|
||||
{isAudioPlaying && config.ttsEnabled && (
|
||||
<div className="vad-indicator vad-indicator--audio">🔊 正在播放...</div>
|
||||
@@ -121,6 +127,12 @@ function App() {
|
||||
</button>
|
||||
) : (
|
||||
<>
|
||||
<button
|
||||
className={`btn ${mode === "observation" ? "btn--active" : "btn--secondary"}`}
|
||||
onClick={toggleMode}
|
||||
>
|
||||
{mode === "observation" ? "👁️ 观察中" : "👁️ 观察模式"}
|
||||
</button>
|
||||
<button className="btn btn--secondary" onClick={stopSession}>
|
||||
结束对话
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user