|
@@ -24,6 +24,7 @@ import { useSWRMUTxThreads } from '../../../stores/thread';
|
|
|
|
|
|
|
|
import { AiAssistantChatInitialView } from './AiAssistantChatInitialView';
|
|
import { AiAssistantChatInitialView } from './AiAssistantChatInitialView';
|
|
|
import { MessageCard } from './MessageCard';
|
|
import { MessageCard } from './MessageCard';
|
|
|
|
|
+import { QuickMenuList } from './QuickMenuList';
|
|
|
import { ResizableTextarea } from './ResizableTextArea';
|
|
import { ResizableTextarea } from './ResizableTextArea';
|
|
|
|
|
|
|
|
import styles from './AiAssistantSidebar.module.scss';
|
|
import styles from './AiAssistantSidebar.module.scss';
|
|
@@ -126,6 +127,10 @@ const AiAssistantSidebarSubstance: React.FC<AiAssistantSidebarSubstanceProps> =
|
|
|
: 'sidebar_ai_assistant.knowledge_assistant_placeholder');
|
|
: 'sidebar_ai_assistant.knowledge_assistant_placeholder');
|
|
|
}, [form.formState.isSubmitting, isEditorAssistant, t]);
|
|
}, [form.formState.isSubmitting, isEditorAssistant, t]);
|
|
|
|
|
|
|
|
|
|
+ const clickQuickMenuHandler = useCallback((quickMenu: string) => {
|
|
|
|
|
+ // todo: https://redmine.weseek.co.jp/issues/163264
|
|
|
|
|
+ }, []);
|
|
|
|
|
+
|
|
|
const isGenerating = generatingAnswerMessage != null;
|
|
const isGenerating = generatingAnswerMessage != null;
|
|
|
const submit = useCallback(async(data: FormData) => {
|
|
const submit = useCallback(async(data: FormData) => {
|
|
|
// do nothing when the assistant is generating an answer
|
|
// do nothing when the assistant is generating an answer
|
|
@@ -336,7 +341,11 @@ const AiAssistantSidebarSubstance: React.FC<AiAssistantSidebarSubstanceProps> =
|
|
|
)
|
|
)
|
|
|
: (
|
|
: (
|
|
|
<>{isEditorAssistant
|
|
<>{isEditorAssistant
|
|
|
- ? <></> // TODO https://redmine.weseek.co.jp/issues/163079
|
|
|
|
|
|
|
+ ? (
|
|
|
|
|
+ <QuickMenuList
|
|
|
|
|
+ onClick={clickQuickMenuHandler}
|
|
|
|
|
+ />
|
|
|
|
|
+ )
|
|
|
: (
|
|
: (
|
|
|
<AiAssistantChatInitialView
|
|
<AiAssistantChatInitialView
|
|
|
description={aiAssistantData?.description ?? ''}
|
|
description={aiAssistantData?.description ?? ''}
|