Commit ba933c74 by Archer Committed by GitHub

perf: markdown code css (#2187)

parent 856d7ce4
...@@ -31,6 +31,7 @@ const main = async (props: Props, retry = 3): Response => { ...@@ -31,6 +31,7 @@ const main = async (props: Props, retry = 3): Response => {
result: JSON.stringify(result) result: JSON.stringify(result)
}; };
} catch (error) { } catch (error) {
console.log(error);
if (retry <= 0) { if (retry <= 0) {
addLog.warn('DuckDuckGo error', { error }); addLog.warn('DuckDuckGo error', { error });
return { return {
......
...@@ -98,7 +98,7 @@ ${JSON.stringify(questionGuides)}`; ...@@ -98,7 +98,7 @@ ${JSON.stringify(questionGuides)}`;
<AccordionPanel <AccordionPanel
py={0} py={0}
px={0} px={0}
mt={0} mt={3}
borderRadius={'md'} borderRadius={'md'}
overflow={'hidden'} overflow={'hidden'}
maxH={'500px'} maxH={'500px'}
...@@ -111,10 +111,12 @@ ${toolParams}`} ...@@ -111,10 +111,12 @@ ${toolParams}`}
/> />
)} )}
{toolResponse && ( {toolResponse && (
<Box mt={3}>
<Markdown <Markdown
source={`~~~json#Response source={`~~~json#Response
${toolResponse}`} ${toolResponse}`}
/> />
</Box>
)} )}
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>
......
...@@ -14,7 +14,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) ...@@ -14,7 +14,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
throw new Error('url is empty'); throw new Error('url is empty');
} }
if (!FastGPTProUrl) { if (!FastGPTProUrl) {
throw new Error('未配置商业版链接'); throw new Error(`未配置商业版链接: ${path}`);
} }
const parsedUrl = new URL(FastGPTProUrl); const parsedUrl = new URL(FastGPTProUrl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment