|
@@ -18,14 +18,12 @@ import { MessageErrorCode, StreamErrorCode } from '../../../../interfaces/messag
|
|
|
import type { IThreadRelationHasId } from '../../../../interfaces/thread-relation';
|
|
import type { IThreadRelationHasId } from '../../../../interfaces/thread-relation';
|
|
|
import {
|
|
import {
|
|
|
useEditorAssistant,
|
|
useEditorAssistant,
|
|
|
- useAiAssistantSidebarCloseEffect as useAiAssistantSidebarCloseEffectForEditorAssistant,
|
|
|
|
|
isEditorAssistantFormData,
|
|
isEditorAssistantFormData,
|
|
|
type FormData as FormDataForEditorAssistant,
|
|
type FormData as FormDataForEditorAssistant,
|
|
|
} from '../../../services/editor-assistant';
|
|
} from '../../../services/editor-assistant';
|
|
|
import {
|
|
import {
|
|
|
useKnowledgeAssistant,
|
|
useKnowledgeAssistant,
|
|
|
useFetchAndSetMessageDataEffect,
|
|
useFetchAndSetMessageDataEffect,
|
|
|
- useAiAssistantSidebarCloseEffect as useAiAssistantSidebarCloseEffectForKnowledgeAssistant,
|
|
|
|
|
type FormData as FormDataForKnowledgeAssistant,
|
|
type FormData as FormDataForKnowledgeAssistant,
|
|
|
} from '../../../services/knowledge-assistant';
|
|
} from '../../../services/knowledge-assistant';
|
|
|
import { useAiAssistantSidebar } from '../../../stores/ai-assistant';
|
|
import { useAiAssistantSidebar } from '../../../stores/ai-assistant';
|
|
@@ -499,9 +497,6 @@ export const AiAssistantSidebar: FC = memo((): JSX.Element => {
|
|
|
const isOpened = aiAssistantSidebarData?.isOpened;
|
|
const isOpened = aiAssistantSidebarData?.isOpened;
|
|
|
const isEditorAssistant = aiAssistantSidebarData?.isEditorAssistant ?? false;
|
|
const isEditorAssistant = aiAssistantSidebarData?.isEditorAssistant ?? false;
|
|
|
|
|
|
|
|
- useAiAssistantSidebarCloseEffectForEditorAssistant();
|
|
|
|
|
- useAiAssistantSidebarCloseEffectForKnowledgeAssistant(sidebarRef);
|
|
|
|
|
-
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
if (!aiAssistantSidebarData?.isOpened) {
|
|
if (!aiAssistantSidebarData?.isOpened) {
|
|
|
mutateIsEnableUnifiedMergeView(false);
|
|
mutateIsEnableUnifiedMergeView(false);
|