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

search-field.test.ts2 KB
// The sidebar's search field heads the rows under it: an outlined field
// with a search icon, its outline level with the top of the chat pane
// beside it.
import assert from "node:assert/strict";
import { test } from "node:test";
import type { EffectViewContext } from "divergence/effect";
import type { Sidebar } from "./controller.ts";
import { initialState } from "./sections.ts";
import { renderSidebar } from "./views.tsx";

type Node = Record<string, unknown> & { type?: string; id?: string; children?: Node[] };

function sidebarTree() {
  const state = initialState();
  state.loaded = true;
  const ctx = { app: { route: "chat" }, state: {}, plugin: "sidebar", update() {}, run() {} } as unknown as EffectViewContext<{ cmd?: boolean }>;
  return { state, tree: renderSidebar(ctx, { state } as unknown as Sidebar["Service"]) as unknown as Node };
}

// The chain of nodes from the root down to the one with `id`.
function pathTo(node: Node, id: string): Node[] | null {
  if (node.id === id) return [node];
  for (const child of node.children ?? []) {
    const path = child && typeof child === "object" ? pathTo(child, id) : null;
    if (path) return [node, ...path];
  }
  return null;
}

test("the search field is an outlined field whose outline starts level with the top of the chat pane", () => {
  const { state, tree } = sidebarTree();
  const path = pathTo(tree, "chat-search");
  assert.ok(path, "the sidebar draws the search field");
  const [sidebar, top, input] = path.slice(-3);
  assert.equal(input!.ghost, undefined, "the field keeps its outline");
  assert.equal(input!.icon, "search");
  assert.equal(input!.placeholder, "Search chats...");
  assert.equal(sidebar!.id, "sidebar");
  assert.equal(sidebar!.paddingTop, 0);
  // The kernel draws the outline half a point outside the field's box, so
  // the box starts half a point down and the outline at the very top.
  assert.equal(top!.paddingTop, 0.5);
  (input!.onChange as (event: { value: string }) => void)({ value: "plan" });
  assert.equal(state.query, "plan", "typing narrows the list");
});

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.