DSH 0.1.6-alpha.2 ships a right-Sidebar terminal and a right-Sidebar browser of its own. Both were things this plugin had built from scratch, so keeping them meant two implementations of one surface plus a plugin that shadows a host type the product is actively developing. Terminal: the plugin's whole PTY stack goes — the UI-tab manager, the agent-owned registry, the lazy node-pty loader, the eight model-facing terminal_* tools, the xterm view and its font/link/scrollback helpers, and the cross-session 'pinned terminal' rail that existed only to keep a terminal alive across a session switch. The host's terminal kind becomes the only provider, which also retires the node-pty dependency, its pnpm allowBuilds entry, and the installer's -Repair mode (issue #140's whole class of 'node-pty failed to load' support). Model-facing capability note: the plugin used to inject terminal_* tools (off by default). Those are the model's only cross-call persistent terminal, and DSH's own equivalent (@deepseek-ai/dsh-tool-terminal) is not mounted by any shipped bundle, so removing them leaves the model with the one-shot bash/pwsh tools only. That is the accepted cost of not maintaining a second PTY surface; the README documents how to enable the upstream toolset. Browser: the plugin's browser tab type is dropped, so the host's own browser kind owns embedded pages. The DOM-level link takeover STAYS (it is the only thing that can route an https link to the system browser by protocol, which the host does not do) but now delegates to the host's browser tab via ctx.sidebarRight.openTab('browser', …) with a window.open fallback, and the two settings that only ever configured the plugin's own iframe (sandbox escape hatch, loopback allowlist) go with it — along with the host-side browser.probe route they fed. Cards: the empty-pane welcome cards adopt the host's guide-capsule recipe (0.5px l4 hairline, 24px radius, layer-1 fill, 56px floor, 14px/20px padding) so the plugin's 'pick what opens here' surface reads as the same design as DSH's own. A theme.spec guard pins the geometry and the token-only paint — including that the upstream-only --dsw-alias-bg-l1/-l2 spellings (defined nowhere, so their declarations are silently dropped upstream) never appear here. Also drops the dead state the removed features left behind (SidebarTab.pin, nextTerminal, agentWaits, bottomOpenedOnce, the agent-tab helpers, the pinned-tab memo key), re-points every test fixture that used them at surviving equivalents, and prunes the specs of the deleted features.
43 lines
2.2 KiB
YAML
43 lines
2.2 KiB
YAML
# dsh-better-sidebar bundle patch
|
|
#
|
|
# This file is the `dsh.bundle.patch` layer of the published npm package: when
|
|
# the plugin is installed through the official CLI —
|
|
#
|
|
# dsh plugin --profile <name> add dsh-better-sidebar@<version>
|
|
#
|
|
# — the command reconciles `dsh.profile.bundles` against installed packages
|
|
# and, seeing this declaration, appends `dsh-better-sidebar` to the bundle
|
|
# stack. The profile boot then merges THIS patch (a single `insert` of the
|
|
# plugin row) exactly like the manual cordis.patch.yml mount line used
|
|
# before. No profile file edits needed — one command installs and mounts.
|
|
#
|
|
# If the profile still carries the old manual mount line in its own
|
|
# cordis.patch.yml, remove it before switching to the bundle channel to
|
|
# avoid double-mounting (two Node halves, two sidebars).
|
|
#
|
|
# The `config.shell` / `config.shellArgs` rows are gone with the plugin's own
|
|
# terminal (DSH 0.1.6 ships its own right-Sidebar terminal, and its shell is
|
|
# chosen from the shell menu there):
|
|
#
|
|
# - insert:
|
|
# - id: better-sidebar
|
|
# name: 'dsh-better-sidebar'
|
|
#
|
|
# Aggregate double-mount guard: aggregate bundles (e.g. @linxin666/dsh-web-ui-all)
|
|
# may already mount this package under their own entry id (e.g.
|
|
# `web-ui-better-sidebar`). Two mounts register /sidebar/api twice and fail the
|
|
# whole plugin tree at boot ("duplicate prefix route"). The `!!js` disabled
|
|
# expression backs THIS row off when another *enabled* entry already mounts
|
|
# `dsh-better-sidebar`; the aggregate instance then owns the sidebar. The
|
|
# loader evaluates it when this row is processed (entry-list order, only rows
|
|
# before this one are visible), so the aggregate bundle must precede this one
|
|
# in `dsh.profile.bundles` — the standard install order, since `dsh plugin add`
|
|
# appends new bundles last. The reverse order (this bundle before the
|
|
# aggregate) is a known limitation: the guard cannot see rows that come after
|
|
# it, and no runtime singleton guard is added. Same-id manual duplicates still
|
|
# fail loudly at the loader as before.
|
|
- insert:
|
|
- id: better-sidebar
|
|
name: 'dsh-better-sidebar'
|
|
disabled: !!js "[...ctx.loader.entries()].some((e) => e.options.name === 'dsh-better-sidebar' && e.options.id !== 'better-sidebar' && !e.disabled)"
|