gui: hide bypass banner when switching away from the requesting agent

This commit is contained in:
Levi Neely 2026-10-06 14:41:09 +02:00
parent a269a6f790
commit f9e6785add
1 changed files with 10 additions and 0 deletions

View File

@ -584,9 +584,19 @@ Connections {
target: ollie
function onActiveSessionIdChanged() {
if (!ollie.activeAgentId) chatPane.loadChat()
// Hide bypass banner if it's not for the now-active session
if (chatPane.pendingBypass && chatPane.pendingBypass.sessionId !== ollie.activeSessionId) {
chatPane.hasPendingBypass = false
}
}
function onActiveAgentIdChanged() {
if (ollie.activeAgentId) chatPane.loadChat()
// Hide bypass banner if it's not for the now-active agent
if (chatPane.pendingBypass &&
(chatPane.pendingBypass.sessionId !== ollie.activeSessionId ||
chatPane.pendingBypass.agentId !== ollie.activeAgentId)) {
chatPane.hasPendingBypass = false
}
}
function onBypassRequested(sessionId, agentId, id, cmd, cwd) {
// Show bypass request only for the currently active agent