The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
refactor: standardize AI acronym to Ai (PascalCase) across internal identifiers (#19837)
Félix Malfait6117a1d6c040
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphqlindex 6ae8f3aff67..6f6dffadd3b 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql@@ -1743,7 +1743,7 @@ type NativeModelCapabilities {twitterSearch: Boolean}-type ClientAIModelConfig {+type ClientAiModelConfig {modelId: String!label: String!modelFamily: ModelFamily@@ -1769,7 +1769,7 @@ enum ModelFamily {GROK}-type AdminAIModelConfig {+type AdminAiModelConfig {modelId: String!label: String!modelFamily: ModelFamily@@ -1789,8 +1789,8 @@ type AdminAIModelConfig {dataResidency: String}-type AdminAIModels {- models: [AdminAIModelConfig!]!+type AdminAiModels {+ models: [AdminAiModelConfig!]!defaultSmartModelId: StringdefaultFastModelId: String}@@ -1852,7 +1852,7 @@ type ClientConfig {appVersion: StringauthProviders: AuthProviders!billing: Billing!- aiModels: [ClientAIModelConfig!]!+ aiModels: [ClientAiModelConfig!]!signInPrefilled: Boolean!isMultiWorkspaceEnabled: Boolean!isEmailVerificationRequired: Boolean!@@ -2957,14 +2957,14 @@ type AgentMessage {createdAt: DateTime!}-type AISystemPromptSection {+type AiSystemPromptSection {title: String!content: String!estimatedTokenCount: Int!}-type AISystemPromptPreview {- sections: [AISystemPromptSection!]!+type AiSystemPromptPreview {+ sections: [AiSystemPromptSection!]!estimatedTokenCount: Int!}@@ -3319,7 +3319,7 @@ type Query {chatThread(id: UUID!): AgentChatThread!chatMessages(threadId: UUID!): [AgentMessage!]!chatStreamCatchupChunks(threadId: UUID!): ChatStreamCatchupChunks!- getAISystemPromptPreview: AISystemPromptPreview!+ getAiSystemPromptPreview: AiSystemPromptPreview!skills: [Skill!]!skill(id: UUID!): SkillchatThreads(@@ -3364,7 +3364,7 @@ type Query {getIndicatorHealthStatus(indicatorId: HealthIndicatorId!): AdminPanelHealthServiceData!getQueueMetrics(queueName: String!, timeRange: QueueMetricsTimeRange = OneHour): QueueMetricsData!versionInfo: VersionInfo!- getAdminAiModels: AdminAIModels!+ getAdminAiModels: AdminAiModels!getDatabaseConfigVariable(key: String!): ConfigVariable!getQueueJobs(queueName: String!, state: JobState!, limit: Int = 50, offset: Int = 0): QueueJobsResponse!findAllApplicationRegistrations: [ApplicationRegistration!]!@@ -3519,7 +3519,7 @@ type Mutation {deleteManyNavigationMenuItems(ids: [UUID!]!): [NavigationMenuItem!]!deleteNavigationMenuItem(id: UUID!): NavigationMenuItem!uploadEmailAttachmentFile(file: Upload!): FileWithSignedUrl!- uploadAIChatFile(file: Upload!): FileWithSignedUrl!+ uploadAiChatFile(file: Upload!): FileWithSignedUrl!uploadWorkflowFile(file: Upload!): FileWithSignedUrl!uploadWorkspaceLogo(file: Upload!): FileWithSignedUrl!uploadWorkspaceMemberProfilePicture(file: Upload!): FileWithSignedUrl!diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.tsindex 4039c25d4c4..85e66f50be5 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts@@ -1444,7 +1444,7 @@ export interface NativeModelCapabilities {__typename: 'NativeModelCapabilities'}-export interface ClientAIModelConfig {+export interface ClientAiModelConfig {modelId: Scalars['String']label: Scalars['String']modelFamily?: ModelFamily@@ -1460,12 +1460,12 @@ export interface ClientAIModelConfig {contextWindowTokens?: Scalars['Float']maxOutputTokens?: Scalars['Float']dataResidency?: Scalars['String']- __typename: 'ClientAIModelConfig'+ __typename: 'ClientAiModelConfig'}export type ModelFamily = 'GPT' | 'CLAUDE' | 'GEMINI' | 'MISTRAL' | 'GROK'-export interface AdminAIModelConfig {+export interface AdminAiModelConfig {modelId: Scalars['String']label: Scalars['String']modelFamily?: ModelFamily@@ -1483,14 +1483,14 @@ export interface AdminAIModelConfig {providerLabel?: Scalars['String']name?: Scalars['String']dataResidency?: Scalars['String']- __typename: 'AdminAIModelConfig'+ __typename: 'AdminAiModelConfig'}-export interface AdminAIModels {- models: AdminAIModelConfig[]+export interface AdminAiModels {+ models: AdminAiModelConfig[]defaultSmartModelId?: Scalars['String']defaultFastModelId?: Scalars['String']- __typename: 'AdminAIModels'+ __typename: 'AdminAiModels'}export interface Billing {@@ -1552,7 +1552,7 @@ export interface ClientConfig {appVersion?: Scalars['String']authProviders: AuthProvidersbilling: Billing- aiModels: ClientAIModelConfig[]+ aiModels: ClientAiModelConfig[]signInPrefilled: Scalars['Boolean']isMultiWorkspaceEnabled: Scalars['Boolean']isEmailVerificationRequired: Scalars['Boolean']@@ -2628,17 +2628,17 @@ export interface AgentMessage {__typename: 'AgentMessage'}-export interface AISystemPromptSection {+export interface AiSystemPromptSection {title: Scalars['String']content: Scalars['String']estimatedTokenCount: Scalars['Int']- __typename: 'AISystemPromptSection'+ __typename: 'AiSystemPromptSection'}-export interface AISystemPromptPreview {- sections: AISystemPromptSection[]+export interface AiSystemPromptPreview {+ sections: AiSystemPromptSection[]estimatedTokenCount: Scalars['Int']- __typename: 'AISystemPromptPreview'+ __typename: 'AiSystemPromptPreview'}export interface ChatStreamCatchupChunks {@@ -2891,7 +2891,7 @@ export interface Query {chatThread: AgentChatThreadchatMessages: AgentMessage[]chatStreamCatchupChunks: ChatStreamCatchupChunks- getAISystemPromptPreview: AISystemPromptPreview+ getAiSystemPromptPreview: AiSystemPromptPreviewskills: Skill[]skill?: SkillchatThreads: AgentChatThreadConnection@@ -2927,7 +2927,7 @@ export interface Query {getIndicatorHealthStatus: AdminPanelHealthServiceDatagetQueueMetrics: QueueMetricsDataversionInfo: VersionInfo- getAdminAiModels: AdminAIModels+ getAdminAiModels: AdminAiModelsgetDatabaseConfigVariable: ConfigVariablegetQueueJobs: QueueJobsResponsefindAllApplicationRegistrations: ApplicationRegistration[]@@ -2975,7 +2975,7 @@ export interface Mutation {deleteManyNavigationMenuItems: NavigationMenuItem[]deleteNavigationMenuItem: NavigationMenuItemuploadEmailAttachmentFile: FileWithSignedUrl- uploadAIChatFile: FileWithSignedUrl+ uploadAiChatFile: FileWithSignedUrluploadWorkflowFile: FileWithSignedUrluploadWorkspaceLogo: FileWithSignedUrluploadWorkspaceMemberProfilePicture: FileWithSignedUrl@@ -4706,7 +4706,7 @@ export interface NativeModelCapabilitiesGenqlSelection{__scalar?: boolean | number}-export interface ClientAIModelConfigGenqlSelection{+export interface ClientAiModelConfigGenqlSelection{modelId?: boolean | numberlabel?: boolean | numbermodelFamily?: boolean | number@@ -4726,7 +4726,7 @@ export interface ClientAIModelConfigGenqlSelection{__scalar?: boolean | number}-export interface AdminAIModelConfigGenqlSelection{+export interface AdminAiModelConfigGenqlSelection{modelId?: boolean | numberlabel?: boolean | numbermodelFamily?: boolean | number@@ -4748,8 +4748,8 @@ export interface AdminAIModelConfigGenqlSelection{__scalar?: boolean | number}-export interface AdminAIModelsGenqlSelection{- models?: AdminAIModelConfigGenqlSelection+export interface AdminAiModelsGenqlSelection{+ models?: AdminAiModelConfigGenqlSelectiondefaultSmartModelId?: boolean | numberdefaultFastModelId?: boolean | number__typename?: boolean | number@@ -4819,7 +4819,7 @@ export interface ClientConfigGenqlSelection{appVersion?: boolean | numberauthProviders?: AuthProvidersGenqlSelectionbilling?: BillingGenqlSelection- aiModels?: ClientAIModelConfigGenqlSelection+ aiModels?: ClientAiModelConfigGenqlSelectionsignInPrefilled?: boolean | numberisMultiWorkspaceEnabled?: boolean | numberisEmailVerificationRequired?: boolean | number@@ -5993,7 +5993,7 @@ export interface AgentMessageGenqlSelection{__scalar?: boolean | number}-export interface AISystemPromptSectionGenqlSelection{+export interface AiSystemPromptSectionGenqlSelection{title?: boolean | numbercontent?: boolean | numberestimatedTokenCount?: boolean | number@@ -6001,8 +6001,8 @@ export interface AISystemPromptSectionGenqlSelection{__scalar?: boolean | number}-export interface AISystemPromptPreviewGenqlSelection{- sections?: AISystemPromptSectionGenqlSelection+export interface AiSystemPromptPreviewGenqlSelection{+ sections?: AiSystemPromptSectionGenqlSelectionestimatedTokenCount?: boolean | number__typename?: boolean | number__scalar?: boolean | number@@ -6265,7 +6265,7 @@ export interface QueryGenqlSelection{chatThread?: (AgentChatThreadGenqlSelection & { __args: {id: Scalars['UUID']} })chatMessages?: (AgentMessageGenqlSelection & { __args: {threadId: Scalars['UUID']} })chatStreamCatchupChunks?: (ChatStreamCatchupChunksGenqlSelection & { __args: {threadId: Scalars['UUID']} })- getAISystemPromptPreview?: AISystemPromptPreviewGenqlSelection+ getAiSystemPromptPreview?: AiSystemPromptPreviewGenqlSelectionskills?: SkillGenqlSelectionskill?: (SkillGenqlSelection & { __args: {id: Scalars['UUID']} })chatThreads?: (AgentChatThreadConnectionGenqlSelection & { __args: {@@ -6307,7 +6307,7 @@ export interface QueryGenqlSelection{getIndicatorHealthStatus?: (AdminPanelHealthServiceDataGenqlSelection & { __args: {indicatorId: HealthIndicatorId} })getQueueMetrics?: (QueueMetricsDataGenqlSelection & { __args: {queueName: Scalars['String'], timeRange?: (QueueMetricsTimeRange | null)} })versionInfo?: VersionInfoGenqlSelection- getAdminAiModels?: AdminAIModelsGenqlSelection+ getAdminAiModels?: AdminAiModelsGenqlSelectiongetDatabaseConfigVariable?: (ConfigVariableGenqlSelection & { __args: {key: Scalars['String']} })getQueueJobs?: (QueueJobsResponseGenqlSelection & { __args: {queueName: Scalars['String'], state: JobState, limit?: (Scalars['Int'] | null), offset?: (Scalars['Int'] | null)} })findAllApplicationRegistrations?: ApplicationRegistrationGenqlSelection@@ -6374,7 +6374,7 @@ export interface MutationGenqlSelection{deleteManyNavigationMenuItems?: (NavigationMenuItemGenqlSelection & { __args: {ids: Scalars['UUID'][]} })deleteNavigationMenuItem?: (NavigationMenuItemGenqlSelection & { __args: {id: Scalars['UUID']} })uploadEmailAttachmentFile?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })- uploadAIChatFile?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })+ uploadAiChatFile?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })uploadWorkflowFile?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })uploadWorkspaceLogo?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })uploadWorkspaceMemberProfilePicture?: (FileWithSignedUrlGenqlSelection & { __args: {file: Scalars['Upload']} })@@ -7887,26 +7887,26 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null- const ClientAIModelConfig_possibleTypes: string[] = ['ClientAIModelConfig']- export const isClientAIModelConfig = (obj?: { __typename?: any } | null): obj is ClientAIModelConfig => {- if (!obj?.__typename) throw new Error('__typename is missing in "isClientAIModelConfig"')- return ClientAIModelConfig_possibleTypes.includes(obj.__typename)+ const ClientAiModelConfig_possibleTypes: string[] = ['ClientAiModelConfig']+ export const isClientAiModelConfig = (obj?: { __typename?: any } | null): obj is ClientAiModelConfig => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isClientAiModelConfig"')+ return ClientAiModelConfig_possibleTypes.includes(obj.__typename)}- const AdminAIModelConfig_possibleTypes: string[] = ['AdminAIModelConfig']- export const isAdminAIModelConfig = (obj?: { __typename?: any } | null): obj is AdminAIModelConfig => {- if (!obj?.__typename) throw new Error('__typename is missing in "isAdminAIModelConfig"')- return AdminAIModelConfig_possibleTypes.includes(obj.__typename)+ const AdminAiModelConfig_possibleTypes: string[] = ['AdminAiModelConfig']+ export const isAdminAiModelConfig = (obj?: { __typename?: any } | null): obj is AdminAiModelConfig => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isAdminAiModelConfig"')+ return AdminAiModelConfig_possibleTypes.includes(obj.__typename)}- const AdminAIModels_possibleTypes: string[] = ['AdminAIModels']- export const isAdminAIModels = (obj?: { __typename?: any } | null): obj is AdminAIModels => {- if (!obj?.__typename) throw new Error('__typename is missing in "isAdminAIModels"')- return AdminAIModels_possibleTypes.includes(obj.__typename)+ const AdminAiModels_possibleTypes: string[] = ['AdminAiModels']+ export const isAdminAiModels = (obj?: { __typename?: any } | null): obj is AdminAiModels => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isAdminAiModels"')+ return AdminAiModels_possibleTypes.includes(obj.__typename)}@@ -8975,18 +8975,18 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null- const AISystemPromptSection_possibleTypes: string[] = ['AISystemPromptSection']- export const isAISystemPromptSection = (obj?: { __typename?: any } | null): obj is AISystemPromptSection => {- if (!obj?.__typename) throw new Error('__typename is missing in "isAISystemPromptSection"')- return AISystemPromptSection_possibleTypes.includes(obj.__typename)+ const AiSystemPromptSection_possibleTypes: string[] = ['AiSystemPromptSection']+ export const isAiSystemPromptSection = (obj?: { __typename?: any } | null): obj is AiSystemPromptSection => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isAiSystemPromptSection"')+ return AiSystemPromptSection_possibleTypes.includes(obj.__typename)}- const AISystemPromptPreview_possibleTypes: string[] = ['AISystemPromptPreview']- export const isAISystemPromptPreview = (obj?: { __typename?: any } | null): obj is AISystemPromptPreview => {- if (!obj?.__typename) throw new Error('__typename is missing in "isAISystemPromptPreview"')- return AISystemPromptPreview_possibleTypes.includes(obj.__typename)+ const AiSystemPromptPreview_possibleTypes: string[] = ['AiSystemPromptPreview']+ export const isAiSystemPromptPreview = (obj?: { __typename?: any } | null): obj is AiSystemPromptPreview => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isAiSystemPromptPreview"')+ return AiSystemPromptPreview_possibleTypes.includes(obj.__typename)}diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.tsindex b4b2649e97d..a12d7f83b6b 100644--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts@@ -3506,7 +3506,7 @@ export default {1]},- "ClientAIModelConfig": {+ "ClientAiModelConfig": {"modelId": [1],@@ -3557,7 +3557,7 @@ export default {]},"ModelFamily": {},- "AdminAIModelConfig": {+ "AdminAiModelConfig": {"modelId": [1],@@ -3613,7 +3613,7 @@ export default {1]},- "AdminAIModels": {+ "AdminAiModels": {"models": [181],@@ -5936,7 +5936,7 @@ export default {1]},- "AISystemPromptSection": {+ "AiSystemPromptSection": {"title": [1],@@ -5950,7 +5950,7 @@ export default {1]},- "AISystemPromptPreview": {+ "AiSystemPromptPreview": {"sections": [331],@@ -6810,7 +6810,7 @@ export default {]}],- "getAISystemPromptPreview": [+ "getAiSystemPromptPreview": [332],"skills": [@@ -7544,7 +7544,7 @@ export default {]}],- "uploadAIChatFile": [+ "uploadAiChatFile": [118,{"file": [diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex 8e345a73e76..e2362bd4a7c 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -19,19 +19,6 @@ export type Scalars = {Upload: any;};-export type AiSystemPromptPreview = {- __typename?: 'AISystemPromptPreview';- estimatedTokenCount: Scalars['Int'];- sections: Array<AiSystemPromptSection>;-};--export type AiSystemPromptSection = {- __typename?: 'AISystemPromptSection';- content: Scalars['String'];- estimatedTokenCount: Scalars['Int'];- title: Scalars['String'];-};-export type ActivateWorkspaceInput = {displayName?: InputMaybe<Scalars['String']>;};@@ -43,7 +30,7 @@ export type AddQuerySubscriptionInput = {};export type AdminAiModelConfig = {- __typename?: 'AdminAIModelConfig';+ __typename?: 'AdminAiModelConfig';contextWindowTokens?: Maybe<Scalars['Float']>;dataResidency?: Maybe<Scalars['String']>;inputCostPerMillionTokens?: Maybe<Scalars['Float']>;@@ -64,7 +51,7 @@ export type AdminAiModelConfig = {};export type AdminAiModels = {- __typename?: 'AdminAIModels';+ __typename?: 'AdminAiModels';defaultFastModelId?: Maybe<Scalars['String']>;defaultSmartModelId?: Maybe<Scalars['String']>;models: Array<AdminAiModelConfig>;@@ -328,6 +315,19 @@ export enum AiModelRole {SMART = 'SMART'}+export type AiSystemPromptPreview = {+ __typename?: 'AiSystemPromptPreview';+ estimatedTokenCount: Scalars['Int'];+ sections: Array<AiSystemPromptSection>;+};++export type AiSystemPromptSection = {+ __typename?: 'AiSystemPromptSection';+ content: Scalars['String'];+ estimatedTokenCount: Scalars['Int'];+ title: Scalars['String'];+};+export enum AllMetadataName {agent = 'agent',commandMenuItem = 'commandMenuItem',@@ -924,7 +924,7 @@ export type CheckUserExist = {};export type ClientAiModelConfig = {- __typename?: 'ClientAIModelConfig';+ __typename?: 'ClientAiModelConfig';contextWindowTokens?: Maybe<Scalars['Float']>;dataResidency?: Maybe<Scalars['String']>;inputCostPerMillionTokens?: Maybe<Scalars['Float']>;@@ -2792,7 +2792,7 @@ export type Mutation = {updateWorkspaceMemberRole: WorkspaceMember;updateWorkspaceMemberSettings: Scalars['Boolean'];upgradeApplication: Scalars['Boolean'];- uploadAIChatFile: FileWithSignedUrl;+ uploadAiChatFile: FileWithSignedUrl;uploadAppTarball: ApplicationRegistration;uploadApplicationFile: File;uploadEmailAttachmentFile: FileWithSignedUrl;@@ -4441,13 +4441,13 @@ export type Query = {findWorkspaceInvitations: Array<WorkspaceInvitation>;frontComponent?: Maybe<FrontComponent>;frontComponents: Array<FrontComponent>;- getAISystemPromptPreview: AiSystemPromptPreview;getAddressDetails: PlaceDetailsResult;getAdminAiModels: AdminAiModels;getAdminAiUsageByWorkspace: Array<UsageBreakdownItem>;getAdminChatThreadMessages: AdminChatThreadMessages;getAdminWorkspaceChatThreads: Array<AdminWorkspaceChatThread>;getAiProviders: Scalars['JSON'];+ getAiSystemPromptPreview: AiSystemPromptPreview;getApprovedAccessDomains: Array<ApprovedAccessDomain>;getAutoCompleteAddress: Array<AutocompleteResult>;getAvailablePackages: Scalars['JSON'];@@ -6636,7 +6636,7 @@ export type UploadAiChatFileMutationVariables = Exact<{}>;-export type UploadAiChatFileMutation = { __typename?: 'Mutation', uploadAIChatFile: { __typename?: 'FileWithSignedUrl', id: string, path: string, size: number, createdAt: string, url: string } };+export type UploadAiChatFileMutation = { __typename?: 'Mutation', uploadAiChatFile: { __typename?: 'FileWithSignedUrl', id: string, path: string, size: number, createdAt: string, url: string } };export type FindManyAgentsQueryVariables = Exact<{ [key: string]: never; }>;@@ -7462,7 +7462,7 @@ export type SetAdminDefaultAiModelMutation = { __typename?: 'Mutation', setAdminexport type GetAdminAiModelsQueryVariables = Exact<{ [key: string]: never; }>;-export type GetAdminAiModelsQuery = { __typename?: 'Query', getAdminAiModels: { __typename?: 'AdminAIModels', defaultSmartModelId?: string | null, defaultFastModelId?: string | null, models: Array<{ __typename?: 'AdminAIModelConfig', modelId: string, label: string, modelFamily?: ModelFamily | null, sdkPackage?: string | null, isAvailable: boolean, isAdminEnabled: boolean, isDeprecated?: boolean | null, isRecommended?: boolean | null, contextWindowTokens?: number | null, maxOutputTokens?: number | null, inputCostPerMillionTokens?: number | null, outputCostPerMillionTokens?: number | null, providerName?: string | null, providerLabel?: string | null, name?: string | null, dataResidency?: string | null }> } };+export type GetAdminAiModelsQuery = { __typename?: 'Query', getAdminAiModels: { __typename?: 'AdminAiModels', defaultSmartModelId?: string | null, defaultFastModelId?: string | null, models: Array<{ __typename?: 'AdminAiModelConfig', modelId: string, label: string, modelFamily?: ModelFamily | null, sdkPackage?: string | null, isAvailable: boolean, isAdminEnabled: boolean, isDeprecated?: boolean | null, isRecommended?: boolean | null, contextWindowTokens?: number | null, maxOutputTokens?: number | null, inputCostPerMillionTokens?: number | null, outputCostPerMillionTokens?: number | null, providerName?: string | null, providerLabel?: string | null, name?: string | null, dataResidency?: string | null }> } };export type GetAdminAiUsageByWorkspaceQueryVariables = Exact<{periodStart?: InputMaybe<Scalars['DateTime']>;@@ -8589,7 +8589,7 @@ export type CheckCustomDomainValidRecordsMutation = { __typename?: 'Mutation', cexport type GetAiSystemPromptPreviewQueryVariables = Exact<{ [key: string]: never; }>;-export type GetAiSystemPromptPreviewQuery = { __typename?: 'Query', getAISystemPromptPreview: { __typename?: 'AISystemPromptPreview', estimatedTokenCount: number, sections: Array<{ __typename?: 'AISystemPromptSection', title: string, content: string, estimatedTokenCount: number }> } };+export type GetAiSystemPromptPreviewQuery = { __typename?: 'Query', getAiSystemPromptPreview: { __typename?: 'AiSystemPromptPreview', estimatedTokenCount: number, sections: Array<{ __typename?: 'AiSystemPromptSection', title: string, content: string, estimatedTokenCount: number }> } };export type GetPublicWorkspaceDataByIdQueryVariables = Exact<{id: Scalars['UUID'];@@ -8670,7 +8670,7 @@ export const SendChatMessageDocument = {"kind":"Document","definitions":[{"kind"export const StopAgentChatStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StopAgentChatStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stopAgentChatStream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}]}]}}]} as unknown as DocumentNode<StopAgentChatStreamMutation, StopAgentChatStreamMutationVariables>;export const UpdateOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAgentInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdateOneAgentMutation, UpdateOneAgentMutationVariables>;export const UpdateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSkillInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdateSkillMutation, UpdateSkillMutationVariables>;-export const UploadAiChatFileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"uploadAIChatFile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"file"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Upload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uploadAIChatFile"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"file"},"value":{"kind":"Variable","name":{"kind":"Name","value":"file"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<UploadAiChatFileMutation, UploadAiChatFileMutationVariables>;+export const UploadAiChatFileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"uploadAiChatFile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"file"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Upload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uploadAiChatFile"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"file"},"value":{"kind":"Variable","name":{"kind":"Name","value":"file"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<UploadAiChatFileMutation, UploadAiChatFileMutationVariables>;export const FindManyAgentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyAgents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyAgents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManyAgentsQuery, FindManyAgentsQueryVariables>;export const FindManySkillsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManySkillsQuery, FindManySkillsQueryVariables>;export const FindOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneAgentQuery, FindOneAgentQueryVariables>;@@ -8939,6 +8939,6 @@ export const DeleteCurrentWorkspaceDocument = {"kind":"Document","definitions":[export const UpdateWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateWorkspaceInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateWorkspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}}]} as unknown as DocumentNode<UpdateWorkspaceMutation, UpdateWorkspaceMutationVariables>;export const UploadWorkspaceLogoDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UploadWorkspaceLogo"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"file"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Upload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uploadWorkspaceLogo"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"file"},"value":{"kind":"Variable","name":{"kind":"Name","value":"file"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<UploadWorkspaceLogoMutation, UploadWorkspaceLogoMutationVariables>;export const CheckCustomDomainValidRecordsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CheckCustomDomainValidRecords"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"checkCustomDomainValidRecords"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"Field","name":{"kind":"Name","value":"records"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"validationType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}}]}}]} as unknown as DocumentNode<CheckCustomDomainValidRecordsMutation, CheckCustomDomainValidRecordsMutationVariables>;-export const GetAiSystemPromptPreviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAISystemPromptPreview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAISystemPromptPreview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sections"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"estimatedTokenCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"estimatedTokenCount"}}]}}]}}]} as unknown as DocumentNode<GetAiSystemPromptPreviewQuery, GetAiSystemPromptPreviewQueryVariables>;+export const GetAiSystemPromptPreviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAiSystemPromptPreview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAiSystemPromptPreview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sections"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"estimatedTokenCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"estimatedTokenCount"}}]}}]}}]} as unknown as DocumentNode<GetAiSystemPromptPreviewQuery, GetAiSystemPromptPreviewQueryVariables>;export const GetPublicWorkspaceDataByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetPublicWorkspaceDataById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getPublicWorkspaceDataById"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}}]}}]}}]} as unknown as DocumentNode<GetPublicWorkspaceDataByIdQuery, GetPublicWorkspaceDataByIdQueryVariables>;export const GetWorkspaceFromInviteHashDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaceFromInviteHash"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inviteHash"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findWorkspaceFromInviteHash"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inviteHash"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inviteHash"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}}]}}]}}]} as unknown as DocumentNode<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>;\ No newline at end of filediff --git a/packages/twenty-front/src/modules/ai/components/AIChatErrorRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AIChatErrorRenderer.tsxdeleted file mode 100644index b5ead539a90..00000000000--- a/packages/twenty-front/src/modules/ai/components/AIChatErrorRenderer.tsx+++ /dev/null@@ -1,22 +0,0 @@-import { AIChatApiKeyNotConfiguredMessage } from '@/ai/components/AIChatApiKeyNotConfiguredMessage';-import { AIChatCreditsExhaustedMessage } from '@/ai/components/AIChatCreditsExhaustedMessage';-import { AIChatErrorMessage } from '@/ai/components/AIChatErrorMessage';-import { type AIChatError } from '@/ai/types/AIChatError';-import { AIChatErrorCode } from '@/ai/utils/aiChatErrorCode';-import { isGraphqlErrorOfType } from '~/utils/is-graphql-error-of-type.util';--type AIChatErrorRendererProps = {- error: AIChatError;-};--export const AIChatErrorRenderer = ({ error }: AIChatErrorRendererProps) => {- if (isGraphqlErrorOfType(error, AIChatErrorCode.BILLING_CREDITS_EXHAUSTED)) {- return <AIChatCreditsExhaustedMessage />;- }-- if (isGraphqlErrorOfType(error, AIChatErrorCode.API_KEY_NOT_CONFIGURED)) {- return <AIChatApiKeyNotConfiguredMessage />;- }-- return <AIChatErrorMessage error={error} />;-};diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatMessagesFetchEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatMessagesFetchEffect.tsxindex 65591bdc043..6671fa5c1e0 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatMessagesFetchEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatMessagesFetchEffect.tsx@@ -10,7 +10,7 @@ import { AGENT_CHAT_NEW_THREAD_DRAFT_KEY } from '@/ai/states/agentChatDraftsByThimport { agentChatFetchedMessagesComponentFamilyState } from '@/ai/states/agentChatFetchedMessagesComponentFamilyState';import { agentChatMessagesLoadingState } from '@/ai/states/agentChatMessagesLoadingState';import { agentChatQueuedMessagesComponentFamilyState } from '@/ai/states/agentChatQueuedMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { skipMessagesSkeletonUntilLoadedState } from '@/ai/states/skipMessagesSkeletonUntilLoadedState';import { mapDBMessagesToUIMessages } from '@/ai/utils/mapDBMessagesToUIMessages';import { useQueryWithCallbacks } from '@/apollo/hooks/useQueryWithCallbacks';@@ -26,13 +26,13 @@ import {export const AgentChatMessagesFetchEffect = () => {const store = useStore();- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const isNewThread = useMemo(() =>- currentAIChatThread === null ||- currentAIChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY,- [currentAIChatThread],+ currentAiChatThread === null ||+ currentAiChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY,+ [currentAiChatThread],);const setAgentChatMessagesLoading = useSetAtomState(@@ -45,12 +45,12 @@ export const AgentChatMessagesFetchEffect = () => {const setAgentChatFetchedMessages = useSetAtomComponentFamilyState(agentChatFetchedMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const setAgentChatQueuedMessages = useSetAtomComponentFamilyState(agentChatQueuedMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const handleEventCallbackFamilyCallback =@@ -84,7 +84,7 @@ export const AgentChatMessagesFetchEffect = () => {return;}- const threadId = store.get(currentAIChatThreadState.atom);+ const threadId = store.get(currentAiChatThreadState.atom);if (!isDefined(threadId)) {return;@@ -135,8 +135,8 @@ export const AgentChatMessagesFetchEffect = () => {const { refetch: refetchAgentChatMessages } = useQueryWithCallbacks(GetChatMessagesDocument,{- variables: { threadId: currentAIChatThread ?? '' },- skip: !isDefined(currentAIChatThread) || isNewThread,+ variables: { threadId: currentAiChatThread ?? '' },+ skip: !isDefined(currentAiChatThread) || isNewThread,onFirstLoad: handleFirstLoad,onDataLoaded: handleDataLoaded,onLoadingChange: handleLoadingChange,diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect.tsxindex ce9d288b942..2d70d2dbb53 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect.tsx@@ -1,6 +1,6 @@import { AI_CHAT_SCROLL_WRAPPER_ID } from '@/ai/constants/AiChatScrollWrapperId';import { agentChatIsInitialScrollPendingOnThreadChangeState } from '@/ai/states/agentChatIsInitialScrollPendingOnThreadChangeState';-import { scrollAIChatToBottom } from '@/ai/utils/scrollAIChatToBottom';+import { scrollAiChatToBottom } from '@/ai/utils/scrollAiChatToBottom';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { useEffect } from 'react';@@ -37,10 +37,10 @@ export const AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect =clearTimeout(settleTimeoutId);}- scrollAIChatToBottom();+ scrollAiChatToBottom();settleTimeoutId = setTimeout(() => {- scrollAIChatToBottom();+ scrollAiChatToBottom();setAgentChatIsInitialScrollPendingOnThreadChange(false);mutationObserver.disconnect();}, SCROLL_SETTLE_DELAY_MS);diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatStreamSubscriptionEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatStreamSubscriptionEffect.tsxindex dc5f3d8b8cf..aecb63d8cd4 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatStreamSubscriptionEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatStreamSubscriptionEffect.tsx@@ -15,7 +15,7 @@ import { agentChatIsStreamingComponentFamilyState } from '@/ai/states/agentChatIimport { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';import { agentChatMessagesLoadingState } from '@/ai/states/agentChatMessagesLoadingState';import { agentChatThreadsLoadingState } from '@/ai/states/agentChatThreadsLoadingState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { useListenToBrowserEvent } from '@/browser-event/hooks/useListenToBrowserEvent';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -23,7 +23,7 @@ import { useSetAtomComponentFamilyState } from '@/ui/utilities/state/jotai/hooksimport { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';export const AgentChatStreamSubscriptionEffect = () => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const { createChatThread } = useCreateAgentChatThread();@@ -41,25 +41,25 @@ export const AgentChatStreamSubscriptionEffect = () => {useAgentChat(ensureThreadIdForSend);const subscriptionThreadId =- currentAIChatThread !== null && isValidUuid(currentAIChatThread)- ? currentAIChatThread+ currentAiChatThread !== null && isValidUuid(currentAiChatThread)+ ? currentAiChatThread: null;useAgentChatSubscription(subscriptionThreadId);const agentChatFetchedMessages = useAtomComponentFamilyStateValue(agentChatFetchedMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const setAgentChatMessages = useSetAtomComponentFamilyState(agentChatMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const agentChatIsStreaming = useAtomComponentFamilyStateValue(agentChatIsStreamingComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const agentChatDisplayedThread = useAtomStateValue(@@ -81,17 +81,17 @@ export const AgentChatStreamSubscriptionEffect = () => {setAgentChatMessages(agentChatFetchedMessages);- if (currentAIChatThread !== agentChatDisplayedThread) {+ if (currentAiChatThread !== agentChatDisplayedThread) {if (agentChatFetchedMessages.length > 0) {setAgentChatIsInitialScrollPendingOnThreadChange(true);}- setAgentChatDisplayedThread(currentAIChatThread);+ setAgentChatDisplayedThread(currentAiChatThread);}}, [agentChatFetchedMessages,agentChatIsStreaming,setAgentChatMessages,- currentAIChatThread,+ currentAiChatThread,agentChatDisplayedThread,setAgentChatDisplayedThread,setAgentChatIsInitialScrollPendingOnThreadChange,diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatStreamingAutoScrollEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatStreamingAutoScrollEffect.tsxindex 54538b154c7..196937ebf98 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatStreamingAutoScrollEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatStreamingAutoScrollEffect.tsx@@ -1,17 +1,17 @@import { agentChatIsScrolledToBottomSelector } from '@/ai/states/agentChatIsScrolledToBottomSelector';import { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';-import { scrollAIChatToBottom } from '@/ai/utils/scrollAIChatToBottom';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';+import { scrollAiChatToBottom } from '@/ai/utils/scrollAiChatToBottom';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useEffect } from 'react';export const AgentChatStreamingAutoScrollEffect = () => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatMessages = useAtomComponentFamilyStateValue(agentChatMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const agentChatIsScrolledToBottom = useAtomStateValue(@@ -24,7 +24,7 @@ export const AgentChatStreamingAutoScrollEffect = () => {}if (agentChatIsScrolledToBottom) {- scrollAIChatToBottom();+ scrollAiChatToBottom();}}, [agentChatMessages, agentChatIsScrolledToBottom]);diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatStreamingPartsDiffSyncEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatStreamingPartsDiffSyncEffect.tsxindex 7761ab11ec5..32ae92f24a4 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatStreamingPartsDiffSyncEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatStreamingPartsDiffSyncEffect.tsx@@ -1,18 +1,18 @@import { useUpdateStreamingPartsWithDiff } from '@/ai/hooks/useUpdateStreamingPartsWithDiff';import { agentChatLastDiffSyncedThreadState } from '@/ai/states/agentChatLastDiffSyncedThreadState';import { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { useEffect } from 'react';export const AgentChatStreamingPartsDiffSyncEffect = () => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatMessages = useAtomComponentFamilyStateValue(agentChatMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const { updateStreamingPartsWithDiff } = useUpdateStreamingPartsWithDiff();@@ -27,11 +27,11 @@ export const AgentChatStreamingPartsDiffSyncEffect = () => {}updateStreamingPartsWithDiff(agentChatMessages);- setAgentChatLastDiffSyncedThread(currentAIChatThread);+ setAgentChatLastDiffSyncedThread(currentAiChatThread);}, [agentChatMessages,updateStreamingPartsWithDiff,- currentAIChatThread,+ currentAiChatThread,setAgentChatLastDiffSyncedThread,]);diff --git a/packages/twenty-front/src/modules/ai/components/AgentChatThreadInitializationEffect.tsx b/packages/twenty-front/src/modules/ai/components/AgentChatThreadInitializationEffect.tsxindex 4bbda19c934..50e601032fa 100644--- a/packages/twenty-front/src/modules/ai/components/AgentChatThreadInitializationEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AgentChatThreadInitializationEffect.tsx@@ -10,8 +10,8 @@ import { agentChatInputState } from '@/ai/states/agentChatInputState';import { agentChatThreadsLoadingState } from '@/ai/states/agentChatThreadsLoadingState';import { agentChatThreadsSelector } from '@/ai/states/agentChatThreadsSelector';import { agentChatUsageComponentFamilyState } from '@/ai/states/agentChatUsageComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';-import { currentAIChatThreadTitleComponentFamilyState } from '@/ai/states/currentAIChatThreadTitleComponentFamilyState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';+import { currentAiChatThreadTitleComponentFamilyState } from '@/ai/states/currentAiChatThreadTitleComponentFamilyState';import { hasInitializedAgentChatThreadsState } from '@/ai/states/hasInitializedAgentChatThreadsState';import { hasTriggeredCreateForDraftState } from '@/ai/states/hasTriggeredCreateForDraftState';import { useUpdateMetadataStoreDraft } from '@/metadata-store/hooks/useUpdateMetadataStoreDraft';@@ -35,14 +35,14 @@ export const AgentChatThreadInitializationEffect = () => {PermissionFlagType.AI_SETTINGS,);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);- const setCurrentAIChatThread = useSetAtomState(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);+ const setCurrentAiChatThread = useSetAtomState(currentAiChatThreadState);const setAgentChatInput = useSetAtomState(agentChatInputState);const setAgentChatThreadsLoading = useSetAtomState(agentChatThreadsLoadingState,);const threadTitleFamilyCallback = useAtomComponentFamilyStateCallbackState(- currentAIChatThreadTitleComponentFamilyState,+ currentAiChatThreadTitleComponentFamilyState,);const agentChatUsageFamilyCallback = useAtomComponentFamilyStateCallbackState(agentChatUsageComponentFamilyState,@@ -93,7 +93,7 @@ export const AgentChatThreadInitializationEffect = () => {useEffect(() => {if (hasInitializedAgentChatThreads ||- (currentAIChatThread !== null && isValidUuid(currentAIChatThread))+ (currentAiChatThread !== null && isValidUuid(currentAiChatThread))) {return;}@@ -114,7 +114,7 @@ export const AgentChatThreadInitializationEffect = () => {const draftForThread =store.get(agentChatDraftsByThreadIdState.atom)[firstThread.id] ?? '';- setCurrentAIChatThread(firstThread.id);+ setCurrentAiChatThread(firstThread.id);setAgentChatInput(draftForThread);const firstThreadFamilyKey = { threadId: firstThread.id };@@ -144,7 +144,7 @@ export const AgentChatThreadInitializationEffect = () => {);} else {store.set(hasTriggeredCreateForDraftState.atom, false);- setCurrentAIChatThread(AGENT_CHAT_NEW_THREAD_DRAFT_KEY);+ setCurrentAiChatThread(AGENT_CHAT_NEW_THREAD_DRAFT_KEY);setAgentChatInput(store.get(agentChatDraftsByThreadIdState.atom)[AGENT_CHAT_NEW_THREAD_DRAFT_KEY@@ -153,12 +153,12 @@ export const AgentChatThreadInitializationEffect = () => {}}, [agentChatThreads,- currentAIChatThread,+ currentAiChatThread,hasAiSettingsPermission,hasInitializedAgentChatThreads,setHasInitializedAgentChatThreads,storeEntry.status,- setCurrentAIChatThread,+ setCurrentAiChatThread,setAgentChatInput,store,threadTitleFamilyCallback,diff --git a/packages/twenty-front/src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatApiKeyNotConfiguredMessage.tsxsimilarity index 80%rename from packages/twenty-front/src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatApiKeyNotConfiguredMessage.tsxindex df26fc79547..3c32900ad47 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatApiKeyNotConfiguredMessage.tsx@@ -1,17 +1,17 @@-import { AIChatBanner } from '@/ai/components/AIChatBanner';+import { AiChatBanner } from '@/ai/components/AiChatBanner';import { t } from '@lingui/core/macro';import { IconExternalLink } from 'twenty-ui/display';const DOCS_URL ='https://twenty.com/developers/section/self-hosting/self-hosting-var#ai-features';-export const AIChatApiKeyNotConfiguredMessage = () => {+export const AiChatApiKeyNotConfiguredMessage = () => {const handleDocsClick = () => {window.open(DOCS_URL, '_blank', 'noopener,noreferrer');};return (- <AIChatBanner+ <AiChatBannermessage={t`AI not configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or XAI_API_KEY in your environment.`}variant="warning"buttonTitle={t`View Docs`}diff --git a/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsxsimilarity index 96%rename from packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsxindex 048792a4d4f..1fd2aec9d2e 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsx@@ -1,4 +1,4 @@-import { AIChatCompactionIndicator } from '@/ai/components/AIChatCompactionIndicator';+import { AiChatCompactionIndicator } from '@/ai/components/AiChatCompactionIndicator';import { CodeExecutionDisplay } from '@/ai/components/CodeExecutionDisplay';import { RoutingStatusDisplay } from '@/ai/components/RoutingStatusDisplay';import { ThinkingStepsDisplay } from '@/ai/components/ThinkingStepsDisplay';@@ -60,7 +60,7 @@ const MessagePartRenderer = ({case 'data-routing-status':return <RoutingStatusDisplay data={part.data} />;case 'data-compaction':- return <AIChatCompactionIndicator />;+ return <AiChatCompactionIndicator />;case 'data-code-execution':return (<CodeExecutionDisplay@@ -87,7 +87,7 @@ const MessagePartRenderer = ({}};-export const AIChatAssistantMessageRenderer = ({+export const AiChatAssistantMessageRenderer = ({messageParts,isLastMessageStreaming,hasError,diff --git a/packages/twenty-front/src/modules/ai/components/AIChatBanner.tsx b/packages/twenty-front/src/modules/ai/components/AiChatBanner.tsxsimilarity index 87%rename from packages/twenty-front/src/modules/ai/components/AIChatBanner.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatBanner.tsxindex fcc4fea470f..5b3d062aced 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatBanner.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatBanner.tsx@@ -9,9 +9,9 @@ import {import { Button } from 'twenty-ui/input';import { themeCssVariables } from 'twenty-ui/theme-constants';-type AIChatBannerVariant = 'default' | 'warning';+type AiChatBannerVariant = 'default' | 'warning';-const StyledBanner = styled.div<{ variant: AIChatBannerVariant }>`+const StyledBanner = styled.div<{ variant: AiChatBannerVariant }>`align-items: center;background-color: ${({ variant }) =>variant === 'warning'@@ -25,7 +25,7 @@ const StyledBanner = styled.div<{ variant: AIChatBannerVariant }>`width: 100%;`;-const StyledIconContainer = styled.div<{ variant: AIChatBannerVariant }>`+const StyledIconContainer = styled.div<{ variant: AiChatBannerVariant }>`align-items: center;color: ${({ variant }) =>variant === 'warning'@@ -38,7 +38,7 @@ const StyledIconContainer = styled.div<{ variant: AIChatBannerVariant }>`width: 16px;`;-const StyledMessage = styled.p<{ variant: AIChatBannerVariant }>`+const StyledMessage = styled.p<{ variant: AiChatBannerVariant }>`color: ${({ variant }) =>variant === 'warning'? themeCssVariables.color.orange@@ -53,9 +53,9 @@ const StyledMessage = styled.p<{ variant: AIChatBannerVariant }>`min-width: 0;`;-export type AIChatBannerProps = {+export type AiChatBannerProps = {message: string;- variant?: AIChatBannerVariant;+ variant?: AiChatBannerVariant;tooltipMessage?: string;buttonTitle?: string;buttonIcon?: IconComponent;@@ -64,7 +64,7 @@ export type AIChatBannerProps = {isButtonLoading?: boolean;};-export const AIChatBanner = ({+export const AiChatBanner = ({message,variant = 'default',tooltipMessage,@@ -73,7 +73,7 @@ export const AIChatBanner = ({buttonOnClick,isButtonDisabled = false,isButtonLoading = false,-}: AIChatBannerProps) => {+}: AiChatBannerProps) => {const tooltipId = 'ai-chat-banner-tooltip';return (diff --git a/packages/twenty-front/src/modules/ai/components/AIChatCompactionIndicator.tsx b/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsxsimilarity index 94%rename from packages/twenty-front/src/modules/ai/components/AIChatCompactionIndicator.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsxindex af900a4bc20..1d6b159ba11 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatCompactionIndicator.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsx@@ -16,7 +16,7 @@ const StyledIconTextContainer = styled.div`gap: ${themeCssVariables.spacing[1]};`;-export const AIChatCompactionIndicator = () => {+export const AiChatCompactionIndicator = () => {const { theme } = useContext(ThemeContext);return (diff --git a/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatCreditsExhaustedMessage.tsxsimilarity index 91%rename from packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatCreditsExhaustedMessage.tsxindex c37e771fc2b..4258c03e545 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatCreditsExhaustedMessage.tsx@@ -1,4 +1,4 @@-import { AIChatBanner } from '@/ai/components/AIChatBanner';+import { AiChatBanner } from '@/ai/components/AiChatBanner';import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap';import { useSubscriptionStatus } from '@/workspace/hooks/useSubscriptionStatus';import { t } from '@lingui/core/macro';@@ -10,7 +10,7 @@ import {} from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';-export const AIChatCreditsExhaustedMessage = () => {+export const AiChatCreditsExhaustedMessage = () => {const navigateSettings = useNavigateSettings();const subscriptionStatus = useSubscriptionStatus();@@ -32,7 +32,7 @@ export const AIChatCreditsExhaustedMessage = () => {const buttonTitle = isTrialing ? t`Subscribe Now` : t`Upgrade Plan`;return (- <AIChatBanner+ <AiChatBannermessage={message}variant="warning"buttonTitle={hasPermissionToManageBilling ? buttonTitle : undefined}diff --git a/packages/twenty-front/src/modules/ai/components/AIChatEditorSection.tsx b/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsxsimilarity index 86%rename from packages/twenty-front/src/modules/ai/components/AIChatEditorSection.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsxindex b6350bdc67c..b67f8935b28 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatEditorSection.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsx@@ -2,15 +2,15 @@ import { styled } from '@linaria/react';import { EditorContent } from '@tiptap/react';import { themeCssVariables } from 'twenty-ui/theme-constants';-import { AIChatEmptyState } from '@/ai/components/AIChatEmptyState';-import { AIChatStandaloneError } from '@/ai/components/AIChatStandaloneError';+import { AiChatEmptyState } from '@/ai/components/AiChatEmptyState';+import { AiChatStandaloneError } from '@/ai/components/AiChatStandaloneError';import { AgentChatContextPreview } from '@/ai/components/internal/AgentChatContextPreview';import { AgentChatFileUploadButton } from '@/ai/components/internal/AgentChatFileUploadButton';-import { AIChatContextUsageButton } from '@/ai/components/internal/AIChatContextUsageButton';-import { AIChatEditorFocusEffect } from '@/ai/components/internal/AIChatEditorFocusEffect';-import { AIChatSkeletonLoader } from '@/ai/components/internal/AIChatSkeletonLoader';+import { AiChatContextUsageButton } from '@/ai/components/internal/AiChatContextUsageButton';+import { AiChatEditorFocusEffect } from '@/ai/components/internal/AiChatEditorFocusEffect';+import { AiChatSkeletonLoader } from '@/ai/components/internal/AiChatSkeletonLoader';import { SendMessageButton } from '@/ai/components/internal/SendMessageButton';-import { useAIChatEditor } from '@/ai/hooks/useAIChatEditor';+import { useAiChatEditor } from '@/ai/hooks/useAiChatEditor';import { useAiModelOptions } from '@/ai/hooks/useAiModelOptions';import { useAgentChatModelId } from '@/ai/hooks/useAgentChatModelId';import { agentChatUserSelectedModelState } from '@/ai/states/agentChatUserSelectedModelState';@@ -104,7 +104,7 @@ const StyledRightButtonsContainer = styled.div`gap: ${themeCssVariables.spacing[1]};`;-export const AIChatEditorSection = () => {+export const AiChatEditorSection = () => {const isMobile = useIsMobile();const { options, pinnedOption } = useAiModelOptions({variant: 'pinned-default',@@ -123,14 +123,14 @@ export const AIChatEditorSection = () => {);const { selectedModelId } = useAgentChatModelId();- const { editor, handleSendAndClear } = useAIChatEditor();+ const { editor, handleSendAndClear } = useAiChatEditor();return (<>- <AIChatEditorFocusEffect editor={editor} />- <AIChatEmptyState editor={editor} />- <AIChatStandaloneError />- <AIChatSkeletonLoader />+ <AiChatEditorFocusEffect editor={editor} />+ <AiChatEmptyState editor={editor} />+ <AiChatStandaloneError />+ <AiChatSkeletonLoader /><StyledInputArea isMobile={isMobile}><AgentChatContextPreview />@@ -141,7 +141,7 @@ export const AIChatEditorSection = () => {<StyledButtonsContainer><StyledLeftButtonsContainer><AgentChatFileUploadButton />- <AIChatContextUsageButton />+ <AiChatContextUsageButton /></StyledLeftButtonsContainer><StyledRightButtonsContainer><Selectdiff --git a/packages/twenty-front/src/modules/ai/components/AIChatEmptyState.tsx b/packages/twenty-front/src/modules/ai/components/AiChatEmptyState.tsxsimilarity index 81%rename from packages/twenty-front/src/modules/ai/components/AIChatEmptyState.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatEmptyState.tsxindex 19aefdd8d5e..736f1127329 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatEmptyState.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatEmptyState.tsx@@ -2,13 +2,13 @@ import { styled } from '@linaria/react';import { type Editor } from '@tiptap/react';import { isDefined } from 'twenty-shared/utils';-import { AIChatSuggestedPrompts } from '@/ai/components/suggested-prompts/AIChatSuggestedPrompts';+import { AiChatSuggestedPrompts } from '@/ai/components/suggested-prompts/AiChatSuggestedPrompts';import { AGENT_CHAT_NEW_THREAD_DRAFT_KEY } from '@/ai/states/agentChatDraftsByThreadIdState';import { agentChatErrorComponentFamilyState } from '@/ai/states/agentChatErrorComponentFamilyState';import { agentChatHasMessageComponentSelector } from '@/ai/states/agentChatHasMessageComponentSelector';import { agentChatMessagesLoadingState } from '@/ai/states/agentChatMessagesLoadingState';import { agentChatThreadsLoadingState } from '@/ai/states/agentChatThreadsLoadingState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { skipMessagesSkeletonUntilLoadedState } from '@/ai/states/skipMessagesSkeletonUntilLoadedState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';@@ -22,15 +22,15 @@ const StyledEmptyState = styled.div`justify-content: flex-end;`;-type AIChatEmptyStateProps = {+type AiChatEmptyStateProps = {editor: Editor | null;};-export const AIChatEmptyState = ({ editor }: AIChatEmptyStateProps) => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+export const AiChatEmptyState = ({ editor }: AiChatEmptyStateProps) => {+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatError = useAtomComponentFamilyStateValue(agentChatErrorComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const agentChatThreadsLoading = useAtomStateValue(agentChatThreadsLoadingState,@@ -47,7 +47,7 @@ export const AIChatEmptyState = ({ editor }: AIChatEmptyStateProps) => {);const isOnNewChatSlot =- currentAIChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY;+ currentAiChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const skeletonShowing =(agentChatThreadsLoading && isOnNewChatSlot) ||(agentChatMessagesLoading && !skipMessagesSkeletonUntilLoaded);@@ -60,7 +60,7 @@ export const AIChatEmptyState = ({ editor }: AIChatEmptyStateProps) => {return (<StyledEmptyState>- <AIChatSuggestedPrompts editor={editor} />+ <AiChatSuggestedPrompts editor={editor} /></StyledEmptyState>);};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatErrorMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsxsimilarity index 91%rename from packages/twenty-front/src/modules/ai/components/AIChatErrorMessage.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsxindex 2918c73b556..ff23176e972 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatErrorMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsx@@ -4,7 +4,7 @@ import { t } from '@lingui/core/macro';import { IconAlertCircle } from 'twenty-ui/display';import { useContext } from 'react';-import { type AIChatError } from '@/ai/types/AIChatError';+import { type AiChatError } from '@/ai/types/AiChatError';import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';import { getErrorMessageFromApolloError } from '~/utils/get-error-message-from-apollo-error.util';@@ -43,11 +43,11 @@ const StyledErrorMessage = styled.div`word-break: break-word;`;-type AIChatErrorMessageProps = {- error: AIChatError;+type AiChatErrorMessageProps = {+ error: AiChatError;};-export const AIChatErrorMessage = ({ error }: AIChatErrorMessageProps) => {+export const AiChatErrorMessage = ({ error }: AiChatErrorMessageProps) => {const { theme } = useContext(ThemeContext);const errorMessage = CombinedGraphQLErrors.is(error)? getErrorMessageFromApolloError(error)diff --git a/packages/twenty-front/src/modules/ai/components/AiChatErrorRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AiChatErrorRenderer.tsxnew file mode 100644index 00000000000..4f6cfc358cf--- /dev/null+++ b/packages/twenty-front/src/modules/ai/components/AiChatErrorRenderer.tsx@@ -0,0 +1,22 @@+import { AiChatApiKeyNotConfiguredMessage } from '@/ai/components/AiChatApiKeyNotConfiguredMessage';+import { AiChatCreditsExhaustedMessage } from '@/ai/components/AiChatCreditsExhaustedMessage';+import { AiChatErrorMessage } from '@/ai/components/AiChatErrorMessage';+import { type AiChatError } from '@/ai/types/AiChatError';+import { AiChatErrorCode } from '@/ai/utils/aiChatErrorCode';+import { isGraphqlErrorOfType } from '~/utils/is-graphql-error-of-type.util';++type AiChatErrorRendererProps = {+ error: AiChatError;+};++export const AiChatErrorRenderer = ({ error }: AiChatErrorRendererProps) => {+ if (isGraphqlErrorOfType(error, AiChatErrorCode.BILLING_CREDITS_EXHAUSTED)) {+ return <AiChatCreditsExhaustedMessage />;+ }++ if (isGraphqlErrorOfType(error, AiChatErrorCode.API_KEY_NOT_CONFIGURED)) {+ return <AiChatApiKeyNotConfiguredMessage />;+ }++ return <AiChatErrorMessage error={error} />;+};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatErrorUnderMessageList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsxsimilarity index 92%rename from packages/twenty-front/src/modules/ai/components/AIChatErrorUnderMessageList.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsxindex e4dc114a716..7fe01def089 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatErrorUnderMessageList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsx@@ -1,4 +1,4 @@-import { AIChatErrorRenderer } from '@/ai/components/AIChatErrorRenderer';+import { AiChatErrorRenderer } from '@/ai/components/AiChatErrorRenderer';import { AgentMessageRole } from '@/ai/constants/AgentMessageRole';import { agentChatDisplayedThreadState } from '@/ai/states/agentChatDisplayedThreadState';import { agentChatErrorComponentFamilyState } from '@/ai/states/agentChatErrorComponentFamilyState';@@ -16,7 +16,7 @@ const StyledErrorWrapper = styled.div`padding-top: ${themeCssVariables.spacing[3]};`;-export const AIChatErrorUnderMessageList = () => {+export const AiChatErrorUnderMessageList = () => {const agentChatDisplayedThread = useAtomStateValue(agentChatDisplayedThreadState,);@@ -50,7 +50,7 @@ export const AIChatErrorUnderMessageList = () => {return (<StyledErrorWrapper>- <AIChatErrorRenderer error={agentChatError} />+ <AiChatErrorRenderer error={agentChatError} /></StyledErrorWrapper>);};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatLastMessageWithStreamingState.tsx b/packages/twenty-front/src/modules/ai/components/AiChatLastMessageWithStreamingState.tsxsimilarity index 91%rename from packages/twenty-front/src/modules/ai/components/AIChatLastMessageWithStreamingState.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatLastMessageWithStreamingState.tsxindex 2951522dd37..21775370e52 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatLastMessageWithStreamingState.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatLastMessageWithStreamingState.tsx@@ -1,4 +1,4 @@-import { AIChatMessage } from '@/ai/components/AIChatMessage';+import { AiChatMessage } from '@/ai/components/AiChatMessage';import { agentChatDisplayedThreadState } from '@/ai/states/agentChatDisplayedThreadState';import { agentChatErrorComponentFamilyState } from '@/ai/states/agentChatErrorComponentFamilyState';import { agentChatIsStreamingComponentFamilyState } from '@/ai/states/agentChatIsStreamingComponentFamilyState';@@ -8,7 +8,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { isDefined } from 'twenty-shared/utils';-export const AIChatLastMessageWithStreamingState = () => {+export const AiChatLastMessageWithStreamingState = () => {const lastMessageId = useAtomComponentSelectorValue(agentChatLastMessageIdComponentSelector,);@@ -30,7 +30,7 @@ export const AIChatLastMessageWithStreamingState = () => {}return (- <AIChatMessage+ <AiChatMessagemessageId={lastMessageId}isLastMessageStreaming={agentChatIsStreaming}error={agentChatError ?? undefined}diff --git a/packages/twenty-front/src/modules/ai/components/AIChatMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsxsimilarity index 93%rename from packages/twenty-front/src/modules/ai/components/AIChatMessage.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatMessage.tsxindex 695adb8b660..9fa4fbfcef3 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx@@ -3,10 +3,10 @@ import { styled } from '@linaria/react';import { AgentChatFilePreview } from '@/ai/components/internal/AgentChatFilePreview';import { AgentMessageRole } from '@/ai/constants/AgentMessageRole';-import { AIChatAssistantMessageRenderer } from '@/ai/components/AIChatAssistantMessageRenderer';-import { AIChatErrorRenderer } from '@/ai/components/AIChatErrorRenderer';+import { AiChatAssistantMessageRenderer } from '@/ai/components/AiChatAssistantMessageRenderer';+import { AiChatErrorRenderer } from '@/ai/components/AiChatErrorRenderer';import { agentChatMessageComponentFamilySelector } from '@/ai/states/agentChatMessageComponentFamilySelector';-import { type AIChatError } from '@/ai/types/AIChatError';+import { type AiChatError } from '@/ai/types/AiChatError';import { LightCopyIconButton } from '@/object-record/record-field/ui/components/LightCopyIconButton';import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -140,17 +140,17 @@ const StyledFilesContainer = styled.div`margin-top: ${themeCssVariables.spacing[2]};`;-type AIChatMessageProps = {+type AiChatMessageProps = {messageId: string;isLastMessageStreaming?: boolean;- error?: AIChatError | undefined;+ error?: AiChatError | undefined;};-export const AIChatMessage = ({+export const AiChatMessage = ({messageId,isLastMessageStreaming = false,error,-}: AIChatMessageProps) => {+}: AiChatMessageProps) => {const agentChatMessage = useAtomComponentFamilySelectorValue(agentChatMessageComponentFamilySelector,{ messageId },@@ -173,7 +173,7 @@ export const AIChatMessage = ({<StyledMessageBubble isUser={isUser}><StyledMessageContainer isUser={isUser}><StyledMessageText isUser={isUser}>- <AIChatAssistantMessageRenderer+ <AiChatAssistantMessageRendererisLastMessageStreaming={isLastMessageStreaming}messageParts={agentChatMessage.parts}hasError={shouldShowError}@@ -187,7 +187,7 @@ export const AIChatMessage = ({</StyledFilesContainer>)}{shouldShowError && isDefined(error) && (- <AIChatErrorRenderer error={error} />+ <AiChatErrorRenderer error={error} />)}</StyledMessageContainer>{agentChatMessage.parts.length > 0 && (diff --git a/packages/twenty-front/src/modules/ai/components/AIChatNonLastMessageIdsList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatNonLastMessageIdsList.tsxsimilarity index 70%rename from packages/twenty-front/src/modules/ai/components/AIChatNonLastMessageIdsList.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatNonLastMessageIdsList.tsxindex 533b5fb7f16..b949282ab13 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatNonLastMessageIdsList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatNonLastMessageIdsList.tsx@@ -1,13 +1,13 @@-import { AIChatMessage } from '@/ai/components/AIChatMessage';+import { AiChatMessage } from '@/ai/components/AiChatMessage';import { agentChatNonLastMessageIdsComponentSelector } from '@/ai/states/agentChatNonLastMessageIdsComponentSelector';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-export const AIChatNonLastMessageIdsList = () => {+export const AiChatNonLastMessageIdsList = () => {const agentChatNonLastMessageIds = useAtomComponentSelectorValue(agentChatNonLastMessageIdsComponentSelector,);return agentChatNonLastMessageIds.map((messageId) => (- <AIChatMessage key={messageId} messageId={messageId} />+ <AiChatMessage key={messageId} messageId={messageId} />));};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatQueuedMessages.tsx b/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsxsimilarity index 90%rename from packages/twenty-front/src/modules/ai/components/AIChatQueuedMessages.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsxindex a16ea3361ac..87e08f8fe99 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatQueuedMessages.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { agentChatQueuedMessagesComponentFamilyState } from '@/ai/states/agentChatQueuedMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { useDeleteQueuedMessage } from '@/ai/hooks/useDeleteQueuedMessage';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -41,15 +41,15 @@ const StyledQueuedText = styled.span`white-space: nowrap;`;-export const AIChatQueuedMessages = () => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+export const AiChatQueuedMessages = () => {+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatQueuedMessages = useAtomComponentFamilyStateValue(agentChatQueuedMessagesComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const { deleteQueuedMessage } = useDeleteQueuedMessage();- if (!isDefined(currentAIChatThread) || agentChatQueuedMessages.length === 0) {+ if (!isDefined(currentAiChatThread) || agentChatQueuedMessages.length === 0) {return null;}diff --git a/packages/twenty-front/src/modules/ai/components/AIChatScrollToBottomButton.tsx b/packages/twenty-front/src/modules/ai/components/AiChatScrollToBottomButton.tsxsimilarity index 91%rename from packages/twenty-front/src/modules/ai/components/AIChatScrollToBottomButton.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatScrollToBottomButton.tsxindex 4195b698b46..fe9afe58b82 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatScrollToBottomButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatScrollToBottomButton.tsx@@ -1,5 +1,5 @@import { agentChatIsScrolledToBottomSelector } from '@/ai/states/agentChatIsScrolledToBottomSelector';-import { scrollAIChatToBottom } from '@/ai/utils/scrollAIChatToBottom';+import { scrollAiChatToBottom } from '@/ai/utils/scrollAiChatToBottom';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { IconArrowDown } from 'twenty-ui/display';@@ -33,7 +33,7 @@ const StyledScrollToBottomButton = styled.button<{ isVisible: boolean }>`}`;-export const AIChatScrollToBottomButton = () => {+export const AiChatScrollToBottomButton = () => {const agentChatIsScrolledToBottom = useAtomStateValue(agentChatIsScrolledToBottomSelector,);@@ -41,7 +41,7 @@ export const AIChatScrollToBottomButton = () => {return (<StyledScrollToBottomButtonisVisible={!agentChatIsScrolledToBottom}- onClick={scrollAIChatToBottom}+ onClick={scrollAiChatToBottom}><IconArrowDown size={16} /></StyledScrollToBottomButton>diff --git a/packages/twenty-front/src/modules/ai/components/AIChatStandaloneError.tsx b/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsxsimilarity index 81%rename from packages/twenty-front/src/modules/ai/components/AIChatStandaloneError.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsxindex 605f3c18e42..c4c80836a16 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatStandaloneError.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsx@@ -1,11 +1,11 @@import { styled } from '@linaria/react';import { themeCssVariables } from 'twenty-ui/theme-constants';-import { AIChatErrorRenderer } from '@/ai/components/AIChatErrorRenderer';+import { AiChatErrorRenderer } from '@/ai/components/AiChatErrorRenderer';import { agentChatErrorComponentFamilyState } from '@/ai/states/agentChatErrorComponentFamilyState';import { agentChatHasMessageComponentSelector } from '@/ai/states/agentChatHasMessageComponentSelector';import { agentChatIsLoadingState } from '@/ai/states/agentChatIsLoadingState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -20,13 +20,13 @@ const StyledErrorContainer = styled.div`width: 100%;`;-export const AIChatStandaloneError = () => {+export const AiChatStandaloneError = () => {const agentChatIsLoading = useAtomStateValue(agentChatIsLoadingState);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatError = useAtomComponentFamilyStateValue(agentChatErrorComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const hasMessages = useAtomComponentSelectorValue(@@ -42,7 +42,7 @@ export const AIChatStandaloneError = () => {return (<StyledErrorContainer>- <AIChatErrorRenderer error={agentChatError} />+ <AiChatErrorRenderer error={agentChatError} /></StyledErrorContainer>);};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx b/packages/twenty-front/src/modules/ai/components/AiChatTab.tsxsimilarity index 71%rename from packages/twenty-front/src/modules/ai/components/AIChatTab.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatTab.tsxindex 0f71c3eca2f..e2a3ce6d3d6 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatTab.tsx@@ -3,15 +3,15 @@ import { useState } from 'react';import { themeCssVariables } from 'twenty-ui/theme-constants';import { DropZone } from '@/activities/files/components/DropZone';-import { AIChatEditorSection } from '@/ai/components/AIChatEditorSection';-import { useAIChatFileUpload } from '@/ai/hooks/useAIChatFileUpload';+import { AiChatEditorSection } from '@/ai/components/AiChatEditorSection';+import { useAiChatFileUpload } from '@/ai/hooks/useAiChatFileUpload';import { AGENT_CHAT_NEW_THREAD_DRAFT_KEY } from '@/ai/states/agentChatDraftsByThreadIdState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { threadIdCreatedFromDraftState } from '@/ai/states/threadIdCreatedFromDraftState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { AIChatQueuedMessages } from '@/ai/components/AIChatQueuedMessages';-import { AIChatTabMessageList } from '@/ai/components/AIChatTabMessageList';+import { AiChatQueuedMessages } from '@/ai/components/AiChatQueuedMessages';+import { AiChatTabMessageList } from '@/ai/components/AiChatTabMessageList';const StyledContainer = styled.div<{ isDraggingFile: boolean }>`background: ${themeCssVariables.background.primary};@@ -23,20 +23,20 @@ const StyledContainer = styled.div<{ isDraggingFile: boolean }>`isDraggingFile ? themeCssVariables.spacing[3] : '0'};`;-export const AIChatTab = () => {+export const AiChatTab = () => {const [isDraggingFile, setIsDraggingFile] = useState(false);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const threadIdCreatedFromDraft = useAtomStateValue(threadIdCreatedFromDraftState,);- const draftKey = currentAIChatThread ?? AGENT_CHAT_NEW_THREAD_DRAFT_KEY;+ const draftKey = currentAiChatThread ?? AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const editorSectionKey =draftKey !== AGENT_CHAT_NEW_THREAD_DRAFT_KEY &&draftKey === threadIdCreatedFromDraft? AGENT_CHAT_NEW_THREAD_DRAFT_KEY: draftKey;- const { uploadFiles } = useAIChatFileUpload();+ const { uploadFiles } = useAiChatFileUpload();return (<StyledContainer@@ -52,9 +52,9 @@ export const AIChatTab = () => {)}{!isDraggingFile && (<>- <AIChatTabMessageList />- <AIChatQueuedMessages />- <AIChatEditorSection key={editorSectionKey} />+ <AiChatTabMessageList />+ <AiChatQueuedMessages />+ <AiChatEditorSection key={editorSectionKey} /></>)}</StyledContainer>diff --git a/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsxsimilarity index 78%rename from packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsxindex 9218131d073..3eced14a1c9 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsx@@ -1,7 +1,7 @@-import { AIChatErrorUnderMessageList } from '@/ai/components/AIChatErrorUnderMessageList';-import { AIChatLastMessageWithStreamingState } from '@/ai/components/AIChatLastMessageWithStreamingState';-import { AIChatNonLastMessageIdsList } from '@/ai/components/AIChatNonLastMessageIdsList';-import { AIChatScrollToBottomButton } from '@/ai/components/AIChatScrollToBottomButton';+import { AiChatErrorUnderMessageList } from '@/ai/components/AiChatErrorUnderMessageList';+import { AiChatLastMessageWithStreamingState } from '@/ai/components/AiChatLastMessageWithStreamingState';+import { AiChatNonLastMessageIdsList } from '@/ai/components/AiChatNonLastMessageIdsList';+import { AiChatScrollToBottomButton } from '@/ai/components/AiChatScrollToBottomButton';import { AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect } from '@/ai/components/AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect';import { AI_CHAT_SCROLL_WRAPPER_ID } from '@/ai/constants/AiChatScrollWrapperId';import { agentChatHasMessageComponentSelector } from '@/ai/states/agentChatHasMessageComponentSelector';@@ -23,7 +23,7 @@ const StyledScrollWrapperContainer = styled.div`width: calc(100% - 24px);`;-export const AIChatTabMessageList = () => {+export const AiChatTabMessageList = () => {const agentChatHasMessage = useAtomComponentSelectorValue(agentChatHasMessageComponentSelector,);@@ -45,12 +45,12 @@ export const AIChatTabMessageList = () => {}}><ScrollWrapper componentInstanceId={AI_CHAT_SCROLL_WRAPPER_ID}>- <AIChatNonLastMessageIdsList />- <AIChatLastMessageWithStreamingState />- <AIChatErrorUnderMessageList />+ <AiChatNonLastMessageIdsList />+ <AiChatLastMessageWithStreamingState />+ <AiChatErrorUnderMessageList /><AgentChatScrollToBottomOnDisplayedThreadChangeLayoutEffect /></ScrollWrapper>- <AIChatScrollToBottomButton />+ <AiChatScrollToBottomButton /></StyledScrollWrapperContainer>);};diff --git a/packages/twenty-front/src/modules/ai/components/AIChatThreadGroup.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThreadGroup.tsxsimilarity index 94%rename from packages/twenty-front/src/modules/ai/components/AIChatThreadGroup.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatThreadGroup.tsxindex 6371568e66e..a6e8c0a0ae3 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatThreadGroup.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatThreadGroup.tsx@@ -1,4 +1,4 @@-import { useAIChatThreadClick } from '@/ai/hooks/useAIChatThreadClick';+import { useAiChatThreadClick } from '@/ai/hooks/useAiChatThreadClick';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';@@ -65,7 +65,7 @@ const StyledThreadTitle = styled.div`white-space: nowrap;`;-export const AIChatThreadGroup = ({+export const AiChatThreadGroup = ({threads,title,}: {@@ -74,7 +74,7 @@ export const AIChatThreadGroup = ({}) => {const { theme } = useContext(ThemeContext);const { t } = useLingui();- const { handleThreadClick } = useAIChatThreadClick();+ const { handleThreadClick } = useAiChatThreadClick();if (threads.length === 0) {return null;diff --git a/packages/twenty-front/src/modules/ai/components/AIChatThreadsList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThreadsList.tsxsimilarity index 82%rename from packages/twenty-front/src/modules/ai/components/AIChatThreadsList.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatThreadsList.tsxindex 7d7bcdc5b42..34845a555a9 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatThreadsList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatThreadsList.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';-import { AIChatThreadGroup } from '@/ai/components/AIChatThreadGroup';-import { AIChatThreadsListFocusEffect } from '@/ai/components/AIChatThreadsListFocusEffect';-import { AIChatSkeletonLoader } from '@/ai/components/internal/AIChatSkeletonLoader';+import { AiChatThreadGroup } from '@/ai/components/AiChatThreadGroup';+import { AiChatThreadsListFocusEffect } from '@/ai/components/AiChatThreadsListFocusEffect';+import { AiChatSkeletonLoader } from '@/ai/components/internal/AiChatSkeletonLoader';import { useChatThreads } from '@/ai/hooks/useChatThreads';-import { useSwitchToNewAIChat } from '@/ai/hooks/useSwitchToNewAIChat';+import { useSwitchToNewAiChat } from '@/ai/hooks/useSwitchToNewAiChat';import { groupThreadsByDate } from '@/ai/utils/groupThreadsByDate';import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';import { t } from '@lingui/core/macro';@@ -35,8 +35,8 @@ const StyledButtonsContainer = styled.div`padding: ${themeCssVariables.spacing[2]} 10px;`;-export const AIChatThreadsList = () => {- const { switchToNewChat } = useSwitchToNewAIChat();+export const AiChatThreadsList = () => {+ const { switchToNewChat } = useSwitchToNewAiChat();const focusId = 'threads-list';@@ -52,16 +52,16 @@ export const AIChatThreadsList = () => {const groupedThreads = groupThreadsByDate(threads);if (loading && threads.length === 0) {- return <AIChatSkeletonLoader />;+ return <AiChatSkeletonLoader />;}return (<>- <AIChatThreadsListFocusEffect focusId={focusId} />+ <AiChatThreadsListFocusEffect focusId={focusId} /><StyledContainer><StyledThreadsContainer>{Object.entries(groupedThreads).map(([title, threadsInGroup]) => (- <AIChatThreadGroup+ <AiChatThreadGroupkey={title}title={capitalize(title)}threads={threadsInGroup}diff --git a/packages/twenty-front/src/modules/ai/components/AIChatThreadsListFocusEffect.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThreadsListFocusEffect.tsxsimilarity index 95%rename from packages/twenty-front/src/modules/ai/components/AIChatThreadsListFocusEffect.tsxrename to packages/twenty-front/src/modules/ai/components/AiChatThreadsListFocusEffect.tsxindex b3cb4280f93..ed33ea8cc43 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatThreadsListFocusEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatThreadsListFocusEffect.tsx@@ -3,7 +3,7 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooksimport { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { useEffect } from 'react';-export const AIChatThreadsListFocusEffect = ({+export const AiChatThreadsListFocusEffect = ({focusId,}: {focusId: string;diff --git a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatContent.tsx b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsxsimilarity index 78%rename from packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatContent.tsxrename to packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsxindex 2f029a5746f..a4e1e22a99a 100644--- a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatContent.tsx+++ b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsx@@ -2,11 +2,11 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { themeCssVariables } from 'twenty-ui/theme-constants';-import { AIChatSkeletonLoader } from '@/ai/components/internal/AIChatSkeletonLoader';-import { NavigationDrawerAIChatThreadDateSection } from '@/ai/components/NavigationDrawerAIChatThreadDateSection';-import { useAIChatThreadClick } from '@/ai/hooks/useAIChatThreadClick';+import { AiChatSkeletonLoader } from '@/ai/components/internal/AiChatSkeletonLoader';+import { NavigationDrawerAiChatThreadDateSection } from '@/ai/components/NavigationDrawerAiChatThreadDateSection';+import { useAiChatThreadClick } from '@/ai/hooks/useAiChatThreadClick';import { useChatThreads } from '@/ai/hooks/useChatThreads';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { type DateGroupKey } from '@/ai/utils/dateGroupKey';import { DATE_GROUP_KEYS } from '@/ai/utils/dateGroupKeys';import { getDateGroupTitle } from '@/ai/utils/getDateGroupTitle';@@ -42,11 +42,11 @@ const StyledFetchMoreTrigger = styled.div`width: 100%;`;-export const NavigationDrawerAIChatContent = () => {+export const NavigationDrawerAiChatContent = () => {const { t } = useLingui();- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);- const { handleThreadClick } = useAIChatThreadClick({+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);+ const { handleThreadClick } = useAiChatThreadClick({resetNavigationStack: true,});@@ -57,7 +57,7 @@ export const NavigationDrawerAIChatContent = () => {if (loading && threads.length === 0) {return (<StyledContainer>- <AIChatSkeletonLoader />+ <AiChatSkeletonLoader /></StyledContainer>);}@@ -78,11 +78,11 @@ export const NavigationDrawerAIChatContent = () => {if (threadsInGroup.length === 0) return null;return (- <NavigationDrawerAIChatThreadDateSection+ <NavigationDrawerAiChatThreadDateSectionkey={key}title={getDateGroupTitle(key)}threads={threadsInGroup}- currentThreadId={currentAIChatThread}+ currentThreadId={currentAiChatThread}onThreadClick={handleThreadClick}/>);diff --git a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatThreadDateSection.tsx b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatThreadDateSection.tsxsimilarity index 93%rename from packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatThreadDateSection.tsxrename to packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatThreadDateSection.tsxindex ef292c95f43..d82e5404a61 100644--- a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAIChatThreadDateSection.tsx+++ b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatThreadDateSection.tsx@@ -32,19 +32,19 @@ const StyledThreadTimestamp = styled.span`padding-right: ${themeCssVariables.spacing['0.5']};`;-export type NavigationDrawerAIChatThreadDateSectionProps = {+export type NavigationDrawerAiChatThreadDateSectionProps = {title: string;threads: AgentChatThread[];currentThreadId: string | null;onThreadClick: (thread: AgentChatThread) => void;};-export const NavigationDrawerAIChatThreadDateSection = ({+export const NavigationDrawerAiChatThreadDateSection = ({title,threads,currentThreadId,onThreadClick,-}: NavigationDrawerAIChatThreadDateSectionProps) => {+}: NavigationDrawerAiChatThreadDateSectionProps) => {const { t } = useLingui();return (diff --git a/packages/twenty-front/src/modules/ai/components/__stories__/AIChatMessage.stories.tsx b/packages/twenty-front/src/modules/ai/components/__stories__/AiChatMessage.stories.tsxsimilarity index 90%rename from packages/twenty-front/src/modules/ai/components/__stories__/AIChatMessage.stories.tsxrename to packages/twenty-front/src/modules/ai/components/__stories__/AiChatMessage.stories.tsxindex 4e437f9f4dd..d13e9a5d9d9 100644--- a/packages/twenty-front/src/modules/ai/components/__stories__/AIChatMessage.stories.tsx+++ b/packages/twenty-front/src/modules/ai/components/__stories__/AiChatMessage.stories.tsx@@ -8,13 +8,13 @@ import { userEvent, within } from 'storybook/test';import { type ExtendedUIMessage } from 'twenty-shared/ai';import { ComponentDecorator } from 'twenty-ui/testing';-import { AIChatMessage } from '@/ai/components/AIChatMessage';+import { AiChatMessage } from '@/ai/components/AiChatMessage';import { AgentChatComponentInstanceContext } from '@/ai/states/AgentChatComponentInstanceContext';import { agentChatDisplayedThreadState } from '@/ai/states/agentChatDisplayedThreadState';import { agentChatMessageComponentFamilyState } from '@/ai/states/agentChatMessageComponentFamilyState';import { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { styled } from '@linaria/react';import { useStore } from 'jotai';@@ -258,7 +258,7 @@ const AgentChatMessagesSetterEffect = ({const store = useStore();useEffect(() => {- const currentThreadId = store.get(currentAIChatThreadState.atom);+ const currentThreadId = store.get(currentAiChatThreadState.atom);store.set(agentChatDisplayedThreadState.atom, currentThreadId);@@ -293,9 +293,9 @@ const AgentChatInstanceDecorator: Decorator = (Story) => (</AgentChatComponentInstanceContext.Provider>);-const meta: Meta<typeof AIChatMessage> = {- title: 'Modules/AI/AIChatMessage',- component: AIChatMessage,+const meta: Meta<typeof AiChatMessage> = {+ title: 'Modules/AI/AiChatMessage',+ component: AiChatMessage,decorators: [ComponentDecorator,RootDecorator,@@ -308,48 +308,48 @@ const meta: Meta<typeof AIChatMessage> = {};export default meta;-type Story = StoryObj<typeof AIChatMessage>;+type Story = StoryObj<typeof AiChatMessage>;// Conversation showcase - demonstrates a full AI chat flowexport const ConversationWithCodeExecution: Story = {render: () => (<StyledConversationContainer>- <AIChatMessage messageId={mockUserMessage.id} />- <AIChatMessage messageId={mockAssistantWithCodeExecution.id} />+ <AiChatMessage messageId={mockUserMessage.id} />+ <AiChatMessage messageId={mockAssistantWithCodeExecution.id} /></StyledConversationContainer>),};export const UserMessage: Story = {- render: () => <AIChatMessage messageId={mockUserMessage.id} />,+ render: () => <AiChatMessage messageId={mockUserMessage.id} />,};export const AssistantTextResponse: Story = {- render: () => <AIChatMessage messageId={mockSimpleTextResponse.id} />,+ render: () => <AiChatMessage messageId={mockSimpleTextResponse.id} />,};export const AssistantStreaming: Story = {- render: () => <AIChatMessage messageId={mockStreamingMessage.id} />,+ render: () => <AiChatMessage messageId={mockStreamingMessage.id} />,};export const CodeExecutionRunning: Story = {- render: () => <AIChatMessage messageId={mockCodeExecutionRunning.id} />,+ render: () => <AiChatMessage messageId={mockCodeExecutionRunning.id} />,};export const CodeExecutionWithError: Story = {- render: () => <AIChatMessage messageId={mockCodeExecutionError.id} />,+ render: () => <AiChatMessage messageId={mockCodeExecutionError.id} />,};export const ThinkingStepsThinkingState: Story = {- render: () => <AIChatMessage messageId={mockThinkingStepsStreaming.id} />,+ render: () => <AiChatMessage messageId={mockThinkingStepsStreaming.id} />,};export const ThinkingStepsDoneCollapsed: Story = {- render: () => <AIChatMessage messageId={mockThinkingStepsDone.id} />,+ render: () => <AiChatMessage messageId={mockThinkingStepsDone.id} />,};export const ThinkingStepsDoneExpanded: Story = {- render: () => <AIChatMessage messageId={mockThinkingStepsDone.id} />,+ render: () => <AiChatMessage messageId={mockThinkingStepsDone.id} />,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const summaryButton = await canvas.findByRole('button', {diff --git a/packages/twenty-front/src/modules/ai/components/__tests__/AIChatAssistantMessageRenderer.test.tsx b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsxsimilarity index 97%rename from packages/twenty-front/src/modules/ai/components/__tests__/AIChatAssistantMessageRenderer.test.tsxrename to packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsxindex e2f7de8efe8..00e4c36ad99 100644--- a/packages/twenty-front/src/modules/ai/components/__tests__/AIChatAssistantMessageRenderer.test.tsx+++ b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';import { ThemeProvider } from 'twenty-ui/theme-constants';import { type ExtendedUIMessagePart } from 'twenty-shared/ai';-import { AIChatAssistantMessageRenderer } from '@/ai/components/AIChatAssistantMessageRenderer';+import { AiChatAssistantMessageRenderer } from '@/ai/components/AiChatAssistantMessageRenderer';jest.mock('@/ai/components/ThinkingStepsDisplay', () => ({ThinkingStepsDisplay: ({@@ -43,7 +43,7 @@ jest.mock('@/ai/components/CodeExecutionDisplay', () => ({const renderAssistantRenderer = (messageParts: ExtendedUIMessagePart[]) => {return render(<ThemeProvider colorScheme="light">- <AIChatAssistantMessageRenderer+ <AiChatAssistantMessageRenderermessageParts={messageParts}isLastMessageStreaming={false}/>@@ -51,7 +51,7 @@ const renderAssistantRenderer = (messageParts: ExtendedUIMessagePart[]) => {);};-describe('AIChatAssistantMessageRenderer', () => {+describe('AiChatAssistantMessageRenderer', () => {it('should group reasoning and tool steps into ThinkingStepsDisplay', () => {const messageParts = [{diff --git a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsxindex d50244921b8..6d894b3d86d 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx@@ -1,4 +1,4 @@-import { useAIChatFileUpload } from '@/ai/hooks/useAIChatFileUpload';+import { useAiChatFileUpload } from '@/ai/hooks/useAiChatFileUpload';import { agentChatSelectedFilesState } from '@/ai/states/agentChatSelectedFilesState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { styled } from '@linaria/react';@@ -23,7 +23,7 @@ export const AgentChatFileUploadButton = () => {agentChatSelectedFilesState,);const fileInputRef = useRef<HTMLInputElement>(null);- const { uploadFiles } = useAIChatFileUpload();+ const { uploadFiles } = useAiChatFileUpload();const handleFileInputChange = (event: React.ChangeEvent<HTMLInputElement>,diff --git a/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsxsimilarity index 97%rename from packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsxrename to packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsxindex b1d30e2118b..612cb4bd498 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsx@@ -13,7 +13,7 @@ import {agentChatUsageComponentFamilyState,type AgentChatLastMessageUsage,} from '@/ai/states/agentChatUsageComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { SettingsBillingLabelValueItem } from '@/settings/billing/components/internal/SettingsBillingLabelValueItem';import { billingState } from '@/client-config/states/billingState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';@@ -93,13 +93,13 @@ const getCachedLabel = (lastMessage: AgentChatLastMessageUsage): string => {return ` (${t`${cachedPercent}% cached`})`;};-export const AIChatContextUsageButton = () => {+export const AiChatContextUsageButton = () => {const { t } = useLingui();const [isHovered, setIsHovered] = useState(false);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatUsage = useAtomComponentFamilyStateValue(agentChatUsageComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const billing = useAtomStateValue(billingState);const isBillingEnabled = billing?.isBillingEnabled ?? false;diff --git a/packages/twenty-front/src/modules/ai/components/internal/AIChatEditorFocusEffect.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatEditorFocusEffect.tsxsimilarity index 86%rename from packages/twenty-front/src/modules/ai/components/internal/AIChatEditorFocusEffect.tsxrename to packages/twenty-front/src/modules/ai/components/internal/AiChatEditorFocusEffect.tsxindex c1985c72690..2d9fc8fb856 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AIChatEditorFocusEffect.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatEditorFocusEffect.tsx@@ -4,13 +4,13 @@ import { useEffect } from 'react';import { shouldFocusChatEditorState } from '@/ai/states/shouldFocusChatEditorState';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';-type AIChatEditorFocusEffectProps = {+type AiChatEditorFocusEffectProps = {editor: Editor | null;};-export const AIChatEditorFocusEffect = ({+export const AiChatEditorFocusEffect = ({editor,-}: AIChatEditorFocusEffectProps) => {+}: AiChatEditorFocusEffectProps) => {const [shouldFocusChatEditor, setShouldFocusChatEditor] = useAtomState(shouldFocusChatEditorState,);diff --git a/packages/twenty-front/src/modules/ai/components/internal/AIChatSkeletonLoader.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsxsimilarity index 92%rename from packages/twenty-front/src/modules/ai/components/internal/AIChatSkeletonLoader.tsxrename to packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsxindex 4fd4cc8ed11..7db5ebacdc2 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AIChatSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsx@@ -7,7 +7,7 @@ import { AGENT_CHAT_NEW_THREAD_DRAFT_KEY } from '@/ai/states/agentChatDraftsByThimport { agentChatMessagesLoadingState } from '@/ai/states/agentChatMessagesLoadingState';import { agentChatThreadsLoadingState } from '@/ai/states/agentChatThreadsLoadingState';import { agentChatHasMessageComponentSelector } from '@/ai/states/agentChatHasMessageComponentSelector';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { skipMessagesSkeletonUntilLoadedState } from '@/ai/states/skipMessagesSkeletonUntilLoadedState';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -32,7 +32,7 @@ const StyledMessageSkeleton = styled.div`const NUMBER_OF_SKELETONS = 6;-export const AIChatSkeletonLoader = () => {+export const AiChatSkeletonLoader = () => {const { theme } = useContext(ThemeContext);const agentChatThreadsLoading = useAtomStateValue(agentChatThreadsLoadingState,@@ -43,14 +43,14 @@ export const AIChatSkeletonLoader = () => {const skipMessagesSkeletonUntilLoaded = useAtomStateValue(skipMessagesSkeletonUntilLoadedState,);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const hasMessages = useAtomComponentSelectorValue(agentChatHasMessageComponentSelector,);const isOnNewChatSlot =- currentAIChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY;+ currentAiChatThread === AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const showForMessagesLoading =agentChatMessagesLoading && !skipMessagesSkeletonUntilLoaded;const shouldRender =diff --git a/packages/twenty-front/src/modules/ai/components/internal/SendMessageButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/SendMessageButton.tsxindex 68b13dd63bf..8799ff9527f 100644--- a/packages/twenty-front/src/modules/ai/components/internal/SendMessageButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/SendMessageButton.tsx@@ -2,7 +2,7 @@ import { AGENT_CHAT_STOP_EVENT_NAME } from '@/ai/constants/AgentChatStopEventNamimport { agentChatInputIsEmptySelector } from '@/ai/states/agentChatInputIsEmptySelector';import { agentChatIsLoadingState } from '@/ai/states/agentChatIsLoadingState';import { agentChatIsStreamingComponentFamilyState } from '@/ai/states/agentChatIsStreamingComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { dispatchBrowserEvent } from '@/browser-event/utils/dispatchBrowserEvent';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -20,10 +20,10 @@ export const SendMessageButton = ({ onSend }: SendMessageButtonProps) => {const agentChatIsLoading = useAtomStateValue(agentChatIsLoadingState);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const agentChatIsStreaming = useAtomComponentFamilyStateValue(agentChatIsStreamingComponentFamilyState,- { threadId: currentAIChatThread },+ { threadId: currentAiChatThread },);const handleStopClick = () => {diff --git a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsxsimilarity index 95%rename from packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsxrename to packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsxindex 413c783f8b0..f71a4d97a32 100644--- a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx+++ b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsx@@ -36,13 +36,13 @@ const StyledSuggestedPromptButtonContainer = styled.div`const pickRandom = <T,>(items: T[]): T =>items[Math.floor(Math.random() * items.length)];-type AIChatSuggestedPromptsProps = {+type AiChatSuggestedPromptsProps = {editor: Editor | null;};-export const AIChatSuggestedPrompts = ({+export const AiChatSuggestedPrompts = ({editor,-}: AIChatSuggestedPromptsProps) => {+}: AiChatSuggestedPromptsProps) => {const { t: resolveMessage } = useLingui();const setAgentChatInput = useSetAtomState(agentChatInputState);diff --git a/packages/twenty-front/src/modules/ai/graphql/mutations/uploadAIChatFile.ts b/packages/twenty-front/src/modules/ai/graphql/mutations/uploadAiChatFile.tssimilarity index 64%rename from packages/twenty-front/src/modules/ai/graphql/mutations/uploadAIChatFile.tsrename to packages/twenty-front/src/modules/ai/graphql/mutations/uploadAiChatFile.tsindex 86eadd1d46e..6dc351e0031 100644--- a/packages/twenty-front/src/modules/ai/graphql/mutations/uploadAIChatFile.ts+++ b/packages/twenty-front/src/modules/ai/graphql/mutations/uploadAiChatFile.ts@@ -1,8 +1,8 @@import { gql } from '@apollo/client';export const UPLOAD_AI_CHAT_FILE = gql`- mutation uploadAIChatFile($file: Upload!) {- uploadAIChatFile(file: $file) {+ mutation uploadAiChatFile($file: Upload!) {+ uploadAiChatFile(file: $file) {idpathsizediff --git a/packages/twenty-front/src/modules/ai/hooks/useAgentChat.ts b/packages/twenty-front/src/modules/ai/hooks/useAgentChat.tsindex ce1b958f854..0e62543abfd 100644--- a/packages/twenty-front/src/modules/ai/hooks/useAgentChat.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useAgentChat.ts@@ -22,7 +22,7 @@ import { agentChatInputState } from '@/ai/states/agentChatInputState';import { agentChatSelectedFilesState } from '@/ai/states/agentChatSelectedFilesState';import { agentChatUploadedFilesState } from '@/ai/states/agentChatUploadedFilesState';import { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { useGetBrowsingContext } from '@/ai/hooks/useBrowsingContext';import { useAgentChatModelId } from '@/ai/hooks/useAgentChatModelId';import { useListenToBrowserEvent } from '@/browser-event/hooks/useListenToBrowserEvent';@@ -37,7 +37,7 @@ export const useAgentChat = (const { modelIdForRequest } = useAgentChatModelId();const { getBrowsingContext } = useGetBrowsingContext();const apolloClient = useApolloClient();- const setCurrentAIChatThread = useSetAtomState(currentAIChatThreadState);+ const setCurrentAiChatThread = useSetAtomState(currentAiChatThreadState);const store = useStore();const agentChatSelectedFiles = useAtomStateValue(agentChatSelectedFilesState);@@ -55,7 +55,7 @@ export const useAgentChat = (const handleSendMessage = useCallback(async () => {const draftKey =- store.get(currentAIChatThreadState.atom) ??+ store.get(currentAiChatThreadState.atom) ??AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const contentToSend =draftKey === AGENT_CHAT_NEW_THREAD_DRAFT_KEY@@ -158,7 +158,7 @@ export const useAgentChat = (setPendingThreadIdAfterFirstSend((pendingId) => {if (isDefined(pendingId)) {- setCurrentAIChatThread(pendingId);+ setCurrentAiChatThread(pendingId);}return null;@@ -195,7 +195,7 @@ export const useAgentChat = (});if (draftKey === AGENT_CHAT_NEW_THREAD_DRAFT_KEY) {- setCurrentAIChatThread(threadId);+ setCurrentAiChatThread(threadId);}setPendingThreadIdAfterFirstSend(null);@@ -211,7 +211,7 @@ export const useAgentChat = (setAgentChatUploadedFiles,setAgentChatDraftsByThreadId,modelIdForRequest,- setCurrentAIChatThread,+ setCurrentAiChatThread,apolloClient,]);@@ -221,7 +221,7 @@ export const useAgentChat = (});const handleStop = useCallback(async () => {- const threadId = store.get(currentAIChatThreadState.atom);+ const threadId = store.get(currentAiChatThreadState.atom);if (!isDefined(threadId) || !isValidUuid(threadId)) {return;diff --git a/packages/twenty-front/src/modules/ai/hooks/useAgentChatSubscription.ts b/packages/twenty-front/src/modules/ai/hooks/useAgentChatSubscription.tsindex dbe21f6ba08..6836ff906c0 100644--- a/packages/twenty-front/src/modules/ai/hooks/useAgentChatSubscription.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useAgentChatSubscription.ts@@ -18,7 +18,7 @@ import { agentChatHandleEventCallbackComponentFamilyState } from '@/ai/states/agimport { agentChatIsStreamingComponentFamilyState } from '@/ai/states/agentChatIsStreamingComponentFamilyState';import { agentChatMessagesComponentFamilyState } from '@/ai/states/agentChatMessagesComponentFamilyState';import { agentChatUsageComponentFamilyState } from '@/ai/states/agentChatUsageComponentFamilyState';-import { currentAIChatThreadTitleComponentFamilyState } from '@/ai/states/currentAIChatThreadTitleComponentFamilyState';+import { currentAiChatThreadTitleComponentFamilyState } from '@/ai/states/currentAiChatThreadTitleComponentFamilyState';import { dispatchBrowserEvent } from '@/browser-event/utils/dispatchBrowserEvent';import { useAtomComponentFamilyStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -116,7 +116,7 @@ export const useAgentChatSubscription = (threadId: string | null) => {agentChatUsageComponentFamilyState,);const threadTitleFamilyCallback = useAtomComponentFamilyStateCallbackState(- currentAIChatThreadTitleComponentFamilyState,+ currentAiChatThreadTitleComponentFamilyState,);useEffect(() => {diff --git a/packages/twenty-front/src/modules/ai/hooks/useAIChatEditor.ts b/packages/twenty-front/src/modules/ai/hooks/useAiChatEditor.tssimilarity index 96%rename from packages/twenty-front/src/modules/ai/hooks/useAIChatEditor.tsrename to packages/twenty-front/src/modules/ai/hooks/useAiChatEditor.tsindex d36d4339f4a..c762c4b6a71 100644--- a/packages/twenty-front/src/modules/ai/hooks/useAIChatEditor.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useAiChatEditor.ts@@ -15,7 +15,7 @@ import {agentChatDraftsByThreadIdState,} from '@/ai/states/agentChatDraftsByThreadIdState';import { agentChatInputState } from '@/ai/states/agentChatInputState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { dispatchAgentChatEnsureThreadForDraftEvent } from '@/ai/utils/dispatchAgentChatEnsureThreadForDraftEvent';import { dispatchAgentChatSendMessageEvent } from '@/ai/utils/dispatchAgentChatSendMessageEvent';import { MENTION_SUGGESTION_PLUGIN_KEY } from '@/mention/constants/MentionSuggestionPluginKey';@@ -41,9 +41,9 @@ const textToTiptapContent = (text: string) => ({],});-export const useAIChatEditor = () => {+export const useAiChatEditor = () => {const setAgentChatInput = useSetAtomState(agentChatInputState);- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);const [agentChatDraftsByThreadId, setAgentChatDraftsByThreadId] =useAtomState(agentChatDraftsByThreadIdState);const { searchMentionRecords } = useMentionSearch();@@ -51,7 +51,7 @@ export const useAIChatEditor = () => {const { removeFocusItemFromFocusStackById } =useRemoveFocusItemFromFocusStackById();- const draftKey = currentAIChatThread ?? AGENT_CHAT_NEW_THREAD_DRAFT_KEY;+ const draftKey = currentAiChatThread ?? AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const initialDraft = agentChatDraftsByThreadId[draftKey] ?? '';const initialContent = textToTiptapContent(initialDraft);diff --git a/packages/twenty-front/src/modules/ai/hooks/useAIChatFileUpload.ts b/packages/twenty-front/src/modules/ai/hooks/useAiChatFileUpload.tssimilarity index 96%rename from packages/twenty-front/src/modules/ai/hooks/useAIChatFileUpload.tsrename to packages/twenty-front/src/modules/ai/hooks/useAiChatFileUpload.tsindex b70bd651fea..63084ff68fa 100644--- a/packages/twenty-front/src/modules/ai/hooks/useAIChatFileUpload.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useAiChatFileUpload.ts@@ -9,7 +9,7 @@ import { isDefined } from 'twenty-shared/utils';import { type AgentChatFileUIPart } from '@/ai/types/agent-chat-file-ui-part.type';import { UploadAiChatFileDocument } from '~/generated-metadata/graphql';-export const useAIChatFileUpload = () => {+export const useAiChatFileUpload = () => {const apolloClient = useApolloClient();const [uploadAiChatFile] = useMutation(UploadAiChatFileDocument, {client: apolloClient,@@ -31,7 +31,7 @@ export const useAIChatFileUpload = () => {},});- const response = result?.data?.uploadAIChatFile;+ const response = result?.data?.uploadAiChatFile;if (!isDefined(response)) {throw new Error(t`Couldn't upload the file.`);diff --git a/packages/twenty-front/src/modules/ai/hooks/useAIChatThreadClick.ts b/packages/twenty-front/src/modules/ai/hooks/useAiChatThreadClick.tssimilarity index 75%rename from packages/twenty-front/src/modules/ai/hooks/useAIChatThreadClick.tsrename to packages/twenty-front/src/modules/ai/hooks/useAiChatThreadClick.tsindex a3c08376d74..749e6daffc6 100644--- a/packages/twenty-front/src/modules/ai/hooks/useAIChatThreadClick.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useAiChatThreadClick.ts@@ -1,10 +1,10 @@import { agentChatDraftsByThreadIdState } from '@/ai/states/agentChatDraftsByThreadIdState';import { agentChatInputState } from '@/ai/states/agentChatInputState';import { agentChatUsageComponentFamilyState } from '@/ai/states/agentChatUsageComponentFamilyState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';-import { currentAIChatThreadTitleComponentFamilyState } from '@/ai/states/currentAIChatThreadTitleComponentFamilyState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';+import { currentAiChatThreadTitleComponentFamilyState } from '@/ai/states/currentAiChatThreadTitleComponentFamilyState';import { threadIdCreatedFromDraftState } from '@/ai/states/threadIdCreatedFromDraftState';-import { useOpenAskAIPageInSidePanel } from '@/side-panel/hooks/useOpenAskAIPageInSidePanel';+import { useOpenAskAiPageInSidePanel } from '@/side-panel/hooks/useOpenAskAiPageInSidePanel';import { useAtomComponentFamilyStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';@@ -12,44 +12,44 @@ import { useStore } from 'jotai';import { isDefined } from 'twenty-shared/utils';import { type AgentChatThread } from '~/generated-metadata/graphql';-export type UseAIChatThreadClickOptions = {+export type UseAiChatThreadClickOptions = {resetNavigationStack?: boolean;};-export const useAIChatThreadClick = (- options: UseAIChatThreadClickOptions = {},+export const useAiChatThreadClick = (+ options: UseAiChatThreadClickOptions = {},) => {const { resetNavigationStack = false } = options;const setThreadIdCreatedFromDraft = useSetAtomState(threadIdCreatedFromDraftState,);- const [currentAIChatThread, setCurrentAIChatThread] = useAtomState(- currentAIChatThreadState,+ const [currentAiChatThread, setCurrentAiChatThread] = useAtomState(+ currentAiChatThreadState,);const setAgentChatInput = useSetAtomState(agentChatInputState);const setAgentChatDraftsByThreadId = useSetAtomState(agentChatDraftsByThreadIdState,);const threadTitleFamilyCallback = useAtomComponentFamilyStateCallbackState(- currentAIChatThreadTitleComponentFamilyState,+ currentAiChatThreadTitleComponentFamilyState,);const agentChatUsageFamilyCallback = useAtomComponentFamilyStateCallbackState(agentChatUsageComponentFamilyState,);const store = useStore();- const { openAskAIPage } = useOpenAskAIPageInSidePanel();+ const { openAskAiPage } = useOpenAskAiPageInSidePanel();const handleThreadClick = (thread: AgentChatThread) => {setThreadIdCreatedFromDraft(null);- const isSameThread = thread.id === currentAIChatThread;+ const isSameThread = thread.id === currentAiChatThread;- if (currentAIChatThread !== null) {+ if (currentAiChatThread !== null) {setAgentChatDraftsByThreadId((prev) => ({...prev,- [currentAIChatThread]: store.get(agentChatInputState.atom),+ [currentAiChatThread]: store.get(agentChatInputState.atom),}));}- setCurrentAIChatThread(thread.id);+ setCurrentAiChatThread(thread.id);if (!isSameThread) {const newDraft =@@ -82,7 +82,7 @@ export const useAIChatThreadClick = (: null,);- openAskAIPage({+ openAskAiPage({resetNavigationStack,});};diff --git a/packages/twenty-front/src/modules/ai/hooks/useCreateAgentChatThread.ts b/packages/twenty-front/src/modules/ai/hooks/useCreateAgentChatThread.tsindex 5f964c82266..fd9bc024db3 100644--- a/packages/twenty-front/src/modules/ai/hooks/useCreateAgentChatThread.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useCreateAgentChatThread.ts@@ -5,7 +5,7 @@ import {agentChatDraftsByThreadIdState,} from '@/ai/states/agentChatDraftsByThreadIdState';import { agentChatInputState } from '@/ai/states/agentChatInputState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { shouldFocusChatEditorState } from '@/ai/states/shouldFocusChatEditorState';import { hasTriggeredCreateForDraftState } from '@/ai/states/hasTriggeredCreateForDraftState';import { isCreatingChatThreadState } from '@/ai/states/isCreatingChatThreadState';@@ -20,7 +20,7 @@ import { useMutation } from '@apollo/client/react';import { CreateChatThreadDocument } from '~/generated-metadata/graphql';export const useCreateAgentChatThread = () => {- const setCurrentAIChatThread = useSetAtomState(currentAIChatThreadState);+ const setCurrentAiChatThread = useSetAtomState(currentAiChatThreadState);const setAgentChatInput = useSetAtomState(agentChatInputState);const setIsCreatingChatThread = useSetAtomState(isCreatingChatThreadState);const setAgentChatDraftsByThreadId = useSetAtomState(@@ -55,7 +55,7 @@ export const useCreateAgentChatThread = () => {const newThreadId = data.createChatThread.id;const previousDraftKey =- store.get(currentAIChatThreadState.atom) ??+ store.get(currentAiChatThreadState.atom) ??AGENT_CHAT_NEW_THREAD_DRAFT_KEY;const draftsSnapshot = store.get(agentChatDraftsByThreadIdState.atom);const newDraft = draftsSnapshot[AGENT_CHAT_NEW_THREAD_DRAFT_KEY] ?? '';@@ -79,7 +79,7 @@ export const useCreateAgentChatThread = () => {}));}- setCurrentAIChatThread(newThreadId);+ setCurrentAiChatThread(newThreadId);setAgentChatInput(newDraft);},onError: () => {diff --git a/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadExistsForDraft.ts b/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadExistsForDraft.tsindex cb1c1b61550..3bf9d6a007a 100644--- a/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadExistsForDraft.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadExistsForDraft.ts@@ -5,7 +5,7 @@ import {AGENT_CHAT_NEW_THREAD_DRAFT_KEY,agentChatDraftsByThreadIdState,} from '@/ai/states/agentChatDraftsByThreadIdState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { hasTriggeredCreateForDraftState } from '@/ai/states/hasTriggeredCreateForDraftState';import { isCreatingChatThreadState } from '@/ai/states/isCreatingChatThreadState';import { pendingCreateFromDraftPromiseState } from '@/ai/states/pendingCreateFromDraftPromiseState';@@ -21,7 +21,7 @@ export const useEnsureAgentChatThreadExistsForDraft = (const store = useStore();const ensureThreadExistsForDraft = useCallback(() => {- const currentThreadId = store.get(currentAIChatThreadState.atom);+ const currentThreadId = store.get(currentAiChatThreadState.atom);if (currentThreadId !== AGENT_CHAT_NEW_THREAD_DRAFT_KEY) {return;diff --git a/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadIdForSend.ts b/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadIdForSend.tsindex 4e41cc703dd..d3c43a8b811 100644--- a/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadIdForSend.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useEnsureAgentChatThreadIdForSend.ts@@ -3,7 +3,7 @@ import { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';import { AGENT_CHAT_NEW_THREAD_DRAFT_KEY } from '@/ai/states/agentChatDraftsByThreadIdState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { isCreatingChatThreadState } from '@/ai/states/isCreatingChatThreadState';import { isCreatingForFirstSendState } from '@/ai/states/isCreatingForFirstSendState';import { pendingCreateFromDraftPromiseState } from '@/ai/states/pendingCreateFromDraftPromiseState';@@ -18,7 +18,7 @@ export const useEnsureAgentChatThreadIdForSend = (const ensureThreadIdForSend = useCallback(async (): Promise<string | null> => {- const currentThreadId = store.get(currentAIChatThreadState.atom);+ const currentThreadId = store.get(currentAiChatThreadState.atom);if (currentThreadId !== null &&diff --git a/packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAIChat.ts b/packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAiChat.tssimilarity index 73%rename from packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAIChat.tsrename to packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAiChat.tsindex 86f53d03c14..4279fb274b0 100644--- a/packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAIChat.ts+++ b/packages/twenty-front/src/modules/ai/hooks/useSwitchToNewAiChat.ts@@ -5,27 +5,27 @@ import {agentChatDraftsByThreadIdState,} from '@/ai/states/agentChatDraftsByThreadIdState';import { agentChatInputState } from '@/ai/states/agentChatInputState';-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';import { shouldFocusChatEditorState } from '@/ai/states/shouldFocusChatEditorState';import { hasTriggeredCreateForDraftState } from '@/ai/states/hasTriggeredCreateForDraftState';import { threadIdCreatedFromDraftState } from '@/ai/states/threadIdCreatedFromDraftState';-import { useOpenAskAIPageInSidePanel } from '@/side-panel/hooks/useOpenAskAIPageInSidePanel';+import { useOpenAskAiPageInSidePanel } from '@/side-panel/hooks/useOpenAskAiPageInSidePanel';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';-export const useSwitchToNewAIChat = () => {+export const useSwitchToNewAiChat = () => {const setThreadIdCreatedFromDraft = useSetAtomState(threadIdCreatedFromDraftState,);- const [currentAIChatThread, setCurrentAIChatThread] = useAtomState(- currentAIChatThreadState,+ const [currentAiChatThread, setCurrentAiChatThread] = useAtomState(+ currentAiChatThreadState,);const setAgentChatInput = useSetAtomState(agentChatInputState);const setAgentChatDraftsByThreadId = useSetAtomState(agentChatDraftsByThreadIdState,);const store = useStore();- const { openAskAIPage } = useOpenAskAIPageInSidePanel();+ const { openAskAiPage } = useOpenAskAiPageInSidePanel();const switchToNewChat = () => {setThreadIdCreatedFromDraft(null);@@ -33,16 +33,16 @@ export const useSwitchToNewAIChat = () => {store.get(agentChatDraftsByThreadIdState.atom)[AGENT_CHAT_NEW_THREAD_DRAFT_KEY] ?? '';- if (currentAIChatThread !== null) {+ if (currentAiChatThread !== null) {setAgentChatDraftsByThreadId((prev) => ({...prev,- [currentAIChatThread]: store.get(agentChatInputState.atom),+ [currentAiChatThread]: store.get(agentChatInputState.atom),}));}store.set(hasTriggeredCreateForDraftState.atom, false);- setCurrentAIChatThread(AGENT_CHAT_NEW_THREAD_DRAFT_KEY);+ setCurrentAiChatThread(AGENT_CHAT_NEW_THREAD_DRAFT_KEY);setAgentChatInput(newChatDraft);- openAskAIPage();+ openAskAiPage();store.set(shouldFocusChatEditorState.atom, true);};diff --git a/packages/twenty-front/src/modules/ai/states/agentChatErrorComponentFamilyState.ts b/packages/twenty-front/src/modules/ai/states/agentChatErrorComponentFamilyState.tsindex ffffaae427a..4367e102932 100644--- a/packages/twenty-front/src/modules/ai/states/agentChatErrorComponentFamilyState.ts+++ b/packages/twenty-front/src/modules/ai/states/agentChatErrorComponentFamilyState.ts@@ -1,10 +1,10 @@import { AgentChatComponentInstanceContext } from '@/ai/states/AgentChatComponentInstanceContext';-import { type AIChatError } from '@/ai/types/AIChatError';+import { type AiChatError } from '@/ai/types/AiChatError';import { createAtomComponentFamilyState } from '@/ui/utilities/state/jotai/utils/createAtomComponentFamilyState';export const agentChatErrorComponentFamilyState =createAtomComponentFamilyState<- AIChatError | null,+ AiChatError | null,{ threadId: string | null }>({key: 'agentChatErrorComponentFamilyState',diff --git a/packages/twenty-front/src/modules/ai/states/currentAIChatThreadState.ts b/packages/twenty-front/src/modules/ai/states/currentAiChatThreadState.tssimilarity index 54%rename from packages/twenty-front/src/modules/ai/states/currentAIChatThreadState.tsrename to packages/twenty-front/src/modules/ai/states/currentAiChatThreadState.tsindex 20b27940c70..eb98d26389a 100644--- a/packages/twenty-front/src/modules/ai/states/currentAIChatThreadState.ts+++ b/packages/twenty-front/src/modules/ai/states/currentAiChatThreadState.ts@@ -1,6 +1,6 @@import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';-export const currentAIChatThreadState = createAtomState<string | null>({- key: 'ai/currentAIChatThreadState',+export const currentAiChatThreadState = createAtomState<string | null>({+ key: 'ai/currentAiChatThreadState',defaultValue: null,});diff --git a/packages/twenty-front/src/modules/ai/states/currentAIChatThreadTitleComponentFamilyState.ts b/packages/twenty-front/src/modules/ai/states/currentAiChatThreadTitleComponentFamilyState.tssimilarity index 76%rename from packages/twenty-front/src/modules/ai/states/currentAIChatThreadTitleComponentFamilyState.tsrename to packages/twenty-front/src/modules/ai/states/currentAiChatThreadTitleComponentFamilyState.tsindex 95e125c36b7..5c8793425b1 100644--- a/packages/twenty-front/src/modules/ai/states/currentAIChatThreadTitleComponentFamilyState.ts+++ b/packages/twenty-front/src/modules/ai/states/currentAiChatThreadTitleComponentFamilyState.ts@@ -1,9 +1,9 @@import { AgentChatComponentInstanceContext } from '@/ai/states/AgentChatComponentInstanceContext';import { createAtomComponentFamilyState } from '@/ui/utilities/state/jotai/utils/createAtomComponentFamilyState';-export const currentAIChatThreadTitleComponentFamilyState =+export const currentAiChatThreadTitleComponentFamilyState =createAtomComponentFamilyState<string | null, { threadId: string | null }>({- key: 'currentAIChatThreadTitleComponentFamilyState',+ key: 'currentAiChatThreadTitleComponentFamilyState',defaultValue: null,componentInstanceContext: AgentChatComponentInstanceContext,});diff --git a/packages/twenty-front/src/modules/ai/types/AIChatError.ts b/packages/twenty-front/src/modules/ai/types/AiChatError.tssimilarity index 54%rename from packages/twenty-front/src/modules/ai/types/AIChatError.tsrename to packages/twenty-front/src/modules/ai/types/AiChatError.tsindex 6110a0bd781..b43326203e8 100644--- a/packages/twenty-front/src/modules/ai/types/AIChatError.ts+++ b/packages/twenty-front/src/modules/ai/types/AiChatError.ts@@ -1,3 +1,3 @@import { type CombinedGraphQLErrors } from '@apollo/client/errors';-export type AIChatError = Error | CombinedGraphQLErrors;+export type AiChatError = Error | CombinedGraphQLErrors;diff --git a/packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.ts b/packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.tsindex 535d5595604..ebeae4f5304 100644--- a/packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.ts+++ b/packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.ts@@ -1,5 +1,5 @@// Error codes matching backend AgentExceptionCode and BillingExceptionCode-export const AIChatErrorCode = {+export const AiChatErrorCode = {BILLING_CREDITS_EXHAUSTED: 'BILLING_CREDITS_EXHAUSTED',API_KEY_NOT_CONFIGURED: 'API_KEY_NOT_CONFIGURED',} as const;diff --git a/packages/twenty-front/src/modules/ai/utils/scrollAIChatToBottom.ts b/packages/twenty-front/src/modules/ai/utils/scrollAiChatToBottom.tssimilarity index 87%rename from packages/twenty-front/src/modules/ai/utils/scrollAIChatToBottom.tsrename to packages/twenty-front/src/modules/ai/utils/scrollAiChatToBottom.tsindex f34fe4b2b4c..3b54fe1fadf 100644--- a/packages/twenty-front/src/modules/ai/utils/scrollAIChatToBottom.ts+++ b/packages/twenty-front/src/modules/ai/utils/scrollAiChatToBottom.ts@@ -1,6 +1,6 @@import { AI_CHAT_SCROLL_WRAPPER_ID } from '@/ai/constants/AiChatScrollWrapperId';-export const scrollAIChatToBottom = () => {+export const scrollAiChatToBottom = () => {const scrollWrapperElement = document.getElementById(`scroll-wrapper-${AI_CHAT_SCROLL_WRAPPER_ID}`,);diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsxindex c9333168953..e5295b75fd7 100644--- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx+++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx@@ -152,9 +152,9 @@ const SettingsAI = lazy(() =>})),);-const SettingsAIUsageUserDetail = lazy(() =>- import('~/pages/settings/ai/SettingsAIUsageUserDetail').then((module) => ({- default: module.SettingsAIUsageUserDetail,+const SettingsAiUsageUserDetail = lazy(() =>+ import('~/pages/settings/ai/SettingsAiUsageUserDetail').then((module) => ({+ default: module.SettingsAiUsageUserDetail,})),);@@ -230,9 +230,9 @@ const SettingsSkillForm = lazy(() =>})),);-const SettingsAIPrompts = lazy(() =>- import('~/pages/settings/ai/SettingsAIPrompts').then((module) => ({- default: module.SettingsAIPrompts,+const SettingsAiPrompts = lazy(() =>+ import('~/pages/settings/ai/SettingsAiPrompts').then((module) => ({+ default: module.SettingsAiPrompts,})),);@@ -564,33 +564,33 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => (element={<SettingsApiWebhooks />}/><Route path={SettingsPath.AI} element={<SettingsAI />} />- <Route path={SettingsPath.AIPrompts} element={<SettingsAIPrompts />} />+ <Route path={SettingsPath.AiPrompts} element={<SettingsAiPrompts />} /><Route- path={SettingsPath.AINewAgent}+ path={SettingsPath.AiNewAgent}element={<SettingsAgentForm mode="create" />}/><Route- path={SettingsPath.AIAgentDetail}+ path={SettingsPath.AiAgentDetail}element={<SettingsAgentForm mode="edit" />}/><Route- path={SettingsPath.AIAgentTurnDetail}+ path={SettingsPath.AiAgentTurnDetail}element={<SettingsAgentTurnDetail />}/><Route- path={SettingsPath.AINewSkill}+ path={SettingsPath.AiNewSkill}element={<SettingsSkillForm mode="create" />}/><Route- path={SettingsPath.AISkillDetail}+ path={SettingsPath.AiSkillDetail}element={<SettingsSkillForm mode="edit" />}/><Route- path={SettingsPath.AIUsageUserDetail}- element={<SettingsAIUsageUserDetail />}+ path={SettingsPath.AiUsageUserDetail}+ element={<SettingsAiUsageUserDetail />}/><Route- path={SettingsPath.AIToolDetail}+ path={SettingsPath.AiToolDetail}element={<SettingsToolDetail />}/><Routediff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/constants/EngineComponentKeyHeadlessComponentMap.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/constants/EngineComponentKeyHeadlessComponentMap.tsxindex 3f759bf55cf..4f453e56b82 100644--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/constants/EngineComponentKeyHeadlessComponentMap.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/constants/EngineComponentKeyHeadlessComponentMap.tsx@@ -208,7 +208,7 @@ export const ENGINE_COMPONENT_KEY_COMPONENT_MAP: Record<),[EngineComponentKey.VIEW_PREVIOUS_AI_CHATS]: (<HeadlessOpenSidePanelPageEngineCommand- page={SidePanelPages.ViewPreviousAIChats}+ page={SidePanelPages.ViewPreviousAiChats}pageTitle={msg`View Previous AI Chats`}pageIcon={IconHistory}/>diff --git a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuHotKeys.ts b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuHotKeys.tsindex 6a4cda074ba..071668ae9ba 100644--- a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuHotKeys.ts+++ b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuHotKeys.ts@@ -1,6 +1,6 @@import { useKeyboardShortcutMenu } from '@/keyboard-shortcut-menu/hooks/useKeyboardShortcutMenu';import { SIDE_PANEL_FOCUS_ID } from '@/side-panel/constants/SidePanelFocusId';-import { useOpenAskAIPageInSidePanel } from '@/side-panel/hooks/useOpenAskAIPageInSidePanel';+import { useOpenAskAiPageInSidePanel } from '@/side-panel/hooks/useOpenAskAiPageInSidePanel';import { useOpenRecordsSearchPageInSidePanel } from '@/side-panel/hooks/useOpenRecordsSearchPageInSidePanel';import { useSidePanelHistory } from '@/side-panel/hooks/useSidePanelHistory';import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';@@ -20,7 +20,7 @@ export const useCommandMenuHotKeys = () => {const { openRecordsSearchPage } = useOpenRecordsSearchPageInSidePanel();- const { openAskAIPage } = useOpenAskAIPageInSidePanel();+ const { openAskAiPage } = useOpenAskAiPageInSidePanel();const { goBackFromSidePanel, goBackOneSubPageOrMainPage } =useSidePanelHistory();@@ -59,11 +59,11 @@ export const useCommandMenuHotKeys = () => {keys: ['@'],callback: () => {if (isAiEnabled) {- openAskAIPage({ resetNavigationStack: true });+ openAskAiPage({ resetNavigationStack: true });}},containsModifier: false,- dependencies: [openAskAIPage, isAiEnabled],+ dependencies: [openAskAiPage, isAiEnabled],options: {ignoreModifiers: true,},diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawer.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawer.tsxindex 839402e8864..57bd1eaea7f 100644--- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawer.tsx+++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawer.tsx@@ -1,5 +1,5 @@import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';-import { NavigationDrawerAIChatContent } from '@/ai/components/NavigationDrawerAIChatContent';+import { NavigationDrawerAiChatContent } from '@/ai/components/NavigationDrawerAiChatContent';import { MainNavigationDrawerNavigationContent } from '@/navigation/components/MainNavigationDrawerNavigationContent';import { MainNavigationDrawerTabsRow } from '@/navigation/components/MainNavigationDrawerTabsRow';import { NavigationDrawer } from '@/ui/navigation/navigation-drawer/components/NavigationDrawer';@@ -27,7 +27,7 @@ export const MainNavigationDrawer = ({ className }: { className?: string }) => {<NavigationDrawerScrollableContent>{navigationDrawerActiveTab ===NAVIGATION_DRAWER_TABS.AI_CHAT_HISTORY ? (- <NavigationDrawerAIChatContent />+ <NavigationDrawerAiChatContent />) : (<MainNavigationDrawerNavigationContent />)}diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsxindex f5ced25db90..f9d8c2056b5 100644--- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx+++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerTabsRow.tsx@@ -11,7 +11,7 @@ import { useIsMobile } from 'twenty-ui/utilities';import { useContext } from 'react';-import { useSwitchToNewAIChat } from '@/ai/hooks/useSwitchToNewAIChat';+import { useSwitchToNewAiChat } from '@/ai/hooks/useSwitchToNewAiChat';import { NavigationDrawerAnimatedCollapseWrapper } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper';import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { navigationDrawerActiveTabState } from '@/ui/navigation/states/navigationDrawerActiveTabState';@@ -140,7 +140,7 @@ export const MainNavigationDrawerTabsRow = () => {);const [navigationDrawerActiveTab, setNavigationDrawerActiveTab] =useAtomState(navigationDrawerActiveTabState);- const { switchToNewChat } = useSwitchToNewAIChat();+ const { switchToNewChat } = useSwitchToNewAiChat();const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const setIsNavigationDrawerExpanded = useSetAtomState(isNavigationDrawerExpandedState,diff --git a/packages/twenty-front/src/modules/navigation/components/MobileNavigationBar.tsx b/packages/twenty-front/src/modules/navigation/components/MobileNavigationBar.tsxindex 0c6d1c1ee0a..2be908b6142 100644--- a/packages/twenty-front/src/modules/navigation/components/MobileNavigationBar.tsx+++ b/packages/twenty-front/src/modules/navigation/components/MobileNavigationBar.tsx@@ -1,4 +1,4 @@-import { useSwitchToNewAIChat } from '@/ai/hooks/useSwitchToNewAIChat';+import { useSwitchToNewAiChat } from '@/ai/hooks/useSwitchToNewAiChat';import { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';import { contextStoreCurrentObjectMetadataItemIdComponentState } from '@/context-store/states/contextStoreCurrentObjectMetadataItemIdComponentState';import { useDefaultHomePagePath } from '@/navigation/hooks/useDefaultHomePagePath';@@ -23,7 +23,7 @@ import {import { NavigationBar } from 'twenty-ui/navigation';import { FeatureFlagKey } from '~/generated-metadata/graphql';-type NavigationBarItemName = 'main' | 'search' | 'newAIChat';+type NavigationBarItemName = 'main' | 'search' | 'newAiChat';export const MobileNavigationBar = () => {const navigate = useNavigate();@@ -36,7 +36,7 @@ export const MobileNavigationBar = () => {useAtomState(isNavigationDrawerExpandedState);const [currentMobileNavigationDrawer, setCurrentMobileNavigationDrawer] =useAtomState(currentMobileNavigationDrawerState);- const { switchToNewChat } = useSwitchToNewAIChat();+ const { switchToNewChat } = useSwitchToNewAiChat();const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const { alphaSortedActiveNonSystemObjectMetadataItems } =useFilteredObjectMetadataItems();@@ -95,7 +95,7 @@ export const MobileNavigationBar = () => {...(isAiEnabled? [{- name: 'newAIChat' as const,+ name: 'newAiChat' as const,Icon: IconMessageCirclePlus,onClick: () => {setIsNavigationDrawerExpanded(false);diff --git a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsxindex 55c091b71af..9cc8fd63379 100644--- a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx+++ b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx@@ -74,7 +74,7 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {const isAdminEnabled =(currentUser?.canImpersonate || currentUser?.canAccessFullAdminPanel) ??false;- const isAIEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);+ const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const isSupportChatConfigured =supportChat?.supportDriver === 'FRONT' &&isNonEmptyString(supportChat.supportFrontChatId);@@ -183,7 +183,7 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {path: SettingsPath.AI,Icon: IconSparkles,isHidden:- !isAIEnabled || !permissionMap[PermissionFlagType.WORKSPACE],+ !isAiEnabled || !permissionMap[PermissionFlagType.WORKSPACE],modifier: 'new',},{diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsxindex 37080993f29..2d9aa270452 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx@@ -82,7 +82,7 @@ export const SettingsRolePermissionsObjectLevelObjectForm = ({},{children: agent.label,- href: getSettingsPath(SettingsPath.AIAgentDetail, {+ href: getSettingsPath(SettingsPath.AiAgentDetail, {agentId: agent.id,}),},@@ -112,7 +112,7 @@ export const SettingsRolePermissionsObjectLevelObjectForm = ({const finishButtonPath =fromAgentId && isDefined(agent)- ? getSettingsPath(SettingsPath.AIAgentDetail, { agentId: agent.id })+ ? getSettingsPath(SettingsPath.AiAgentDetail, { agentId: agent.id }): getSettingsPath(SettingsPath.RoleDetail, { roleId });const objectPredicates =diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useActionRolePermissionFlagConfig.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useActionRolePermissionFlagConfig.tsindex 1499533584d..c81c239e580 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useActionRolePermissionFlagConfig.ts+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useActionRolePermissionFlagConfig.ts@@ -30,7 +30,7 @@ type UseActionRolePermissionFlagConfigParams = {export const useActionRolePermissionFlagConfig = ({assignmentCapabilities,}: UseActionRolePermissionFlagConfigParams = {}): SettingsRolePermissionsSettingPermission[] => {- const isAIEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);+ const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const {canBeAssignedToAgents = false,@@ -154,7 +154,7 @@ export const useActionRolePermissionFlagConfig = ({canBeAssignedToUsers && !canBeAssignedToAgents && !canBeAssignedToApiKeys;return allPermissions.filter((permission) => {- if (permission.key === PermissionFlagType.AI && !isAIEnabled) {+ if (permission.key === PermissionFlagType.AI && !isAiEnabled) {return false;}@@ -179,6 +179,6 @@ export const useActionRolePermissionFlagConfig = ({canBeAssignedToAgents,canBeAssignedToUsers,canBeAssignedToApiKeys,- isAIEnabled,+ isAiEnabled,]);};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.tsindex e67cf8aa03b..10719ecca44 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts@@ -33,7 +33,7 @@ type UseSettingsRolePermissionFlagConfigParams = {export const useSettingsRolePermissionFlagConfig = ({assignmentCapabilities,}: UseSettingsRolePermissionFlagConfigParams = {}): SettingsRolePermissionsSettingPermission[] => {- const isAIEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);+ const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const {canBeAssignedToAgents = false,@@ -174,7 +174,7 @@ export const useSettingsRolePermissionFlagConfig = ({canBeAssignedToUsers && !canBeAssignedToAgents && !canBeAssignedToApiKeys;return allPermissions.filter((permission) => {- if (permission.key === PermissionFlagType.AI_SETTINGS && !isAIEnabled) {+ if (permission.key === PermissionFlagType.AI_SETTINGS && !isAiEnabled) {return false;}if (hasAssignmentCapabilities) {@@ -198,6 +198,6 @@ export const useSettingsRolePermissionFlagConfig = ({canBeAssignedToAgents,canBeAssignedToUsers,canBeAssignedToApiKeys,- isAIEnabled,+ isAiEnabled,]);};diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelAskAIInfo.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelAskAiInfo.tsxsimilarity index 60%rename from packages/twenty-front/src/modules/side-panel/components/SidePanelAskAIInfo.tsxrename to packages/twenty-front/src/modules/side-panel/components/SidePanelAskAiInfo.tsxindex ad3afbdc37b..51abb47b6f9 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelAskAIInfo.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelAskAiInfo.tsx@@ -1,5 +1,5 @@-import { currentAIChatThreadState } from '@/ai/states/currentAIChatThreadState';-import { currentAIChatThreadTitleComponentFamilyState } from '@/ai/states/currentAIChatThreadTitleComponentFamilyState';+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';+import { currentAiChatThreadTitleComponentFamilyState } from '@/ai/states/currentAiChatThreadTitleComponentFamilyState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';@@ -13,17 +13,17 @@ const StyledPageTitle = styled.div`font-weight: ${themeCssVariables.font.weight.semiBold};`;-export const SidePanelAskAIInfo = () => {- const currentAIChatThread = useAtomStateValue(currentAIChatThreadState);- const currentAIChatThreadTitle = useAtomComponentFamilyStateValue(- currentAIChatThreadTitleComponentFamilyState,- { threadId: currentAIChatThread },+export const SidePanelAskAiInfo = () => {+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);+ const currentAiChatThreadTitle = useAtomComponentFamilyStateValue(+ currentAiChatThreadTitleComponentFamilyState,+ { threadId: currentAiChatThread },);return (<StyledPageTitle><OverflowingTextWithTooltip- text={currentAIChatThreadTitle ?? t`Ask AI`}+ text={currentAiChatThreadTitle ?? t`Ask AI`}/></StyledPageTitle>);diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsxindex c217ef1ae87..af7013649cb 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx@@ -7,7 +7,7 @@ import {import { selectedNavigationMenuItemIdInEditModeState } from '@/navigation-menu-item/common/states/selectedNavigationMenuItemIdInEditModeState';import { useNavigationMenuItemSectionItems } from '@/navigation-menu-item/display/hooks/useNavigationMenuItemSectionItems';-import { SidePanelAskAIInfo } from '@/side-panel/components/SidePanelAskAIInfo';+import { SidePanelAskAiInfo } from '@/side-panel/components/SidePanelAskAiInfo';import { SidePanelFolderInfo } from '@/side-panel/components/SidePanelFolderInfo';import { SidePanelLinkInfo } from '@/side-panel/components/SidePanelLinkInfo';import { SidePanelMultipleRecordsInfo } from '@/side-panel/components/SidePanelMultipleRecordsInfo';@@ -114,10 +114,10 @@ export const SidePanelPageInfo = ({ pageChip }: SidePanelPageInfoProps) => {);}- const isAskAIPage = pageChip.page?.page === SidePanelPages.AskAI;+ const isAskAiPage = pageChip.page?.page === SidePanelPages.AskAI;- if (isAskAIPage) {- return <SidePanelAskAIInfo />;+ if (isAskAiPage) {+ return <SidePanelAskAiInfo />;}if (pageChip.page?.page === SidePanelPages.NavigationMenuAddItem) {diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsxindex 3e7c1a36de9..4c71c5d199a 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx@@ -1,4 +1,4 @@-import { useSwitchToNewAIChat } from '@/ai/hooks/useSwitchToNewAIChat';+import { useSwitchToNewAiChat } from '@/ai/hooks/useSwitchToNewAiChat';import { SidePanelObjectFilterDropdown } from '@/side-panel/components/SidePanelObjectFilterDropdown';import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';import { sidePanelSearchObjectFilterState } from '@/side-panel/states/sidePanelSearchObjectFilterState';@@ -22,7 +22,7 @@ export const SidePanelTopBarRightCornerIcon = () => {const isMobile = useIsMobile();const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);const sidePanelPage = useAtomStateValue(sidePanelPageState);- const { switchToNewChat } = useSwitchToNewAIChat();+ const { switchToNewChat } = useSwitchToNewAiChat();const [sidePanelSearchObjectFilter, setSidePanelSearchObjectFilter] =useAtomState(sidePanelSearchObjectFilterState);@@ -37,12 +37,12 @@ export const SidePanelTopBarRightCornerIcon = () => {);}- const isOnAskAIPage = [+ const isOnAskAiPage = [SidePanelPages.AskAI,- SidePanelPages.ViewPreviousAIChats,+ SidePanelPages.ViewPreviousAiChats,].includes(sidePanelPage);- if (isMobile || !isAiEnabled || !isOnAskAIPage) {+ if (isMobile || !isAiEnabled || !isOnAskAiPage) {return null;}diff --git a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsxindex b79ed94234b..efcebc7f12d 100644--- a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx+++ b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx@@ -2,8 +2,8 @@ import { SidePanelCommandMenuItemDisplayPage } from '@/command-menu-item/displayimport { SidePanelCommandMenuItemEditPage } from '@/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage';import { SidePanelNavigationMenuItemEditPage } from '@/navigation-menu-item/edit/side-panel/components/SidePanelNavigationMenuItemEditPage';import { SidePanelNewSidebarItemPage } from '@/navigation-menu-item/edit/side-panel/components/SidePanelNewSidebarItemPage';-import { SidePanelAIChatThreadsPage } from '@/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage';-import { SidePanelAskAIPage } from '@/side-panel/pages/ask-ai/components/SidePanelAskAIPage';+import { SidePanelAiChatThreadsPage } from '@/side-panel/pages/ai-chat-threads/components/SidePanelAiChatThreadsPage';+import { SidePanelAskAiPage } from '@/side-panel/pages/ask-ai/components/SidePanelAskAiPage';import { SidePanelCalendarEventPage } from '@/side-panel/pages/calendar-event/components/SidePanelCalendarEventPage';import { SidePanelComposeEmailPage } from '@/side-panel/pages/compose-email/components/SidePanelComposeEmailPage';import { SidePanelFrontComponentPage } from '@/side-panel/pages/front-component/components/SidePanelFrontComponentPage';@@ -49,8 +49,8 @@ export const SIDE_PANEL_PAGES_CONFIG = new Map<SidePanelPages, React.ReactNode>([SidePanelPages.WorkflowStepView, <SidePanelWorkflowViewStep />],[SidePanelPages.WorkflowRunStepView, <SidePanelWorkflowRunViewStep />],[SidePanelPages.SearchRecords, <SidePanelSearchRecordsPage />],- [SidePanelPages.AskAI, <SidePanelAskAIPage />],- [SidePanelPages.ViewPreviousAIChats, <SidePanelAIChatThreadsPage />],+ [SidePanelPages.AskAI, <SidePanelAskAiPage />],+ [SidePanelPages.ViewPreviousAiChats, <SidePanelAiChatThreadsPage />],[SidePanelPages.PageLayoutDashboardWidgetTypeSelect,<SidePanelPageLayoutDashboardWidgetTypeSelect />,diff --git a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAIPageInSidePanel.test.tsx b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAiPageInSidePanel.test.tsxsimilarity index 80%rename from packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAIPageInSidePanel.test.tsxrename to packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAiPageInSidePanel.test.tsxindex af583b86926..5a6f58cd34e 100644--- a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAIPageInSidePanel.test.tsx+++ b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenAskAiPageInSidePanel.test.tsx@@ -2,7 +2,7 @@ import { act, renderHook } from '@testing-library/react';import { Provider as JotaiProvider } from 'jotai';import { type ReactNode } from 'react';-import { useOpenAskAIPageInSidePanel } from '@/side-panel/hooks/useOpenAskAIPageInSidePanel';+import { useOpenAskAiPageInSidePanel } from '@/side-panel/hooks/useOpenAskAiPageInSidePanel';import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedState';import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { SidePanelPages } from 'twenty-shared/types';@@ -23,19 +23,19 @@ const Wrapper = ({ children }: { children: ReactNode }) => (<JotaiProvider store={jotaiStore}>{children}</JotaiProvider>);-describe('useOpenAskAIPageInSidePanel', () => {+describe('useOpenAskAiPageInSidePanel', () => {beforeEach(() => {jest.clearAllMocks();jotaiStore.set(isSidePanelOpenedState.atom, false);});it('should navigate to AskAI page with correct defaults', () => {- const { result } = renderHook(() => useOpenAskAIPageInSidePanel(), {+ const { result } = renderHook(() => useOpenAskAiPageInSidePanel(), {wrapper: Wrapper,});act(() => {- result.current.openAskAIPage();+ result.current.openAskAiPage();});expect(navigateSidePanelMenuMock).toHaveBeenCalledWith(@@ -50,12 +50,12 @@ describe('useOpenAskAIPageInSidePanel', () => {it('should use resetNavigationStack from argument when provided', () => {jotaiStore.set(isSidePanelOpenedState.atom, true);- const { result } = renderHook(() => useOpenAskAIPageInSidePanel(), {+ const { result } = renderHook(() => useOpenAskAiPageInSidePanel(), {wrapper: Wrapper,});act(() => {- result.current.openAskAIPage({ resetNavigationStack: false });+ result.current.openAskAiPage({ resetNavigationStack: false });});expect(navigateSidePanelMenuMock).toHaveBeenCalledWith(@@ -68,12 +68,12 @@ describe('useOpenAskAIPageInSidePanel', () => {it('should default resetNavigationStack to isSidePanelOpened', () => {jotaiStore.set(isSidePanelOpenedState.atom, true);- const { result } = renderHook(() => useOpenAskAIPageInSidePanel(), {+ const { result } = renderHook(() => useOpenAskAiPageInSidePanel(), {wrapper: Wrapper,});act(() => {- result.current.openAskAIPage();+ result.current.openAskAiPage();});expect(navigateSidePanelMenuMock).toHaveBeenCalledWith(diff --git a/packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAIPageInSidePanel.ts b/packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAiPageInSidePanel.tssimilarity index 91%rename from packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAIPageInSidePanel.tsrename to packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAiPageInSidePanel.tsindex 2fcb8daf78b..e31836ada2f 100644--- a/packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAIPageInSidePanel.ts+++ b/packages/twenty-front/src/modules/side-panel/hooks/useOpenAskAiPageInSidePanel.ts@@ -7,11 +7,11 @@ import { SidePanelPages } from 'twenty-shared/types';import { IconSparkles } from 'twenty-ui/display';import { v4 } from 'uuid';-export const useOpenAskAIPageInSidePanel = () => {+export const useOpenAskAiPageInSidePanel = () => {const { navigateSidePanelMenu } = useSidePanelMenu();const isSidePanelOpened = useAtomStateValue(isSidePanelOpenedState);- const openAskAIPage = useCallback(+ const openAskAiPage = useCallback(({resetNavigationStack,}: {@@ -34,6 +34,6 @@ export const useOpenAskAIPageInSidePanel = () => {);return {- openAskAIPage,+ openAskAiPage,};};diff --git a/packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAiChatThreadsPage.tsxsimilarity index 56%rename from packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage.tsxrename to packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAiChatThreadsPage.tsxindex ee0e47ee015..b13cdd4c0bd 100644--- a/packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAiChatThreadsPage.tsx@@ -1,4 +1,4 @@-import { AIChatThreadsList } from '@/ai/components/AIChatThreadsList';+import { AiChatThreadsList } from '@/ai/components/AiChatThreadsList';import { styled } from '@linaria/react';const StyledContainer = styled.div`@@ -6,10 +6,10 @@ const StyledContainer = styled.div`width: 100%;`;-export const SidePanelAIChatThreadsPage = () => {+export const SidePanelAiChatThreadsPage = () => {return (<StyledContainer>- <AIChatThreadsList />+ <AiChatThreadsList /></StyledContainer>);};diff --git a/packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAIPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAiPage.tsxsimilarity index 60%rename from packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAIPage.tsxrename to packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAiPage.tsxindex ae14d1c1e8f..14404bf0be7 100644--- a/packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAIPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/ask-ai/components/SidePanelAskAiPage.tsx@@ -1,15 +1,15 @@import { styled } from '@linaria/react';-import { AIChatTab } from '@/ai/components/AIChatTab';+import { AiChatTab } from '@/ai/components/AiChatTab';const StyledContainer = styled.div`height: 100%;width: 100%;`;-export const SidePanelAskAIPage = () => {+export const SidePanelAskAiPage = () => {return (<StyledContainer>- <AIChatTab />+ <AiChatTab /></StyledContainer>);};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsxindex 69bb61eafaf..41a3c414c7d 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx@@ -85,7 +85,7 @@ export const WorkflowStepFooter = ({const handleViewAgent = () => {closeDropdown(dropdownId);if (isDefined(agentId)) {- navigateSettings(SettingsPath.AIAgentDetail, { agentId });+ navigateSettings(SettingsPath.AiAgentDetail, { agentId });}};diff --git a/packages/twenty-front/src/modules/workspace/graphql/queries/getAISystemPromptPreview.ts b/packages/twenty-front/src/modules/workspace/graphql/queries/getAiSystemPromptPreview.tssimilarity index 76%rename from packages/twenty-front/src/modules/workspace/graphql/queries/getAISystemPromptPreview.tsrename to packages/twenty-front/src/modules/workspace/graphql/queries/getAiSystemPromptPreview.tsindex f7e80bb57f9..ae7b61e68c8 100644--- a/packages/twenty-front/src/modules/workspace/graphql/queries/getAISystemPromptPreview.ts+++ b/packages/twenty-front/src/modules/workspace/graphql/queries/getAiSystemPromptPreview.ts@@ -1,8 +1,8 @@import { gql } from '@apollo/client';export const GET_AI_SYSTEM_PROMPT_PREVIEW = gql`- query GetAISystemPromptPreview {- getAISystemPromptPreview {+ query GetAiSystemPromptPreview {+ getAiSystemPromptPreview {sections {titlecontentdiff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsxindex 5662a12b7ba..62bad91ac49 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx@@ -93,10 +93,10 @@ export const SettingsAdminNewAiProvider = () => {const hasSelected = selectedModelsDevId !== null || isCustomMode;const npmPackage = form.watch('npm');const isBedrock = npmPackage === '@ai-sdk/amazon-bedrock';- const isOpenAICompatible = npmPackage === '@ai-sdk/openai-compatible';+ const isOpenAiCompatible = npmPackage === '@ai-sdk/openai-compatible';const needsApiKey = !isBedrock;const isModelsDevWithoutNativeSdk =- selectedModelsDevId !== null && isOpenAICompatible;+ selectedModelsDevId !== null && isOpenAiCompatible;const handleProviderSelected = (providerId: string) => {setSelectedModelsDevId(providerId);@@ -150,7 +150,7 @@ export const SettingsAdminNewAiProvider = () => {values.apiKey.trim() && {apiKey: values.apiKey.trim(),}),- ...(isOpenAICompatible &&+ ...(isOpenAiCompatible &&values.baseUrl.trim() && {baseUrl: values.baseUrl.trim(),}),@@ -178,7 +178,7 @@ export const SettingsAdminNewAiProvider = () => {}}- if (!isBedrock && !isOpenAICompatible && !values.apiKey.trim()) {+ if (!isBedrock && !isOpenAiCompatible && !values.apiKey.trim()) {form.setError('apiKey', {type: 'manual',message: t`API key is required`,@@ -187,7 +187,7 @@ export const SettingsAdminNewAiProvider = () => {return;}- if (isOpenAICompatible && !values.baseUrl.trim()) {+ if (isOpenAiCompatible && !values.baseUrl.trim()) {form.setError('baseUrl', {type: 'manual',message: t`Base URL is required`,@@ -325,7 +325,7 @@ export const SettingsAdminNewAiProvider = () => {</Section>)}- {isOpenAICompatible && (+ {isOpenAiCompatible && (<Section><H2Titletitle={t`Base URL`}diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsxindex 09ab424afb6..e68d9b25253 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx@@ -22,10 +22,10 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { UndecoratedLink } from 'twenty-ui/navigation';-import { SettingsAIMoreTab } from '~/pages/settings/ai/components/SettingsAIMoreTab';+import { SettingsAiMoreTab } from '~/pages/settings/ai/components/SettingsAiMoreTab';import { SettingsAgentToolsTab } from '~/pages/settings/ai/components/SettingsAgentToolsTab';-import { SettingsAIModelsTab } from './components/SettingsAIModelsTab';-import { SettingsAIUsageTab } from './components/SettingsAIUsageTab';+import { SettingsAiModelsTab } from './components/SettingsAiModelsTab';+import { SettingsAiUsageTab } from './components/SettingsAiUsageTab';import { SettingsAgentSkills } from './components/SettingsAgentSkills';import { SETTINGS_AI_TABS } from './constants/SettingsAiTabs';@@ -117,7 +117,7 @@ export const SettingsAI = () => {title={t`AI`}actionButton={isSkillsTab ? (- <UndecoratedLink to={getSettingsPath(SettingsPath.AINewSkill)}>+ <UndecoratedLink to={getSettingsPath(SettingsPath.AiNewSkill)}><ButtonIcon={IconPlus}title={t`New Skill`}@@ -149,11 +149,11 @@ export const SettingsAI = () => {tabs={tabs}componentInstanceId={SETTINGS_AI_TABS.COMPONENT_INSTANCE_ID}/>- {isModelsTab && <SettingsAIModelsTab />}+ {isModelsTab && <SettingsAiModelsTab />}{isSkillsTab && <SettingsAgentSkills />}{isToolsTab && <SettingsAgentToolsTab />}- {isUsageTab && <SettingsAIUsageTab />}- {isMoreTab && <SettingsAIMoreTab />}+ {isUsageTab && <SettingsAiUsageTab />}+ {isMoreTab && <SettingsAiMoreTab />}</SettingsPageContainer></SubMenuTopBarContainer>);diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsxindex 118992728ad..ad4429d27c8 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx@@ -1,4 +1,4 @@-import { AIChatAssistantMessageRenderer } from '@/ai/components/AIChatAssistantMessageRenderer';+import { AiChatAssistantMessageRenderer } from '@/ai/components/AiChatAssistantMessageRenderer';import { mapDBMessagesToUIMessages } from '@/ai/utils/mapDBMessagesToUIMessages';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';@@ -84,7 +84,7 @@ export const SettingsAgentTurnDetail = () => {{ children: t`AI`, href: getSettingsPath(SettingsPath.AI) },{children: t`Agent`,- href: getSettingsPath(SettingsPath.AIAgentDetail).replace(+ href: getSettingsPath(SettingsPath.AiAgentDetail).replace(':agentId',agentId || '',),@@ -130,7 +130,7 @@ export const SettingsAgentTurnDetail = () => {{ children: t`AI`, href: getSettingsPath(SettingsPath.AI) },{children: t`Agent`,- href: getSettingsPath(SettingsPath.AIAgentDetail).replace(+ href: getSettingsPath(SettingsPath.AiAgentDetail).replace(':agentId',agentId || '',),@@ -171,7 +171,7 @@ export const SettingsAgentTurnDetail = () => {<StyledMessageBubble key={message.id}><StyledMessageRole>{roleLabel}</StyledMessageRole><StyledMessageContent>- <AIChatAssistantMessageRenderer+ <AiChatAssistantMessageRenderermessageParts={message.parts}isLastMessageStreaming={false}/>diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAIPrompts.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsxsimilarity index 98%rename from packages/twenty-front/src/pages/settings/ai/SettingsAIPrompts.tsxrename to packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsxindex e47054cbaef..fda214ee600 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAIPrompts.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsx@@ -28,14 +28,14 @@ const StyledTitleContainer = styled.div`margin-top: ${themeCssVariables.spacing[2]};`;-export const SettingsAIPrompts = () => {+export const SettingsAiPrompts = () => {const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);const { data: previewData, loading: previewLoading } = useQuery(GetAiSystemPromptPreviewDocument,);- const preview = previewData?.getAISystemPromptPreview;+ const preview = previewData?.getAiSystemPromptPreview;const sections = preview?.sections ?? [];const buildUserContextPreview = (): string => {diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAIUsageUserDetail.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAiUsageUserDetail.tsxsimilarity index 98%rename from packages/twenty-front/src/pages/settings/ai/SettingsAIUsageUserDetail.tsxrename to packages/twenty-front/src/pages/settings/ai/SettingsAiUsageUserDetail.tsxindex 2e1134a08c0..d642d30078f 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAIUsageUserDetail.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAiUsageUserDetail.tsx@@ -14,7 +14,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/layout';-export const SettingsAIUsageUserDetail = () => {+export const SettingsAiUsageUserDetail = () => {const { t: tLingui } = useLingui();const { userWorkspaceId } = useParams<{ userWorkspaceId: string }>();diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsxindex 0ffc5ca2ca9..28682a7fc2f 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx@@ -239,7 +239,7 @@ export const SettingsAgentLogsTab = ({>{latestEvaluation && (<UndecoratedLink- to={getSettingsPath(SettingsPath.AIAgentTurnDetail)+ to={getSettingsPath(SettingsPath.AiAgentTurnDetail).replace(':agentId', agentId).replace(':turnId', turn.id)}>diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsxindex 3f5c471ec5b..b39dce2157a 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx@@ -20,7 +20,7 @@ import {CreateOneRoleDocument,GetRolesDocument,} from '~/generated-metadata/graphql';-import { type SettingsAIAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';+import { type SettingsAiAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';const StyledWarningText = styled.div`color: ${themeCssVariables.font.color.tertiary};@@ -29,10 +29,10 @@ const StyledWarningText = styled.div``;type SettingsAgentRoleTabProps = {- formValues: SettingsAIAgentFormValues;+ formValues: SettingsAiAgentFormValues;onFieldChange: (- field: keyof SettingsAIAgentFormValues,- value: SettingsAIAgentFormValues[keyof SettingsAIAgentFormValues],+ field: keyof SettingsAiAgentFormValues,+ value: SettingsAiAgentFormValues[keyof SettingsAiAgentFormValues],) => void;disabled: boolean;agentId?: string;diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsxindex ccc2f31f805..71d99a73571 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx@@ -21,7 +21,7 @@ import { type Agent } from '~/generated-metadata/graphql';import { SettingsAgentDeleteConfirmationModal } from '~/pages/settings/ai/components/SettingsAgentDeleteConfirmationModal';import { SettingsAgentResponseFormat } from '~/pages/settings/ai/components/SettingsAgentResponseFormat';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';-import { type SettingsAIAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';+import { type SettingsAiAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';const StyledFormContainer = styled.div`@@ -49,10 +49,10 @@ const StyledErrorMessage = styled.div`const DELETE_AGENT_MODAL_ID = 'delete-agent-modal';type SettingsAgentSettingsTabProps = {- formValues: SettingsAIAgentFormValues;+ formValues: SettingsAiAgentFormValues;onFieldChange: (- field: keyof SettingsAIAgentFormValues,- value: SettingsAIAgentFormValues[keyof SettingsAIAgentFormValues],+ field: keyof SettingsAiAgentFormValues,+ value: SettingsAiAgentFormValues[keyof SettingsAiAgentFormValues],) => void;disabled: boolean;agent?: Agent;diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsxindex 0878758dd31..b65f9295e57 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx@@ -85,7 +85,7 @@ export const SettingsAgentSkillsTable = ({}link={skill.isActive- ? getSettingsPath(SettingsPath.AISkillDetail, {+ ? getSettingsPath(SettingsPath.AiSkillDetail, {skillId: skill.id,}): undefineddiff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentTableRow.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentTableRow.tsxsimilarity index 93%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentTableRow.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentTableRow.tsxindex 35bbdce83de..8e0f592084c 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentTableRow.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentTableRow.tsx@@ -8,7 +8,7 @@ import { OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';import { type Agent } from '~/generated-metadata/graphql';-export type SettingsAIAgentTableRowProps = {+export type SettingsAiAgentTableRowProps = {action: ReactNode;agent: Agent;link?: string;@@ -21,11 +21,11 @@ const StyledIconContainer = styled.div`height: ${themeCssVariables.spacing[4]};`;-export const SettingsAIAgentTableRow = ({+export const SettingsAiAgentTableRow = ({action,agent,link,-}: SettingsAIAgentTableRowProps) => {+}: SettingsAiAgentTableRowProps) => {const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const Icon = getIcon(agent.icon || 'IconRobot');diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentsTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentsTable.tsxsimilarity index 90%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentsTable.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentsTable.tsxindex 76a56d180d1..53a9eef6ccc 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIAgentsTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiAgentsTable.tsx@@ -24,8 +24,8 @@ import { FindManyAgentsDocument } from '~/generated-metadata/graphql';import { TableRow } from '@/ui/layout/table/components/TableRow';import {AI_AGENT_TABLE_ROW_GRID_TEMPLATE_COLUMNS,- SettingsAIAgentTableRow,-} from './SettingsAIAgentTableRow';+ SettingsAiAgentTableRow,+} from './SettingsAiAgentTableRow';const StyledSearchContainer = styled.div`margin-bottom: ${themeCssVariables.spacing[2]};@@ -39,7 +39,7 @@ const StyledTableHeaderRowContainer = styled.div`margin-bottom: ${themeCssVariables.spacing[2]};`;-export const SettingsAIAgentsTable = () => {+export const SettingsAiAgentsTable = () => {const { theme } = useContext(ThemeContext);const { data, loading } = useQuery(FindManyAgentsDocument);@@ -104,13 +104,13 @@ export const SettingsAIAgentsTable = () => {gridTemplateColumns={AI_AGENT_TABLE_ROW_GRID_TEMPLATE_COLUMNS}>{SETTINGS_AI_AGENT_TABLE_METADATA.fields.map(- (settingsAIAgentTableMetadataField) => (+ (settingsAiAgentTableMetadataField) => (<SortableTableHeader- key={settingsAIAgentTableMetadataField.fieldName}- fieldName={settingsAIAgentTableMetadataField.fieldName}- label={t(settingsAIAgentTableMetadataField.fieldLabel)}+ key={settingsAiAgentTableMetadataField.fieldName}+ fieldName={settingsAiAgentTableMetadataField.fieldName}+ label={t(settingsAiAgentTableMetadataField.fieldLabel)}tableId={SETTINGS_AI_AGENT_TABLE_METADATA.tableId}- align={settingsAIAgentTableMetadataField.align}+ align={settingsAiAgentTableMetadataField.align}initialSort={SETTINGS_AI_AGENT_TABLE_METADATA.initialSort}/>),@@ -123,7 +123,7 @@ export const SettingsAIAgentsTable = () => {<Skeleton height={32} borderRadius={4} key={index} />))}{filteredAgents.map((agent) => (- <SettingsAIAgentTableRow+ <SettingsAiAgentTableRowkey={agent.id}agent={agent}action={@@ -132,7 +132,7 @@ export const SettingsAIAgentsTable = () => {stroke={theme.icon.stroke.sm}/>}- link={getSettingsPath(SettingsPath.AIAgentDetail, {+ link={getSettingsPath(SettingsPath.AiAgentDetail, {agentId: agent.id,})}/>diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIMCP.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiMCP.tsxsimilarity index 99%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIMCP.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiMCP.tsxindex e12da6974ff..2fa533707e0 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIMCP.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiMCP.tsx@@ -51,7 +51,7 @@ const StyledEditorContainer = styled.div`type McpAuthMethod = 'oauth' | 'api-key';-export const SettingsAIMCP = () => {+export const SettingsAiMCP = () => {const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const [authMethod, setAuthMethod] = useState<McpAuthMethod>('oauth');diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIModelsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsxsimilarity index 99%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIModelsTab.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsxindex 35898f7c3e5..5aee504e2fc 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIModelsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx@@ -34,7 +34,7 @@ const StyledCustomModelsContainer = styled.div`padding-top: ${themeCssVariables.spacing[4]};`;-export const SettingsAIModelsTab = () => {+export const SettingsAiModelsTab = () => {const { enqueueErrorSnackBar } = useSnackBar();const [currentWorkspace, setCurrentWorkspace] = useAtomState(currentWorkspaceState,diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIMoreTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiMoreTab.tsxsimilarity index 94%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIMoreTab.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiMoreTab.tsxindex 52e36701cf4..7313ed83a07 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIMoreTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiMoreTab.tsx@@ -19,7 +19,7 @@ import {GetAiSystemPromptPreviewDocument,UpdateWorkspaceDocument,} from '~/generated-metadata/graphql';-import { SettingsAIMCP } from '~/pages/settings/ai/components/SettingsAIMCP';+import { SettingsAiMCP } from '~/pages/settings/ai/components/SettingsAiMCP';import { formatNumber } from '~/utils/format/formatNumber';const StyledFormContainer = styled.div`@@ -28,7 +28,7 @@ const StyledFormContainer = styled.div`gap: ${themeCssVariables.spacing[4]};`;-export const SettingsAIMoreTab = () => {+export const SettingsAiMoreTab = () => {const { theme } = useContext(ThemeContext);const { enqueueErrorSnackBar } = useSnackBar();const [currentWorkspace, setCurrentWorkspace] = useAtomState(@@ -87,7 +87,7 @@ export const SettingsAIMoreTab = () => {};const systemPromptTokenCount =- previewData?.getAISystemPromptPreview.estimatedTokenCount;+ previewData?.getAiSystemPromptPreview.estimatedTokenCount;const systemPromptDescription = isDefined(systemPromptTokenCount)? t`Read the system prompts to understand how the AI works (~${formatNumber(systemPromptTokenCount,@@ -128,7 +128,7 @@ export const SettingsAIMoreTab = () => {/></StyledFormContainer></Section>- <SettingsAIMCP />+ <SettingsAiMCP /><Section><H2Title@@ -136,7 +136,7 @@ export const SettingsAIMoreTab = () => {description={systemPromptDescription}/>- <UndecoratedLink to={getSettingsPath(SettingsPath.AIPrompts)}>+ <UndecoratedLink to={getSettingsPath(SettingsPath.AiPrompts)}><SettingsCardIcon={<IconPrompt size={theme.icon.size.md} />}title={t`Read system prompts`}diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIUsageTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiUsageTab.tsxsimilarity index 97%rename from packages/twenty-front/src/pages/settings/ai/components/SettingsAIUsageTab.tsxrename to packages/twenty-front/src/pages/settings/ai/components/SettingsAiUsageTab.tsxindex ab6133a23d7..36dbd68b089 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAIUsageTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiUsageTab.tsx@@ -18,7 +18,7 @@ import { Tag } from 'twenty-ui/components';import { H2Title, IconLock } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';-export const SettingsAIUsageTab = () => {+export const SettingsAiUsageTab = () => {const currentWorkspace = useAtomStateValue(currentWorkspaceState);const billing = useAtomStateValue(billingState);const isBillingEnabled = billing?.isBillingEnabled ?? false;@@ -130,7 +130,7 @@ export const SettingsAIUsageTab = () => {description={t`Click a user to see their daily breakdown.`}operationTypes={AI_OPERATION_TYPES}getDetailPath={(userWorkspaceId) =>- getSettingsPath(SettingsPath.AIUsageUserDetail, {+ getSettingsPath(SettingsPath.AiUsageUserDetail, {userWorkspaceId,})}diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsxindex 95ee53d17c5..2cba1740100 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsx@@ -115,7 +115,7 @@ export const SettingsToolsTable = () => {const isCustom = (item: ToolItem) => isDefined(item.applicationId);const getToolLink = (item: ToolItem) =>- getSettingsPath(SettingsPath.AIToolDetail, {+ getSettingsPath(SettingsPath.AiToolDetail, {toolIdentifier: item.identifier,});diff --git a/packages/twenty-front/src/pages/settings/ai/constants/SettingsAiAgentTableMetadata.ts b/packages/twenty-front/src/pages/settings/ai/constants/SettingsAiAgentTableMetadata.tsindex 09d802d0f85..1ea6cd58cc4 100644--- a/packages/twenty-front/src/pages/settings/ai/constants/SettingsAiAgentTableMetadata.ts+++ b/packages/twenty-front/src/pages/settings/ai/constants/SettingsAiAgentTableMetadata.ts@@ -3,7 +3,7 @@ import { msg } from '@lingui/core/macro';import { type Agent } from '~/generated-metadata/graphql';export const SETTINGS_AI_AGENT_TABLE_METADATA: TableMetadata<Agent> = {- tableId: 'settingsAIAgent',+ tableId: 'settingsAiAgent',fields: [{fieldLabel: msg`Name`,diff --git a/packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx b/packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAiAgentForm.tsxsimilarity index 93%rename from packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsxrename to packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAiAgentForm.tsxindex 8cc95a0d0c1..d814a5580ef 100644--- a/packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx+++ b/packages/twenty-front/src/pages/settings/ai/forms/components/SettingsAiAgentForm.tsx@@ -10,7 +10,7 @@ import { TextArea } from '@/ui/input/components/TextArea';import { isDefined } from 'twenty-shared/utils';import { themeCssVariables } from 'twenty-ui/theme-constants';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';-import { type SettingsAIAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';+import { type SettingsAiAgentFormValues } from '~/pages/settings/ai/hooks/useSettingsAgentFormState';const StyledFormContainer = styled.div`display: flex;@@ -34,20 +34,20 @@ const StyledErrorMessage = styled.div`margin-top: ${themeCssVariables.spacing[1]};`;-type SettingsAIAgentFormProps = {- formValues: SettingsAIAgentFormValues;+type SettingsAiAgentFormProps = {+ formValues: SettingsAiAgentFormValues;onFieldChange: (- field: keyof SettingsAIAgentFormValues,- value: SettingsAIAgentFormValues[keyof SettingsAIAgentFormValues],+ field: keyof SettingsAiAgentFormValues,+ value: SettingsAiAgentFormValues[keyof SettingsAiAgentFormValues],) => void;disabled: boolean;};-export const SettingsAIAgentForm = ({+export const SettingsAiAgentForm = ({formValues,onFieldChange,disabled,-}: SettingsAIAgentFormProps) => {+}: SettingsAiAgentFormProps) => {const { t } = useLingui();const { options: modelOptions } = useAiModelOptions();diff --git a/packages/twenty-front/src/pages/settings/ai/hooks/useSettingsAgentFormState.ts b/packages/twenty-front/src/pages/settings/ai/hooks/useSettingsAgentFormState.tsindex 4d2d1ab528f..f1222756a61 100644--- a/packages/twenty-front/src/pages/settings/ai/hooks/useSettingsAgentFormState.ts+++ b/packages/twenty-front/src/pages/settings/ai/hooks/useSettingsAgentFormState.ts@@ -1,14 +1,14 @@import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { type z } from 'zod';-import { settingsAIAgentFormSchema } from '~/pages/settings/ai/validation-schemas/settingsAIAgentFormSchema';+import { settingsAiAgentFormSchema } from '~/pages/settings/ai/validation-schemas/settingsAiAgentFormSchema';-export type SettingsAIAgentFormValues = z.infer<- typeof settingsAIAgentFormSchema+export type SettingsAiAgentFormValues = z.infer<+ typeof settingsAiAgentFormSchema>;export const useSettingsAgentFormState = (mode: 'create' | 'edit') => {- const [formValues, setFormValues] = useState<SettingsAIAgentFormValues>({+ const [formValues, setFormValues] = useState<SettingsAiAgentFormValues>({name: '',label: '',description: '',@@ -29,7 +29,7 @@ export const useSettingsAgentFormState = (mode: 'create' | 'edit') => {const validateForm = (): boolean => {try {- settingsAIAgentFormSchema.parse(formValues);+ settingsAiAgentFormSchema.parse(formValues);return true;} catch {return false;@@ -37,13 +37,13 @@ export const useSettingsAgentFormState = (mode: 'create' | 'edit') => {};const handleFieldChange = (- field: keyof SettingsAIAgentFormValues,- value: SettingsAIAgentFormValues[keyof SettingsAIAgentFormValues],+ field: keyof SettingsAiAgentFormValues,+ value: SettingsAiAgentFormValues[keyof SettingsAiAgentFormValues],) => {setFormValues((prev) => ({ ...prev, [field]: value }));};- const resetForm = (values?: Partial<SettingsAIAgentFormValues>) => {+ const resetForm = (values?: Partial<SettingsAiAgentFormValues>) => {if (isDefined(values)) {setFormValues((prev) => ({ ...prev, ...values }));} else {diff --git a/packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAIAgentFormSchema.ts b/packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAiAgentFormSchema.tssimilarity index 88%rename from packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAIAgentFormSchema.tsrename to packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAiAgentFormSchema.tsindex 1c1b27e6d0b..08a832a14dc 100644--- a/packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAIAgentFormSchema.ts+++ b/packages/twenty-front/src/pages/settings/ai/validation-schemas/settingsAiAgentFormSchema.ts@@ -2,7 +2,7 @@ import { type AgentResponseSchema } from 'twenty-shared/ai';import { z } from 'zod';import { zodNonEmptyString } from '~/types/ZodNonEmptyString';-export const settingsAIAgentFormSchema = z.object({+export const settingsAiAgentFormSchema = z.object({name: z.string().optional(),label: zodNonEmptyString,description: z.string().nullish(),@@ -36,6 +36,6 @@ export const settingsAIAgentFormSchema = z.object({evaluationInputs: z.array(z.string()).default([]),});-export type SettingsAIAgentFormValues = z.infer<- typeof settingsAIAgentFormSchema+export type SettingsAiAgentFormValues = z.infer<+ typeof settingsAiAgentFormSchema>;diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsxindex c152a0d0716..4733a3d5e7c 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx@@ -9,7 +9,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';import { type Application } from '~/generated-metadata/graphql';-import { SettingsAIAgentsTable } from '~/pages/settings/ai/components/SettingsAIAgentsTable';+import { SettingsAiAgentsTable } from '~/pages/settings/ai/components/SettingsAiAgentsTable';import {SettingsApplicationDataTable,type ApplicationDataTableRow,@@ -139,7 +139,7 @@ export const SettingsApplicationDetailContentTab = ({title={t`Agents`}description={t`Agents powering this app`}/>- <SettingsAIAgentsTable />+ <SettingsAiAgentsTable /></Section>)}</>diff --git a/packages/twenty-front/src/pages/settings/roles/SettingsRoleAddObjectLevel.tsx b/packages/twenty-front/src/pages/settings/roles/SettingsRoleAddObjectLevel.tsxindex 0ad41a1036c..ef574dbf277 100644--- a/packages/twenty-front/src/pages/settings/roles/SettingsRoleAddObjectLevel.tsx+++ b/packages/twenty-front/src/pages/settings/roles/SettingsRoleAddObjectLevel.tsx@@ -45,7 +45,7 @@ export const SettingsRoleAddObjectLevel = () => {},{children: agent.label,- href: getSettingsPath(SettingsPath.AIAgentDetail, {+ href: getSettingsPath(SettingsPath.AiAgentDetail, {agentId: agent.id,}),},diff --git a/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts b/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.tsindex 86bdc25c5b5..d47e2b26d93 100644--- a/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts+++ b/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts@@ -23,7 +23,7 @@ import { AdminWorkspaceChatThreadDTO } from 'src/engine/core-modules/admin-panelimport { AdminChatThreadMessagesDTO } from 'src/engine/core-modules/admin-panel/dtos/admin-chat-thread-messages.dto';import { ApplicationRegistrationEntity } from 'src/engine/core-modules/application/application-registration/application-registration.entity';import { ApplicationRegistrationService } from 'src/engine/core-modules/application/application-registration/application-registration.service';-import { AdminAIModelsDTO } from 'src/engine/core-modules/client-config/client-config.entity';+import { AdminAiModelsDTO } from 'src/engine/core-modules/client-config/client-config.entity';import { UsageBreakdownItemDTO } from 'src/engine/core-modules/usage/dtos/usage-breakdown-item.dto';import { UsageAnalyticsService } from 'src/engine/core-modules/usage/services/usage-analytics.service';import { AiModelRole } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-role.enum';@@ -211,8 +211,8 @@ export class AdminPanelResolver {}@UseGuards(AdminPanelGuard)- @Query(() => AdminAIModelsDTO)- async getAdminAiModels(): Promise<AdminAIModelsDTO> {+ @Query(() => AdminAiModelsDTO)+ async getAdminAiModels(): Promise<AdminAiModelsDTO> {const resolvedProviders =this.aiModelRegistryService.getResolvedProvidersForAdmin();diff --git a/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts b/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.tsindex e0a39123e30..a263bee82f3 100644--- a/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts+++ b/packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts@@ -39,7 +39,7 @@ export class NativeModelCapabilities {}@ObjectType()-export class ClientAIModelConfig {+export class ClientAiModelConfig {@Field(() => String)// Composite model id (`provider/modelName`) for this workspace; matches registry and admin APIs.modelId: ModelId;@@ -88,7 +88,7 @@ export class ClientAIModelConfig {}@ObjectType()-export class AdminAIModelConfig {+export class AdminAiModelConfig {@Field(() => String)// Composite model id (`provider/modelName`) used for toggles, defaults, and registry lookups.modelId: string;@@ -143,10 +143,10 @@ export class AdminAIModelConfig {dataResidency?: string;}-@ObjectType('AdminAIModels')-export class AdminAIModelsDTO {- @Field(() => [AdminAIModelConfig])- models: AdminAIModelConfig[];+@ObjectType('AdminAiModels')+export class AdminAiModelsDTO {+ @Field(() => [AdminAiModelConfig])+ models: AdminAiModelConfig[];@Field(() => String, { nullable: true })// Composite model id for the default “smart” role (`provider/modelName`).@@ -249,8 +249,8 @@ export class ClientConfig {@Field(() => Billing, { nullable: false })billing: Billing;- @Field(() => [ClientAIModelConfig])- aiModels: ClientAIModelConfig[];+ @Field(() => [ClientAiModelConfig])+ aiModels: ClientAiModelConfig[];@Field(() => Boolean)signInPrefilled: boolean;diff --git a/packages/twenty-server/src/engine/core-modules/client-config/services/client-config.service.ts b/packages/twenty-server/src/engine/core-modules/client-config/services/client-config.service.tsindex 19379b4c814..a9ab34f1d72 100644--- a/packages/twenty-server/src/engine/core-modules/client-config/services/client-config.service.ts+++ b/packages/twenty-server/src/engine/core-modules/client-config/services/client-config.service.ts@@ -14,7 +14,7 @@ import { SupportDriver } from 'src/engine/core-modules/twenty-config/interfaces/import { MaintenanceModeService } from 'src/engine/core-modules/admin-panel/maintenance-mode.service';import {- type ClientAIModelConfig,+ type ClientAiModelConfig,type ClientConfig,type NativeModelCapabilities,} from 'src/engine/core-modules/client-config/client-config.entity';@@ -76,7 +76,7 @@ export class ClientConfigService {? (resolvedProviders[providerName]?.label ?? providerName): undefined;- const aiModels: ClientAIModelConfig[] = availableModels.map(+ const aiModels: ClientAiModelConfig[] = availableModels.map((registeredModel) => {const modelConfig = this.aiModelRegistryService.getModelConfig(registeredModel.modelId,diff --git a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/file-ai-chat.module.ts b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/file-ai-chat.module.tsindex f8f8a4f9ad9..82d68cfabc3 100644--- a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/file-ai-chat.module.ts+++ b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/file-ai-chat.module.ts@@ -1,14 +1,14 @@import { Module } from '@nestjs/common';import { ApplicationModule } from 'src/engine/core-modules/application/application.module';-import { FileAIChatResolver } from 'src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver';-import { FileAIChatService } from 'src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service';+import { FileAiChatResolver } from 'src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver';+import { FileAiChatService } from 'src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service';import { FileUrlModule } from 'src/engine/core-modules/file/file-url/file-url.module';import { PermissionsModule } from 'src/engine/metadata-modules/permissions/permissions.module';@Module({imports: [FileUrlModule, ApplicationModule, PermissionsModule],- providers: [FileAIChatService, FileAIChatResolver],- exports: [FileAIChatService],+ providers: [FileAiChatService, FileAiChatResolver],+ exports: [FileAiChatService],})-export class FileAIChatModule {}+export class FileAiChatModule {}diff --git a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver.ts b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver.tsindex 8b41c632d21..a8a17ca2445 100644--- a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver.ts+++ b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/resolvers/file-ai-chat.resolver.ts@@ -8,7 +8,7 @@ import type { FileUpload } from 'graphql-upload/processRequest.mjs';import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator';import { FileWithSignedUrlDTO } from 'src/engine/core-modules/file/dtos/file-with-sign-url.dto';-import { FileAIChatService } from 'src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service';+import { FileAiChatService } from 'src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service';import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter';import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe';import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';@@ -21,12 +21,12 @@ import { streamToBuffer } from 'src/utils/stream-to-buffer';@UsePipes(ResolverValidationPipe)@UseFilters(PreventNestToAutoLogGraphqlErrorsFilter)@MetadataResolver()-export class FileAIChatResolver {- constructor(private readonly fileAIChatService: FileAIChatService) {}+export class FileAiChatResolver {+ constructor(private readonly fileAiChatService: FileAiChatService) {}@Mutation(() => FileWithSignedUrlDTO)@UseGuards(SettingsPermissionGuard(PermissionFlagType.UPLOAD_FILE))- async uploadAIChatFile(+ async uploadAiChatFile(@AuthWorkspace(){ id: workspaceId }: WorkspaceEntity,@Args({ name: 'file', type: () => GraphQLUpload })@@ -35,7 +35,7 @@ export class FileAIChatResolver {const stream = createReadStream();const buffer = await streamToBuffer(stream);- return await this.fileAIChatService.uploadFile({+ return await this.fileAiChatService.uploadFile({file: buffer,filename,workspaceId,diff --git a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service.ts b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service.tsindex 4bc37c362e7..0074a20951e 100644--- a/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service.ts+++ b/packages/twenty-server/src/engine/core-modules/file/file-ai-chat/services/file-ai-chat.service.ts@@ -11,7 +11,7 @@ import { FileUrlService } from 'src/engine/core-modules/file/file-url/file-url.simport { extractFileInfo } from 'src/engine/core-modules/file/utils/extract-file-info.utils';import { sanitizeFile } from 'src/engine/core-modules/file/utils/sanitize-file.utils';@Injectable()-export class FileAIChatService {+export class FileAiChatService {constructor(private readonly fileStorageService: FileStorageService,private readonly applicationService: ApplicationService,diff --git a/packages/twenty-server/src/engine/core-modules/file/file.module.ts b/packages/twenty-server/src/engine/core-modules/file/file.module.tsindex e3f33b92138..4effdaa9b33 100644--- a/packages/twenty-server/src/engine/core-modules/file/file.module.ts+++ b/packages/twenty-server/src/engine/core-modules/file/file.module.ts@@ -3,7 +3,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity';import { FileStorageModule } from 'src/engine/core-modules/file-storage/file-storage.module';-import { FileAIChatModule } from 'src/engine/core-modules/file/file-ai-chat/file-ai-chat.module';+import { FileAiChatModule } from 'src/engine/core-modules/file/file-ai-chat/file-ai-chat.module';import { FilePathGuard } from 'src/engine/core-modules/file/guards/file-path-guard';import { FileDeletionJob } from 'src/engine/core-modules/file/jobs/file-deletion.job';import { FileWorkspaceFolderDeletionJob } from 'src/engine/core-modules/file/jobs/file-workspace-folder-deletion.job';@@ -34,7 +34,7 @@ import { FileService } from './services/file.service';FilesFieldModule,FileCorePictureModule,FileWorkflowModule,- FileAIChatModule,+ FileAiChatModule,FileEmailAttachmentModule,SecureHttpClientModule,],@@ -53,7 +53,7 @@ import { FileService } from './services/file.service';FilesFieldModule,FileCorePictureModule,FileWorkflowModule,- FileAIChatModule,+ FileAiChatModule,FileEmailAttachmentModule,],controllers: [FileController],diff --git a/packages/twenty-server/src/engine/core-modules/metrics/types/metrics-keys.type.ts b/packages/twenty-server/src/engine/core-modules/metrics/types/metrics-keys.type.tsindex f36c11c4aa8..1cfdefca083 100644--- a/packages/twenty-server/src/engine/core-modules/metrics/types/metrics-keys.type.ts+++ b/packages/twenty-server/src/engine/core-modules/metrics/types/metrics-keys.type.ts@@ -23,8 +23,8 @@ export enum MetricsKeys {WorkflowRunThrottled = 'workflow-run/throttled',WorkflowRunFailedToEnqueue = 'workflow-run/failed/to-enqueue',WorkflowRunSystemError = 'workflow-run/system-error',- AIToolExecutionFailed = 'ai-tool-execution/failed',- AIToolExecutionSucceeded = 'ai-tool-execution/succeeded',+ AiToolExecutionFailed = 'ai-tool-execution/failed',+ AiToolExecutionSucceeded = 'ai-tool-execution/succeeded',SchemaVersionMismatch = 'schema-version/mismatch',AppVersionMismatch = 'app-version/mismatch',CronJobDeletedWorkspace = 'cron-job/deleted-workspace',diff --git a/packages/twenty-server/src/engine/core-modules/tool-provider/providers/native-model-tool.provider.ts b/packages/twenty-server/src/engine/core-modules/tool-provider/providers/native-model-tool.provider.tsindex 2f8de30d90a..5b3ea34400c 100644--- a/packages/twenty-server/src/engine/core-modules/tool-provider/providers/native-model-tool.provider.ts+++ b/packages/twenty-server/src/engine/core-modules/tool-provider/providers/native-model-tool.provider.ts@@ -8,7 +8,7 @@ import { type ToolProviderContext } from 'src/engine/core-modules/tool-provider/import { ToolCategory } from 'twenty-shared/ai';import { WebSearchService } from 'src/engine/core-modules/web-search/web-search.service';-import { AgentModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service';+import { AiModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service';import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';// SDK-native tools (anthropic webSearch, etc.) are opaque and not serializable.@@ -18,7 +18,7 @@ export class NativeModelToolProvider implements NativeToolProvider {readonly category = ToolCategory.NATIVE_MODEL;constructor(- private readonly agentModelConfigService: AgentModelConfigService,+ private readonly aiModelConfigService: AiModelConfigService,private readonly aiModelRegistryService: AiModelRegistryService,private readonly webSearchService: WebSearchService,) {}@@ -39,7 +39,7 @@ export class NativeModelToolProvider implements NativeToolProvider {const registeredModel =await this.aiModelRegistryService.resolveModelForAgent(context.agent);- return this.agentModelConfigService.getNativeModelTools(+ return this.aiModelConfigService.getNativeModelTools(registeredModel,context.agent,);diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-execution/services/agent-async-executor.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-execution/services/agent-async-executor.service.tsindex 61281a24ac7..950cd599e28 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-execution/services/agent-async-executor.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-execution/services/agent-async-executor.service.ts@@ -31,7 +31,7 @@ import { WORKFLOW_SYSTEM_PROMPTS } from 'src/engine/metadata-modules/ai/ai-agentimport { type AgentEntity } from 'src/engine/metadata-modules/ai/ai-agent/entities/agent.entity';import { repairToolCall } from 'src/engine/metadata-modules/ai/ai-agent/utils/repair-tool-call.util';import { AI_TELEMETRY_CONFIG } from 'src/engine/metadata-modules/ai/ai-models/constants/ai-telemetry.const';-import { AgentModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service';+import { AiModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service';import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';import { RoleTargetEntity } from 'src/engine/metadata-modules/role-target/role-target.entity';@@ -46,7 +46,7 @@ export class AgentAsyncExecutorService {constructor(private readonly aiModelRegistryService: AiModelRegistryService,- private readonly agentModelConfigService: AgentModelConfigService,+ private readonly aiModelConfigService: AiModelConfigService,private readonly toolRegistry: ToolRegistryService,@InjectRepository(RoleTargetEntity)private readonly roleTargetRepository: Repository<RoleTargetEntity>,@@ -170,10 +170,10 @@ export class AgentAsyncExecutorService {},);- providerOptions = this.agentModelConfigService.getProviderOptions(+ providerOptions = this.aiModelConfigService.getProviderOptions(registeredModel,agent as unknown as Parameters<- typeof this.agentModelConfigService.getProviderOptions+ typeof this.aiModelConfigService.getProviderOptions>[1],);}diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util.tsindex d0a502c3663..f03274b910d 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util.ts@@ -1,4 +1,4 @@-import { type AIModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';+import { type AiModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';import { ModelFamily } from 'src/engine/metadata-modules/ai/ai-models/types/model-family.enum';export type TokenUsageInput = {@@ -36,7 +36,7 @@ const safeNumber = (value: number | undefined): number => {// Anthropic: outputTokens excludes reasoning (thinking) tokens// OpenAI/xAI/Groq/Google: outputTokens includes reasoning tokensexport const computeCostBreakdown = (- model: AIModelConfig,+ model: AiModelConfig,usage: TokenUsageInput,): CostBreakdown => {const rawInputTokens = safeNumber(usage.inputTokens);diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto.tsindex fc2953d903c..14def3ce0ae 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto.ts@@ -1,7 +1,7 @@import { Field, Int, ObjectType } from '@nestjs/graphql';-@ObjectType('AISystemPromptSection')-export class AISystemPromptSectionDTO {+@ObjectType('AiSystemPromptSection')+export class AiSystemPromptSectionDTO {@Field(() => String)title: string;@@ -12,10 +12,10 @@ export class AISystemPromptSectionDTO {estimatedTokenCount: number;}-@ObjectType('AISystemPromptPreview')-export class AISystemPromptPreviewDTO {- @Field(() => [AISystemPromptSectionDTO])- sections: AISystemPromptSectionDTO[];+@ObjectType('AiSystemPromptPreview')+export class AiSystemPromptPreviewDTO {+ @Field(() => [AiSystemPromptSectionDTO])+ sections: AiSystemPromptSectionDTO[];@Field(() => Int)estimatedTokenCount: number;diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/jobs/stream-agent-chat.job.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/jobs/stream-agent-chat.job.tsindex ee69d8a3708..633651b7339 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/jobs/stream-agent-chat.job.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/jobs/stream-agent-chat.job.ts@@ -25,7 +25,7 @@ import { AgentChatStreamingService } from 'src/engine/metadata-modules/ai/ai-chaimport { AgentChatService } from 'src/engine/metadata-modules/ai/ai-chat/services/agent-chat.service';import { ChatExecutionService } from 'src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service';import { getCancelChannel } from 'src/engine/metadata-modules/ai/ai-chat/utils/get-cancel-channel.util';-import type { AIModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';+import type { AiModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';import { STREAM_AGENT_CHAT_JOB_NAME } from './stream-agent-chat-job-name.constant';import { type StreamAgentChatJobData } from './stream-agent-chat-job.types';@@ -351,7 +351,7 @@ export class StreamAgentChatJob {};providerMetadata?: Record<string, Record<string, unknown> | undefined>;};- modelConfig: AIModelConfig;+ modelConfig: AiModelConfig;lastStepConversationSize: number;totalCacheCreationTokens: number;onUpdateUsage: (usage: {@@ -435,7 +435,7 @@ export class StreamAgentChatJob {outputCredits: number;};lastStepConversationSize: number;- modelConfig: AIModelConfig;+ modelConfig: AiModelConfig;userMessagePromise: Promise<{ turnId: string | null }>;}): Promise<void> {if (responseMessage.parts.length === 0) {diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.tsindex 372c0164fdc..4fdccd0e665 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts@@ -43,7 +43,7 @@ import { AiGraphqlApiExceptionInterceptor } from 'src/engine/metadata-modules/aiimport { type BrowsingContextType } from 'src/engine/metadata-modules/ai/ai-agent/types/browsingContext.type';import { AgentMessageDTO } from 'src/engine/metadata-modules/ai/ai-agent-execution/dtos/agent-message.dto';import { AgentChatThreadDTO } from 'src/engine/metadata-modules/ai/ai-chat/dtos/agent-chat-thread.dto';-import { AISystemPromptPreviewDTO } from 'src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto';+import { AiSystemPromptPreviewDTO } from 'src/engine/metadata-modules/ai/ai-chat/dtos/ai-system-prompt-preview.dto';import { ChatStreamCatchupChunksDTO } from 'src/engine/metadata-modules/ai/ai-chat/dtos/chat-stream-catchup-chunks.dto';import { SendChatMessageResultDTO } from 'src/engine/metadata-modules/ai/ai-chat/dtos/send-chat-message-result.dto';import { AgentChatThreadEntity } from 'src/engine/metadata-modules/ai/ai-chat/entities/agent-chat-thread.entity';@@ -275,9 +275,9 @@ export class AgentChatResolver {return deleted;}- @Query(() => AISystemPromptPreviewDTO)+ @Query(() => AiSystemPromptPreviewDTO)@RequireFeatureFlag(FeatureFlagKey.IS_AI_ENABLED)- async getAISystemPromptPreview(+ async getAiSystemPromptPreview(@AuthWorkspace() workspace: WorkspaceEntity,@AuthUserWorkspaceId() userWorkspaceId: string,) {diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.tsindex 1ef804bbbfe..b7af4a47c0c 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts@@ -55,10 +55,10 @@ import {import { AI_TELEMETRY_CONFIG } from 'src/engine/metadata-modules/ai/ai-models/constants/ai-telemetry.const';import {AiModelRegistryService,- type RegisteredAIModel,+ type RegisteredAiModel,} from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';import { SdkProviderFactoryService } from 'src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service';-import { type AIModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';+import { type AiModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';import { WebSearchService } from 'src/engine/core-modules/web-search/web-search.service';import { SkillService } from 'src/engine/metadata-modules/skill/skill.service';@@ -76,7 +76,7 @@ export type ChatExecutionOptions = {export type ChatExecutionResult = {stream: ReturnType<typeof streamText>;- modelConfig: AIModelConfig;+ modelConfig: AiModelConfig;};@Injectable()@@ -455,7 +455,7 @@ export class ChatExecutionService {return context;}- private getNativeWebSearchTools(model: RegisteredAIModel): {+ private getNativeWebSearchTools(model: RegisteredAiModel): {tools: ToolSet;callableToolNames: string[];} {diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/controllers/ai-generate-text.controller.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/controllers/ai-generate-text.controller.tsindex 7fe50693241..175de197604 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/controllers/ai-generate-text.controller.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/controllers/ai-generate-text.controller.ts@@ -14,7 +14,7 @@ import {AiExceptionCode,} from 'src/engine/metadata-modules/ai/ai.exception';import { AiRestApiExceptionFilter } from 'src/engine/metadata-modules/ai/filters/ai-api-exception.filter';-import { GenerateTextInput } from 'src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text-input.dto';+import { GenerateTextInput } from 'src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text.input';import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';@Controller('rest/ai')diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text-input.dto.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text.input.tssimilarity index 100%rename from packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text-input.dto.tsrename to packages/twenty-server/src/engine/metadata-modules/ai/ai-generate-text/dtos/generate-text.input.tsdiff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/ai-models.module.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/ai-models.module.tsindex 62fa55afacd..b345bb69a59 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/ai-models.module.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/ai-models.module.ts@@ -1,6 +1,6 @@import { Global, Module } from '@nestjs/common';-import { AgentModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service';+import { AiModelConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service';import { AiModelPreferencesService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-preferences.service';import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';import { ModelsDevCatalogService } from 'src/engine/metadata-modules/ai/ai-models/services/models-dev-catalog.service';@@ -15,11 +15,11 @@ import { SdkProviderFactoryService } from 'src/engine/metadata-modules/ai/ai-modModelsDevCatalogService,AiModelPreferencesService,AiModelRegistryService,- AgentModelConfigService,+ AiModelConfigService,],exports: [AiModelRegistryService,- AgentModelConfigService,+ AiModelConfigService,SdkProviderFactoryService,ModelsDevCatalogService,],diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service.tssimilarity index 94%rename from packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service.tsrename to packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service.tsindex e31ec359fa0..b0b11cb4c07 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/agent-model-config.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-config.service.ts@@ -12,20 +12,20 @@ import {} from 'src/engine/metadata-modules/ai/ai-models/constants/ai-sdk-package.const';import {AiModelRegistryService,- RegisteredAIModel,+ RegisteredAiModel,} from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';import { SdkProviderFactoryService } from 'src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service';import { FlatAgentWithRoleId } from 'src/engine/metadata-modules/flat-agent/types/flat-agent.type';@Injectable()-export class AgentModelConfigService {+export class AiModelConfigService {constructor(private readonly aiModelRegistryService: AiModelRegistryService,private readonly sdkProviderFactory: SdkProviderFactoryService,) {}getProviderOptions(- model: RegisteredAIModel,+ model: RegisteredAiModel,agent: FlatAgentWithRoleId,): ProviderOptions {switch (model.sdkPackage) {@@ -41,7 +41,7 @@ export class AgentModelConfigService {}getNativeModelTools(- model: RegisteredAIModel,+ model: RegisteredAiModel,agent: FlatAgentWithRoleId,): ToolSet {const tools: ToolSet = {};@@ -123,7 +123,7 @@ export class AgentModelConfigService {}private getAnthropicProviderOptions(- model: RegisteredAIModel,+ model: RegisteredAiModel,): ProviderOptions {if (!model.supportsReasoning) {return {};@@ -139,7 +139,7 @@ export class AgentModelConfigService {};}- private getBedrockProviderOptions(model: RegisteredAIModel): ProviderOptions {+ private getBedrockProviderOptions(model: RegisteredAiModel): ProviderOptions {if (!model.supportsReasoning) {return {};}diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service.tsindex a4eb9903a1b..62e44f2592a 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service.ts@@ -14,7 +14,7 @@ import {import { AiModelPreferencesService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-preferences.service';import { ProviderConfigService } from 'src/engine/metadata-modules/ai/ai-models/services/provider-config.service';import { SdkProviderFactoryService } from 'src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service';-import { type AIModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';+import { type AiModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';import { type AiProviderConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-provider-config.type';import { type AiProviderModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-provider-model-config.type';import { type AiProvidersConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-providers-config.type';@@ -34,7 +34,7 @@ import {type WorkspaceModelAvailabilitySettings,} from 'src/engine/metadata-modules/ai/ai-models/utils/is-model-allowed.util';-export interface RegisteredAIModel {+export interface RegisteredAiModel {modelId: string;sdkPackage: AiSdkPackage;model: LanguageModel;@@ -46,8 +46,8 @@ export interface RegisteredAIModel {@Injectable()export class AiModelRegistryService {private readonly logger = new Logger(AiModelRegistryService.name);- private modelRegistry: Map<string, RegisteredAIModel> = new Map();- private modelConfigCache: Map<string, AIModelConfig> = new Map();+ private modelRegistry: Map<string, RegisteredAiModel> = new Map();+ private modelConfigCache: Map<string, AiModelConfig> = new Map();private providerModelDefCache: Map<string,{ providerName: string; modelDef: AiProviderModelConfig }@@ -112,7 +112,7 @@ export class AiModelRegistryService {this.modelConfigCache.set(compositeId,- this.toAIModelConfig(compositeId, config, modelDef),+ this.toAiModelConfig(compositeId, config, modelDef),);this.providerModelDefCache.set(compositeId, {@@ -134,11 +134,11 @@ export class AiModelRegistryService {}}- private toAIModelConfig(+ private toAiModelConfig(compositeId: string,providerConfig: AiProviderConfig,modelDef: AiProviderModelConfig,- ): AIModelConfig {+ ): AiModelConfig {return {modelId: compositeId,label: modelDef.label,@@ -163,19 +163,19 @@ export class AiModelRegistryService {};}- getModel(modelId: string): RegisteredAIModel | undefined {+ getModel(modelId: string): RegisteredAiModel | undefined {this.ensureFresh();return this.modelRegistry.get(modelId);}- getAvailableModels(): RegisteredAIModel[] {+ getAvailableModels(): RegisteredAiModel[] {this.ensureFresh();return Array.from(this.modelRegistry.values());}- getModelConfig(modelId: string): AIModelConfig | undefined {+ getModelConfig(modelId: string): AiModelConfig | undefined {this.ensureFresh();return this.modelConfigCache.get(modelId);@@ -187,7 +187,7 @@ export class AiModelRegistryService {private getFirstAvailableModelFromList(modelIds: string[],- ): RegisteredAIModel | undefined {+ ): RegisteredAiModel | undefined {for (const modelId of modelIds) {const model = this.getModel(modelId);@@ -199,15 +199,15 @@ export class AiModelRegistryService {return undefined;}- getDefaultSpeedModel(): RegisteredAIModel {+ getDefaultSpeedModel(): RegisteredAiModel {return this.getDefaultModelForRole(AiModelRole.FAST);}- getDefaultPerformanceModel(): RegisteredAIModel {+ getDefaultPerformanceModel(): RegisteredAiModel {return this.getDefaultModelForRole(AiModelRole.SMART);}- private getDefaultModelForRole(role: AiModelRole): RegisteredAIModel {+ private getDefaultModelForRole(role: AiModelRole): RegisteredAiModel {const prefs = this.preferencesService.getPreferences();const preferenceKey =role === AiModelRole.FAST ? 'defaultFastModels' : 'defaultSmartModels';@@ -228,7 +228,7 @@ export class AiModelRegistryService {return model;}- getEffectiveModelConfig(modelId: string): AIModelConfig {+ getEffectiveModelConfig(modelId: string): AiModelConfig {this.ensureFresh();if (isAutoSelectModelId(modelId)) {@@ -262,8 +262,8 @@ export class AiModelRegistryService {}private createDefaultConfigForCustomModel(- registeredModel: RegisteredAIModel,- ): AIModelConfig {+ registeredModel: RegisteredAiModel,+ ): AiModelConfig {return {modelId: registeredModel.modelId,label: registeredModel.modelId,@@ -316,14 +316,14 @@ export class AiModelRegistryService {}}- getAdminFilteredModels(): RegisteredAIModel[] {+ getAdminFilteredModels(): RegisteredAiModel[] {return this.getAvailableModels().filter((model) =>this.isModelAdminAllowed(model.modelId),);}getAllModelsWithStatus(): Array<{- modelConfig: AIModelConfig;+ modelConfig: AiModelConfig;isAvailable: boolean;isAdminEnabled: boolean;isRecommended: boolean;@@ -401,7 +401,7 @@ export class AiModelRegistryService {return this.providerConfigService.getCatalogProviderNames();}- resolveModelForAgent(agent: { modelId: string } | null): RegisteredAIModel {+ resolveModelForAgent(agent: { modelId: string } | null): RegisteredAiModel {const aiModel = this.getEffectiveModelConfig(agent?.modelId ?? AUTO_SELECT_SMART_MODEL_ID,);diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service.tsindex d3c6c6c24ea..92bdbde254c 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/services/sdk-provider-factory.service.ts@@ -106,7 +106,7 @@ export class SdkProviderFactoryService {case AI_SDK_BEDROCK:return this.buildBedrockProvider(config);case AI_SDK_OPENAI_COMPATIBLE:- return this.buildOpenAICompatibleProvider(config);+ return this.buildOpenAiCompatibleProvider(config);default:throw new Error(`Unsupported SDK package: ${config.npm}`);}@@ -167,7 +167,7 @@ export class SdkProviderFactoryService {};}- private buildOpenAICompatibleProvider(+ private buildOpenAiCompatibleProvider(config: AiProviderConfig,): AiSdkProviderInstance {if (!config.baseUrl) {diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type.tsindex 032a248211b..b195119fbbf 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type.ts@@ -2,8 +2,7 @@ import { type AiSdkPackage, type DataResidency } from 'twenty-shared/ai';import { type LongContextCost } from 'src/engine/metadata-modules/ai/ai-models/types/long-context-cost.type';import { type ModelFamily } from 'src/engine/metadata-modules/ai/ai-models/types/model-family.enum';-// TODO: rename to AiModelConfig for consistency with service naming (AiModelRegistryService, etc.)-export type AIModelConfig = {+export type AiModelConfig = {// Composite model id (`provider/modelName`) used in the registry and GraphQL; same shape as SDK routing when applicable.modelId: string;sdkPackage: AiSdkPackage;diff --git a/packages/twenty-shared/src/ai/index.ts b/packages/twenty-shared/src/ai/index.tsindex 9bb5a32150b..005c37fee40 100644--- a/packages/twenty-shared/src/ai/index.ts+++ b/packages/twenty-shared/src/ai/index.ts@@ -29,8 +29,8 @@ export type {} from './types/DataMessagePart';export { isExtendedFileUIPart } from './types/DataMessagePart';export type {- AIChatUsageMetadata,- AIChatModelMetadata,+ AiChatUsageMetadata,+ AiChatModelMetadata,ExtendedUIMessage,} from './types/ExtendedUIMessage';export type { ExtendedUIMessagePart } from './types/ExtendedUIMessagePart';diff --git a/packages/twenty-shared/src/ai/types/ExtendedUIMessage.ts b/packages/twenty-shared/src/ai/types/ExtendedUIMessage.tsindex b301b8b1bdd..daca44ec228 100644--- a/packages/twenty-shared/src/ai/types/ExtendedUIMessage.ts+++ b/packages/twenty-shared/src/ai/types/ExtendedUIMessage.ts@@ -2,7 +2,7 @@ import { type DataMessagePart } from '@/ai/types/DataMessagePart';import { type Nullable } from '@/types';import { type UIMessage } from 'ai';-export type AIChatUsageMetadata = {+export type AiChatUsageMetadata = {inputTokens: number;outputTokens: number;cachedInputTokens: number;@@ -11,14 +11,14 @@ export type AIChatUsageMetadata = {conversationSize: number;};-export type AIChatModelMetadata = {+export type AiChatModelMetadata = {contextWindowTokens: number;};type Metadata = {createdAt: string;- usage?: AIChatUsageMetadata;- model?: AIChatModelMetadata;+ usage?: AiChatUsageMetadata;+ model?: AiChatModelMetadata;};export type ExtendedUIMessage = UIMessage<Metadata, DataMessagePart> & {diff --git a/packages/twenty-shared/src/types/SettingsPath.ts b/packages/twenty-shared/src/types/SettingsPath.tsindex 498f2e87c1a..e487fcdd376 100644--- a/packages/twenty-shared/src/types/SettingsPath.ts+++ b/packages/twenty-shared/src/types/SettingsPath.ts@@ -32,14 +32,14 @@ export enum SettingsPath {EmailingDomainDetail = 'domains/emailing-domain/:domainId',Updates = 'updates',AI = 'ai',- AIUsageUserDetail = 'ai/usage/user/:userWorkspaceId',- AIPrompts = 'ai/prompts',- AINewAgent = 'ai/new-agent',- AIAgentDetail = 'ai/agents/:agentId',- AIAgentTurnDetail = 'ai/agents/:agentId/turns/:turnId',- AINewSkill = 'ai/new-skill',- AISkillDetail = 'ai/skills/:skillId',- AIToolDetail = 'ai/tools/:toolIdentifier',+ AiUsageUserDetail = 'ai/usage/user/:userWorkspaceId',+ AiPrompts = 'ai/prompts',+ AiNewAgent = 'ai/new-agent',+ AiAgentDetail = 'ai/agents/:agentId',+ AiAgentTurnDetail = 'ai/agents/:agentId/turns/:turnId',+ AiNewSkill = 'ai/new-skill',+ AiSkillDetail = 'ai/skills/:skillId',+ AiToolDetail = 'ai/tools/:toolIdentifier',Applications = 'applications',ApplicationDetail = 'applications/:applicationId',ApplicationLogicFunctionDetail = 'applications/:applicationId/logicFunctions/:logicFunctionId',diff --git a/packages/twenty-shared/src/types/SidePanelPages.ts b/packages/twenty-shared/src/types/SidePanelPages.tsindex 81c76dca128..f6c9213f968 100644--- a/packages/twenty-shared/src/types/SidePanelPages.ts+++ b/packages/twenty-shared/src/types/SidePanelPages.ts@@ -14,7 +14,7 @@ export enum SidePanelPages {WorkflowRunStepView = 'workflow-run-step-view',SearchRecords = 'search-records',AskAI = 'ask-ai',- ViewPreviousAIChats = 'view-previous-ai-chats',+ ViewPreviousAiChats = 'view-previous-ai-chats',PageLayoutDashboardWidgetTypeSelect = 'page-layout-dashboard-widget-type-select',PageLayoutTabSettings = 'page-layout-tab-settings',DashboardChartSettings = 'dashboard-chart-settings',