Official

files

Built-in files 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/files@0.2.5

Permissions in 0.2.5

  • Read files fs.readMediumReads files in the listed places.List the files of the workspacePlaces: the open workspace
  • Read chats chats.readMediumReads your transcripts and chat lists.Refresh the file list when an agent finishes a turn
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Show the files button and panelSlots: railright

Files

panel.test.ts2.3 KB
// File-panel tree, selection and filtering contracts.
import assert from "node:assert/strict";
import { test } from "node:test";
import { folderIds, initialState, isOpen, isPending, runFinished, selectedPath, treeItems } from "./panel.ts";

test("the tree holds only listed folders, with ids the whole list would give them", () => {
  const listing = { "": { files: ["README.md"], folders: ["src"] }, "src/": { files: ["a.ts"], folders: ["deep"] } };
  assert.deepEqual(treeItems(listing), [
    {
      id: "src/",
      label: "src",
      children: [
        { id: "src/deep/", label: "deep", children: [{ id: "src/deep/…", label: "Loading…" }] },
        { id: "src/a.ts", label: "a.ts" },
      ],
    },
    { id: "README.md", label: "README.md" },
  ]);
  assert.deepEqual(treeItems({}), [], "nothing before the top is listed");
  assert.deepEqual(
    treeItems(listing, new Set(), new Set(["src/deep/"]))[0]?.children?.[0]?.children,
    [{ id: "src/deep/…", label: "Could not list this folder" }],
    "a folder whose listing failed says so instead of loading forever",
  );
  assert.equal(
    JSON.stringify(treeItems(listing, new Set(["src/deep/"]))[0]?.children?.[0]),
    '{"id":"src/deep/","label":"deep","open":true,"children":[{"id":"src/deep/…","label":"Loading…"}]}',
    "an open folder says so, listed or not",
  );
  assert.deepEqual(folderIds("src/deep/a.ts"), ["src/", "src/deep/"]);
  assert.deepEqual(folderIds("README.md"), []);
  assert.equal(isPending("src/deep/…"), true);
  assert.equal(isPending("src/a.ts"), false);
});
test("panel opens pinned or previewed, and selection is only a file path", () => {
  for (const key of ["rightPanel", "rightPanelPreview"]) assert.equal(isOpen({ shared: { [key]: "files" } }), true);
  assert.equal(isOpen({}), false);
  assert.equal(isOpen({ shared: { rightPanel: "git" } }), false);
  assert.equal(selectedPath("src/a.ts"), "src/a.ts");
  assert.equal(selectedPath(null), null);
  assert.deepEqual(initialState(), {
    workspaceId: null,
    listing: {},
    failed: new Set(),
    all: null,
    open: {},
    query: "",
    results: [],
    resultsFor: null,
    tabs: undefined,
    activePath: null,
    follow: undefined,
  });
  assert.equal(runFinished({ event: "run_finished" }), true);
  assert.equal(runFinished({ event: "text_delta" }), false);
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.6latestNov 21, 2026>=5 <613.7 KB3 permissionsListed
0.2.5Nov 11, 2026>=5 <613.3 KB3 permissionsListed
0.2.4Nov 9, 2026>=5 <612.3 KB3 permissionsListed
0.2.3Oct 27, 2026>=2 <48 KB3 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.