적응형 카드 응답의 인라인 편집 허용(미리 보기)

인라인 편집을 허용하여 Microsoft 365 Copilot용 선언적 에이전트에서 적응형 카드 응답을 향상시킬 수 있습니다. 이 접근 방식을 사용하면 카드가 입력 데이터를 수집하고, 구조화된 페이로드를 앱에 보내고, 반환된 응답을 기반으로 카드를 동적으로 업데이트하여 에이전트 표면을 벗어나지 않고도 원활하고 상태 저장 공간 있는 상호 작용을 만들 수 있습니다.

이 문서에서는 함수( Action.Execute 적응형 카드 스키마 버전 1.5부터 사용 가능)를 사용하여 Copilot 에이전트 응답에 모달 대화 상자를 추가하는 방법을 설명합니다. 이러한 대화 상자를 사용하면 적응형 카드를 통해 정보를 편집하고 제출할 수 있습니다.

참고

이 함수는 Action.Execute 현재 미리 보기로 제공됩니다.

적응형 카드 편집

모달 대화 상자 동작을 사용하려면 다음을 수행합니다.

다음 예제에서는 Action.Execute의 스키마를 보여 줍니다.

{
  "static_template": {
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
      {
        "type": "Container",
        "$data": "${$root}",
        "items": [
          {
            "type": "TextBlock",
            "text": "ticketId: ${if(ticketId, ticketId, 'N/A')}",
            "wrap": true
          },
          {
            "type": "Input.Text",
            "value": "${if(title, title, 'N/A')}",
            "id": "title",
            "wrap": true,
            "maxLength": 500
          },
          {
            "type": "Input.Text",
            "value": "${if(description, description, 'N/A')}",
            "id": "description",
            "wrap": true,
            "maxLength": 500,
            "isMultiline": true
          },
          {
            "type": "Input.Number",
            "label": "Severity",
            "value": "${if(severity, severity, 'N/A')}",
            "id": "severity",
            "wrap": true
          },
          {
            "type": "Input.Date",
            "label": "Due Date - Overdue ⏰",
            "id": "dueDate",
            "value": "${if(dueDate, dueDate, 'N/A')}",
            "wrap": true
          },
          {
            "type": "Input.Number",
            "placeholder": "Placeholder text",
            "id": "completionPercentage",
            "label": "Completion Percentage",
            "max": 100,
            "min": 0,
            "value": "${if(completionPercentage, completionPercentage, 'N/A')}",
            "isVisible": true,
            "wrap": true
          }
        ]
      }
    ],
    "actions": [
      {
        "type": "Action.Execute",
        "verb": "updateTickets",
        "isVisible": true,
        "id": "ticketUpdate",
        "title": "Update Ticket",
        "data": {
          "ticketId": "${if(ticketId, ticketId, 'N/A')}"
        }
      }
    ]
  }
},
{
  "name": "updateTickets",
  "description": "Update a ticket field for a given ticketId",
  "capabilities": {
    "response_semantics": {
      "data_path": "$",
      "properties": {
        "title": "$.title",
        "subtitle": "$.description"
      },
      "static_template": {
        "type": "AdaptiveCard",
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "version": "1.5",
        "body": [
          {
            "type": "Container",
            "$data": "${$root}",
            "items": [
              {
                "type": "TextBlock",
                "text": "ticketId: ${if(updatedTicket.ticketId, updatedTicket.ticketId, 'N/A')}",
                "wrap": true
              },
              {
                "type": "Input.Text",
                "value": "${if(updatedTicket.title, updatedTicket.title, 'N/A')}",
                "id": "title",
                "wrap": true,
                "maxLength": 500
              },
              {
                "type": "Input.Text",
                "value": "${if(updatedTicket.description, updatedTicket.description, 'N/A')}",
                "id": "description",
                "wrap": true,
                "maxLength": 500,
                "isMultiline": true
              }
            ]
          }
        ],
        "actions": [
          {
            "type": "Action.Execute",
            "verb": "updateTickets",
            "isVisible": true,
            "id": "ticketUpdate",
            "title": "Update Ticket",
            "data": {
              "ticketId": "${if(updatedTicket.ticketId, updatedTicket.ticketId, 'N/A')}"
            }
          }
        ]
      }
    }
  }
}

요청 및 응답 예제

다음 요청 및 응답 예제는 사용자가 클라이언트에서 함수가 실행되도록 하는 Action.Execute 작업을 수행할 때 발생하는 상황을 보여줍니다.

요청

{
  "clientInfo": {
    "clientPlatform": "chat-web",
    "clientAppName": "Office",
    "clientEntrypoint": "chat-officeweb",
    "clientSessionId": "d8bc8369-277e-c48c-2faf-3c894945abe0"
  },
  "message": {
    "text": "Card action execute",
    "messageType": "ExecuteActionRequest",
    "actionId": "jiraclouddev_searchForIssuesUsingJql(jql=\"assignee=currentUser() AND type=Task AND created >= -30d\", startAt=0, maxResults=10)",
    "author": "user",
    "executeActionData": {
      "gptId": "gpt_ud",
      "gptActionId": "plugin_1",
      "titleId": "U_e80ce190-4f5a-ee50-ce95-dcbabd8cd2ec",
      "verb": "updateTickets",
      "data": {
        "ticketId": 1,
        "title": "Bug Fix",
        "description": "Fix login issues",
        "severity": "3",
        "dueDate": "2025-06-20",
        "completionPercentage": "97"
      }
    }
  }
}

응답

{
  "text": "Mohit custom text",
  "executeActionData": "{\"type\":\"AdaptiveCard\",\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"version\":\"1.5\",\"body\":[{\"type\":\"Container\",\"style\":\"good\",\"items\":[{\"type\":\"TextBlock\",\"text\":\"✅ Ticket updated successfully\",\"color\":\"default\",\"weight\":\"bolder\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"1\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"Bug Fix\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"Fix login issues\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"3\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"2025-06-20\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"97\",\"wrap\":true}]}]}",
  "messageType": "ExecuteActionResponse",
  "author": "bot",
  "createdAt": "2025-04-30T11:07:44.9557335+00:00",
  "timestamp": "2025-04-30T11:07:44.9557335+00:00",
  "messageId": "649112bc-7fe2-40bd-990d-928364fb173c",
  "requestId": "3058aa09-c9b6-3425-b0ef-49ef2ad4b9a5",
  "offense": "Unknown",
  "spokenText": "Ticket updated successfully",
  "turnCount": 1
}