From cd76864f19905a559fbedeefc13fad75f264462f Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 6 Oct 2026 10:42:35 +0200 Subject: [PATCH] fix agent profile selection from GUI Two bugs: 1. GUI sends 'agent=' but server only recognized 'profile=' - Added 'agent' as alias for 'profile' in parseAgentNewRequest 2. Model dropdown showed cost columns appended to model names - /models format: backendmodel[inout...] - Parser took everything after first tab as model name - Now stops at second tab to extract just the model name --- cmd/olliesrv/internal/fs/support.go | 2 +- kde/gui/ollie9pclient.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/olliesrv/internal/fs/support.go b/cmd/olliesrv/internal/fs/support.go index 8b6b2b8..ec1e520 100644 --- a/cmd/olliesrv/internal/fs/support.go +++ b/cmd/olliesrv/internal/fs/support.go @@ -168,7 +168,7 @@ func parseAgentNewRequest(data []byte) agentNewRequest { r.Params.Name = v case "remote": r.Params.Remote = v - case "profile": + case "profile", "agent": r.Params.Profile = v case "prompt": r.Prompt = v diff --git a/kde/gui/ollie9pclient.cpp b/kde/gui/ollie9pclient.cpp index f73474c..92a743a 100644 --- a/kde/gui/ollie9pclient.cpp +++ b/kde/gui/ollie9pclient.cpp @@ -777,7 +777,10 @@ void Ollie9pClient::ensureRootDataLoaded() int tab = line.indexOf('\t'); if (tab < 0) continue; QString be = line.left(tab).trimmed(); - QString mo = line.mid(tab + 1).trimmed(); + // Extract just the model name (second field), not the cost columns + QString rest = line.mid(tab + 1); + int nextTab = rest.indexOf('\t'); + QString mo = (nextTab >= 0 ? rest.left(nextTab) : rest).trimmed(); if (!be.isEmpty() && !mo.isEmpty()) { QStringList list = m_rootModels[be].toStringList(); list.append(mo);