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.9
Permissions in 0.2.9
Files
clock.ts1.3 KB
import type { Controller } from "./controller.ts";
import { chatsOnScreen } from "./layout.ts";
import { policyOf } from "./scheduler-policy.ts";
import { workingFor } from "./transcript.ts";
/// The labels each running chat's working row last showed when the clock drew it.
export type Drawn = Map<string, string>;
/// What the clock draws again each second, for every chat on screen: a chat
/// that waits on a usage limit counts down above its prompt box, and a running
/// chat's working row counts up. The row draws only when its text changes, so
/// it moves every second while it shows seconds and every minute once it
/// shows hours. Nothing here waits on the host, so streaming or not, the time
/// keeps moving.
export function tick(c: Controller, drawn: Drawn, now = Date.now()) {
for (const chatId of chatsOnScreen(c)) {
const snapshot = c.scheduler.snapshots[chatId];
if (c.scheduler.activeLimits[chatId] || (snapshot && policyOf(snapshot).wait)) {
c.refresh(chatId);
continue;
}
const t = c.state.transcripts[chatId];
if (!t?.running) {
drawn.delete(chatId);
continue;
}
const label = workingFor(t, now);
if (drawn.get(chatId) === label) continue;
drawn.set(chatId, label);
const chat = c.state.chats[chatId];
if (chat) c.paneOf(chat)?.view.update();
}
}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.