@zodic/shared 0.0.192 → 0.0.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,6 +72,8 @@ export class ConceptService {
72
72
 
73
73
  let attempts = 0;
74
74
  const maxAttempts = 3;
75
+ let newlyGeneratedNames: string[] = []; // ✅ Track generated names in memory
76
+
75
77
  while (attempts < maxAttempts) {
76
78
  let phase = 'generation';
77
79
  try {
@@ -94,7 +96,9 @@ export class ConceptService {
94
96
  }
95
97
 
96
98
  console.log(`✏️ Generating new name...`);
97
- const recentNamesEN = allNamesEN.slice(-40);
99
+ // Merge newly generated names with existing recent names
100
+ const recentNamesEN = [...allNamesEN.slice(-40), ...newlyGeneratedNames];
101
+
98
102
  const messages = this.context
99
103
  .buildLLMMessages()
100
104
  .generateConceptBasicInfo({
@@ -117,6 +121,9 @@ export class ConceptService {
117
121
 
118
122
  console.log(`🎭 Generated names: EN - "${nameEN}", PT - "${namePT}"`);
119
123
 
124
+ // ✅ **Add the generated names to our local tracking list**
125
+ newlyGeneratedNames.push(nameEN, namePT);
126
+
120
127
  // ✅ Check uniqueness before storing
121
128
  if (allNamesEN.includes(nameEN) || allNamesPT.includes(namePT)) {
122
129
  console.warn(`⚠️ Duplicate Name Detected: "${nameEN}" or "${namePT}"`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.192",
3
+ "version": "0.0.193",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {