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 convergence/chat@0.2.2
Permissions in 0.2.2
Files
artifacts.test.ts3.3 KB
// Saved documents stay outside tool folds and retain readable source when their renderer is absent.
// Use the real chat projection and native element factories, not a browser preview.
import assert from "node:assert/strict";
import test from "node:test";
import { chat, harness, item, nodes, transcript } from "./ui-for-tests.test.ts";
import { renderArtifact, renderItems } from "./views/rows.ts";
test("artifact fallback exposes the exact saved source and keeps expansion local to the document", async () => {
const h = harness();
try {
const first = item({ id: "visual-a", role: "artifact" });
const second = item({ id: "visual-b", role: "artifact" });
const t = transcript([first, second]);
const render = () => renderArtifact(h.v, t, first);
const initial = render();
assert.equal(initial.type, "artifact_view");
assert.equal(nodes(initial).find((node) => node.id === "visual-a")?.artifact, first.artifact);
assert.ok(nodes(initial).some((node) => node.text === first.artifact.summary));
assert.equal(
nodes(initial).some((node) => node.type === "code"),
false,
);
nodes(initial)
.find((node) => node.id === "source-visual-a")
?.onClick();
const source = nodes(render()).find((node) => node.type === "code");
assert.ok(source);
assert.deepEqual(JSON.parse(source.text), first.artifact);
assert.equal(
nodes(renderArtifact(h.v, t, second)).some((node) => node.type === "code"),
false,
);
nodes(render())
.find((node) => node.id === "source-visual-a")
?.onClick();
assert.equal(
nodes(render()).some((node) => node.type === "code"),
false,
);
} finally {
await h.close();
}
});
test("older helpers receive a plain readable artifact fallback without an unsupported embedding", async () => {
const h = harness();
try {
Reflect.deleteProperty(h.controller.api, "artifactRenderers");
const saved = item({ id: "visual-old-host", role: "artifact" });
const t = transcript([saved]);
const initial = renderArtifact(h.v, t, saved);
assert.equal(initial.type, "div");
assert.ok(nodes(initial).some((node) => node.text === saved.artifact.title));
nodes(initial)
.find((node) => node.id === "source-visual-old-host")
?.onClick();
assert.deepEqual(
JSON.parse(nodes(renderArtifact(h.v, t, saved)).find((node) => node.type === "code")!.text),
saved.artifact,
);
} finally {
await h.close();
}
});
test("visual replies remain placed between collapsed tool groups even without a renderer", async () => {
const h = harness();
try {
const saved = item({ id: "visual-a", role: "artifact" });
const items = [item({ id: "before", role: "tool" }), saved, item({ id: "after", role: "tool" })];
const t = transcript(items);
const rows = renderItems(h.v, chat(), t, items);
assert.equal(rows.length, 3);
assert.equal(rows[1]?.type, "artifact_view");
assert.equal(nodes(rows[1]).find((node) => node.id === saved.id)?.artifact, saved.artifact);
assert.equal(
nodes(rows[0]).some((node) => node.type === "artifact_view"),
false,
);
assert.equal(
nodes(rows[2]).some((node) => node.type === "artifact_view"),
false,
);
} finally {
await h.close();
}
});Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.2.5latest | Nov 21, 2026 | >=2 <4 | 174.6 KB | 5 permissions | Listed |
| 0.2.4 | Oct 25, 2026 | >=2 <4 | 174.2 KB | 5 permissions | Listed |
| 0.2.3 | Oct 24, 2026 | >=2 <4 | 165.4 KB | 5 permissions | Listed |
| 0.2.2 | Oct 23, 2026 | >=2 <4 | 165 KB | 5 permissions | Listed |
| 0.2.1 | Oct 6, 2026 | >=2 <3 | 111.8 KB | 5 permissions | Listed |
| 0.2.0 | Oct 5, 2026 | >=2 <3 | 105.1 KB | 5 permissions | Listed |
No comments yet.