Official

palette

Built-in command palette (⌘⇧P) and chat search (⌘P).

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/palette@0.2.3

Permissions in 0.2.3

  • Run other plugins' commands commands.runHighRuns commands of other plugins.Run the command you pick, whichever plugin it belongs to
  • Read chats chats.readMediumReads your transcripts and chat lists.Search your chats by title and workspace, and open the one you pick
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Hold the palette, which opens over the windowSlots: title

Files

state.ts1.7 KB
// Palette state belongs to one activation; ranking and rendering share it through this layer.
// Its view handle lets asynchronous catalog and search results request a render.
import * as Context from "effect/Context";
import * as Layer from "effect/Layer";
import type { EffectClient } from "divergence/effect";
import type { Chat, CommandInfo, PaletteItem, PaletteProviderInfo, ViewHandle, Workspace } from "divergence";
import type { Settings } from "../settings/contract.ts";

export interface State {
  open: "commands" | "chats" | null;
  // The palette a key press asked for while its lists are on their way,
  // and the ticket of the latest press.
  pending: "commands" | "chats" | null;
  opening: number;
  query: string;
  selected: number;
  commands: readonly CommandInfo[];
  // Every chat by id, kept current by the host's chat events once loaded.
  chats: Map<string, Chat>;
  chatsLoaded: boolean;
  workspaces: Record<string, Workspace>;
  providers: readonly PaletteProviderInfo[];
  found: { key: string; items: readonly PaletteItem[] };
  recent: string[];
  searching: number;
  view?: ViewHandle;
  // The divergence/settings client while its provider runs; Assign on a
  // conflicting key does nothing without it.
  settings: EffectClient<typeof Settings> | undefined;
}

export class PaletteState extends Context.Service<PaletteState, State>()("palette/State") {
  static readonly layer = Layer.sync(PaletteState, () => ({
    open: null,
    pending: null,
    opening: 0,
    query: "",
    selected: 0,
    commands: [],
    chats: new Map(),
    chatsLoaded: false,
    workspaces: {},
    providers: [],
    found: { key: "", items: [] },
    recent: [],
    searching: 0,
    settings: undefined,
  }));
}

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.5latestNov 21, 2026>=5 <618.4 KB3 permissionsListed
0.2.4Nov 16, 2026>=5 <618.1 KB3 permissionsListed
0.2.3Nov 11, 2026>=5 <613.5 KB3 permissionsListed
0.2.2Nov 9, 2026>=5 <611.5 KB3 permissionsListed
0.2.1Oct 27, 2026>=2 <411.4 KB3 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.