Preface¶
In the “everything is a plugin” ecosystem of DSH, a plugin can fill in the development experience gaps missing from the Web GUI. dsh-workspace-search is designed for the DeepSeek Harness (dsh) web GUI, providing VS Code-style workspace keyword search and registering the search results page as a Search tab within dsh-better-sidebar.
Below, we introduce what it can do, how to install it, and the boundaries to consider during configuration.
Plugin Positioning¶
dsh-workspace-search is a dsh plugin used for keyword search within the current session’s workspace. The repository path is tsonglew/dsh-workspace-search.
The problem it solves is straightforward: in the dsh Web GUI, users want to search for file names and file contents as they would in an editor, and directly open the corresponding file from the results.
Core Features¶
Search File Names and File Contents¶
It supports keyword search across the session workspace, targeting:
- File names
- File contents
Results are grouped by file and display line numbers.
VS Code-Style Search Rules¶
It provides search rules similar to VS Code:
- Files to include: specify files to include using glob patterns
- Files to exclude: specify files to exclude using glob patterns
- Regular expression queries: support regex queries, which can be toggled on or off
- Case toggle: support toggling case sensitivity
Glob patterns are comma-separated and support **, *, ?, {a,b}.
Click Results to Open Files¶
Clicking on a match opens the file in the built-in editor within better-sidebar.
Default Exclusions and Truncation¶
By default, it skips some common directories and hidden files, including:
- Hidden files
.gitnode_modulesdistbuild.nexttarget- Other default exclusions
If the search process hits limits on the number of files, matches, or line length, the plugin reports this transparently as truncation.
Installation and Enablement¶
First, confirm that the runtime environment meets the dependency requirements:
@deepseek-ai/cordis >=4.0.1
@deepseek-ai/schemastery >=3.18.1
dsh-better-sidebar >=0.4.0
node >=22
Among these, dsh-better-sidebar >=0.4.0 exposes ctx.betterSidebar, which is a prerequisite for the plugin to register the Search tab into the sidebar.
In the working directory where the plugin path is located at ./plugins/dsh-workspace-search, execute:
dsh plugin --profile web add ./plugins/dsh-workspace-search
This command adds the plugin with the web profile.
Typical Usage¶
- Enter the Search tab provided by
dsh-better-sidebar. - Enter the keyword you want to find.
- If you need to narrow the scope, fill in files to include or files to exclude.
These fields use comma-separated glob patterns and support**,*,?,{a,b}. - If you need regex queries, enable regex query.
- If you need case-sensitive matching, toggle case.
- Review the results grouped by file along with line numbers, and click a match to open the file.
Optional Configuration¶
The following configuration fields are all optional:
- id: workspace-search
config:
maxFiles: 5000
maxMatches: 300
maxLineLength: 300
maxFileBytes: 1048576
These fields respectively limit the number of files, number of matches, single-line length, and file size during the search process.
How It Works¶
It uses a dual-end bundle:
- The host side registers the
/workspace-searchConnection RPC channel with a loopback trust fence. - The browser side registers the Search tab via
ctx.betterSidebar.registerTab.
Search results can be opened in the built-in editor within better-sidebar.
Applicable Scenarios and Considerations¶
Suitable for the following scenarios:
- Viewing text locations within the current session’s workspace in the dsh Web GUI.
- Needing to complete the “search, locate, open file” workflow within the sidebar.
- Wanting to use VS Code-style include/exclude, regex queries, and case toggling.
Points to note:
- This plugin runs with the permissions of the current dsh process. Before installation, review the source code, configuration, and license.
- The license is MIT.
- It requires
dsh-better-sidebar >=0.4.0; otherwise, the Search tab cannot be registered. - Search is constrained by limits on the number of files, matches, and line length; when these limits are reached, the results are reported as truncation.
Related Links¶
- GitHub: https://github.com/tsonglew/dsh-workspace-search
- Directory page: https://www.skillhub.cn/plugins/tsonglew/dsh-workspace-search