fix(ai) - fixes (#22227)

- ai chat author fix (before : "workflow", after : "user")
- https://discord.com/channels/1130383047699738754/1496872385687584768

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22227?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
Etienne
2026-06-26 19:53:29 +02:00
committed by GitHub
parent d58ec64e10
commit 3525187321
12 changed files with 165 additions and 22 deletions
@@ -3,17 +3,20 @@ import {
FieldActorSource,
type FullNameMetadata,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
type BuildCreatedByFromFullNameMetadataArgs = {
workspaceMemberId: string;
fullNameMetadata: FullNameMetadata;
source?: FieldActorSource;
};
export const buildCreatedByFromFullNameMetadata = ({
fullNameMetadata,
workspaceMemberId,
source = FieldActorSource.MANUAL,
}: BuildCreatedByFromFullNameMetadataArgs): ActorMetadata => ({
workspaceMemberId,
source: FieldActorSource.MANUAL,
source,
name: `${fullNameMetadata.firstName} ${fullNameMetadata.lastName}`,
context: {},
});
@@ -404,6 +404,7 @@ export class ToolRegistryService {
roleId: context.roleId,
rolePermissionConfig,
authContext: context.authContext,
actorContext: context.actorContext,
userId: context.userId,
userWorkspaceId: context.userWorkspaceId,
threadId: context.threadId,