Preface¶
In DSH (DeepSeek Harness), the common approaches for letting an agent “search for images online” involve the model either constructing URLs itself or writing files directly into the workspace. The former often results in retrieving thumbnails, watermarked stock images, or files that cannot be downloaded at all; the latter lacks a “review before deciding which ones to keep” stage. This article introduces the community plugin dsh-search-picture (maintained by tuanzi0v0). It splits the workflow into two distinct tools—searching, clarity filtering, and saving to the system album—ensuring that no files appear in your album until you have explicitly confirmed them.
What is this¶
dsh-search-picture is a network-enabled utility plugin for DSH. You can find the GitHub repository at tuanzi0v0/dsh-search-picture, and the SkillHub directory page at plugins/tuanzi0v0/dsh-search-picture.
In short: The agent calls tools to search across multiple sources and downloads them to a preview area, reading the images into the context for you to choose. Once you confirm the selection by index, it calls a second tool to tile-flatten copy the selected items to a fixed album directory under the system Pictures folder.
Two-Step Workflow¶
The workflow is strictly two steps, which is crucial:
- You say “Help me find a few pictures of XX,” and the agent calls
search_picture: It concurrently queries multiple key-free image sources, filters and sorts by rules, downloads to the preview area, submits the images to the model as attachments, and explains the source and retention recommendation for each image. - You say “I’m satisfied with #1 and #3,” and the agent calls
save_pictures: It writes only the specified indices or filenames to the album; the rest can be deleted from the preview area.
Nothing will appear in your album before you confirm it.
Directory Conventions¶
The division of labor for preview and album paths is as follows (Windows example as described in the README):
downloads/ Download root directory (configured 'directory'), holds only the preview area
└── .staging/<batch id>/ Preview area: candidates land here first
├── STAGING.md Batch manifest (resolution/source/direct link)
└── query-01.jpg Candidate files
%USERPROFILE%\Pictures\dsh-search-picture\ Album: images are tile-flattened, no subfolders created
├── query-01.jpg
└── query-03.jpg
The album is a fixed directory with tile-flattened images; the folder parameter is deprecated. The write operation is a copy, not a move, so confirmed images remain in the preview area. Duplicate names in the album will automatically append -2, -3, avoiding overwriting existing files. Before a new search begins, the previous batch’s preview is cleared by default (disable with autoCleanPreview: false); the current batch will not be deleted.
The album is located outside the workspace. If the session sandbox defaults to workspace-write, writing to the album requires a one-time approval to broaden access to full access (a pop-up confirmation will appear under the ask policy).
Core Features (Documented)¶
| Component | Behavior Summary |
|---|---|
| Search Engines | Concurrently queries Bing Images, Baidu Images, 360 Images, Bilibili Text-Image (column illustrations and text-image galleries, excluding video covers), and deduplicates by image address. |
| Related Sites | Moegirlpedia is enabled by default (relatedSites), using opensearch to find entries and generator=images to fetch images; biligame is optional and disabled by default (WAF often returns HTTP 567). |
| Official Websites | Disabled by default (enable with officialSite: true); README testing indicates official homepage images are mostly event key visuals, creating significant noise for “specific character” queries. |
| Image Boards | Optional Safebooru (tags parameter): Tags are English romaji connected by underscores; Chinese/natural language queries will not use this source. |
| Zhihu Preference | Does not connect directly to Zhihu (frequent 403/401); instead, hits zhimg.com via engines like Baidu and fetches from the image host, marking them as hotlinkFriendly. |
| Watermarks | No visual model used; deterministic rules filter before download based on a domain blacklist (appendable via watermarkHosts) and URL/filenames containing watermark, 水印, etc. |
| Clarity | Default threshold is approx. 720p (921600 px²); after download, area, long edge, and aspect ratio are verified against decoded dimensions, eliminating failures. |
| Display | Images enter model context; the Client side renders a thumbnail gallery and “Save Results” card (tool cards are collapsed by default). |
Tool Parameters¶
search_picture (Search to Preview Area)¶
| Parameter | Required | Description |
|---|---|---|
query |
Yes | Image content description, Chinese or English. |
count |
No | Number of images; defaults to config count, cannot exceed configured value. |
page |
No | Result page number (starts at 0). |
tags |
No | Safebooru tags, underscore-connected, space-separated for multiple; do not fill for pure Chinese queries. |
Returns previewFolder, targetFolder (album path), path/width/height/hotlinkFriendly for each image, as well as the image blocks themselves.
save_pictures (Write to Album After Confirmation)¶
| Parameter | Required | Description |
|---|---|---|
keep |
Yes | Indices to keep (e.g., "2", "#5") or filenames. |
discard |
No | Images not wanted; deleted from preview area. |
previewFolder / sourceFolder |
No | Preview area or download root; defaults to config and current batch. |
The README is explicit: Call save_pictures only after the user has explicitly expressed satisfaction.
Installation and Activation¶
It is recommended to install the tarball from Releases (the latest direct link always points to the newest version). In DSH, use the Plugin Manager (GUI Plugins page or plugin_manager in Creator mode):
plugin_manager action: install_bundle target: https://github.com/tuanzi0v0/dsh-search-picture/releases/latest/download/dsh-search-picture-0.4.9.tgz
You can also point to the repository (requires git ls-remote reachability from your machine):
plugin_manager action: install_bundle target: https://github.com/tuanzi0v0/dsh-search-picture
Restart DSH after installation to activate. Command line equivalent example (for developer local directories, profile depends on your environment):
dsh plugin --profile desktop add "$(pwd)"
The plugin runs with the permissions of the current DSH process; please review the repository source code and the MIT License before installation.
Configuration¶
Override in the profile’s cordis.patch.yml by plugin id (the patch replaces the entire config, so all keys you want to change must be written). Example data fragment:
- id: dsh-search-picture
name: dsh-search-picture
config:
directory: downloads # Download root (preview area); relative paths resolved against session workspace
count: 6 # Default number of images per request
For other keys (such as officialSite, relatedSites, watermarkHosts, autoCleanPreview, etc.), please refer to the “Configuration” section in the repository README.
Typical Usage¶
- Describe the need in conversation, e.g., “Help me find a few high-res images of [Character Name], no obvious watermarks.”
- The agent calls
search_picture. You view the thumbnails and descriptions in the reply, and ask the agent to turn thepageif necessary. - Reply with “Keep #1 and #3,” and the agent calls
save_pictureswith the corresponding indices inkeep. - When looking for large artist-specific/doujin images, add Safebooru
tags(English tag format) to suitable queries; do not forcetagson pure Chinese queries.
Use Cases and Notes¶
- Suitable for: Writers needing illustrations, organizing reference images, scenarios wanting “look before save” with final files going to the system album rather than scattered workspace directories.
- Boundaries: Cannot universally recognize in-image watermarks; official site sources do not guarantee hitting “specific characters”; Bilibili searches have anonymous rate limits, with backoff retries implemented in the plugin.
- Ecosystem: The DSH community plugin directory (like SkillHub) is maintained by the community and has no official affiliation with DeepSeek or Hidream.
Conclusion¶
dsh-search-picture turns online image search into a fixed flow of “Preview → Confirm → Tile-Flatten into Album,” centrally handling multi-engine merging, clarity thresholds, and authorization issues for writing outside the workspace. Directories and packages: