Official

sidebar

Built-in sidebar UI (JavaScript UI plugin).

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/sidebar@0.2.5

Permissions in 0.2.5

  • Control chats chats.controlHighCreates chats, sends prompts and cancels runs.Add and remove workspaces, and create, rename, check off and archive chats
  • Run other plugins' commands commands.runHighRuns commands of other plugins.Close the tab on screen with Cmd+W when its chat is part of a task
  • Read chats chats.readMediumReads your transcripts and chat lists.List workspaces and chats, and follow them as agents work
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Draw the sidebarSlots: left

Files

rest-prefetch.test.ts2.5 KB
// Reading a chat ahead builds its whole pane, which the kernel takes on the
// main thread, so the sidebar reads ahead only for a row the pointer rests
// on. A pointer sweeping down the list reads nothing.
import assert from "node:assert/strict";
import { afterEach, mock, test } from "node:test";
import activate from "./main.ts";
import { REST_MS } from "./rest.ts";
import { fakeHost } from "./testing.ts";

afterEach(() => mock.timers.reset());

const day = (n: number) => `2026-10-0${n}T00:00:00.000Z`;

function setup() {
  const prefetched: string[] = [];
  const fake = fakeHost(
    [
      { id: "c1", title: "First", at: day(3) },
      { id: "c2", title: "Second", at: day(2) },
      { id: "c3", title: "Third", at: day(1) },
    ],
    [],
    {
      queued: () => [],
      draftTitles: () => ({}),
      starting: () => [],
      prefetch: (params) => void prefetched.push((params as { chatId: string }).chatId),
    },
  );
  return { fake, prefetched };
}

const flush = () => new Promise<void>((resolve) => setImmediate(resolve));
// A row's pointer event, once the sidebar has acted on it.
const pointer = async (fake: ReturnType<typeof fakeHost>, id: string, event: "onPointerEnter" | "onPointerLeave") => {
  fake.click(`row-${id}`, event);
  await flush();
};

test("a pointer sweeping over rows reads none of them ahead", async () => {
  const { fake, prefetched } = setup();
  const dispose = activate(fake.api);
  try {
    await fake.settle();
    for (const id of ["c1", "c2", "c3"]) {
      await pointer(fake, id, "onPointerEnter");
      mock.timers.tick(REST_MS / 3);
      await pointer(fake, id, "onPointerLeave");
    }
    mock.timers.tick(REST_MS * 4);
    await fake.settle();
    assert.deepEqual(prefetched, []);
  } finally {
    await dispose();
  }
});

test("a pointer resting on a row reads that chat ahead once", async () => {
  const { fake, prefetched } = setup();
  const dispose = activate(fake.api);
  try {
    await fake.settle();
    await pointer(fake, "c1", "onPointerEnter");
    mock.timers.tick(REST_MS / 3);
    await pointer(fake, "c1", "onPointerLeave");
    await pointer(fake, "c2", "onPointerEnter");
    mock.timers.tick(REST_MS);
    await fake.settle();
    assert.deepEqual(prefetched, ["c2"]);
    await pointer(fake, "c2", "onPointerEnter");
    mock.timers.tick(REST_MS * 2);
    await fake.settle();
    assert.deepEqual(prefetched, ["c2", "c2"], "entering again after the read rests again");
  } finally {
    await dispose();
  }
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.7latestNov 21, 2026>=5 <6100.9 KB4 permissionsListed
0.2.6Nov 16, 2026>=5 <6100.6 KB4 permissionsListed
0.2.5Nov 11, 2026>=5 <665.1 KB4 permissionsListed
0.2.4Nov 9, 2026>=5 <660.4 KB4 permissionsListed
0.2.3Oct 27, 2026>=2 <426.1 KB3 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.