diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/resourceReferences.ts b/apps/ai-game-creator-shell/src/features/project-workspace/resourceReferences.ts index 8daf77df1..84fffde94 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/resourceReferences.ts +++ b/apps/ai-game-creator-shell/src/features/project-workspace/resourceReferences.ts @@ -365,13 +365,15 @@ function chatReferenceKey(reference: ChatReference) { */ export function chatReferenceListKey(references: ChatReference[]) { return references - .map((reference) => - reference.type === 'resource' - ? `resource:${reference.resourceId}:${reference.source}:${reference.label}` - : reference.type === 'skill' - ? `skill:${reference.name}` - : `runtime-region:${runtimeRegionReferenceDiscriminators(reference)}`, - ) + .map((reference) => { + if (reference.type === 'resource') { + return `resource:${reference.resourceId}:${reference.source}:${reference.label}`; + } + if (reference.type === 'skill') { + return `skill:${reference.name}`; + } + return `runtime-region:${runtimeRegionReferenceDiscriminators(reference)}`; + }) .join('\u0001'); }