jinhuang712/dsh-survey3

dsh-survey

DeepSeek Harness 的问卷式调查插件:支持 do_a_survey 工具一次性提问多个问题,提供四种展示模式及提交后对比

AI 分析

核心用途是允许 Agent 通过结构化问卷(单选、多选、简答等)一次性收集用户反馈。适合需要高效收集用户意图、减少多轮对话交互的场景。

套件
dsh-survey
版本
1.1.2
授權
MIT
最近更新
2026年8月16日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jinhuang712/dsh-survey

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",
      "header": "Runtime",
      "question": "Which runtime does this ship on?",
      "options": [
        { "label": "Node 20 LTS (recommended)", "description": "Matches the CI base image." },
        { "label": "Bun 1.1", "description": "Faster boot, fewer native addons." }
      ]
    },
    { "id": "q2", "header": "Scope", "question": "Which surfaces need the rewrite?", "multi_select": true, "options": [{ "label": "Web client" }, { "label": "CLI" }] },
    { "id": "q3", "kind": "boolean", "question": "Ship behind a flag first?" },
    { "id": "q4", "header": "Notes", "question": "Anything the changelog should call out?" }
  ]
}

header is an optional short heading shown beside the question number. A trailing (recommended) on a label becomes a badge.

Question types

TypeTriggerUIAnswer
Singleoptions + no multi_selectNumbered rows (1 / 2 / 3)The chosen option's label
Multioptions + multi_select: trueCheckboxEvery chosen label, in option order
Yes/Nokind: "boolean"Radio pair; segmented toggle in grid (omit options)"yes" or "no"
Comparekind: "compare" + compare: {left: {title,text}, right: {title,text}}Side-by-side blocks (overlay recommended)"left" or "right"
Openno options, not boolean/compareMulti-line inputEmpty selected, body in custom

Each answer is { id, selected, custom?, skipped? }. Question ids must be unique within one survey, and a survey nobody submits within 30 minutes fails on timeout rather than hanging the call.

Features

  • Full Markdown — question text, option labels/descriptions, compare blocks and 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
    • every card is the same size, controls sit under the question, per-card skip
    • card text is inline-only: a fenced block collapses to inline code and hard breaks to spaces, so one long question cannot blow open the whole matrix
    • compare questions degrade to a left/right choice
  • Readable recap — strict two-column grid, one "question → answer" row each
  • Follows your language — card copy ships in English and Chinese, tracking the Web UI's language setting
    • falls back to the browser's language where that setting is unavailable
    • answers stay language-neutral, so switching never changes what the model receives
  • Accessibility — radio/checkbox semantics + keyboard focus rings