feat: sidebar cloud LLM indicator — amber badge when any cloud backend active

This commit is contained in:
pyr0ball 2026-03-06 14:48:20 -08:00
parent 0c78f19c1e
commit 00fc73c91f

View file

@ -163,6 +163,25 @@ with st.sidebar:
icon="🔒", icon="🔒",
) )
_task_indicator() _task_indicator()
# Cloud LLM indicator — shown whenever any cloud backend is active
_llm_cfg_path = Path(__file__).parent.parent / "config" / "llm.yaml"
try:
import yaml as _yaml
from scripts.byok_guard import cloud_backends as _cloud_backends
_active_cloud = _cloud_backends(_yaml.safe_load(_llm_cfg_path.read_text()) or {})
except Exception:
_active_cloud = []
if _active_cloud:
_provider_names = ", ".join(b.replace("_", " ").title() for b in _active_cloud)
st.warning(
f"**Cloud LLM active**\n\n"
f"{_provider_names}\n\n"
"AI features send content to this provider. "
"[Change in Settings](2_Settings)",
icon="🔓",
)
st.divider() st.divider()
st.caption(f"Peregrine {_get_version()}") st.caption(f"Peregrine {_get_version()}")
inject_feedback_button(page=pg.title) inject_feedback_button(page=pg.title)