Official

tabs

The tabbed detail pane beside the chat: files to edit and diffs (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/tabs@0.2.7

Permissions in 0.2.7

  • Read files fs.readMediumReads files in the listed places.Open workspace files in tabsPlaces: the open workspace
  • Write files fs.writeMediumCreates, changes and deletes files in the listed places.Save the files edited in tabsPlaces: the open workspace
  • Read chats chats.readMediumReads your transcripts and chat lists.Reload the open files when an agent finishes a turn, and find the folders of the workspaces whose files the tabs follow
  • Read git status and diffs git.readLowReads git status and diffs.Read a file's changes for a diff tab dragged from Source Control or brought back after a restart

Files

visible.ts1.6 KB
// Which tab is visible, for the divergence/tabs service's activeChanged.
// The tabs on screen are each the one its pane shows, as their views last
// drew: a tab coming on screen is the visible one, and the last going leaves
// none (a chat took its pane, or it closed).
import { activeTab } from "./tabs.ts";
import type { Tab, TabsState } from "./tabs.ts";
import type { TabRef } from "./controller.ts";

export const refOf = (tab: Tab): TabRef => ({ kind: tab.kind, path: tab.path, workspaceId: tab.workspaceId });

export function makeVisible(state: TabsState) {
  // The service handle is set after the views register; until a provider
  // handle exists there is nobody to tell.
  let emit: ((tab: TabRef | null) => void) | undefined;
  const announce = (tab: Tab | undefined) => {
    emit?.(tab ? refOf(tab) : null);
  };
  const onScreen = new Set<string>();
  // A runtime before `visible` never says a tab is on screen: closing then
  // announces the tab the strip falls back to, as it always did.
  let reportsVisible = false;
  const visible = (tab: Tab, shown: boolean) => {
    if (shown === onScreen.has(tab.id)) return;
    if (shown) {
      reportsVisible = true;
      onScreen.add(tab.id);
      state.active = tab.id;
      announce(tab);
      return;
    }
    onScreen.delete(tab.id);
    if (!onScreen.size) announce(undefined);
  };
  const forget = (id: string) => {
    if (onScreen.delete(id) && !onScreen.size) announce(undefined);
  };
  const closed = () => {
    if (!reportsVisible) announce(activeTab(state));
  };
  const setEmit = (next: typeof emit) => {
    emit = next;
  };
  return { announce, visible, forget, closed, setEmit };
}

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.7latestNov 21, 2026>=5 <635.3 KB4 permissionsListed
0.2.6Nov 11, 2026>=5 <635 KB4 permissionsListed
0.2.5Nov 11, 2026>=5 <634.9 KB4 permissionsListed
0.2.4Nov 9, 2026>=5 <630 KB4 permissionsListed
0.2.3Oct 27, 2026>=2 <422 KB4 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.