feat(remote): serve local WebUI with an explicit host contract
This commit is contained in:
1 parent
02ce0cfb6f
commit
5aa91b66cc
14 files changed
+489
-59
No files matched your search
@@ -806,6 +806,7 @@ class WebSocketChannel(BaseChannel):
|
||||
client_id = client_id[:128]
|
||||
|
||||
default_chat_id = str(uuid.uuid4())
|
||||
from nanobot.webui.client_contract import gateway_identity
|
||||
|
||||
try:
|
||||
await connection.send(
|
||||
@@ -814,9 +815,8 @@ class WebSocketChannel(BaseChannel):
|
||||
"event": "ready",
|
||||
"chat_id": default_chat_id,
|
||||
"client_id": client_id,
|
||||
**({"terminal": {
|
||||
"protocolVersion": 1, "gatewayId": self.gateway.tokens.instance_id,
|
||||
}} if _query_first(query, "terminal_protocol") == "1" else {}),
|
||||
**({"terminal": gateway_identity(self.gateway.tokens.instance_id)}
|
||||
if _query_first(query, "terminal_protocol") == "1" else {}),
|
||||
},
|
||||
ensure_ascii=False,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user