Fix AI chat streaming persistence when command menu closes (#14854)

Closes [#1583](https://github.com/twentyhq/core-team-issues/issues/1583)


- Removed `messageId` column from `File` table and its references in
code (unrelated to this PR)
- Updated AI chat to use React Context API with persistent provider in
`CommandMenuContainer`
- Converted all AI chat component states to regular Recoil atoms (no
instance context needed)

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Abdul Rahman
2025-10-03 16:07:41 +05:30
committed by GitHub
parent 329af2b670
commit 0648dc5c65
41 changed files with 385 additions and 415 deletions
@@ -70,7 +70,6 @@ export type Agent = {
export type AgentChatMessage = {
__typename?: 'AgentChatMessage';
createdAt: Scalars['DateTime'];
files: Array<File>;
id: Scalars['UUID'];
parts: Array<AgentChatMessagePart>;
role: Scalars['String'];
@@ -1281,7 +1280,6 @@ export type File = {
createdAt: Scalars['DateTime'];
fullPath: Scalars['String'];
id: Scalars['UUID'];
messageId?: Maybe<Scalars['UUID']>;
name: Scalars['String'];
size: Scalars['Float'];
type: Scalars['String'];