diff --git a/ai_agent.py b/ai_agent.py index 1ba1fb1..2cb53d3 100644 --- a/ai_agent.py +++ b/ai_agent.py @@ -8,7 +8,7 @@ from config import get_config def get_llm_response(prompt: str, provider: str, cfg: dict) -> str: """Invoca o provedor de LLM configurado.""" if provider == "gemini": - api_key = cfg.get("gemini_api_key") + api_key = cfg.get("gemini_api_key") or os.getenv("GEMINI_API_KEY") url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key={api_key}" payload = {"contents": [{"parts": [{"text": prompt}]}]} res = requests.post(url, json=payload) diff --git a/templates/index.html b/templates/index.html index 7bc3b0e..e1deb4c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -49,11 +49,9 @@ } /* Scrollbar Fix for Firefox */ - @supports (scrollbar-width: thin) { - * { - scrollbar-width: thin; - scrollbar-color: var(--accent) transparent; - } + * { + scrollbar-width: thin; + scrollbar-color: var(--accent) transparent; } @keyframes pulse { @@ -605,7 +603,6 @@ align-items: center; justify-content: center; z-index: 2000; - -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: opacity 0.5s ease, visibility 0.5s; } @@ -631,104 +628,31 @@ -webkit-background-clip: text; -webkit-text-fill-color: transparent; } - - .login-icon { - font-size: 3rem; - margin-bottom: 1rem; - } - - .login-desc { - color: var(--text-muted); - margin-bottom: 1.5rem; - font-size: 0.85rem; - } - - .login-input { - margin-bottom: 1rem; - text-align: center; - font-size: 1.1rem; - letter-spacing: 0.2rem; - } - - .login-btn { - width: 100%; - padding: 0.8rem; - } - - #login-error { - color: var(--danger); - font-size: 0.75rem; - margin-top: 1rem; - display: none; - } - - .theme-icon-sun { - display: none; - } - - .theme-icon-moon { - display: block; - } - - [data-theme="light"] .theme-icon-sun { - display: block; - } - - [data-theme="light"] .theme-icon-moon { - display: none; - } - - .chat-input-area { - padding: 0.75rem; - gap: 0.5rem; - } - - .recording-indicator { - display: none; - width: 8px; - height: 8px; - background: red; - border-radius: 50%; - animation: pulse 1s infinite; - } - - .insights-icon { - font-size: 2.5rem; - margin-bottom: 1rem; - } - - .insights-placeholder small { - display: block; - margin-top: 0.5rem; - opacity: 0.6; - } - - .progress-bar { - width: 0%; - transition: width 0.5s ease; - }
- +
🔒

Acesso Restrito

- +

Esta VPS está protegida. Insira + a senha mestra para gerenciar o Agente.

- -
Senha incorreta. Tente novamente.
+
-
-
-

CPU

-
--%
-
-
-
-
-
-

RAM

-
-- / -- GB
-
-
-
-
-
-

Disk

-
--%
-
-
-
-
-
- -
Ações Rápidas
-
- - - - - -
- -
Configuração AI
-
-
-
- - -
-
- - -
-
- -
- -
Terminal & Insights da IA
-
- -
-
-
- Olá! Sou o VPS Agent. Como posso ajudar com seu servidor? Tudo o que eu fizer aparecerá aqui no - terminal técnico. +
+
+

CPU

+
--%
+
+
-
- - - - - +
+

RAM

+
-- / -- GB
+
+
+
+
+
+

Disk

+
--%
+
+
+
- -
-
-
Ações Rápidas
+
+
-
-
- -

Aguardando dados estruturados...

- Peça algo como "status dos containers" para ver o refinamento aqui. + Ping + + + + + +
+ +
Configuração AI
+
+
+
+ + +
+
+ +
+
+ +
Terminal & Insights da IA
+
+ +
+
+
+ Olá! Sou o VPS Agent. Como posso ajudar com seu servidor? Tudo o que eu fizer aparecerá aqui + no + terminal técnico. +
+
+
+ + + + + +
+
+ + +
+
+ + + + + + Painel de Insights Visuais +
+
+
+
📊
+

Aguardando dados estruturados...

+ Peça algo como "status dos + containers" para ver o refinamento aqui. +
+
+
+
Ação executada!
@@ -947,11 +878,15 @@ updateThemeIcon(!isDark); } - function updateThemeIcon(isDark) {} + function updateThemeIcon(isDark) { + document.getElementById('icon-sun').style.display = isDark ? 'block' : 'none'; + document.getElementById('icon-moon').style.display = isDark ? 'none' : 'block'; + } const savedTheme = localStorage.getItem('theme'); if (savedTheme) { document.documentElement.dataset.theme = savedTheme; + updateThemeIcon(savedTheme === 'light'); } // Stats @@ -1196,9 +1131,9 @@ const icon = document.getElementById('mic-icon'); const btn = document.getElementById('audio-btn'); - if (dot) dot.style.display = active ? 'inline-block' : 'none'; - if (icon) icon.style.color = active ? 'red' : 'inherit'; - if (btn) btn.style.borderColor = active ? 'red' : 'var(--border)'; + dot.style.display = active ? 'inline-block' : 'none'; + icon.style.color = active ? 'red' : 'inherit'; + btn.style.borderColor = active ? 'red' : 'var(--border)'; } async function uploadAudio(blob) {