[verified] fix: scope model changes to the active profile
This commit is contained in:
@@ -29,6 +29,7 @@ from gateway.platforms.base import (
|
||||
BasePlatformAdapter,
|
||||
SendResult,
|
||||
)
|
||||
from hermes_constants import get_hermes_home
|
||||
|
||||
from . import protocol as proto
|
||||
from . import hermes_bridge
|
||||
@@ -59,6 +60,11 @@ class PhebyAdapter(BasePlatformAdapter):
|
||||
platform._value_ = "pheby"
|
||||
platform._name_ = "PHEBY"
|
||||
super().__init__(config=config, platform=platform)
|
||||
# WebSocket control requests run outside normal gateway turns. Capture
|
||||
# the profile root while the adapter is constructed under its routed
|
||||
# profile context so model changes can install the matching credential
|
||||
# scope later instead of reading another profile's environment.
|
||||
self.hermes_home = get_hermes_home()
|
||||
self._pcfg: PhebyConfig = load_config(config.extra or {})
|
||||
self._server: Any = None
|
||||
self._loop: Optional[asyncio.AbstractEventLoop] = None
|
||||
|
||||
Reference in New Issue
Block a user