gui: clicking a session clears explicit agent selection
- Session row click now calls setActiveSessionId(id) - setActiveSessionId no longer returns early for same-session clicks; it always clears m_agentId and stops per-agent streams - This enforces a clean 'session selected, no agent selected' state
This commit is contained in:
parent
38cd1313ec
commit
b8fc64fb18
|
|
@ -604,6 +604,7 @@ ApplicationWindow {
|
|||
}
|
||||
if (renamingIndex >= 0) return
|
||||
if (type === "session") {
|
||||
ollie.setActiveSessionId(id)
|
||||
toggleExpand(parent.modelIndex)
|
||||
} else if (type === "agent") {
|
||||
activateAgent(parentId, agentId)
|
||||
|
|
|
|||
|
|
@ -49,8 +49,9 @@ Ollie9pClient::~Ollie9pClient()
|
|||
|
||||
void Ollie9pClient::setActiveSessionId(const QString &id)
|
||||
{
|
||||
if (m_activeSessionId == id) return;
|
||||
|
||||
// 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.
|
||||
stopStreams();
|
||||
m_activeSessionId = id;
|
||||
m_agentId.clear();
|
||||
|
|
|
|||
Reference in New Issue