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
keyboard-commands.ts2.5 KB
// Commands that reach the composer's controls from the keyboard: the prompt
// box, the agent picker, the settings menu's rows and attaching an image;
// and Find in Chat. Each acts on the chat on screen, and brings the chat
// back first when another page (Settings, the Marketplace) holds the
// center.
import * as Effect from "effect/Effect";
import { Commands } from "divergence/effect";
import type { Controller } from "./controller.ts";
import { runAppCommand } from "./app-commands.ts";
import { openFind } from "./find.ts";
/// The chat on screen, after bringing the chat back to the center.
const onScreenChat = Effect.fn("Chat.onScreenChat")(function* (c: Controller) {
const state = c.api.app.state();
if (!state.chatId || !c.state.chats[state.chatId]) return null;
if (state.route && state.route !== "chat") yield* c.app.route("chat");
return state.chatId;
});
/// Opens the approval row of the settings menu: what the agent may do
/// without asking.
const chooseApproval = Effect.fn("Chat.chooseApproval")(function* (c: Controller, chatId: string) {
const option = c.visibleOptions(c.composer(chatId)).find((known) => known.category === "approval");
const chat = c.state.chats[chatId];
if (option && chat) return yield* c.views.focus(`models-${chatId}-${chat.agentId}`, option.id);
yield* c.notify.warning(`${(chat && c.state.agents[chat.agentId]?.name) ?? "This agent"} has no approval setting`);
});
export const registerKeyboardCommands = Effect.fn("Chat.registerKeyboardCommands")(function* (c: Controller) {
const commands = yield* Commands;
const inChat = (run: (chatId: string) => Effect.Effect<unknown, unknown>) =>
Effect.gen(function* () {
const chatId = yield* onScreenChat(c);
if (chatId) yield* run(chatId);
});
yield* commands.register(
"chat.focusPrompt",
inChat((chatId) => c.views.focus(`prompt-${chatId}`)),
);
yield* commands.register(
"chat.chooseAgent",
inChat((chatId) => c.views.focus(`agent-${chatId}`)),
);
for (const [id, setting] of [
["chat.chooseModel", "model"],
["chat.chooseEffort", "effort"],
["chat.chooseMode", "mode"],
] as const)
yield* commands.register(
id,
inChat((chatId) => runAppCommand(c, chatId, setting)),
);
yield* commands.register(
"chat.chooseApproval",
inChat((chatId) => chooseApproval(c, chatId)),
);
yield* commands.register(
"chat.attachImage",
inChat((chatId) => c.pickAttachments(chatId)),
);
yield* commands.register(
"chat.find",
inChat((chatId) => openFind(c, chatId)),
);
});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.