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.5
Permissions in 0.2.5
Files
terminal.test.ts2.4 KB
import test from "node:test";
import assert from "node:assert/strict";
import * as Effect from "effect/Effect";
import { ansiLines } from "./terminal.ts";
import { applyEvent } from "./transcript.ts";
import { openSubagent } from "./panes.ts";
import { renderSubagentPane } from "./views/tasks.ts";
import { chat, harness, nodes, taskEvent } from "./ui-for-tests.test.ts";
test("captured output keeps ANSI colours and whitespace while discarding control sequences", () => {
assert.deepEqual(ansiLines("\x1b[31;1mred\x1b[0m plain\n\x1b[38;2;1;2;3mrgb"), [
[{ text: "red", color: "danger", bold: true }, { text: " plain" }],
[{ text: "rgb", color: "#010203" }],
]);
assert.deepEqual(ansiLines("10%\r20%\x1b]0;title\x07\r\nend"), [[{ text: "20%" }], [{ text: "end" }]]);
});
test("opening a terminal uses a retained detail pane without reading subagent history", async () => {
const h = harness(),
c = chat();
h.controller.state.chats[c.id] = c;
const t = h.controller.transcript(c.id);
applyEvent(
t,
taskEvent({
id: "build",
kind: "terminal",
command: "cargo build",
title: "Build",
output: "\x1b[32m done\x1b[0m\n",
status: "running",
}),
);
await Effect.runPromise(openSubagent(h.controller, c, "build"));
assert.ok(h.controller.state.paneViews[`subagent/${c.id}/build`]);
assert.equal(
h.calls.some((call) => call.method === "host/chats.load_task"),
false,
);
const output = nodes(renderSubagentPane(h.v, c.id, "build"));
assert.ok(output.some((node) => node.text === "$ cargo build"));
assert.ok(output.some((node) => node.text === " done" && node.color === "success"));
applyEvent(t, taskEvent({ id: "build", kind: "terminal", title: "Build", outputDelta: "more\n", status: "running" }));
assert.ok(nodes(renderSubagentPane(h.v, c.id, "build")).some((node) => node.text === "more"));
applyEvent(
t,
taskEvent({
id: "build",
kind: "terminal",
command: "cargo build",
title: "Build",
output: "done\n",
status: "completed",
}),
);
// Like a terminal, the pane is the command and its output, with no status header.
const done = nodes(renderSubagentPane(h.v, c.id, "build"));
assert.ok(done.some((node) => node.text === "done"));
assert.ok(!done.some((node) => node.text === "Completed" || node.text === "Running"));
await h.close();
});Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.2.9latest | Nov 21, 2026 | >=5 <6 | 349 KB | 5 permissions | Listed |
| 0.2.8 | Nov 16, 2026 | >=5 <6 | 348.6 KB | 5 permissions | Listed |
| 0.2.7 | Nov 11, 2026 | >=5 <6 | 314.3 KB | 5 permissions | Listed |
| 0.2.6 | Nov 9, 2026 | >=5 <6 | 306.2 KB | 5 permissions | Listed |
| 0.2.5 | Oct 27, 2026 | >=2 <4 | 178.6 KB | 5 permissions | Listed |
No comments yet.