aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Presets.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 12:15:23 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 12:15:23 +0100
commit80306b3a3ad59e3a06a7e694c69be3ada976ff03 (patch)
tree6d9652b779203a45ce3715770c5de25ba37ca0bf /desktop/assistant/Presets.js
parent4736a1a80ba984d3dfb9ff3bcfef6b63b570c6a1 (diff)
downloadquickshell-80306b3a3ad59e3a06a7e694c69be3ada976ff03.tar.gz
quickshell-80306b3a3ad59e3a06a7e694c69be3ada976ff03.zip
feat(assistant): catalog IPC for deck-it, presets sent as written
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/assistant/Presets.js')
-rw-r--r--desktop/assistant/Presets.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/desktop/assistant/Presets.js b/desktop/assistant/Presets.js
index 0fd6f31..f7cce1c 100644
--- a/desktop/assistant/Presets.js
+++ b/desktop/assistant/Presets.js
@@ -18,15 +18,15 @@
// more files are staged. The list in use is Prefs.presets when one is
// saved (the settings window's Ask presets page edits it), these otherwise.
const DEFAULTS = [
- { 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." },
+ { label: "Summarize", icon: "\uf036", kinds: ["pdf", "text"], prompt: "Summarize this in a few short paragraphs. Answer in the language of the document." },
+ { label: "Key points", icon: "\uf0ca", kinds: ["pdf"], prompt: "List the key points as bullets. Answer in the language of the document." },
+ { label: "Explain simply", icon: "\uf0eb", kinds: ["pdf", "text"], prompt: "Explain this simply, as to a non-expert. Answer in the language of the document." },
+ { label: "Describe", icon: "\uf06e", kinds: ["image"], prompt: "Describe this image. Answer in the language of the document." },
+ { label: "Extract text", icon: "\uf031", kinds: ["image", "pdf"], prompt: "Transcribe all the text, keeping the layout where it helps. Answer in the language of the document." },
+ { label: "What is this?", icon: "\uf059", kinds: ["image"], prompt: "What is this, and what is it for? Answer in the language of the document." },
+ { label: "Explain", icon: "\uf121", kinds: ["code"], prompt: "Explain what this code does. Answer in the language of the document." },
+ { label: "Review", icon: "\uf188", kinds: ["code"], prompt: "Review this code: bugs, risks, and simplifications. Answer in the language of the document." },
+ { label: "Compare", icon: "\uf0db", kinds: ["many"], prompt: "Compare these files: what they share and how they differ. Answer in the language of the document." },
];
var FALLBACK = "\uf086";
@@ -45,6 +45,7 @@ function offered(presets, files) {
: files.every(f => p.kinds.includes(f.kind)));
}
-// The model answers in the language it is asked in; a preset is asked in
-// English, so it says which language to use.
-function prompt(p) { return p.prompt + " Answer in the language of the document."; }
+// Sent as written: a preset says which language to answer in, so a
+// Translate preset can name its target. The defaults ask for the
+// document's own language.
+function prompt(p) { return p.prompt; }