When configuring a provider using DeepSeek Harness (DSH), going to the “Settings > Models” page and clicking “Get Available Models” opens a dialog that lists all models supported by the provider, with one checkbox per line. The default interface only provides two actions: “Cancel” and “Add Selected.” When facing hundreds or thousands of model options, unchecking them one by one is time-consuming and error-prone. The following section introduces a plugin that solves this tedious operation issue.
Plugin Purpose¶
This is a pure client-side plugin developed by Townrain. Its core function is to add an “Unselect All” button to the bottom action bar of the “Get Available Models” dialog, on the left side of the “Cancel” button. With this button, users can clear all selected model checkboxes with one click, avoiding manual operation.
Core Features¶
- New action button: The plugin uses a DOM observer to monitor the loading of the dialog, anchors to the “Add Selected” button, clones its style, and inserts a visually consistent “Unselect All” button on the left.
- React state synchronization: After clicking the button, the plugin iterates through all model checkboxes in the dialog and unchecks them, while triggering the native
changeevent for each checkbox. This ensures that the React-controlled state remains synchronized with the UI view, so that the “Add Selected” action ultimately selects no models. - Language follow: The button text supports Chinese and English localization and automatically follows the language setting of the “Cancel” button.
Installation and Enablement¶
Run the following command in your terminal to install the plugin:
dsh plugin --profile web add github:dsh-fetch-models-unselect-all
After installation, restart the dsh web process and perform a hard refresh in the browser (Ctrl+Shift+R or Cmd+Shift+R) to load the new client code.
Typical Usage¶
After installing and restarting the service, click “Get Available Models” on the DSH model settings page. In the dialog, an “Unselect All” button appears on the left side of the action bar. Clicking this button clears all model checkboxes, and the state updates immediately.
Use Cases and Notes¶
- Use cases: Suitable for users who frequently need to bulk reset model selection lists, or for scenarios where custom providers require quickly clearing the list.
- Technical limitations:
- This dialog does not have an official plugin slot, so the button is implemented by anchoring to the DOM structure (the “Add Selected” button).
- This means that if DSH redesigns the settings form in the future, the anchor logic may need to be updated to maintain compatibility.
- No side effects: The plugin does not involve host code, RPC calls, settings read/write, or session events, and leaves no residual code or side effects when uninstalled.
This tool significantly reduces the operational cost of managing model lists through minimal client-side changes, making the configuration workflow more efficient.