Repository navigation
@whybebabo/dsh-code-nav v0.1.1
@whybebabo/dsh-code-nav v0.1.1
Fork of AnakinCao/dsh-code-nav at commit 0d34d27.
Published to npm as @whybebabo/dsh-code-nav@0.1.1.
dsh plugin --profile desktop add @whybebabo/dsh-code-navAdded
-
Selection → add to conversation — selecting code in the preview floats
the same "Add to conversation" button the better-sidebar built-in viewers
show, inserting the selection into the session composer as a fenced block
headed byrelative/path:start[-end](the built-in payload shape; over 500
characters inserts the path line only).Taking the preview over used to lose this affordance entirely: the plugin
registers withpriority: 10, so the built-inTextEditornever mounts,
and the popup lives insideTextEditoronly — thebetterSidebarservice
exposes no selection, popup or draft API.
Notes
- Line numbers come from the rendered line containers and the text from the
per-line code column, so theuser-select: nonegutter never leaks into the
payload; a selection ending exactly at the next line start narrows the span. - The insert prefers the official
captureInsertion()/insertText()(one
undo step, reference chips preserved, refuses without touching the draft
while the composer is busy) and falls back tosetDrafton older hosts. - Dismissal follows better-sidebar's contract: outside mousedown, Escape,
hidden document, blur, scroll, surface leaving the viewport. - The registration id in
lib/client.jsis now injected frompackage.jsonby
scripts/build.mjs— client-modules keys its module table by the full package
name, so the scoped rename required it. ⚠️ Do not install alongside the upstreamdsh-code-nav: both register the
viewer iddsh-code-nav:outline.
The upstream change is open as AnakinCao/dsh-code-nav#1;
if it merges and upstream publishes, prefer the upstream package.