From f6ceae477979b32869c0c17e2b1fc05477d6eb81 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 16:06:33 +0200 Subject: feat(assistant): Ask presets in the file state A row of canned questions matching every staged file's kind, plus Compare for two or more files: one click asks it, Shift+click puts it in the input to edit first. Defaults live in Presets.js and the list in use in Prefs, so a future drawer settings page can edit it; a saved list that does not validate reads as the defaults. Each prompt asks for an answer in the document's language. Code and configuration get their own kind, so a script is offered Explain and Review rather than Summarize. Button's clicked signal carries the mouse event for the Shift check. Co-Authored-By: Claude Opus 5.5 --- desktop/Button.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'desktop/Button.qml') diff --git a/desktop/Button.qml b/desktop/Button.qml index b93a926..6a977fa 100644 --- a/desktop/Button.qml +++ b/desktop/Button.qml @@ -17,7 +17,9 @@ Rectangle { property alias font: label.font property bool danger: false property bool enabled: true - signal clicked + // The mouse event, for a caller that reads modifiers; a handler that + // takes no argument ignores it. + signal clicked(var mouse) implicitWidth: label.implicitWidth + 22 implicitHeight: label.implicitHeight + 12 @@ -44,6 +46,6 @@ Rectangle { anchors.fill: parent hoverEnabled: true cursorShape: btn.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor - onClicked: if (btn.enabled) btn.clicked() + onClicked: mouse => { if (btn.enabled) btn.clicked(mouse); } } } -- cgit v1.2.3