gui: add debug logs for session/agent selection and statewait startup

This commit is contained in:
Levi Neely 2026-08-01 21:24:38 +02:00
parent b8fc64fb18
commit 50bca0a770
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,7 @@ Ollie9pClient::~Ollie9pClient()
void Ollie9pClient::setActiveSessionId(const QString &id)
{
qDebug() << "setActiveSessionId" << id << "prev session" << m_activeSessionId << "prev agent" << m_agentId;
// Session selection must be side-effect free for per-agent streams.
// Even re-selecting the same session should clear agent selection and stop
// statewait/chat so the UI can stay in a pure "session selected" state.
@ -207,6 +208,7 @@ void Ollie9pClient::setActiveAgentId(const QString &agentId)
void Ollie9pClient::switchAgent(const QString &sessionId, const QString &agentId)
{
qDebug() << "switchAgent" << sessionId << agentId << "prev session" << m_activeSessionId << "prev agent" << m_agentId;
if (m_activeSessionId == sessionId && m_agentId == agentId) return;
stopStreams();
@ -439,6 +441,7 @@ void Ollie9pClient::startChatStream()
void Ollie9pClient::startStateStream()
{
qDebug() << "startStateStream active session" << m_activeSessionId << "active agent" << m_agentId;
if (m_stateProc) return;
// Check if session still exists before starting