microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.59k stars 1.53k forks source link

Citation list should use names from `entities` instead of Markdown #5209

Closed compulim closed 3 months ago

compulim commented 3 months ago

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Development build

Which distribution are you using Web Chat from?

Bundle (webchat.js)

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Others or unrelated

Which area does this issue affect?

Chat history

Which theme pack does this issue affect?

I did not test it on other theme packs

What is the public URL for the website?

No response

Please describe the bug

When displaying the following chat history JSON in the repro steps, it should display "Aloha" as the document name, instead of "Hello".

Do you see any errors in console log?

No response

How to reproduce the issue?

Use the following JSON to render the chat history.

[
  {
    "from": {
      "role": "bot"
    },
    "type": "message",
    "timestamp": "2023-10-03T17:00:00.000Z",
    "text": "This is the document[1].\n\n[1]: _:c1 \"Hello - should not be displayed\"\n",
    "entities": [
      {
        "@context": "https://schema.org",
        "@id": "",
        "@type": "Message",
        "citation": [
          {
            "@id": "_:c1",
            "@type": "Claim",
            "appearance": {
              "@type": "DigitalDocument",
              "name": "Aloha",
              "text": "Title should be \"Aloha\" instead\n"
            },
            "position": "1"
          }
        ],
        "type": "https://schema.org/Message"
      }
    ]
  }
]

What do you expect?

The document should be named "Aloha".

What actually happened?

The document is displayed as "Hello".

Do you have any screenshots or recordings to repro the issue?

image

Adaptive Card JSON

No response

Additional context

No response