From 4355eb15974003b4d0f61febb95dd5dca5c4d614 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 21:33:05 +0000 Subject: [PATCH 1/2] Emoji and AI paste into the app you were in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emoji 1.2.0: Enter pastes the emoji. AI 1.1.0: Enter pastes the result of Fix, Improve, Translate… (copy a text, run Fix, press Enter: the corrected text replaces it), and conversations get Paste Answer. On launchers older than 0.4, which have no paste, they copy as before. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzDMDJteorsmKRm6FVPX94 --- extensions/ai/backslash.toml | 2 +- extensions/ai/chat.ts | 2 ++ extensions/ai/paste.ts | 9 +++++++++ extensions/ai/tools.ts | 2 ++ extensions/emoji/backslash.toml | 2 +- extensions/emoji/commands/search.ts | 5 +++++ 6 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 extensions/ai/paste.ts diff --git a/extensions/ai/backslash.toml b/extensions/ai/backslash.toml index 181b4fb..7c41c69 100644 --- a/extensions/ai/backslash.toml +++ b/extensions/ai/backslash.toml @@ -2,7 +2,7 @@ id = "ai" title = "AI" description = "Ask questions, fix, rewrite, summarize, translate and explain text, with Claude, OpenAI, Mistral, Groq, OpenRouter or a local Ollama" -version = "1.0.0" +version = "1.1.0" author = "Backslash" icon = "✨" license = "MIT" diff --git a/extensions/ai/chat.ts b/extensions/ai/chat.ts index 5ab4afc..9ef316c 100644 --- a/extensions/ai/chat.ts +++ b/extensions/ai/chat.ts @@ -1,5 +1,6 @@ import { action, clipboard, close, detail, field, form, replace, storage } from "@backslash/api"; import { languageRule, type Message, type Prefs } from "./lib.ts"; +import { canPaste, pasteText } from "./paste.ts"; import { answer, modelName } from "./llm.ts"; export interface Conversation { @@ -72,6 +73,7 @@ export function chat(prefs: Prefs, previous: Conversation | undefined, question? return close("Answer copied"); }, { icon: "edit-copy" }), action("Ask a Follow-up…", () => followUp, { icon: "mail-reply-sender", shortcut: "r" }), + ...(canPaste ? [action("Paste Answer", () => pasteText(last), { icon: "edit-paste", shortcut: "p" })] : []), action("Copy Conversation", async () => { await clipboard.write(transcript(convo.messages)); return close("Conversation copied"); diff --git a/extensions/ai/paste.ts b/extensions/ai/paste.ts new file mode 100644 index 0000000..db8abe3 --- /dev/null +++ b/extensions/ai/paste.ts @@ -0,0 +1,9 @@ +import { clipboard } from "@backslash/api"; + +/** clipboard.paste came with Backslash 0.4. */ +export const canPaste = "paste" in clipboard; + +/** Pastes into the app the user was in, closing the launcher. */ +export async function pasteText(text: string) { + await clipboard.paste(text); +} diff --git a/extensions/ai/tools.ts b/extensions/ai/tools.ts index e60e271..ec1a161 100644 --- a/extensions/ai/tools.ts +++ b/extensions/ai/tools.ts @@ -1,6 +1,7 @@ import { type Action, action, clipboard, close, type Context, detail, replace } from "@backslash/api"; import { chat } from "./chat.ts"; import { languageRule, type Prefs } from "./lib.ts"; +import { canPaste, pasteText } from "./paste.ts"; import { answer, modelName } from "./llm.ts"; /** The streamed result of an instruction applied to `text`; Enter copies it. */ @@ -23,6 +24,7 @@ export function toolView( } }, actions: [ + ...(canPaste ? [action("Paste Result", () => pasteText(result), { icon: "edit-paste" })] : []), action("Copy Result", async () => { await clipboard.write(result); return close("Copied"); diff --git a/extensions/emoji/backslash.toml b/extensions/emoji/backslash.toml index 2c3a6e5..a96d337 100644 --- a/extensions/emoji/backslash.toml +++ b/extensions/emoji/backslash.toml @@ -2,7 +2,7 @@ id = "emoji" title = "Emoji & Symbols" description = "Search emoji and symbols by name and copy them" -version = "1.1.0" +version = "1.2.0" author = "Backslash" icon = "😀" license = "MIT" diff --git a/extensions/emoji/commands/search.ts b/extensions/emoji/commands/search.ts index 95d110e..8d42cb5 100644 --- a/extensions/emoji/commands/search.ts +++ b/extensions/emoji/commands/search.ts @@ -1,4 +1,8 @@ +import * as api from "@backslash/api"; import { copy, list } from "@backslash/api"; + +// paste() came with Backslash 0.4; older launchers only copy. +const pasteFirst = (text: string) => ("paste" in api ? [api.paste(text, "Paste Emoji")] : []); import data from "../emoji.json" with { type: "json" }; // Names are "common words · official unicode name"; the title keeps the @@ -22,6 +26,7 @@ export default list({ icon: emoji, keywords: name.includes(" · ") ? [name.split(" · ")[0], ...name.split(" ")] : name.split(" "), actions: [ + ...pasteFirst(emoji), copy(emoji, "Copy Emoji"), copy(title(name), "Copy Name"), copy(codepoints, "Copy Code Point"), From f9182207bfdb59dc44bc761094b7a2893272ee85 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 21:33:08 +0000 Subject: [PATCH 2/2] Registry: Emoji 1.2.0, AI 1.1.0 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzDMDJteorsmKRm6FVPX94 --- registry/ai.toml | 6 +++--- registry/emoji.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/registry/ai.toml b/registry/ai.toml index e44d055..978ab7b 100644 --- a/registry/ai.toml +++ b/registry/ai.toml @@ -3,11 +3,11 @@ title = "AI" description = "Ask questions, fix, rewrite, summarize, translate and explain text, with Claude, OpenAI, Mistral, Groq, OpenRouter or a local Ollama" author = "Backslash" icon = "✨" -version = "1.0.0" +version = "1.1.0" repository = "https://github.com/backslash-app/plugins" path = "extensions/ai" -commit = "e2762ad04c6bc8eddadcd95bc2640611cdd763fc" -checksum = "sha256:bf618cffe2c612643f7b10c97c825dc5da1ccb4f5689407ba06093cc34eedad2" +commit = "4355eb15974003b4d0f61febb95dd5dca5c4d614" +checksum = "sha256:6f09352f8175b132111367f1926cd9e36bf86567d7cfd44fda862a749703f8bc" permissions = ["Access api.anthropic.com", "Access api.openai.com", "Access api.mistral.ai", "Access api.groq.com", "Access openrouter.ai", "Access localhost:11434", "Read the clipboard"] commands = ["Ask AI", "Fix Spelling and Grammar", "Improve Writing", "Summarize", "Translate", "Explain"] diff --git a/registry/emoji.toml b/registry/emoji.toml index bb52164..a8b0d91 100644 --- a/registry/emoji.toml +++ b/registry/emoji.toml @@ -3,11 +3,11 @@ title = "Emoji & Symbols" description = "Search emoji and symbols by name and copy them" author = "Backslash" icon = "😀" -version = "1.1.0" +version = "1.2.0" repository = "https://github.com/backslash-app/plugins" path = "extensions/emoji" -commit = "5b791b35805a9d4c6c3e3cb8ccb89796c84a0a97" -checksum = "sha256:27f4e8abf5cf616d7f38625b709225ffb69f8720d997243dc7efb3091c706b7e" +commit = "4355eb15974003b4d0f61febb95dd5dca5c4d614" +checksum = "sha256:3d6c8065bb45587d5e68b3226ab7ab0ed73cc0772f7daf494f53b6b0575b543f" permissions = [] commands = ["Search Emoji & Symbols"]