File storage cleaning (#18381)

- Remove feature flag
- Remove legacy methods in file-upload and file-service
- Migrate AI Chat to new file management

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Etienne
2026-03-04 23:46:03 +01:00
committed by GitHub
parent c41a8e2b23
commit 26f0a416a1
117 changed files with 859 additions and 3239 deletions
@@ -1,5 +1,8 @@
import { type ReasoningUIPart, type ToolUIPart } from 'ai';
import { type ExtendedUIMessagePart } from 'twenty-shared/ai';
import {
type ExtendedFileUIPart,
type ExtendedUIMessagePart,
} from 'twenty-shared/ai';
import { type AgentMessagePart } from '~/generated-metadata/graphql';
export const mapDBPartToUIMessagePart = (
@@ -23,7 +26,8 @@ export const mapDBPartToUIMessagePart = (
mediaType: part.fileMediaType!,
filename: part.fileFilename!,
url: part.fileUrl!,
};
fileId: part.fileId!,
} as ExtendedFileUIPart;
case 'source-url':
return {
type: 'source-url',