aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Presets.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 16:45:36 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 16:45:36 +0200
commit193cd8c2e1cc7e16b1389b95036bf7f4f99f97e0 (patch)
treeee6e88c3069baf51462f8f036ae8e69da3bd2902 /desktop/assistant/Presets.js
parent607934e74ffabc1dcce72b29fc28e92a669e54ce (diff)
downloadquickshell-193cd8c2e1cc7e16b1389b95036bf7f4f99f97e0.tar.gz
quickshell-193cd8c2e1cc7e16b1389b95036bf7f4f99f97e0.zip
feat(assistant): Ask and Do as captioned tile grids with icons
The actions sat as buttons bunched at the left of the card. Each group is now a grid of equal tiles across the card's width, icon over label, about 150 px a column, with a small Ask or Do caption. Icons are Font Awesome and Octicons codepoints checked in Inconsolata Nerd Font's cmap; a saved preset without one gets a fallback. The lists referenced from QML are var, since a library's top-level const is not reliably exposed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/assistant/Presets.js')
-rw-r--r--desktop/assistant/Presets.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/desktop/assistant/Presets.js b/desktop/assistant/Presets.js
index 116d7d0..057f993 100644
--- a/desktop/assistant/Presets.js
+++ b/desktop/assistant/Presets.js
@@ -11,22 +11,26 @@
.pragma library
-// Canned questions for the file state's Ask row. kinds lists the staged
+// Canned questions for the file state's Ask row. icon is a Nerd Font
+// codepoint, checked in Inconsolata Nerd Font's cmap; a saved preset
+// without one gets FALLBACK. kinds lists the staged
// kinds a preset applies to (Files.js); ["many"] offers it whenever two or
// more files are staged. The list in use is Prefs.presets when one is
// saved (a settings page will edit it), these otherwise.
const DEFAULTS = [
- { label: "Summarize", kinds: ["pdf", "text"], prompt: "Summarize this in a few short paragraphs." },
- { label: "Key points", kinds: ["pdf"], prompt: "List the key points as bullets." },
- { label: "Explain simply", kinds: ["pdf", "text"], prompt: "Explain this simply, as to a non-expert." },
- { label: "Describe", kinds: ["image"], prompt: "Describe this image." },
- { label: "Extract text", kinds: ["image", "pdf"], prompt: "Transcribe all the text, keeping the layout where it helps." },
- { label: "What is this?", kinds: ["image"], prompt: "What is this, and what is it for?" },
- { label: "Explain", kinds: ["code"], prompt: "Explain what this code does." },
- { label: "Review", kinds: ["code"], prompt: "Review this code: bugs, risks, and simplifications." },
- { label: "Compare", kinds: ["many"], prompt: "Compare these files: what they share and how they differ." },
+ { label: "Summarize", icon: "\uf036", kinds: ["pdf", "text"], prompt: "Summarize this in a few short paragraphs." },
+ { label: "Key points", icon: "\uf0ca", kinds: ["pdf"], prompt: "List the key points as bullets." },
+ { label: "Explain simply", icon: "\uf0eb", kinds: ["pdf", "text"], prompt: "Explain this simply, as to a non-expert." },
+ { label: "Describe", icon: "\uf06e", kinds: ["image"], prompt: "Describe this image." },
+ { label: "Extract text", icon: "\uf031", kinds: ["image", "pdf"], prompt: "Transcribe all the text, keeping the layout where it helps." },
+ { label: "What is this?", icon: "\uf059", kinds: ["image"], prompt: "What is this, and what is it for?" },
+ { label: "Explain", icon: "\uf121", kinds: ["code"], prompt: "Explain what this code does." },
+ { label: "Review", icon: "\uf188", kinds: ["code"], prompt: "Review this code: bugs, risks, and simplifications." },
+ { label: "Compare", icon: "\uf0db", kinds: ["many"], prompt: "Compare these files: what they share and how they differ." },
];
+var FALLBACK = "\uf086";
+
// The saved list if it is one, else the defaults: a hand edit with a typo
// must not leave the row empty.
function list(saved) {