From 8ce50452a15783a9e02b1f6f3aef12707cb194f3 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 9 Oct 2026 19:37:58 +0200 Subject: [PATCH] Fix log.raw streaming: add Stream handler back --- cmd/olliesrv/internal/fs/spec.go | 3 ++- kde/gui/chatblockmodel.cpp | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/olliesrv/internal/fs/spec.go b/cmd/olliesrv/internal/fs/spec.go index 755a4f7..d101250 100644 --- a/cmd/olliesrv/internal/fs/spec.go +++ b/cmd/olliesrv/internal/fs/spec.go @@ -820,7 +820,7 @@ func buildAgentChildren(a *agent.Agent, s *session.Session) []virtfs.FsNodeDecl ), // log.raw — JSONL (one Block per line), for GUI/programmatic access virtfs.FileNode("log.raw", 0440, - virtfs.Doc("JSONL chat log. One JSON block per line."), + virtfs.Doc("JSONL chat log. One JSON block per line. Streaming."), virtfs.StatOverride(chatStat), virtfs.Read(func() ([]byte, error) { a.ChatMu().RLock() @@ -830,6 +830,7 @@ func buildAgentChildren(a *agent.Agent, s *session.Session) []virtfs.FsNodeDecl copy(data, raw) return data, nil }), + virtfs.Stream(a.RawLogRead, a.ChatSignal), ), // log — Rendered plain text for TUI/humans (non-blocking read) virtfs.FileNode("log", 0440, diff --git a/kde/gui/chatblockmodel.cpp b/kde/gui/chatblockmodel.cpp index fcd6888..55b613c 100644 --- a/kde/gui/chatblockmodel.cpp +++ b/kde/gui/chatblockmodel.cpp @@ -192,7 +192,6 @@ QHash ChatBlockModel::roleNames() const void ChatBlockModel::appendData(const QString &text) { - qDebug() << "ChatBlockModel::appendData len=" << text.length() << "text=" << text.left(200); m_lineBuffer += text.toUtf8(); // Process complete JSONL lines @@ -201,7 +200,6 @@ void ChatBlockModel::appendData(const QString &text) QByteArray line = m_lineBuffer.left(idx); m_lineBuffer = m_lineBuffer.mid(idx + 1); if (!line.isEmpty()) { - qDebug() << "ChatBlockModel: processing line:" << line.left(100); processJsonLine(line); } } @@ -224,8 +222,6 @@ void ChatBlockModel::processJsonLine(const QByteArray &line) QString format = obj["format"].toString(); bool partial = obj["partial"].toBool(false); - qDebug() << "ChatBlockModel::processJsonLine role=" << role << "id=" << id << "content.len=" << content.length(); - // Skip context blocks from rendering (context is for LLM, not display) if (role == "context") { return;