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.7

Permissions in 0.2.7

  • Control chats chats.controlHighCreates chats, sends prompts and cancels runs.Send prompts, answer agent questions, and create, change, fork, revert, stop and group chats
  • Run other plugins' commands commands.runHighRuns commands of other plugins.Run the sidebar's New chat command from the title bar
  • Read chats chats.readMediumReads your transcripts and chat lists.Show workspaces, tasks, chats and transcripts, and follow them as agents work
  • Read files fs.readMediumReads files in the listed places.Suggest workspace files for @ mentionsPlaces: the open workspace
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Draw the chat grid, the title bar, and the Session panel with its rail buttonSlots: centertitlerailright

Files

keyboard-commands.ts2.3 KB
// Commands that reach the composer's controls from the keyboard: the prompt
// box, the agent and settings pickers, the approval pill and attaching an
// image. 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";

/// 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 pill: 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");
  if (option) return yield* c.views.focus(`opt-${chatId}-${option.id}`);
  const chat = c.state.chats[chatId];
  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)),
  );
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.9latestNov 21, 2026>=5 <6349 KB5 permissionsListed
0.2.8Nov 16, 2026>=5 <6348.6 KB5 permissionsListed
0.2.7Nov 11, 2026>=5 <6314.3 KB5 permissionsListed
0.2.6Nov 9, 2026>=5 <6306.2 KB5 permissionsListed
0.2.5Oct 27, 2026>=2 <4178.6 KB5 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.