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

Permissions in 0.2.3

  • 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

session.ts2.8 KB
// The Session panel's data: when it shows, and how the chat open in the
// center reads (its options, status and times, its subagents). Pure: the
// views in views/session.ts draw what this returns.
import type { AppState, Chat, ConfigOption, TranscriptItem } from "convergence";
import { allTasks, counts } from "./subagents.ts";

/// The plugin the shell names in `rightPanel` and `rightPanelPreview`.
export const PANEL = "chat";

export const pinned = (app: AppState): boolean => app.shared?.rightPanel === PANEL;
/// Pinned as the docked column, or shown as the rail icon's fly-out.
export const sessionOpen = (app: AppState): boolean => pinned(app) || app.shared?.rightPanelPreview === PANEL;

/// The name of an option's chosen value ("Opus 4.1", "High"), else the
/// value itself; null without a value.
export function optionLabel(option: Pick<ConfigOption, "value" | "choices"> | undefined): string | null {
  if (option?.value === undefined || option.value === null || option.value === "") return null;
  return option.choices?.find((choice) => choice.value === option.value)?.name ?? String(option.value);
}

/// The chat's state as the sidebar names it, with the tone of its mark.
export function statusOf(chat: Pick<Chat, "status" | "sessionId">): {
  label: string;
  tone: "warning" | "info" | "danger" | "faint";
  running: boolean;
} {
  switch (chat.status) {
    case "running":
      return { label: "Running", tone: "info", running: true };
    case "waiting_approval":
    case "waiting_question":
      return { label: "Needs you", tone: "warning", running: false };
    case "failed":
      return { label: "Failed", tone: "danger", running: false };
    default:
      return { label: chat.sessionId ? "Idle" : "Not started", tone: "faint", running: false };
  }
}

/// "Oct 11, 14:05"; null for a time that does not parse.
export function when(iso: string | undefined): string | null {
  const at = iso ? Date.parse(iso) : Number.NaN;
  if (Number.isNaN(at)) return null;
  return new Date(at).toLocaleString("en", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hour12: false });
}

/// "just now", "5m ago", "3h ago", "2d ago"; null for a time that does not parse.
export function ago(iso: string | undefined, now = Date.now()): string | null {
  const at = iso ? Date.parse(iso) : Number.NaN;
  if (Number.isNaN(at)) return null;
  const minutes = Math.floor(Math.max(0, now - at) / 60_000);
  if (minutes < 1) return "just now";
  if (minutes < 60) return `${minutes}m ago`;
  const hours = Math.floor(minutes / 60);
  return hours < 24 ? `${hours}h ago` : `${Math.floor(hours / 24)}d ago`;
}

/// Subagents at work in a transcript (running or waiting on the user):
/// the rail icon's badge and the title strip's "N working".
export const working = (items: readonly TranscriptItem[]): number => counts(allTasks(items).map((row) => row.task)).working;

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.5latestNov 21, 2026>=2 <4174.6 KB5 permissionsListed
0.2.4Oct 25, 2026>=2 <4174.2 KB5 permissionsListed
0.2.3Oct 24, 2026>=2 <4165.4 KB5 permissionsListed
0.2.2Oct 23, 2026>=2 <4165 KB5 permissionsListed
0.2.1Oct 6, 2026>=2 <3111.8 KB5 permissionsListed
0.2.0Oct 5, 2026>=2 <3105.1 KB5 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.