追问卡片 userinputrequired

字段说明

字段必填说明
------:----:------
id请求 ID,提交时回传
toolCallId关联工具调用 ID
title卡片标题
description副标题说明
mode交互模式:single / multiple / text / number / date / toggle / wizard
options选项列表 [{id, label, description?, recommended?}]
allowCustom是否允许自定义输入
maxSelectionsmultiple 最多可选数
submitLabel按钮文案
questionswizard 分步题目列表

单选 single

{
  "id": "ask_001",
  "toolCallId": "call_001",
  "title": "请选择执行方式",
  "description": "这是单选卡演示",
  "mode": "single",
  "options": [
    { "id": "safe", "label": "先分析", "description": "只阅读和给出方案", "recommended": true },
    { "id": "implement", "label": "直接实现", "description": "开始修改当前项目" }
  ],
  "submitLabel": "确认"
}
┌───────────────────────────────────┐
│ 💬 请选择执行方式                   │
│    这是单选卡演示                   │
│                                   │
│  ◉ 先分析 ⭐         ← 推荐高亮    │
│    只阅读和给出方案                 │
│  ○ 直接实现                        │
│    开始修改当前项目                 │
│                                   │
│           [ 确认 ]                 │
└───────────────────────────────────┘

多选 multiple

{
  "id": "ask_002",
  "toolCallId": "call_002",
  "title": "请选择要生成的内容",
  "mode": "multiple",
  "options": [
    { "id": "summary", "label": "项目摘要", "recommended": true },
    { "id": "tasks", "label": "待办清单" },
    { "id": "risks", "label": "风险提示" }
  ],
  "allowCustom": true,
  "submitLabel": "开始生成"
}
┌───────────────────────────────────┐
│ 💬 请选择要生成的内容               │
│                                   │
│  ☑ 项目摘要 ⭐       ← 选中高亮    │
│  ☑ 待办清单                       │
│  ☐ 风险提示                       │
│                                   │
│  其他: [_______________]           │
│                                   │
│         [ 开始生成 ]               │
└───────────────────────────────────┘

文本 text

{
  "id": "ask_003",
  "toolCallId": "call_003",
  "title": "请描述你想要的功能",
  "mode": "text",
  "submitLabel": "提交"
}
┌───────────────────────────────────┐
│ 💬 请描述你想要的功能               │
│                                   │
│  ┌─────────────────────────────┐  │
│  │ 在这里输入...                │  │
│  │                             │  │
│  └─────────────────────────────┘  │
│                                   │
│           [ 提交 ]                 │
└───────────────────────────────────┘

分步问卷 wizard

{
  "id": "ask_004",
  "toolCallId": "call_004",
  "title": "商户画像构建",
  "mode": "wizard",
  "submitLabel": "确认提交",
  "questions": [
    {
      "id": "style",
      "title": "希望呈现什么形象?",
      "mode": "multiple",
      "maxSelections": 2,
      "options": [
        { "id": "healthy", "label": "有机健康" },
        { "id": "fashion", "label": "时尚打卡" },
        { "id": "light", "label": "轻生活方式" }
      ]
    },
    {
      "id": "audience",
      "title": "主要面向哪些客群?",
      "mode": "multiple",
      "maxSelections": 2,
      "options": [
        { "id": "office", "label": "周边白领" },
        { "id": "family", "label": "家庭客群" }
      ]
    },
    {
      "id": "note",
      "title": "还有需要强调的特色吗?",
      "mode": "text"
    }
  ]
}
  第1页                第2页                第3页
┌──────────────┐   ┌──────────────┐   ┌──────────────┐
│ 1/3  ○●●     │   │ 2/3  ●○●     │   │ 3/3  ●●○     │
│              │   │              │   │              │
│ 希望呈现      │ → │ 面向客群?    │ → │ 补充特色?    │
│ 什么形象?    │   │ (最多2项)     │   │              │
│ (最多2项)     │   │              │   │ [___________] │
│              │   │ ☐ 周边白领    │   │              │
│ [有机健康]    │   │ ☐ 家庭客群    │   │              │
│ [时尚打卡]    │   │              │   │              │
│ [轻生活]      │   │              │   │              │
│              │   │              │   │              │
│ [上一题][下一题]│  │ [上一题][下一题]│  │ [上一题][提交] │
└──────────────┘   └──────────────┘   └──────────────┘

提交 API

POST /api/chat/continue

{
  "sessionId": "default",
  "requestId": "ask_001",        // ← SSE data 的 id
  "selections": ["safe"],        // ← 选中的 option.id
  "customInput": "",             // ← 自定义输入
  "cancelled": false
}

交互规则