Introduction¶
When discussing code with models in DeepSeek Harness (DSH), it is often necessary to “bring” a specific file or directory into the current conversation’s input box. While manually typing @ in the input area and completing the path works, switching from the workspace structure visible in the right sidebar file tree to the input box to select a path breaks the flow. The community plugin dsh-files-to-chat (maintainer: ruaibeite, category: Client) targets this specific step: it adds right-click and multi-select functionality to the official right sidebar file tree rows, inserting files or folders as @ references into the current conversation draft, with support for batch insertion. It inserts the reference syntax itself without dumping file content into the context; the semantics are identical to using @ to select a file in the input box.
Below is an introduction to the plugin’s positioning, capabilities, installation, and typical usage, along with known limitations and usage notes.
What is this¶
dsh-files-to-chat (npm package name @ruaibeite/dsh-files-to-chat, version 0.2.4 in current materials) is a client-side plugin for DSH that mounts on the official dsh-client-ui-sidebar-files file tree related slots. It does not replace the official file tree but enhances interaction at the row level: context menus, ⌘/Ctrl and Shift multi-selection, and header quick chips. Ultimately, it writes @path into the current conversation input box via the conversation input machine’s insertReference or equivalent paths.
The DSH ecosystem emphasizes “everything is a plugin”; the plugin directory page is at skillhub.cn, and the source code and documentation are on GitHub. This directory is a community site and is not officially affiliated with DeepSeek or High-Flyer.
Core Features¶
Right-click and Menus¶
Right-clicking on a file row or folder row in the file tree reveals options such as “Add to Chat,” “Open with Default App,” “Show in File Manager,” and “Copy Path.” For folder rows, the “open” type text changes to “Open Folder” or “Show in Parent Directory.” A normal left-click does not change the original official behavior (opening files, expanding directories) but only clears the multi-selection state maintained by this plugin.
“Open / Show in File Manager” utilizes the official open-in-app host capability (the same session remote namespace as the file tree header’s “Open With”). The plugin itself does not spawn shell processes. The host uses canOpenWorkspacePath() for a tri-state probe: the entire menu group is hidden only when the host explicitly responds with “unsupported”; if the probe fails or does not respond, the menu remains visible, and the host handles the click on the spot.
Multi-selection and Batch Insertion¶
| Action | Result |
|---|---|
| ⌘/Ctrl + Click | Adds or removes the row from the selection (does not open the file) |
| Shift + Click | Extends the selection from the last selected row to the current row |
| Right-click on selected rows | The menu changes to “Add selected N items to Chat” and “Copy N paths” |
| Header chip | Appears in the file tree header when there is a selection; click to insert, × to clear selection |
| Escape | Closes the menu; clears selection if the menu is not open |
“Open” is not available in multi-selection state (launching multiple applications at once is meaningless).
Form of Inserted Content¶
The inserted content is the @ reference syntax, equivalent to selecting a file via @ autocomplete in the input box:
- Paths within the workspace are in relative form, e.g.,
@iwcc/iwcc.sql; - Paths outside the workspace retain absolute paths;
- Paths containing spaces use closing quotes, e.g.,
@"my docs/a b.md",@"ba docs/".
According to the design of dsh-file-reference, @path is merely text in the prompt and does not attach file content; the model still needs to read it via file tools. Folder references only insert @dir/ and are not expanded into a list of files within the directory.
Insertion Path and Fallback¶
The plugin prioritizes the inputActions distributed by the Session scope and falls back to the conversation input machine within the conversation scope if missing. For the reference form, it prioritizes calling insertReference (the official atomic reference chip); if that fails, it attempts the event slash/input-insert-reference; if that fails again, it degrades to insertText plain text, with semantics consistent with the chip. During insertion, it uses draftRev for CAS: if the draft is modified or busy, the reference text is copied to the clipboard with a prompt to avoid silent loss. Upon success, focus returns to the input box, with the cursor placed after the inserted reference.
Installation and Enablement¶
Install from the marketplace or GitHub (commands from the project README):
dsh plugin --profile desktop add github:ruaibeite/dsh-files-to-chat
Install from a local directory:
./install.sh # Installs to desktop profile by default
PROFILE_NAME=web ./install.sh # Installs to other profiles
Restart the Harness after installation is complete (browser-side loading follows session guidance; simply refreshing the page is not enough). To verify if it is mounted:
dsh --profile desktop --dump-config | grep -A2 files-to-chat
The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and the MIT license on GitHub before installation to assess whether to include it in your work environment.
Typical Usage¶
The basic workflow can be summarized as:
Right-click any file/folder → Add to Chat → An @path reference appears in the draft
⌘/Ctrl+Click to multi-select → Right-click → Add selected N items
- Open the file tree corresponding to the conversation in the right sidebar, right-click the target file, and select “Add to Chat”.
- When multiple paths are needed, use ⌘/Ctrl or Shift to multi-select several rows, then right-click to select “Add selected N items to Chat”, or click the header chip to insert all at once.
- Before sending the message, the model side must still use tools to read the file pointed to by
@; large files will not enter the context directly just by adding a reference.
Applicable Scenarios and Notes¶
Who it is for: Developers who frequently use the right sidebar file tree in DSH desktop (desktop profile) to browse the workspace and want to write paths into the conversation with less typing.
Known Limitations (from README):
- Only enhances the file and folder rows of the official file tree;
othertypes (sockets, device files, etc.) have no menu, and right-clicking still shows the system menu. - Multi-selection state is stored in the plugin’s memory; switching tabs, refreshing the tree, or changing conversations will clear it.
- Depends on the official row DOM contract (
data-files-entry,data-files-path,data-files-root); if DSH changes these attributes, right-click enhancements may silently fail. - For remote paths or others that cannot be mapped to the local machine, “Open / Show in File Manager” may be rejected by the host, and the plugin will display the error code returned by the host.
On the development side, you can run node test/mention.mjs to verify path relativization, @ reference syntax, and batch construction. The client entry is the handwritten pre-built module client/client.js; simply restart the Harness after making changes, no additional packaging steps are required.
Conclusion¶
dsh-files-to-chat streamlines the “file tree to conversation input” process into a few steps of right-clicking and multi-selection, aligning with the official @ reference semantics without attaching file content. If you are already using the DSH right sidebar file tree, you can install it via the commands above and try it after restarting.