diff --git a/deepflow-apptracing-panel/src/components/AskGPT.tsx b/deepflow-apptracing-panel/src/components/AskGPT.tsx index f20d88b..816932a 100644 --- a/deepflow-apptracing-panel/src/components/AskGPT.tsx +++ b/deepflow-apptracing-panel/src/components/AskGPT.tsx @@ -268,7 +268,11 @@ export const AskGPT: React.FC = ({ data }) => { setCheckedAiEngine(list.filter(e => !e.disabled)?.[0].value || '') } catch (error: any) { setErrorMsg(`GET ENGINES FAILED: ${error.message}`) - + setDrawerData({ + inRequest: false, + answer: `Engine帮助文档`, + answerIsEnd: true + }) setTimeout(() => { setErrorMsg('') }, 800) @@ -365,7 +369,7 @@ export const AskGPT: React.FC = ({ data }) => { overflow: 'auto' }} > - {drawerData.answer !== '' && !drawerData.inRequest ? ( + {checkedAiEngine && drawerData.answer !== '' && !drawerData.inRequest ? ( = ({ data }) => { setCheckedAiEngine(list.filter(e => !e.disabled)?.[0].value || '') } catch (error: any) { setErrorMsg(`GET ENGINES FAILED: ${error.message}`) + setDrawerData({ + inRequest: false, + answer: `Engine帮助文档`, + answerIsEnd: true + }) setTimeout(() => { setErrorMsg('') }, 800) @@ -359,7 +364,7 @@ export const AskGPT: React.FC = ({ data }) => { overflow: 'auto' }} > - {drawerData.answer !== '' && !drawerData.inRequest ? ( + {checkedAiEngine && drawerData.answer !== '' && !drawerData.inRequest ? (