This commit is contained in:
Kevin
2026-04-28 10:41:48 +08:00
parent 482b016872
commit 15884bd68e
60 changed files with 2092 additions and 1994 deletions

View File

@@ -14,6 +14,8 @@ from __future__ import annotations
import time
from app.services.voice_terminal_hub import VoiceTerminalHub
from app.baked import pipeline as bp
from app.services.consumable_vision_algorithm import (
PredictionCandidate,
@@ -56,8 +58,13 @@ class VisionClassificationHandler:
self,
*,
registry: SurgerySessionRegistry,
voice_terminal_hub: VoiceTerminalHub | None = None,
) -> None:
self._registry = registry
self._voice_hub = voice_terminal_hub
def attach_voice_terminal_hub(self, hub: VoiceTerminalHub | None) -> None:
self._voice_hub = hub
def _append_vision_consumption_window_if_ready(
self,
@@ -212,3 +219,7 @@ class VisionClassificationHandler:
confirmation_id=cid,
doctor_id=bp.VIDEO_RESULT_DOCTOR_ID,
)
hub = self._voice_hub
vtid = (state.voice_terminal_id or "").strip()
if hub is not None and vtid and surgery_id:
hub.schedule_notify_pending_head(vtid, surgery_id)