feat(webui): improve setup flows across chat channels (NAN-112) (#5356)
* feat(webui): improve channel setup flows * fix(webui): refine channel setup interactions (NAN-112) * fix(webui): keep email setup sections channel-owned * fix(webui): remove concrete channel details from shared components * refactor(webui): remove unused channel setup resources * fix(webui): finish channel-owned setup boundaries * fix(webui): update channel switches optimistically * test(channels): remove obsolete absence assertions * fix(webui): flatten channel instance settings disclosure * fix(webui): complete channel setup and connection flows * fix(whatsapp): wait for session database release * fix(webui): preserve scrolling channel controls * fix(webui): stage channel connection checks * fix(channels): align verification actions * fix(email): expose connection checks * fix(webui): align channel field actions * fix(email): verify account credentials * fix(wecom): bypass system proxy for websocket * fix(channels): stabilize async connection cleanup * fix(webui): autosave channel credentials * fix(email): make provider presets non-destructive * test(weixin): isolate persisted QR credentials
This commit is contained in:
1 parent
3cc3012b3a
commit
e8a29a0087
291 files changed
+12194
-3979
No files matched your search
@@ -9,6 +9,7 @@ from nanobot.optional_features import (
|
||||
OptionalFeatureError,
|
||||
disable_optional_feature,
|
||||
enable_optional_feature,
|
||||
install_optional_feature_support,
|
||||
optional_features_payload,
|
||||
)
|
||||
from nanobot.webui.http_utils import query_first
|
||||
@@ -42,9 +43,24 @@ def nanobot_features_action(
|
||||
) -> dict[str, Any]:
|
||||
name = (query_first(query, "name") or "").strip()
|
||||
instance_id = nanobot_feature_instance_target(query)
|
||||
raw_install_only = query_first(query, "install_only")
|
||||
install_only = False
|
||||
if raw_install_only is not None:
|
||||
normalized = raw_install_only.strip().lower()
|
||||
if normalized not in {"1", "0", "true", "false", "yes", "no"}:
|
||||
raise OptionalFeatureError("install_only must be boolean")
|
||||
install_only = normalized in {"1", "true", "yes"}
|
||||
if action != "enable":
|
||||
raise OptionalFeatureError("install_only is only supported for enable actions")
|
||||
if not name:
|
||||
raise OptionalFeatureError("missing feature name")
|
||||
if action == "enable":
|
||||
if install_only:
|
||||
return install_optional_feature_support(
|
||||
name,
|
||||
config_path=config_path,
|
||||
allow_install=allow_install,
|
||||
)
|
||||
return enable_optional_feature(
|
||||
name,
|
||||
config_path=config_path,
|
||||
|
||||
Reference in new issue
Block a user