From f99a9329caccdd14d9c530777a5e5b622d34f602 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 14:16:24 +0200 Subject: fix(assistant): keep focus in the card, scope errors, guard links From review of the canvas. Escape stopped working in three ways, each leaving the keyboard grabbed with nothing to receive it: the history field hiding took focus with it, a disabled input could not hold focus while the daemon was down, and a click in a streaming reply focused text the next flush destroyed. The card now gives focus back to the input whenever it falls out, and the input is read-only rather than disabled. Only an error the daemon marks as ending the reply (turn) closes the live row; a command error, possibly another client's, used to freeze the reply mid-stream. The running tool comes from state events, hello included. Scrolling up during a stream no longer snaps back, since following stops when a movement starts. History snippets go through Notify.sanitize like any model output, links open only for http, https and mailto, and a line opening with inline triple-backtick code is no longer taken as a fence. Co-Authored-By: Claude Opus 5.5 --- desktop/assistant/History.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'desktop/assistant/History.qml') diff --git a/desktop/assistant/History.qml b/desktop/assistant/History.qml index 114ab2b..709e1a6 100644 --- a/desktop/assistant/History.qml +++ b/desktop/assistant/History.qml @@ -92,8 +92,9 @@ Rectangle { // A list row has its date; a search row its snippet. text: r.modelData.snippet !== undefined // Backticks go: a match inside a code span would - // show its ** markers literally. - ? r.modelData.snippet.replace(/\s+/g, " ").replace(/`/g, "") + // show its ** markers literally. Sanitized like any + // model output: a snippet can hold a remote image. + ? Notify.sanitize(r.modelData.snippet.replace(/\s+/g, " ").replace(/`/g, "")) : new Date(r.modelData.updated * 1000).toLocaleString(Qt.locale(), Locale.ShortFormat) textFormat: r.modelData.snippet !== undefined ? Text.MarkdownText : Text.PlainText elide: Text.ElideRight -- cgit v1.2.3