Introduction¶
In DeepSeek Harness (DSH), handling file attachments often requires manually copying paths or relying on native attachment mechanisms, making the process cumbersome. The DragView plugin listens for drag-and-drop events, injects local files directly into the chat interface, and generates structured Codex-style attachment cards. It supports secure preview, opening with the system app, and two modes: path resolution or file copying.
Plugin Overview¶
The plugin is maintained by user anzhaohao and has the package name dsh-dragview. It addresses the needs of quickly onboarding files, previewing non-image content, and securely accessing local file paths in agent development scenarios.
Core Features¶
DragView provides the following capabilities:
* Drag-and-drop interaction: Drag a local file into the chat interface; after release, the behavior is determined by the configuration.
* Card rendering: Generates a 280×64 px Codex-style attachment card, displaying the file name, size, and type.
* Preview mechanism: Supports secure preview for PDFs, audio/video, and text files (text is limited to 10 MB, displaying the first 1 MB).
* System Open: Click the card or press Enter/Space to open Office documents, archives, and unknown files with the default system application.
* Path resolution: Uses Windows Everything CLI, macOS Spotlight, and Linux plocate/locate for path location.
* Image handling: Images do not go through this plugin and retain the platform’s native attachment channel.
Installation and Configuration¶
The plugin can be installed via the official command.
dsh plugin add dsh-dragview
After installation, add a drag-file section in DSH settings for configuration.
Modes and Usage¶
The plugin supports two working modes. Switch between them in the drag-file section of the settings; restart to apply.
resolve mode (default)¶
After a file is dropped, it resolves the real absolute path and does not copy the original file. It is suitable for referencing existing files in the workspace.
copy mode¶
After a file is dropped, it copies the bytes directly into the workspace. It is suitable for files outside the workspace and ensures stable model reading.
Steps¶
- Drag a local file into the chat interface.
- When released, display a “Copy” or “Reference” hint based on the mode.
- View the generated Codex-style card in the attachment bar of the input box.
- Click the card or press Enter/Space to preview or open it with the system.
- When sending the message, file references will be appended to the content, one
@"<absolute path>"per line.
Security and Boundaries¶
The plugin applies multi-layered security controls for file access:
* Opaque ID: After each successful resolution or copy, the host generates a short-lived, opaque fileId, and all subsequent operations must be checked against this ID.
* Path validation: The write process rejects symlinks/junctions at each level and revalidates after creation to prevent path escape.
* Sandboxed preview: Text preview responses are forced to text/plain and include CSP to prevent active content execution.
* Error prompts: A prompt is shown when path resolution fails or capability validation does not pass; it does not fail silently.
Notes¶
copymode can only write to the workspace that is authoritatively bound to the current session in the workspace registry.- The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation.
- Images do not go through this plugin and retain the platform’s native attachment channel.
Related Links¶
- GitHub repository: anzhaohao/DragView
- Plugin directory: anzhaohao/DragView