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.8

Permissions in 0.2.8

  • 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, and its Close Chat and Reopen Closed Chat for Cmd+W and Cmd+Shift+T on a chat's only tab
  • 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

question-fields.test.ts2.3 KB
import { test } from "node:test";
import assert from "node:assert/strict";
import type { QuestionField } from "divergence";
import { storableAnswers, submittedValues, visibleFields } from "./question-fields.ts";

const fields: QuestionField[] = [
  { id: "kind", label: "Kind", kind: "select", options: [{ value: "api", label: "API" }, { value: "cli", label: "CLI" }], default: "cli" },
  { id: "key", label: "Key", kind: "text", secret: true, when: [{ field: "kind", op: "eq", value: "api" }] },
  { id: "region", label: "Region", kind: "text", when: [{ field: "key", op: "ne", value: "" }] },
  { id: "verbose", label: "Verbose", kind: "boolean", default: false },
];

test("a field shows only while its conditions hold, and a hidden field hides what depends on it", () => {
  assert.deepEqual(visibleFields(fields, {}).map((field) => field.id), ["kind", "verbose"], "the default answers kind");
  assert.deepEqual(visibleFields(fields, { kind: "api" }).map((field) => field.id), ["kind", "key", "verbose"]);
  assert.deepEqual(visibleFields(fields, { kind: "api", key: "sk" }).map((field) => field.id), ["kind", "key", "region", "verbose"]);
  assert.deepEqual(
    visibleFields(fields, { kind: "cli", key: "sk" }).map((field) => field.id),
    ["kind", "verbose"],
    "region depends on a hidden field",
  );
});

test("the answer sent takes defaults and leaves out hidden fields", () => {
  assert.deepEqual(submittedValues(fields, { key: "sk", region: "eu" }), { kind: "cli", verbose: false });
  assert.deepEqual(submittedValues(fields, { kind: "api", key: "sk", region: "eu", verbose: true }), {
    kind: "api",
    key: "sk",
    region: "eu",
    verbose: true,
  });
});

test("a secret answer is never kept across a reload", () => {
  assert.deepEqual(storableAnswers(fields, { kind: "api", key: "sk", region: "eu" }), { kind: "api", region: "eu" });
});

test("a list answer holds a condition when it contains the value", () => {
  const list: QuestionField[] = [
    { id: "tags", label: "Tags", kind: "multi_select", options: [] },
    { id: "why", label: "Why", kind: "text", when: [{ field: "tags", op: "eq", value: "other" }] },
  ];
  assert.deepEqual(visibleFields(list, { tags: ["a", "other"] }).map((field) => field.id), ["tags", "why"]);
  assert.deepEqual(visibleFields(list, { tags: ["a"] }).map((field) => field.id), ["tags"]);
});

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.