diff --git a/web/.env.example b/web/.env.example index f26272c8f3..800dbb633e 100644 --- a/web/.env.example +++ b/web/.env.example @@ -10,10 +10,10 @@ NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api # console or api domain. # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api -# The APIFREX for MARKETPLACE -NEXT_PUBLIC_MARKETPLACE_API_PREFIX=http://localhost:5002/api +# The API PREFIX for MARKETPLACE +NEXT_PUBLIC_MARKETPLACE_API_PREFIX=https://marketplace.dify.ai/api/v1 # The URL for MARKETPLACE -NEXT_PUBLIC_MARKETPLACE_URL_PREFIX= +NEXT_PUBLIC_MARKETPLACE_URL_PREFIX=https://marketplace.dify.ai # SENTRY NEXT_PUBLIC_SENTRY_DSN= diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx index 37691416e9..8689d44a1c 100644 --- a/web/app/components/base/markdown.tsx +++ b/web/app/components/base/markdown.tsx @@ -68,12 +68,13 @@ const preprocessLaTeX = (content: string) => { } const preprocessThinkTag = (content: string) => { - if (!content.trim().startsWith('\n')) + if (!(content.trim().startsWith('\n') || content.trim().startsWith('
\n', '
\n'), - (str: string) => str.replace('\n', '\n[ENDTHINKFLAG]
'), + (str: string) => str.replaceAll('\n', '
\n'), + (str: string) => str.replaceAll('\n', '\n[ENDTHINKFLAG]
'), + (str: string) => str.replaceAll('\n
', '\n[ENDTHINKFLAG]'), ])(content) }