Back to home

jinhuang712

dsh-survey

问卷式批量提问插件 for DeepSeek Harness:一次性问 10+ 题(单选/多选/是否 toggle/对比题/开放题),可跳过、全屏浮层、提交后对半 recap

Stars
0
Language
JavaScript
Created
Aug 13, 2026
Updated
Aug 14, 2026
Skills
GitHub repo

Introduction

dsh-survey

Questionnaire-style questioning & survey plugin for DeepSeek Harness — the do_a_survey tool asks 1 to 10+ questions in one go, rendered as a survey and submitted together.

license dsh-plugin 中文

SingleMultiYes/NoCompareOpen
RadioCheckboxCompact toggleSide-by-side blocksMulti-line input

When the model calls do_a_survey, the Web UI renders the survey by mode: compact single-question card / inline embedded column / fullscreen overlay for compare / grid matrix for many simple questions. All text supports Markdown (code blocks, blockquotes, inline code, bold) and color ({color:red}text{/color}); a readable two-column recap is shown after submit.

Preview

Grid matrix — fullscreen overlay for many simple questions, one card each:

Grid matrix mode

Inline — survey embedded in the conversation column, filled and submitted together:

Inline mode

Overlay compare — fullscreen side-by-side comparison with Markdown & color:

Overlay compare mode

Compact — single-question card with rich question types:

Compact mode

Install

Bundle plugin (recommended, resident) — build artifacts are committed, one-line install:

dsh plugin --profile web add "github:jinhuang712/dsh-survey#main"
# restart dsh web, then refresh the page

Local directory install (when you have the source):

git clone https://github.com/jinhuang712/dsh-survey.git
cd dsh-survey
dsh plugin --profile web add .
# restart dsh web, then refresh the page

After install, the do_a_survey tool and its survey UI are available permanently. The companion skill dsh-survey registers with the install (dsh.skills declaration): it documents usage and ships a dynamic-plugin fallback recipe (references/dynamic-plugin-fallback.md) for environments without the bundle.

Usage

Tell the model what you want to collect; it calls do_a_survey(mode, questions). mode is required:

modeWhenPresentation
"compact"Exactly 1 questionCompact single-question card
"inline"Multiple questions, no compareEmbedded in the conversation column
"overlay"Compare questions or wide canvasFullscreen overlay (1180px)
"grid"Many simple questions (yes/no, single)Fullscreen grid matrix, one card each

Example:

{
  "mode": "inline",
  "questions": [
    { "id": "q1", "question": "Your **OS**?", "options": [{ "label": "macOS" }, { "label": "Linux" }] },
    { "id": "q2", "question": "Which question types?", "multi_select": true, "options": [{ "label": "Single" }, { "label": "Compare" }] },
    { "id": "q3", "kind": "boolean", "question": "Auto-save progress?" },
    { "id": "q4", "question": "Other feedback:" }
  ]
}

Question types

TypeTriggerUI
Singleoptions + no multi_selectRadio
Multioptions + multi_select: trueCheckbox
Yes/Nokind: "boolean"Compact toggle (omit options)
Comparekind: "compare" + compare: {left: {title,text}, right: {title,text}}Side-by-side blocks (overlay recommended)
Openno options, not boolean/compareMulti-line input

Features

  • Full Markdown — question text, option labels/descriptions, compare blocks, recap all render through the official safe renderer (micromark + protocol allowlist + shiki highlighting): code blocks, blockquotes, inline code, bold
  • Color{color:red}text{/color} (named / #hex / rgb()), usable in questions, options, compare blocks
  • Skip / restore — per-question ✕ grays out, ↺ restores; submitted as skipped: true
  • Fullscreen overlaymode: "overlay" centers fullscreen (mask + 1180px), breaking past the 748px conversation column
  • Grid matrixmode: "grid" fullscreen grid of many simple questions: equal-height cards, bottom-aligned toggles, per-card skip; compare questions degrade to left/right choice
  • Readable recap — strict two-column grid, one "question → answer" row each
  • Accessibility — radio/checkbox semantics + keyboard focus rings

Architecture

  • Host half (lib/index.mjs): Cordis entry — defineTool registers do_a_survey; webServer.register serves /api/dsh-survey/submit|cancel; execute suspends on the answer (exec.callId correlation, exec.signal abort cleanup)
  • Client half (lib/client.js): __ModuleLoader__.load bundle registering tool.call.toolview key=do_a_survey; four modes (compact/inline/overlay/grid) + Markdown & color rendering + fetch submit
  • Skill (skills/dsh-survey/SKILL.md): usage guide + dynamic-plugin fallback recipe (references/dynamic-plugin-fallback.md)

Verify

  • After install, __DSH_BOOT__ should include the dsh-survey client row; /plugins/dsh-survey/client.js returns 200
  • cordis_inspect_query (Tool.listTools) should show do_a_survey
  • Run a 4-6 question survey (with markdown + color text) and check all four modes

Uninstall

  • Remove the dsh-survey insert row from the web profile's cordis.patch.yml
  • Remove the dsh-survey dependency from the web profile's dsh.profile.bundles and run pnpm remove

License

MIT