mirror of
https://github.com/multipleof4/dsh-context-plugin.git
synced 2026-09-18 03:35:42 +00:00
main
DeepSeek Harness Context Plugin (dsh-context-plugin)
A dynamic Cordis plugin for DeepSeek Harness (DSH) that adds an interactive UI window to scan workspace files and ingest them directly into the active chat session as individual prompt turns.
Features
- Interactive UI Window:
- Rendered in
shell.overlaywith support for minimize and close. - Quick launcher button docked in
conversation.session.header.actions. - Button dynamically displays the active workspace root directory.
- Editable input override to type or change the workspace directory path.
- Rendered in
- Header Link Formatting:
- Configurable switch between standard Linux
file:///URIs and IDEvscode://file/URIs. - Link format:
[](file://<abs-path>).
- Configurable switch between standard Linux
- Dynamic Backtick Escaping:
- Dynamically calculates enclosing code fence backtick length (
\ge 3backticks) so files containing markdown or nested code fences never break the outer block.
- Dynamically calculates enclosing code fence backtick length (
- Binary / Non-Text File Detection:
- Inspects file extensions and scans the first 8 KB for null bytes (
\0). - Replaces binary contents with
*Binary file - content not displayed.*.
- Inspects file extensions and scans the first 8 KB for null bytes (
- Git & Ignore Rules:
- Always ignores
.git/across all directories. - Respects
.gitignoreand.dshignorerules from the workspace root (including negation!patterns). - Skips walking ignored directories entirely for performance.
- Always ignores
- Real-Time Progress Feedback:
- Live animated spinner and counter (
Reading 5/42...,Injecting 5/42...). - Visual progress bar.
- Interactive file selection checklist before ingestion.
- Live animated spinner and counter (
- Individual User Prompt Turns:
- Dispatches each file as an individual prompt turn into the chat session queue.
Prompt Turn Format
[`relative/path/to/file`](file:///absolute/path/to/workspace/relative/path/to/file)
```{extension}
{file_contents}
## Structure
- `src/host.js`: Node.js host-side plugin handling filesystem queries, ignore rule resolution, and binary checks.
- `src/client.js`: Browser client-side plugin rendering the floating overlay window and header action button in Cordis slots.
Description
Languages
JavaScript
100%