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

Permissions in 0.2.8

  • 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, and its Close Chat and Reopen Closed Chat for Cmd+W and Cmd+Shift+T on a chat's only tab
  • 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

views/find.tsx2.6 KB
// The Find in Chat bar (`../find.ts`): glass over the transcript's top right corner, holding the field, where the
// reader is among the matches, the two steps and close.
import type { Element, KeyEvent, SubmitEvent, ValueEvent } from "divergence";
import type { ChatView } from "../controller.ts";
import { chatHits, closeFind, positionOf, search, step } from "../find.ts";
import { RAISED, row } from "./styles.tsx";

/** The bar is a field and its controls wide; a narrow pane gives it less. */
const WIDTH = 340;

export function renderFindBar(v: ChatView, chatId: string): Element | null {
  const c = v.controller;
  const t = c.transcript(chatId);
  const find = t.find;
  if (!find) return null;
  const hits = chatHits(c, t);
  // Where the reader is among the matches; only how many there are while they are on none (the match they were on
  // went with a rewritten reply, or the matches came in with older messages after they typed).
  const at = positionOf(hits, find.current);
  const count = !find.query
    ? ""
    : !hits.length
      ? "No results"
      : at >= 0
        ? `${at + 1} of ${hits.length}`
        : `${hits.length} ${hits.length === 1 ? "result" : "results"}`;
  const close = () => {
    closeFind(c, chatId);
    v.ctx.run(c.views.focus(`prompt-${chatId}`));
  };
  return (
    <div
      {...row}
      id={`find-bar-${chatId}`}
      position="absolute"
      top="small"
      right="medium"
      width={WIDTH}
      maxWidth="90%"
      gap={2}
      padding={4}
      background="card/40"
      backdrop={{ blur: 6 }}
      borderRadius="md"
      {...RAISED}
    >
      <div {...row} flexGrow={1} flexShrink={1} minWidth={0}>
        <input
          id={`find-${chatId}`}
          value={find.query}
          ghost
          placeholder="Find in chat"
          keys={["escape"]}
          onKey={(event: KeyEvent) => {
            if (event.key === "escape") close();
          }}
          onChange={(event: ValueEvent<string>) => search(c, chatId, event.value)}
          onSubmit={(event: SubmitEvent) => step(c, chatId, event.shift ? 1 : -1)}
        />
      </div>
      {count ? <text style="body" size="xs" tone="muted" text={count} /> : null}
      <button id={`find-older-${chatId}`} icon="chevron-up" variant="ghost" small disabled={!hits.length} tooltip="Older match" onClick={() => step(c, chatId, -1)} />
      <button id={`find-newer-${chatId}`} icon="chevron-down" variant="ghost" small disabled={!hits.length} tooltip="Newer match" onClick={() => step(c, chatId, 1)} />
      <button id={`find-close-${chatId}`} icon="x" variant="ghost" small tooltip="Close" onClick={close} />
    </div>
  );
}

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.