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/assistant/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'desktop/assistant/README.md') diff --git a/desktop/assistant/README.md b/desktop/assistant/README.md index aabce2d..4715b12 100644 --- a/desktop/assistant/README.md +++ b/desktop/assistant/README.md @@ -20,6 +20,7 @@ what is typed. The protocol is specified in that repo, | `Picker.qml` | the in-card file picker behind the paperclip | | `Md.js` | splits a message into prose and fenced code | | `Files.js` | a path's kind, and a dropped URL to a path | +| `Presets.js` | the Ask row's canned questions and which kinds they fit | Three states (`Assistant.qml`, `mode`): **entry**, one line, "How can I help you?"; **file**, files staged and nothing asked yet, with what can be @@ -65,5 +66,11 @@ Notes: - **`socketPath`** is a property so a check can point the canvas at a scratch daemon; the desktop uses the default. -Test the splitter and the kinds: `node desktop/assistant/test_md.js`, -`node desktop/assistant/test_files.js`. +- **Ask presets** live in `Prefs.qml` (`assistant.presets`) once saved and + are `Presets.js`'s defaults until then; an invalid saved list reads as the + defaults. There is no editor yet: a drawer settings page will call + `Prefs.setPresets`. Each prompt asks for an answer in the document's + language, since the model answers in the language it is asked in. + +Tests: `node desktop/assistant/test_md.js`, `test_files.js`, +`test_presets.js` (same directory). -- cgit v1.2.3