How witherwithwinter/dsh-codinput works
DSH-Codinput is a DeepSeek Harness web plugin that replaces the chat composer with a CodeMirror-based input surface. The principal workflow is user input through the normal, floating, or sidebar-mounted surface, with slash/mention menus and attachments, then submission through the host’s conversation machinery. The graph also covers documented model/permission controls, usage statistics, and settings. Some feature links rely on the README because their implementations were not sampled; uncertain internal wiring is omitted.
Main entry points: CodinputSurface.tsx Composer surface · index.tsx Plugin entry · settings.tsx Settings section · CodinputBar.tsx Input modes
Components 21
Host integration
- Plugin entry
src/client/index.tsx - Host services
src/client/services.ts - Composer slot
src/client/components/CodinputBar.tsx - Sidebar input
src/client/sideinput.ts - Settings section
src/client/settings.tsx
Composer experience
- Input modes
src/client/components/CodinputBar.tsx - Composer surface
src/client/components/CodinputSurface.tsx - Editor
src/client/cm.ts - Markdown preview
src/client/components/CodinputSurface.tsx
Input controls
- Attachments
src/client/attachments.ts - Slash and mention
src/client/triggers.ts - Candidate menu
src/client/components/SlashMenu.tsx - Model selection
src/client/modeldir.ts - Permission presets
src/client/permission.ts - Codinput command
src/client/command.ts
Preferences and insight
- Preferences
src/client/prefs.ts - Usage statistics
src/client/stats.ts - Stats display
src/client/components/StatsRow.tsx - Host localization
src/client/i18n.ts
Other components
- User
- DSH host
Connections 31
- User → Plugin entry: activates plugin
- Plugin entry → Host services: installs services
- Plugin entry → Composer slot: registers composer
- Plugin entry → Settings section: registers settings
- Plugin entry → Codinput command: registers command
- Plugin entry → DSH host: injects host APIs
- DSH host → Host services: provides services
- DSH host → Composer slot: provides slot
- DSH host → Sidebar input: hosts sidebar tab
- User → Sidebar input: opens Codinput tab
- Sidebar input → Plugin entry: signals carried input
- Composer slot → Input modes: mounts input modes
- Input modes → Composer surface: renders surface
- Composer surface → Editor: edits draft
- Composer surface → Markdown preview: renders preview
- Composer surface → Attachments: manages attachments
- Composer surface → Slash and mention: tracks triggers
- Composer surface → Model selection: selects model
- Composer surface → Permission presets: selects permission
- Slash and mention → Candidate menu: supplies candidates
- Candidate menu → DSH host: uses host menu chain
- Composer surface → DSH host: submits conversation
- Codinput command → DSH host: dispatches command
- Settings section → Preferences: updates preferences
- Input modes → Preferences: reads mode
- Composer surface → Stats display: renders usage
- Stats display → Usage statistics: formats statistics
- Usage statistics → DSH host: reads session data
- Host services → Host localization: installs locale
- Composer surface → Host localization: uses translations
- Settings section → Host localization: uses translations