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
title.test.ts3.3 KB
// Regression coverage for title using the real chat modules.
// Fixtures exercise the same behavior and assertions as the JavaScript tests.
import assert from "node:assert/strict";
import test from "node:test";
import * as Effect from "effect/Effect";
import { send } from "./composer.ts";
import { refreshHistory, syncDraftTitle } from "./data.ts";
import { InputLedger, withController } from "./testing.ts";
import { draftTitle } from "./title.ts";
test("a draft is named like the host names a chat from its first prompt", () => {
assert.equal(draftTitle("\n Fix the bug\nmore"), "Fix the bug");
assert.equal(draftTitle(" \n "), null);
assert.equal(draftTitle(""), null);
const long = draftTitle("x".repeat(100));
assert.ok(long);
assert.equal([...long].length, 61);
assert.ok(long.endsWith("…"));
assert.equal(draftTitle("é".repeat(60)), "é".repeat(60));
});
test("the first prompt's title remains visible while delivery waits for the host title", async () => {
const ledger = new InputLedger();
await withController(ledger, (c) =>
Effect.gen(function* () {
const chat = (c.state.chats.c1 = { ...c.state.chats.c1, sessionId: undefined });
c.transcript("c1").loaded = true;
c.composer("c1").text = "Keep this submitted title";
yield* syncDraftTitle(c, "c1");
assert.equal(c.titleOf(chat), "Keep this submitted title");
const observed: string[] = [];
ledger.beforeEnqueue = async () => {
observed.push(c.titleOf(chat));
c.composer("c1").text = "A later draft must not rename this chat";
await Effect.runPromise(syncDraftTitle(c, "c1"));
};
ledger.afterClaim = async () => {
observed.push(c.titleOf(chat));
};
yield* send(c, "c1");
assert.deepEqual(observed, ["Keep this submitted title", "Keep this submitted title"]);
yield* syncDraftTitle(c, "c1");
assert.equal(c.titleOf(chat), "Keep this submitted title", "no New Chat flash after delivery");
c.state.chats.c1 = { ...chat, title: "Title supplied by the provider" };
yield* syncDraftTitle(c, "c1");
assert.equal(c.titleOf(c.state.chats.c1), "Title supplied by the provider", "host title replaces the fallback");
}),
);
});
test("clearing an unsent draft still restores New Chat", async () => {
await withController(new InputLedger(), (c) =>
Effect.gen(function* () {
c.composer("c1").text = "Unsent temporary title";
yield* syncDraftTitle(c, "c1");
assert.equal(c.titleOf(c.state.chats.c1), "Unsent temporary title");
c.composer("c1").text = "";
yield* syncDraftTitle(c, "c1");
assert.equal(c.titleOf(c.state.chats.c1), "New Chat");
}),
);
});
test("the first history sync of a chat with no composer yet ends with its composer loaded", async () => {
const ledger = new InputLedger();
await withController(ledger, (c) =>
Effect.gen(function* () {
// As at launch: the history read starts before the pane made a composer.
delete c.state.composers.c1;
yield* refreshHistory(c, "c1");
for (let tries = 0; c.composer("c1").loading && tries < 100; tries++) yield* Effect.sleep(5);
assert.equal(c.composer("c1").syncing, false);
assert.equal(c.composer("c1").loading, false, "its options were loaded");
}),
);
});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.