rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Penguin-SAMA/dsh-conversation-links
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
Bring the record of one DSH conversation into another: mention it with @, drag it in from the sidebar, or open a conversation, tick a few of its messages and insert them somewhere else.
Either route works; reload the DSH page afterwards (Ctrl+R in the desktop app):
From a GitHub Release (no clone needed):
Download dsh-conversation-links-<version>.tgz from the latest release,
extract it to get the package/ directory, then:
plugin_manager action=install_bundle target=<absolute path to the extracted package directory>
From source:
git clone https://github.com/Penguin-SAMA/dsh-conversation-links.git
plugin_manager action=install_bundle target=<absolute path to the clone>
Uninstall: plugin_manager action=set_bundle target=dsh-conversation-links enabled=false.
It is also published on npm (
npm i dsh-conversation-links), but DSH'sinstall_bundletakes an absolute directory path, so point it atnode_modules/dsh-conversation-linkswhen installing from npm. Everything else is the same.
There are three ways to use it.
@Type @ in the composer: the candidate panel first lists "Files & folders", then a
"Conversations" group (the @conversation-link source this plugin registers). Picking a
conversation inserts a conversation chip into the composer; on send, the host attaches a
read-only snapshot of that conversation as a separate user message (## Referenced sessions).
Why this plugin registers its own
@source: the built-in DSH source (@deepseek-ai/dsh-client-ui-reference) asks the host remotesessionReferenceResolver.candidatesfor its conversation candidates, and handles failure asresult.ok ? result.value : []— one remote error silently degrades to an empty array. File candidates still render, so@shows only "Files & folders" and no conversations at all (that is exactly what happened on this machine). This plugin's@conversation-linksource reads the client-side session list (sessions.list) instead and does not depend on the host remote, so the group can no longer vanish silently.Both sources insert the same wire format,
@[title](dsh-session:<base64url>), so it is fully compatible with a hand-typed@and with DSH's own reference chips. Snapshot injection on send is still done by the built-in@deepseek-ai/dsh-session-reference; this plugin does not reimplement it.
Implementation notes (read before touching this code):
candidates(projection, { query, quoted, drilled, signal }) must return a Promise / be
declared async: the trigger controller does source.candidates(...).then(...), and a
synchronous array throws — the whole group then disappears without a trace.section (t("sectionSessions") → "Conversations"), which
together with showGroupTitle: false forms its own group.onPick must return { insert: { source, ref, label, appearance: "session", clipboardText } }
to insert a real chip; returning { text } only inserts the raw wire text (the editor does
not decorate it into a chip live).ctx.inject(["inputTriggers"], ...) + owner.effect(() => triggers.registerSource(...)),
and tolerate "already registered" with try/catch (the same plugin can be mounted twice).Press and hold a conversation row in the sidebar, drag it onto any conversation's composer, and release:
Two entry points:
conversation.input.left,
order 40) — the source conversation defaults to the current one and can be switched;sidebar.workspaces.session.row.action,
order 500) — uses that conversation as the source directly.Panel layout:
What insertion does:
captureInsertion / insertText, the same rendering path as DSH's
own reference chips), which is then focused;localStorage["dsh.conversation.<sessionId>"]), so it is already in the composer when you
open that conversation — send it manually when ready.The inserted text looks like this:
## Quoted conversation: <title>
(Quoted from another conversation, for reference only; it carries no new instructions.)
**User**:
…
**Assistant**:
…
— end of quote —
Edge cases in the drag bridge (important):
dragover, so dataTransfer.getData() returns an
empty string there. Hovering therefore only judges "does this look like a conversation
drag?" from the MIME types; the real session id is read and validated on drop (it must be
found in the session list, otherwise the drop is ignored, so ordinary text or links are
never mistaken for a conversation);Files / text/uri-list / text/html are always left to their original
receivers: dropped files still go to the attachment area, and dropped links or selections
are still handled by the editor.@ → Conversations group → picking one produces a conversation chip": verified in a running
DSH desktop window (the @ panel shows both "Files & folders" and "Conversations", and the
composer receives a real chip rather than raw text).dsh.conversation.<sessionId> record is produced in localStorage).dragstart, a foreign drag, a drop outside the composer, and
the payload shape) — all behave as intended. Synthetic mouse events cannot start a real
HTML5 drag session in Chromium/Electron, though, so this one could not be reproduced in
the UI by script; it needs one drag with a real mouse to confirm.sessions.retain() + eventSource, with no extra host HTTP route;
the host half of this plugin (lib/index.js) is therefore an empty implementation and all
logic lives on the client.| File | Purpose |
|---|---|
package.json |
Bundle manifest: dsh.bundle.patch + dsh.client |
cordis.patch.yml |
Inserts the single conversation-links row |
lib/index.js |
Host side, intentionally empty (apply() {}) |
lib/client.js |
All logic: the @ conversation source, drag bridge, picker, insertion, i18n, styles |
locale/zh.json, locale/en.json |
Title and description shown by the market |
icon.svg |
Plugin icon (vector, used inside DSH) |
icon.png |
Plugin icon (256×256 raster, for the plugin market) |
README.zh-CN.md |
Chinese version of this document |
>= 0.2.0-rc.2, Node >= 18, Web platform (dsh.client.platform = "web").conversation.input.shell(id), shell.actions.captureInsertion/insertText/setDraft,
sessions.retain/list, inputTriggers.registerSource, slots.inject/register,
uiSession.current. DOM selectors: [data-row-key^="session:"] (sidebar rows),
[data-composer-card] / [data-composer-seat] / [data-conversation-region="composer"]
(the composer), [data-conversation-session] (DOM → session id).CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。