Preface¶
In DeepSeek Harness (DSH), a common way to supplement model context is by using @ to reference files or conversation segments. However, if the content is still on the clipboard, or if you have just selected a code snippet in Monaco, switching to a reference panel often adds unnecessary steps. The dsh-context-picker, maintained by starstorm-ai in the DSH community, takes a different approach: without modifying the Harness source code or replacing built-in file/session @ sources, it pops up an extensible inline selector when you type @ in the chat input box, turning the selected content into atomic ref chips that can be mixed with the main text.
What is this¶
dsh-context-picker is a standalone DSH Bundle for DeepSeek Harness (an inline context picker using the Provider architecture). It is maintained by starstorm-ai; the current public version is v0.1.0, licensed under MIT. Repository: github.com/starstorm-ai/dsh-context-picker; Community Directory Page: dsh-context-picker on skillhub.cn (marked as installable, with no official affiliation with GitHub).
Core Features¶
After typing @, you can pick candidates from the following sources (subject to the English README in the repository):
- Clipboard Text
- Clipboard Images
- Recent user/AI messages from the current DSH session
- Context registered by other plugins, such as the current Monaco selection provided by the installed
dsh-file-manager
Upon selection, it appears in the input box as an atomic ref chip, which can be mixed with regular text; what is submitted to the Host is a snapshot reference, rather than uploading the clipboard immediately when the menu opens.
Clipboard and Security Boundary: The web side reads the clipboard via the operating system’s Clipboard API, so candidates may originate from copy operations in other applications or processes; their appearance is still subject to browser policies such as HTTPS/local security context, page focus, and user authorization. When the candidate menu is open, the content is only temporarily stored in browser memory; only after the user confirms the selection does the plugin hand the snapshot over to the DSH Host, and the send action waits for the snapshot persistence to complete.
Extension Mechanism: Context source plugins implement the public dsh-context-picker/provider contract and can register with ctx.contextPicker; they do not depend on the composer’s internal implementation, ref syntax, storage, or model message assembly details. For architecture and Provider contracts, see docs/architecture.md in the repository, and for Chinese descriptions, see README.zh.md.
Data and Default Limits (can be overridden in Bundle configuration, config items are located in cordis.patch.yml):
- Text snapshots default to a maximum of 256 KiB UTF-8
- A single direct user message defaults to expanding a maximum of 12 different refs
- Recent messages default to displaying 12 entries (direct user messages and AI messages, excluding plugin-synthesized context)
- Images undergo validation, normalization, and content-addressed storage via DSH
ctx.attachments, along with message volume limits - Snapshot directory:
$DSH_HOME/context-picker/v1/snapshots, with the ID being the SHA-256 of the normalized snapshot
Installation and Activation¶
The community directory page shows that this plugin is installable and the version is v0.1.0. The fetched materials and README do not provide a one-line installation command like dsh plugin add …; for installation steps, please refer to the SkillHub Directory Page and the repository’s README.zh.md.
If you need to participate in development or local debugging from source, the repository’s Development section uses the pnpm workflow (Node engine requirements see package.json: ^22.19.0 || >=24.0.0, package manager pnpm@11.7.0). pnpm dev will start the Web Profile using the isolated .tmp/dsh-home within the repository; release builds and testing methods are consistent with standalone Bundles like dsh-file-manager. This text does not expand on clone steps; for complete commands, see the GitHub README.
Typical Usage¶
End User: Using @ in the Input Box¶
- Type
@in the DSH chat input box. - Select clipboard text/images, recent session messages, or selection-based candidates provided by other plugins (such as file-manager) from the pop-up menu.
- After confirming, a ref chip appears in the input box; continue editing the main text and send; the send path will wait for the selected snapshot to persist.
Plugin Author: Registering a ContextPickerProvider¶
Third-party web plugins rely on the dsh-context-picker/provider type and mount the Provider to ctx.contextPicker. The following example comes from the repository’s Chinese README, showing how to return immutable candidates:
import type { ContextPickerProvider } from 'dsh-context-picker/provider'
import type {} from 'dsh-context-picker/client'
const provider: ContextPickerProvider = {
id: 'my-editor',
label: 'My Editor selection',
candidates(sessionId, { query, signal }) {
signal.throwIfAborted()
return [{
key: 'active-selection',
revision: 'buffer-v42',
label: 'Current selection',
content: { type: 'text', text: 'selected text', language: 'typescript' },
appearance: 'file',
}]
},
}
ctx.inject(['contextPicker'], (scope) => {
scope.effect(() => scope.contextPicker.registerProvider(provider))
})
The Provider is only responsible for listing candidates; it does not need to implement the input box, ref URI, Host storage, or model message format. For lifecycle and boundaries, see docs/architecture.md.
Scenarios and Notes¶
Who is it for
- Developers who frequently paste screenshots, log snippets, or externally copied text in DSH and want to select them once with
@to turn them into referenceable chips. - Maintainers who already use or plan to write Web-side DSH plugins and need to “contribute” editor selections, panel content, etc., into the unified
@menu (e.g., in conjunction withdsh-file-manager).
Please be aware before use
- The plugin runs with the permissions of the current DSH process; before installation, please review the source code and the MIT license yourself, and confirm there are no expected conflicts with existing Bundles (including built-in
@references). - Clipboard reading is subject to browser and system policy restrictions; if permission is denied, the corresponding candidates will not appear, but other Providers will still function normally.
- Default limits and the
$DSH_HOMEsnapshot path are listed above; if you need to relax these in a production environment, you should modifycordis.patch.ymlor Bundle override items after understanding the costs of storage and message expansion.
Conclusion¶
dsh-context-picker adds extensible inline context selection while preserving DSH’s original @ file/session capabilities: clipboard, recent messages, and candidates contributed by other plugins all eventually become atomic refs that can be mixed with the main text. For directory and version information, see SkillHub; for implementation details and the Provider SDK, see the GitHub Repository.