Official

chat

Built-in chat 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/chat@0.2.6

Permissions in 0.2.6

  • Control chats chats.controlHighCreates chats, sends prompts and cancels runs.Send prompts, answer agent questions, and create, change, fork, revert, stop and group chats
  • Run other plugins' commands commands.runHighRuns commands of other plugins.Run the sidebar's New chat command from the title bar
  • Read chats chats.readMediumReads your transcripts and chat lists.Show workspaces, tasks, chats and transcripts, and follow them as agents work
  • Read files fs.readMediumReads files in the listed places.Suggest workspace files for @ mentionsPlaces: the open workspace
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Draw the chat grid, the title bar, and the Session panel with its rail buttonSlots: centertitlerailright

Files

side-split.test.ts4.1 KB
// Cmd+Shift+B hides and shows the side split from the chat, and does
// nothing while Settings is open, so going back finds the side split as it
// was left.
import assert from "node:assert/strict";
import test from "node:test";
import * as Effect from "effect/Effect";
import { InputLedger, withController } from "./testing.ts";
import { toggleSideSplit } from "./layout.ts";
import type { Controller } from "./controller.ts";

class SideLedger extends InputLedger {
  updates: unknown[] = [];
  override async call(method: string, raw: unknown): Promise<unknown> {
    if (method === "host/layouts.update") {
      this.updates.push(raw);
      return { changed: true };
    }
    return super.call(method, raw);
  }
}

const onRoute = (c: Controller, route: string) => {
  Object.assign(c.app, { state: Effect.succeed({ route, chatId: "c1" }) });
};

test("the side split's key hides it from the chat and leaves it alone in Settings", async () => {
  const ledger = new SideLedger();
  await withController(ledger, (c) =>
    Effect.gen(function* () {
      c.state.layouts.side = { layout: null, remembered: [], open: true, width: 520 };
      onRoute(c, "settings");
      yield* toggleSideSplit(c);
      assert.deepEqual(ledger.updates, [], "Settings keeps the side split as it was");
      onRoute(c, "chat");
      yield* toggleSideSplit(c);
      assert.deepEqual(ledger.updates, [{ side: { open: false }, onScreen: null }]);
    }),
  );
});

test("the side split keeps the width it was dragged to, and opens again at it", async () => {
  const { harness, chat, nodes, tree } = await import("./ui-for-tests.test.ts");
  const { noteTask } = await import("./layout.ts");
  const { renderTaskCenter } = await import("./views/layout.tsx");
  const h = harness();
  const c = h.controller;
  c.state.chats.a = chat({ id: "a" });
  c.state.panes.a = { chatId: "a", view: { id: 20, update() {}, remove() {} }, drawn: true, ready: true };
  const own = { kind: "chat" as const, chatId: "a" };
  const subagent = { kind: "item" as const, id: "i1", owner: "chat", itemKind: "chat.subagent", key: "s", title: "Scout", chatId: "a" };
  const task = { id: "t", layout: { root: { kind: "pane" as const, id: "p", tabs: [own], active: own }, focused: "p" }, createdAt: "", updatedAt: "" };
  noteTask(c.state.layouts, task);
  const side = { layout: { root: { kind: "pane" as const, id: "sp", tabs: [subagent], active: subagent }, focused: "sp" }, remembered: [], open: true, width: 400, resized: true };
  c.state.layouts.side = side;
  let redrawn = 0;
  Object.assign(h.v.ctx, { update: () => void redrawn++ });
  const center = () => tree(renderTaskCenter(h.v, task));
  const windowSplit = () => nodes(center()).find((node) => node.id === "window-split")!;
  // The room is measured once, around the whole window split.
  const measureRoom = (width: number) => (center().children[0]!.children[0]!.onResize as (size: { width: number; height: number }) => void)({ width, height: 900 });
  const sideWidth = () => (windowSplit().sizes as number[])[1]! * 2000;
  measureRoom(2000);
  assert.equal(redrawn, 1, "a new room draws the side split again at its width");
  assert.equal(Math.round(sideWidth()), 400);
  // A drag to 260px, narrower than the old floor of 15% of the room, is the width it keeps.
  (windowSplit().onResize as (e: { sizes: number[] }) => void)({ sizes: [0.87, 0.13] });
  await h.settle();
  assert.deepEqual((h.calls.findLast((call) => call.method === "host/layouts.update")?.params as { side: unknown }).side, { width: 260 });
  side.width = 260;
  assert.equal(Math.round(sideWidth()), 260, "drawn again, it stays where it was dropped");
  // Hidden and shown again, it opens at the same width, with nothing measured in between.
  side.open = false;
  assert.equal(nodes(center()).find((node) => node.id === "window-split")!.sizes?.toString(), "1");
  side.open = true;
  assert.equal(Math.round(sideWidth()), 260, "it opens at the width it was dragged to");
  assert.equal(redrawn, 1, "and nothing it did measured a new room");
  // A drag stops where the width it would leave is kept: the task's column keeps 200px, the side split 240px.
  assert.deepEqual(windowSplit().minSizes, [200, 240]);
  await h.close();
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.9latestNov 21, 2026>=5 <6349 KB5 permissionsListed
0.2.8Nov 16, 2026>=5 <6348.6 KB5 permissionsListed
0.2.7Nov 11, 2026>=5 <6314.3 KB5 permissionsListed
0.2.6Nov 9, 2026>=5 <6306.2 KB5 permissionsListed
0.2.5Oct 27, 2026>=2 <4178.6 KB5 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.