diff --git a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx index a08779ac3..50f8845d8 100644 --- a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx +++ b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx @@ -59,12 +59,12 @@ const markdownComponents: Components = { ), p: ({ children }) =>

{children}

, ul: ({ children }) => ( - + ), ol: ({ children }) => (
    {children}
), - li: ({ children }) =>
  • {children}
  • , + li: ({ children }) =>
  • - {children}
  • , blockquote: ({ children }) => (
    {children} @@ -112,6 +112,12 @@ const markdownComponents: Components = { ), }; +function escapeHtmlTagsForDisplay(text: string) { + return text.replace(/<\/?[A-Za-z][^>]*>/gu, (tag) => + tag.replaceAll('<', '<').replaceAll('>', '>'), + ); +} + export function ChatMarkdownMessage({ text, role, @@ -134,7 +140,7 @@ export function ChatMarkdownMessage({ remarkPlugins={[remarkGfm]} components={markdownComponents} > - {text} + {escapeHtmlTagsForDisplay(text)} diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx index 5c2ef58e9..de45d73d9 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx @@ -175,11 +175,13 @@ export function ProjectSupervisorView({ {directActivity || '陶泥儿正在处理'} {transientReply ? ( - +
    + +
    ) : null} ) : transientReply ? (