From 00fc73c91f9a21c1ef3e175f93b412b7c49954bf Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 6 Mar 2026 14:48:20 -0800 Subject: [PATCH] =?UTF-8?q?feat:=20sidebar=20cloud=20LLM=20indicator=20?= =?UTF-8?q?=E2=80=94=20amber=20badge=20when=20any=20cloud=20backend=20acti?= =?UTF-8?q?ve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/app.py b/app/app.py index d5d3913..f08dbcb 100644 --- a/app/app.py +++ b/app/app.py @@ -163,6 +163,25 @@ with st.sidebar: icon="🔒", ) _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.caption(f"Peregrine {_get_version()}") inject_feedback_button(page=pg.title)