Skip to content
dsh.fish
Bundle

@zhangsan5213/dsh-right_sidebar

Dual-face dsh web plugin: five-column AppFrame, right-side Git workspace tree, Source Control, and a bottom multi-terminal dock

Source
zhangsan5213
License
MIT
Updated
Updated 8 days ago

Readme

# dsh-right_sidebar

A dual-face [dsh](https://github.com/deepseek-ai/deepseek-harness) web plugin that replaces the built-in three-column layout with a **five-column frame** and adds a right-side Git workspace file tree with Content/Diff preview.

- Host half mounts a dedicated Connection RPC channel (`/workspace-files`) using `ctx.connection.rpc.handle`
- Browser half provides the five-column `root` frame (`sidebar | center | file preview | files | details`), `ctx.layout`, the theme presenter, and the file-tree/preview slots
- File tree shows porcelain Git status badges, a changes-only filter, refresh, and per-file Content / Diff tabs
- Source Control view: staged/unstaged groups, stage / unstage / stage-all / unstage-all, and commit
- Bottom terminal dock: multiple PTY tabs, prompt output, input, and session close/kill
- No `/api` method-table change

## Requirements

- dsh `0.1.0-rc.5` or later (tested on `0.1.0-rc.5` and `0.1.0-rc.6`)
- A `web` profile

## Install from a GitHub Release tarball

Download the `.tgz` from the latest release, then:

```bash
dsh plugin --profile web add ./zhangsan5213-dsh-right_sidebar-0.1.0.tgz
dsh web
```

`dsh plugin` detects the package's `dsh.bundle` declaration and activates its patch layer automatically; do not hand-edit the profile patch.

> pnpm may print peer-dependency warnings during `dsh plugin add`. This is expected: those peers are supplied by the installed dsh bundles and resolve at boot from the dsh installation, not from the profile's `node_modules`.

## Install directly from git

The repository commits the built `lib/` artifacts, so no `prepare` script or `allowBuilds` permission is needed:

```bash
dsh plugin --profile web add github:zhangsan5213/dsh-right_sidebar#main
dsh web
```

Pin a commit (`#<sha>`) for reproducible installs.

## Source Control

Open the right rail's Source Control icon (the branch glyph below Files). The panel groups the Git porcelain snapshot into Staged Changes and Changes. Stage individual files or all files, unstage them, and commit staged changes with the message box. Clicking a file opens it in the existing Diff preview.

Mutations are loopback-only (`/scm` channel) and are limited to `git add`, `git reset`, and `git commit`. Discard, push, and pull are intentionally not exposed.

## Terminal

Open the terminal icon at the bottom of the collapsed right rail. The first open creates one PTY session in the current workspace; use the `+` button for additional tabs. Input is forwarded to the Host shell, output is polled through the loopback `/terminal` RPC channel, and each tab can be closed independently.

Current version: the dock is a real bottom grid row, so opening it squeezes the conversation/composer upward instead of covering them. Opening the dock auto-creates a terminal when none exist, and closing the last terminal hides the dock. Drag the top edge to resize the panel (double-click resets to 280px); xterm refits after resize and keeps a stable 80-column PTY width for full-screen commands. The PTY row count is still fixed until the subprocess seam exposes a terminal resize verb.

## What the bundle patch does

The package owns the full frame, so its `cordis.patch.yml`:

1. disables the in-box `ui-layout` row, and
2. inserts `@zhangsan5213/dsh-right_sidebar` as one dual-face row.

`ui-sidebar` and `ui-conversation` keep working because this package provides the same `ctx.layout` service and registers the same `root` slot.

## Development

```bash
pnpm install
pnpm run build
pnpm pack --pack-destination dist
```

## Discoverability

- Add the [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic to your plugin repository for discoverability.

## Compatibility note

Because this bundle replaces the layout owner, upstream changes to `ui-layout` are not picked up automatically. If the five-column slots are merged upstream, this package can be simplified to a thin file-tree bundle that no longer disables `ui-layout`.

Install

dsh plugin --profile web add github:zhangsan5213/dsh-right_sidebar

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source