diff --git a/Services/TelegramService.cs b/Services/TelegramService.cs index bdb37e6..ab6237d 100644 --- a/Services/TelegramService.cs +++ b/Services/TelegramService.cs @@ -164,7 +164,10 @@ public class TelegramService private async Task HandleMessage(long chatId, string userText, string botToken, string botUserId, SessionRecord session) { - var ctx = await _chatService.PrepareContext(session.SessionId, botUserId, _settings.GetInt("MaxIterations", 100)); + // Kontext mit dem Session-Besitzer aufbauen, nicht mit dem Bot-Besitzer: + // bei einem geteilten Bot können sich beide unterscheiden, und PrepareContext + // lehnt fremde Sessions ab. Credentials/CLI-Berechtigung bleiben beim Bot-Besitzer (botUserId, s.u.). + var ctx = await _chatService.PrepareContext(session.SessionId, session.UserId, _settings.GetInt("MaxIterations", 100)); if (ctx == null) { await SendMessage(chatId, botToken, "❌ Kein Agent konfiguriert. Bitte weise der Session im Web-UI einen Agent zu."); diff --git a/wwwroot/css/dashboard.css b/wwwroot/css/dashboard.css index 84af811..d7cbc40 100644 --- a/wwwroot/css/dashboard.css +++ b/wwwroot/css/dashboard.css @@ -121,6 +121,12 @@ color: var(--secondary); } +.badge-effort { + background: rgb(from var(--info) r g b / .1); + border-color: rgb(from var(--info) r g b / .25); + color: var(--info); +} + .section-add-btn { font-size: var(--font-size); } diff --git a/wwwroot/js/cards.js b/wwwroot/js/cards.js index 3e7e07f..12ad0b8 100644 --- a/wwwroot/js/cards.js +++ b/wwwroot/js/cards.js @@ -153,12 +153,15 @@ function buildAgentCard(agent, skills) { } } + const effort = (agent.effort || ``).toLowerCase() + card.innerHTML = `