Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
andrewkchanPublic archive

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

bb-plugin-monaco

Deprecated. This plugin has been upstreamed into BB as a builtin (get-bb/bb#2127). Recent BB versions ship the Monaco editor out of the box, so there is no need to install this plugin. It is no longer maintained.

Opens files in BB using Monaco, the editor from VS Code, instead of BB's read-only file preview.

It applies everywhere BB opens a file: links clicked in chat, the secondary panel's file search, and bb thread open.

The Monaco editor in BB's secondary panel, with the file tree open above it: a filter box, the project tree expanded to reveal the open packages/process-utils/src/index.ts, and the file bar showing that path with reload and tree-toggle buttons.

Features

  • Edit and save. ⌘S writes the file. If it changed on disk since you opened it — often because the agent edited it — the save stops and offers Reload or Overwrite rather than clobbering the change.
  • Find in file with ⌘F, plus Monaco's usual editing: multiple cursors, block selection, bracket matching, code folding.
  • Syntax highlighting for ~86 common file types.
  • File tree. Toggle it from the file bar to browse the project, filter by path, expand and collapse directories, and jump to another file. It opens with the current file revealed. Right-click any row to copy its absolute path, relative path, or filename.
  • Quick palette commands. Open BB's quick palette (⌘⇧P) and type "fold", "sort", or "copy" to reach fold level 1–5, fold recursively, unfold all, unfold recursively, unfold at cursor, sort selected lines ascending/descending, and copy the path / relative path of the current file — the sort rows appear only when you have a multi-line selection. They act on the Monaco tab you last worked in, and need a BB with the commandPaletteAction slot (get-bb/bb#2270); on older builds the rows are simply absent.
  • Follows your theme, including light/dark switches and custom palettes.

Install

npm install
bb plugin install .

bb plugin dev rebuilds and reloads on every save while you work on it.

Requires a BB with a working fileOpener slot (get-bb/bb#2026).

Which files it opens

The plugin claims the extensions listed in lib/languages.ts — common code, config, and text formats. Binaries like png and pdf are left to BB's own preview, which renders them properly.

To change any file type back, use Settings → File openers, which offers Automatic, BB's built-in preview, or Monaco per extension. Right-clicking a file link also offers a one-off "Open with…".

Roadmap

  • Language intelligence. There is no language server, so no go-to-definition, find-references, or type checking. Monaco ships a TypeScript checker, but it can only see the one open file, so every import looks unresolved — it is switched off rather than showing errors that are wrong.
  • File operations. The tree is read-only; renaming, creating, and deleting files are not implemented yet.
  • Hidden files and node_modules never appear in the tree. BB's path listing excludes them and offers no way to ask for them (get-bb/bb#2093).
  • Opening a file from the tree reuses the current tab, so the tab title keeps naming the file it was opened with. A plugin cannot ask BB to open a file or retitle its tab (get-bb/bb#2102).
  • No "open in editor" button like BB's preview has; that capability is not available to plugins.
  • Thread-storage files on a remote machine fail to open.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages