rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:dsh-plugins/dsh-file-drop-attachments
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A persistent DSH Web plugin that keeps native image previews and renders non-image drops as file attachments.
~/.dsh/file-drop-attachments/ and are explicitly marked 副本 in the card and [附件副本] in model text.%DSH_HOME%\file-drop-attachments\image-cache\... instead of repeated image bytes; the alias is a hard link to %DSH_HOME%\attachments\v1\objects\... when supported, and images in the unresolved current request suffix remain native image content.Verified against both client-runtime generations:
0.1.0-rc.6 (web profile): the composer was a <textarea> inside [data-input-scroll].0.1.2-rc.1 (desktop profile): the composer is a contenteditable Lexical editor inside the same region, and the send affordance is the primary-action button. Opening a card uses remote.session.openWorkspacePath, falling back to the older workspaces.openPath.sessionId is a standard prop of session-scoped slots in both generations — dsh-client-web-react set it explicitly in 0.1.0, and dsh-client-ui-session's builtin source provides props: ["sessionId"] in 0.1.2. The plugin also passes it through its own inject(sessionId), which spreads the same value and survives a runtime that stops providing it.
inputActions.setDraft is not a text edit: the host clears the draft, rebuilds it, and parks the caret at the end. Running that rewrite during an IME composition commits the pre-edit text and selects it, so the next keystroke replaces the character the user just typed. Every plugin-owned draft write therefore goes through the composition gate:
whenIdle for bookkeeping writes (the sentinel that keeps the send affordance live).whenSettled for the submit-time write, which also re-checks at fire time so a composition opening in between is never written into.Cmd/Ctrl+Enter keeps the composer's own submit mode; the plugin only folds the attachment lines in and lets the composer send.The repository ships the prebuilt client bundle, so a GitHub source install is enough. One command installs the plugin and mounts it into the profile:
dsh plugin --profile web add github:dsh-plugins/dsh-file-drop-attachments
The command forwards to pnpm inside the profile directory and then reconciles dsh.profile.bundles against the installed state. This package declares dsh.bundle.patch (cordis.patch.yml), so the resolved dependency joins the bundle stack and the profile boot mounts it — no profile file is edited by hand. Restart DSH Web afterwards so the Host and Client plugin graph is rebuilt.
To install a local checkout while developing:
git clone https://github.com/dsh-plugins/dsh-file-drop-attachments.git
dsh plugin --profile web add file:./dsh-file-drop-attachments
To remove it:
dsh plugin --profile web remove dsh-file-drop-attachments-persisted
Earlier revisions were mounted by hand: a link: dependency in the web profile plus a file-drop-attachments insert row in the profile's own cordis.patch.yml. Delete that insert row, then switch to the bundle channel — with the manual row still present the plugin mounts twice (two Host halves, two composer rails):
dsh plugin --profile web remove dsh-file-drop-attachments-persisted
dsh plugin --profile web add github:dsh-plugins/dsh-file-drop-attachments
For a machine without git access, unpack the repository anywhere and run the bundled installer. It copies the files under $DSH_HOME/plugins, links that copy from the web profile, registers it in dsh.profile.bundles, drops a legacy hand-written mount row if one is present, and then runs the profile's package manager:
powershell -ExecutionPolicy Bypass -File ./install.ps1
Restart DSH Web afterwards, exactly as with the dsh plugin path. Add -NoInstall when the dependency is already linked and only the files and the profile registration need refreshing.
The host and client sources live in src/index.ts and src/client.ts and are
checked with TypeScript's strict mode. Install the development dependencies with
npm ci, then use:
npm run typecheck
npm test
npm test builds before running the Node regression tests. npm run build
regenerates lib/index.js and lib/client.js; commit those outputs with source
changes. The compiled files remain checked in so GitHub and offline installs do
not need TypeScript or a build step. The existing package exports and DSH bundle
configuration continue to point to lib/.
The client is intentionally a classic script registered with
window.__ModuleLoader__, not an ES module. Its React dependencies are supplied
by DSH at runtime; the React packages in development dependencies contain types
only. Do not add runtime imports or exports to src/client.ts.
CI checks strict types, regression tests, and that the committed lib/ outputs
match the sources. The optional test/cdp-drop-verify.mjs script needs a running
DSH browser session and is not part of the isolated Node test suite.
GPL-3.0-only. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。