theseus/quicklinks-preload.js
Local Dev 22e2b3f75e Theseus 0.3.100: LLM sidebar button, Hermes consolidation, Settings polish
The gear popover at the bottom of the left strip is reduced to a single
"Open sidebar settings" item; the overlay/push radio and "Reset panel
widths" controls move to Settings › Sidebar permanently, so there's one
source of truth for the sidebar's own options.

A new sparkle button is added below the icon stack: it opens the user's
default AI engine (any search engine with kind=llm — Perplexity ships
on by default now; Phind is in the catalog). Click opens the engine in
the left panel like the existing web-app quick-links; right-click (or
the small chevron in the button's corner) pops a native menu of every
enabled LLM, each one-click to switch default + open. The button hides
itself when no LLM engine is enabled.

Hermes consolidation. The hermes.x web quick-link added in 0.3.99 is
retracted — the bundled Hermes extension already registers a left-strip
panel (side: "left"), so the web link was duplicating it. Any profile
that caught 0.3.99 gets the stray entry yanked on first load.
Ctrl+Shift+E now opens the Hermes panel in the active window's left
sidebar instead of the standalone Messages BrowserWindow; the window
is still reachable via the ⧉ pop-out button in the panel header for
users who want a free-floating client. The home-page Silent Mode card
for Hermes.X comes back (it's a link to the web page, not a shortcut
to the panel — different purpose).
2026-10-21 20:10:11 +03:00

15 lines
944 B
JavaScript

const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("quicklinks", {
getState: () => ipcRenderer.invoke("quicklinks-get-state"),
open: (id) => ipcRenderer.invoke("quicklinks-open", String(id || "")),
close: () => ipcRenderer.invoke("quicklinks-close"),
// The gear: rect is the button's box in the strip, for placing the menu.
menu: (rect) => ipcRenderer.invoke("quicklinks-menu", rect),
// LLM picker — right-click on the LLM button pops a native menu of
// enabled LLM engines. rect positions the menu next to the button.
llmMenu: (rect) => ipcRenderer.invoke("quicklinks-llm-menu", rect),
// The strip's new order after a drag: keys "q:<link id>" / "p:<panelId>".
reorder: (order) => ipcRenderer.invoke("quicklinks-reorder", order),
add: () => ipcRenderer.invoke("quicklinks-add"),
onState: (cb) => ipcRenderer.on("quicklinks-state", (_e, d) => cb(d)),
});