From 80306b3a3ad59e3a06a7e694c69be3ada976ff03 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 12:15:23 +0100 Subject: feat(assistant): catalog IPC for deck-it, presets sent as written Co-Authored-By: Claude Opus 5.5 --- desktop/assistant/Presets.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'desktop/assistant/Presets.js') 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; } -- cgit v1.2.3