diff --git a/openbas-front/src/admin/components/common/form/TextFieldAskAI.tsx b/openbas-front/src/admin/components/common/form/TextFieldAskAI.tsx index dd3c1f1a93..00238623f1 100644 --- a/openbas-front/src/admin/components/common/form/TextFieldAskAI.tsx +++ b/openbas-front/src/admin/components/common/form/TextFieldAskAI.tsx @@ -43,7 +43,6 @@ const TextFieldAskAI: FunctionComponent = ({ const [openToneOptions, setOpenToneOptions] = useState(false); const [openGenMessageOptions, setOpenGenMessageOptions] = useState(false); const [openGenMediaOptions, setOpenGenMediaOptions] = useState(false); - const [tone, setTone] = useState<'tactical' | 'operational' | 'strategic'>('tactical'); const [messageContext, setMessageContext] = useState(context ?? ''); const [messageInput, setMessageInput] = useState(currentValue); const [messageParagraphs, setMessageParagraphs] = useState(5); @@ -84,7 +83,7 @@ const TextFieldAskAI: FunctionComponent = ({ const askFixSpelling = async () => aiFixSpelling(currentValue, format, (data: string) => setContent(data)); const askMakeShorter = async () => aiMakeShorter(currentValue, format, (data: string) => setContent(data)); const askMakeLonger = async () => aiMakeLonger(currentValue, format, (data: string) => setContent(data)); - const askChangeTone = async () => aiChangeTone(currentValue, tone, format, (data: string) => setContent(data)); + const askChangeTone = async () => aiChangeTone(currentValue, messageTone, format, (data: string) => setContent(data)); const askSummarize = async () => aiSummarize(currentValue, format, (data: string) => setContent(data)); const askExplain = async () => aiExplain(currentValue, (data: string) => setContent(data)); const askGenMessage = async () => aiGenMessage( @@ -398,13 +397,19 @@ const TextFieldAskAI: FunctionComponent = ({ {t('Tone')}