Introduction¶
When working on projects in a DSH Web session, it is often necessary to view files in the current workspace and make minor modifications. lak321/dsh-filetree is a plugin combo for the DSH Web interface that provides project viewing, opening, and editing capabilities, adding file browsing and an editor to the session view.
What is this¶
lak321/dsh-filetree is a DSH plugin combo maintained by lak321 and licensed under the MIT license. Its goal is to provide directory viewing, file opening, file editing, and saving capabilities for the current workspace (project) within the DSH Web session view.
Core Features¶
The main capabilities of this plugin are introduced below:
- Add a “Files” tab to the DSH Web session view.
- Display the full directory tree of the current workspace (project).
- Support expanding/collapsing all subfolders and following the current workspace switch.
- Click any file to view its contents.
- Support direct modification and saving to disk.
- Provide a VSCode-style editor, including C/C++ syntax highlighting, line numbers, tab indentation and auto-indentation on Enter, status bar, dark theme, and transparent scrollbar.
Installation and Enabling¶
In the installation command, replace <commit> with the latest commit hash from the repository homepage.
dsh plugin --profile web add "github:lak321/dsh-filetree#<commit>&path:/"
Restart DSH after installation:
npx -y @deepseek-ai/dsh web
The old method of manually copying host/ + client/ and injecting cordis.patch.yml is deprecated, replaced by bundle stack installation.
Typical Usage¶
Use the following steps:
- Open the DSH Web interface and enter any session.
- Click the top “Files” tab, which is located after “Conversation / Trajectory”.
- The current project directory tree is displayed on the left; click
▸to expand folders, and click a file to open it on the right. - Click “Save” after editing; click “Close” when you need to close the editor.
Development and Debugging Notes¶
If you need to integrate or modify this in similar DSH client plugins, note the following constraints:
- Client plugins must export
exports.inject(dependency list, e.g.,["slots"]), otherwisectx.slotsis unavailable:
exports.inject = ["slots"];
client.jsfollows the formatwindow.__ModuleLoader__.load({ id, factory }), whererequire("react")is used insidefactory, andexports.apply/exports.injectare exported.- If replacing a single slot, you must use a lower priority:
priority: -1
Otherwise, the loader will report already has a registration at priority 0.
Applicable Scenarios and Notes¶
Suitable for scenarios where you need to view current workspace files, open, edit, and save files in a DSH Web session. Since this plugin provides file viewing and saving to disk capabilities and runs with the current dsh process permissions, you should check the source code and MIT license before installation to ensure it is from a trusted source.
Conclusion¶
lak321/dsh-filetree completes the file viewing, opening, editing, and saving workflow for the current project in DSH Web sessions. Repository address: