feat: add seat-scoped static and dynamic assistant modes
This commit is contained in:
@@ -47,6 +47,7 @@ from cognitive_agent.application.mode_profile_intent import ( # noqa: E402
|
||||
normalize_mode_profile_name,
|
||||
parse_mode_profile_update,
|
||||
)
|
||||
from cognitive_agent.application.mode_schedule_service import public_schedule_status # noqa: E402
|
||||
from cognitive_agent.application.seat_service import SeatDemoService # noqa: E402
|
||||
from cognitive_agent.application.self_extension import ( # noqa: E402
|
||||
ExtensionIntegrationError,
|
||||
@@ -304,6 +305,14 @@ class SeatDemoHandler(BaseHTTPRequestHandler):
|
||||
if path == "/api/runtime":
|
||||
self._json(self.service.runtime_info())
|
||||
return
|
||||
if path == "/api/modes/schedule/status":
|
||||
query = parse_qs(parsed_url.query)
|
||||
try:
|
||||
vehicle = self.service.vehicle_profiles.get(str(query.get("vehicle_id", [""])[0]) or None)
|
||||
self._json(public_schedule_status(self.service.mode_schedule_runner.status(vehicle.id)))
|
||||
except ValueError as exc:
|
||||
self._json({"error": "invalid_request", "message": str(exc)}, HTTPStatus.BAD_REQUEST)
|
||||
return
|
||||
if path == "/api/vehicle-display-sync":
|
||||
self._json(self.vehicle_display_sync.snapshot(self._extension_health()))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user