Introduction¶
In daily operations when handling archives within DeepSeek Harness (DSH), the common approach is to extract them to a directory, browse the Files tab, modify the text, and then manually repack. dsh-archive-sidebar integrates this workflow into the right sidebar: it opens sub-files without extracting, allows for in-place editing, and writes changes back directly to the archive. It is a client-side plugin maintained by gejx-gejingxuan, positioned as an archive manager within the DSH Web UI right sidebar.
The following introduces its capabilities, installation methods, typical workflows, and known limitations.
What is it¶
In short: It adds an “Archive” tab to the right sidebar of the DSH Web UI. You can browse zip / rar / 7z / tar / gz / bz2 / xz like native decompression software, preview and directly edit text files within them, open uncompressed sub-files as sidebar tabs, and hand them over to the system’s default programs when needed. When necessary, the AI of the current session can modify files on your behalf using the archive_* tools included with the plugin.
The plugin is a DSH bundle (Host plugin + Web client plugin), no build required: client.js is a hand-written __ModuleLoader__ bundle, and the Host side is pure Node ESM. The code uses the MIT License, current version 1.0.0.
Core Features¶
- Sidebar Parsing: Adds a new “Archive” tab; can be opened via the sidebar wizard, or by clicking a
.zip/.rar/.7zfile directly in the Files tab, at which point the plugin takes over the parsing. - Browsing: Lists all entries (directories prioritized, expandable/collapsible), displays the name and extracted size, and supports filtering by name at the top.
- Native Decompression Usage: Double-clicking an entry extracts it to the system temporary directory and opens it with a default program (Word / PDF reader / Image viewer, etc.); clicking opens a sidebar tab to preview that sub-file. The toolbar provides “Open with default”, “Extract this entry”, and “Show in folder”.
- Direct Opening of Sub-files: Clicking any entry opens a new tab in the right sidebar displaying that uncompressed sub-file. Text is previewed/edited with line numbers; images are previewed directly. For document types like doc/docx/xls/xlsx/ppt/pptx/pdf, it provides a one-click “Open with default” option and does not simulate Office in the sidebar.
- In-place Editing: You can toggle between preview and edit modes in the sub-file tab. The editor features synchronized line numbers, monospaced font, tab indentation,
Ctrl+Ssave, line break toggle, dirty state, and restore. Saving writes back to the archive immediately. - Direct Modification: Text entries are saved back to the original archive (in-place update, no separate copy). It also supports adding new entries, renaming entries, deleting entries, and adding files from disk.
- AI-assisted Modification: Located in the collapsible entry “Request AI modification…” at the bottom of the panel. Write a requirement and send it to the current session; the AI completes the modification using the
archive_*tools of this plugin. Daily operations can be performed using the panel itself without needing AI. - Extract / Create: Extract the entire archive or specific entries to a specified directory; pack a directory into a new zip / 7z / tar / gz / bz2 / xz.
The panel is drawn using Harness native sidebar components, uses theme tokens, and automatically follows the light/dark theme.
Installation and Enablement¶
The plugin does not require commands like dsh plugin add; it is installed via the Plugins page or plugin_manager.
- Adding via Plugins Page (Recommended): Open Harness Settings → Plugins → Add Plugin, select this repository directory (local clone) or enter the git address:
https://github.com/gejx-gejingxuan/dsh-archive-sidebar
- Letting the Agent Install: Ask the Agent to call the
install_bundlemethod of theplugin_managertool. Filltargetwith the absolute directory after cloning or the git address above (requires full-access permission or approval).
plugin_manager install_bundle --target https://github.com/gejx-gejingxuan/dsh-archive-sidebar
- After installation, if the page does not update automatically, refresh the page. Uninstallation is done by deleting this bundle in the Plugins page.
Requirements: Node.js ≥ 20. To read and write RAR on Windows, install WinRAR (default path C:\Program Files\WinRAR\).
Opening Archives¶
There are three entry points:
- The “+” at the top of the sidebar → the Archive card in the wizard.
- Clicking any archive file in the right sidebar Files tab.
- Directly entering the absolute path of the archive in the “Archive” tab, for example:
D:\data\site.zip
Supported Formats¶
| Format | Browse / Read | In-place Modify | Engine |
|---|---|---|---|
| zip / zipx | ✅ | ✅ | Bundled 7-Zip (bin/7za.exe) |
| 7z | ✅ | ✅ | Bundled 7-Zip |
| tar / gz / tgz / bz2 / xz / cab / iso / lzh / zst | ✅ (Read/Extract) | ❌ | Bundled 7-Zip |
| rar / rar5 | ✅ (Read/Extract) | ✅ (Write requires WinRAR’s Rar.exe) |
Local WinRAR (UnRAR.exe / Rar.exe) |
RAR extraction and writing depend on the local WinRAR installation. If not installed, RAR may still be readable by 7-Zip (7-Zip supports RAR extraction), but writing will indicate that it is unavailable.
Agent Tools¶
The plugin is registered as a global tool and can be used directly in any session:
| Tool | Purpose |
|---|---|
archive_list |
List archive entries |
archive_read |
Read a text entry |
archive_write |
Overwrite/Add text entry (mode: replace \| add) |
archive_add_file |
Add a file from disk to the archive (preserves original bytes) |
archive_rename |
Rename an entry in the archive |
archive_delete |
Delete an entry |
archive_extract |
Extract all or specific entries to a directory |
archive_create |
Pack a directory into a new archive |
Paths always use absolute paths, and entry names always use POSIX style, for example dir/file.txt.
Configuration¶
Generally, no changes are needed. You can override tool locations in the profile’s cordis.patch.yml, for example when 7-Zip or WinRAR are not in default locations:
- id: archive-sidebar
config:
sevenZip: 'D:\tools\7-Zip\7za.exe'
rar: 'D:\tools\WinRAR\Rar.exe'
unrar: 'D:\tools\WinRAR\UnRAR.exe'
Typical Workflow¶
After opening a zip, click site/config.yaml in the sidebar. A new tab opens in the right sidebar displaying the uncompressed text. Switch to edit mode, change a line, press Ctrl+S, and the plugin writes the changes back to the archive in-place, without creating temporary files or separate copies.
For documents like docx or pdf that are not simulated in the sidebar, click “Open with default”. The plugin extracts that entry to %TEMP%\dsh-archive-open\… and hands it to the system’s default program, leaving the archive itself unchanged.
If a batch of entries requires the same text replacement, you don’t need to edit them one by one manually: open “Request AI modification…” at the bottom of the panel, write a requirement, and the current session will call archive_list, archive_read, and archive_write to complete the modification.
Security and Limitations¶
- The panel requests go to
/api/dsh-archive/rpcand only accept authenticated browser connections, using the same validation as other Harness/apiroutes. - You can only operate on archives that already exist on the local file system. In-place updates are only allowed for zip / zipx / 7z / rar and validate entry names (rejecting
.., absolute paths, drive letters). - Single read limit: Text 4 MiB, Binary 8 MiB, marked as
truncatedif exceeded. - Modifications are in-place and do not preserve automatic backups; please backup important archives yourself before editing.
- Encrypted archives (passwords) are currently not supported.
- After the plugin is uninstalled, the registered tools and routes will be removed along with the Cordis effect.
Use Cases and Notes¶
Suitable for developers who frequently view and make small modifications to archive contents within the DSH Web UI: they don’t want to extract just to view a text file, nor do they want to repeatedly extract, modify, and re-compress for a single line change.
Two points to note: the plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license (MIT, see THIRD-PARTY-NOTICES.md for third-party binaries) before installing; since in-place editing does not create automatic backups, please backup important archives before making changes.
Directory Page: https://www.skillhub.cn/plugins/gejx-gejingxuan/dsh-archive-sidebar
GitHub: https://github.com/gejx-gejingxuan/dsh-archive-sidebar