diff --git a/ai-web-agent-console/ai_web_agent_console/presentation.py b/ai-web-agent-console/ai_web_agent_console/presentation.py index 56fac2e..626ca6c 100644 --- a/ai-web-agent-console/ai_web_agent_console/presentation.py +++ b/ai-web-agent-console/ai_web_agent_console/presentation.py @@ -35,6 +35,17 @@ def apply_console_theme(st: Any, profile: AppProfile) -> None: input, textarea, [data-baseweb="select"] > div, [data-testid="stSidebar"] button {{ background:#fff !important; border:1px solid var(--console-border) !important; border-radius:4px !important; box-shadow:none !important; }} + /* Streamlit JSON uses an independently styled code surface. Keep the + MCP detail payload readable even when the browser/system prefers a + dark code theme. */ + [data-testid="stJson"], [data-testid="stJson"] > div, + [data-testid="stJson"] .react-json-view, [data-testid="stJson"] pre {{ + background:#f8fafc !important; color:var(--console-text) !important; + border-color:var(--console-border) !important; color-scheme:light !important; }} + [data-testid="stJson"] *, [data-testid="stJson"] pre *, + [data-testid="stJson"] code {{ + background:transparent !important; color:var(--console-text) !important; + -webkit-text-fill-color:var(--console-text) !important; }} div[data-testid="stButton"] > button, div[data-testid="stFormSubmitButton"] > button {{ background:#fff !important; color:var(--console-text) !important; border:1px solid var(--console-border) !important;