Migrate more to Jotai (#17968)

As per title

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
This commit is contained in:
Charles Bochet
2026-02-17 19:24:36 +01:00
committed by GitHub
parent 98482f3a01
commit d7f025157b
179 changed files with 1219 additions and 988 deletions
@@ -1,6 +1,6 @@
import { useAgentChatContextOrThrow } from '@/ai/hooks/useAgentChatContextOrThrow';
import { agentChatInputState } from '@/ai/states/agentChatInputState';
import { useRecoilValue } from 'recoil';
import { agentChatInputStateV2 } from '@/ai/states/agentChatInputStateV2';
import { useRecoilValueV2 } from '@/ui/utilities/state/jotai/hooks/useRecoilValueV2';
import { IconArrowUp, IconPlayerStop } from 'twenty-ui/display';
import { RoundedIconButton } from 'twenty-ui/input';
@@ -9,7 +9,7 @@ type SendMessageButtonProps = {
};
export const SendMessageButton = ({ onSend }: SendMessageButtonProps) => {
const agentChatInput = useRecoilValue(agentChatInputState);
const agentChatInput = useRecoilValueV2(agentChatInputStateV2);
const { handleStop, isLoading, isStreaming } = useAgentChatContextOrThrow();
if (isStreaming) {