|
@@ -127,6 +127,11 @@ 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 clickPresetPromptHandler = useCallback((presetPrompt: string) => {
|
|
|
|
|
+ console.log('presetPrompt', { presetPrompt });
|
|
|
|
|
+ // 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
|
|
@@ -337,7 +342,11 @@ const AiAssistantSidebarSubstance: React.FC<AiAssistantSidebarSubstanceProps> =
|
|
|
)
|
|
)
|
|
|
: (
|
|
: (
|
|
|
<>{isEditorAssistant
|
|
<>{isEditorAssistant
|
|
|
- ? <PresetPromptList />
|
|
|
|
|
|
|
+ ? (
|
|
|
|
|
+ <PresetPromptList
|
|
|
|
|
+ onClick={clickPresetPromptHandler}
|
|
|
|
|
+ />
|
|
|
|
|
+ )
|
|
|
: (
|
|
: (
|
|
|
<AiAssistantChatInitialView
|
|
<AiAssistantChatInitialView
|
|
|
description={aiAssistantData?.description ?? ''}
|
|
description={aiAssistantData?.description ?? ''}
|