From ba933c7450d53161775995f0f338b95cff3f6034 Mon Sep 17 00:00:00 2001
From: Archer <545436317@qq.com>
Date: Mon, 29 Jul 2024 10:01:14 +0800
Subject: [PATCH] perf: markdown code css (#2187)
---
packages/plugins/src/duckduckgo/search/index.ts | 1 +
.../components/core/chat/components/AIResponseBox.tsx | 10 ++++++----
projects/app/src/pages/api/proApi/[...path].ts | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/packages/plugins/src/duckduckgo/search/index.ts b/packages/plugins/src/duckduckgo/search/index.ts
index 002ac5dbd..4275909f7 100644
--- a/packages/plugins/src/duckduckgo/search/index.ts
+++ b/packages/plugins/src/duckduckgo/search/index.ts
@@ -31,6 +31,7 @@ const main = async (props: Props, retry = 3): Response => {
result: JSON.stringify(result)
};
} catch (error) {
+ console.log(error);
if (retry <= 0) {
addLog.warn('DuckDuckGo error', { error });
return {
diff --git a/projects/app/src/components/core/chat/components/AIResponseBox.tsx b/projects/app/src/components/core/chat/components/AIResponseBox.tsx
index d01aedb8d..3c04c0b15 100644
--- a/projects/app/src/components/core/chat/components/AIResponseBox.tsx
+++ b/projects/app/src/components/core/chat/components/AIResponseBox.tsx
@@ -98,7 +98,7 @@ ${JSON.stringify(questionGuides)}`;
)}
{toolResponse && (
-
+
+ />
+
)}
diff --git a/projects/app/src/pages/api/proApi/[...path].ts b/projects/app/src/pages/api/proApi/[...path].ts
index e7dd2e1d2..261955d1c 100644
--- a/projects/app/src/pages/api/proApi/[...path].ts
+++ b/projects/app/src/pages/api/proApi/[...path].ts
@@ -14,7 +14,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
throw new Error('url is empty');
}
if (!FastGPTProUrl) {
- throw new Error('未配置商业版链接');
+ throw new Error(`未配置商业版链接: ${path}`);
}
const parsedUrl = new URL(FastGPTProUrl);