feat(webui): add temporary chat mode

This commit is contained in:
Xubin Ren
2026-08-08 23:20:59 +08:00
parent 113e8d67ad
commit c9a6145878
41 changed files with 1500 additions and 119 deletions
+8 -2
View File
@@ -8,7 +8,11 @@ from typing import Any, cast
from loguru import logger
from nanobot.bus.events import InboundMessage, OutboundMessage
from nanobot.bus.events import (
INBOUND_META_TRANSIENT_SESSION,
InboundMessage,
OutboundMessage,
)
from nanobot.bus.queue import MessageBus
from nanobot.pairing import (
PAIRING_CODE_META_KEY,
@@ -302,7 +306,8 @@ class BaseChannel(ABC):
)
return
meta = metadata or {}
meta = dict(metadata or {})
transient_session = meta.pop(INBOUND_META_TRANSIENT_SESSION, False) is True
if self.supports_streaming:
meta = {**meta, "_wants_stream": True}
@@ -314,6 +319,7 @@ class BaseChannel(ABC):
media=media or [],
metadata=meta,
session_key_override=session_key,
transient_session=transient_session,
)
await self.bus.publish_inbound(msg)