When using DeepSeek Harness (DSH) in Web mode, the settings panel often contains many sections and options. Locating a specific setting in long lists requires multiple page scrolls. The dsh-settings-search-plugin adds a search entry to the settings panel and provides an independent candidate list, helping you quickly locate the target section and focus on the specific setting.
Plugin Overview¶
This is a browser-only plugin. It adds a search field to the DSH Web settings panel. While typing, it covers the content column with an independent candidate list. Clicking a candidate navigates to its section and focuses the corresponding setting.
Installation and Enablement¶
Mount the plugin into the Web configuration file by following these steps:
- Clone the repository and install dependencies
git clone https://github.com/DoiiarX/dsh-settings-search-plugin
cd dsh-settings-search-plugin
pnpm install
Note: The built lib/ output is committed, and peer dependencies are provided by the harness runtime.
- Edit the configuration file
Edit$HOME/.dsh/profiles/web/package.jsonand add underdependencies:
"@doiiarx/dsh-settings-search-plugin": "link:<绝对路径到该目录>"
Also add under dsh.profile.bundles:
"@doiiarx/dsh-settings-search-plugin"
- Install dependencies and restart
Runpnpm installin the Web configuration directory, then restart the Web process. Verify that the search field appears in the settings panel.
Core Features¶
- Search Entry and Independent List
Adds a search input box to the settings panel. After entering text, an independent candidate list is displayed above the content column. - Navigation and Focus
After clicking a candidate, the browser automatically navigates to the section containing that setting, scrolls to the corresponding item, and highlights its outline. - Index Building Mechanism
The plugin builds the search index using three approaches:- Slot Ledger (Declarative): Reads the injected
slotsservice. All registeredsettings.sectionentries are candidates, whether or not they have been visited. - Registration Surface (Optional Enhancement): Plugins can call the global interface to register more detailed item-level data.
- Rendered-DOM Scan (Visited Sections): Observes the DOM of opened sections and extracts headings and text to generate item-level candidates.
- Slot Ledger (Declarative): Reads the injected
- Registration Surface Support
The plugin provides a global objectwindow.__DSH_SETTINGS_SEARCH__, allowing other settings plugins to register item-level search entries, including custom keywords anddata-settings-itemanchors.
Typical Usage¶
If you need to register a search entry in a settings plugin, you can call the following in the client’s apply method:
window.__DSH_SETTINGS_SEARCH__?.register('local-shell-tools', {
label: 'Shell',
keywords: 'shell 终端 命令 cmd bash powershell pwsh 语言环境',
items: [
{
id: 'bashLang',
label: '语言环境',
desc: '写入 LANG 与 LC_ALL',
keywords: '语言 locale lang 环境'
},
],
})
Notes¶
- Browser-side Runtime: This plugin runs only in the browser environment and does not involve settings namespaces or model tools, so configuring
WEB_SETTINGS_NAMESPACESand rebuilding the host are not required. - Index Limitation for Unvisited Sections: For sections that the user has never opened and that are not registered by a plugin, search returns only section names (tab-level) and cannot provide specific item-level candidates.
- Matching Logic: Candidate text is normalized only; no stemming or pinyin matching is performed, and fuzzy recall is not supported.
- Overlay Behavior: The search overlay is page-local, and its size is measured when installed. If a theme changes the width of the navigation bar or content after the dialog is mounted, the settings panel may need to be reopened to recalculate the size.