From f17e5bd6c84acb3781430af6dc61bf1d8d6d6ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=93=E5=BF=83=E5=9D=9A=E5=AE=9A=E9=9F=A9=E9=81=93?= =?UTF-8?q?=E5=8F=8B?= Date: Thu, 21 Aug 2025 10:31:54 +0800 Subject: [PATCH] FIX/Adapt message box to handle long text in frontend (#466) * fix:ui * fix:ui bug --------- Co-authored-by: Willem Jiang --- .../app/chat/components/message-list-view.tsx | 66 ++++++++++++------- .../components/deer-flow/message-input.tsx | 2 +- web/src/styles/prosemirror.css | 9 +++ 3 files changed, 53 insertions(+), 24 deletions(-) diff --git a/web/src/app/chat/components/message-list-view.tsx b/web/src/app/chat/components/message-list-view.tsx index ed94319..1a25e35 100644 --- a/web/src/app/chat/components/message-list-view.tsx +++ b/web/src/app/chat/components/message-list-view.tsx @@ -185,7 +185,7 @@ function MessageListItem({ )} > -
+
{children}
@@ -492,27 +493,46 @@ function PlanCard({ - - {plan.thought} - - {plan.steps && ( -
    - {plan.steps.map((step, i) => ( -
  • -

    - - {step.title} - -

    -
    - - {step.description} - -
    -
  • - ))} -
- )} +
+ + {plan.thought} + + {plan.steps && ( +
    + {plan.steps.map((step, i) => ( +
  • +
    +
    +

    + + {step.title} + + {step.tools && step.tools.length > 0 && ( + 1 ? "s" : ""}`} + > +
    + + {step.tools.length} +
    +
    + )} +

    +
    + + {step.description} + +
    + {step.tools && step.tools.length > 0 && ( + + )} +
    +
    +
  • + ))} +
+ )} +
{!message.isStreaming && interruptMessage?.options?.length && ( diff --git a/web/src/components/deer-flow/message-input.tsx b/web/src/components/deer-flow/message-input.tsx index 9b4ab5e..0a68fb8 100644 --- a/web/src/components/deer-flow/message-input.tsx +++ b/web/src/components/deer-flow/message-input.tsx @@ -185,7 +185,7 @@ const MessageInput = forwardRef( strong { mark[style] > strong { color: inherit; } + +.prose ol, .prose ul { + margin-left: 1.2em; + color: #b0b0b0; + font-size: 0.98em; +} +.prose ol > li::marker, .prose ul > li::marker { + color: #b0b0b0; +}