aws / mynah-ui

https://aws.github.io/mynah-ui/
Apache License 2.0
13 stars 11 forks source link

Mynah-ui parse paragraph as code block. #70

Closed chengoramazon closed 1 week ago

chengoramazon commented 2 months ago

Problem

mynah-ui parse paragraph as code block.

Actual input

Hi, I'm the Amazon Q Developer Agent for software development.

    I can generate code to implement new functionality across your workspace. We'll start by discussing an implementation plan, and then we can review and regenerate code based on your feedback.

    To get started, describe the task you are trying to accomplish.

bug-in-example

Steps to reproduce the issue

  1. Go to https://aws.github.io/mynah-ui/
  2. Enter

    Hi, I'm the Amazon Q Developer Agent for software development.
    
    I can generate code to implement new functionality across your workspace. We'll start by discussing an implementation plan, and then we can review and regenerate code based on your feedback.
    
    To get started, describe the task you are trying to accomplish.
  3. Same thing happens in Amazon Q /dev

Bug

Expected behavior

Parse as paragraph.

System details (run the AWS: About Toolkit command)

dogusata commented 1 week ago

This implementation for this issue is reverted back to keep markdown default behavior as is without overriding the parsing mechanism. The reason behind that is the markdown default formatting structure. Empty spaces as being converted to code blocks.

It can be shown in some markdown generators like Lorem Markdown as well.

Here's a basic markdown output it generates for a code block:

image

Since the support of the markdown in the prompt input field is crucial to give the ability to user writing markdown elements like code blocks and inline codes, as discussed with UX team the decision is to keep the prompt input to support default markdown formats without overriding the rendering.

dogusata commented 1 week ago

Another useful information:

image