@zodic/shared 0.0.208 → 0.0.210

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.
@@ -81,6 +81,9 @@ export class ConceptService {
81
81
 
82
82
  phase = 'cleaning';
83
83
  aiResponse = this.cleanAIResponse(aiResponse);
84
+
85
+ console.log("!-- aiResponse -> ", aiResponse)
86
+ console.log("!-- aiResponse length -> ", aiResponse.length)
84
87
 
85
88
  phase = 'parsing';
86
89
  let { nameEN, descriptionEN, poemEN, namePT, descriptionPT, poemPT } = this.parseBasicInfoResponse(aiResponse, conceptSlug);
@@ -90,8 +93,8 @@ export class ConceptService {
90
93
  // ✅ Forcefully trim the name to exactly 5 words if it's too long
91
94
  const enforceWordLimit = (name: string): string => {
92
95
  const words = name.split(/\s+/);
93
- if (words.length > 5) {
94
- return words.slice(0, 5).join(' ');
96
+ if (words.length > 6) {
97
+ return words.slice(0, 6).join(' ');
95
98
  }
96
99
  return name;
97
100
  };
@@ -116,8 +119,8 @@ export class ConceptService {
116
119
  }
117
120
 
118
121
  console.log(`📝 Storing names in Durable Object...`);
119
- await stub.fetch(`https://internal/add-name`, { method: 'POST', body: JSON.stringify({ language: 'en-us', name: nameEN }), headers: { 'Content-Type': 'application/json' } });
120
- await stub.fetch(`https://internal/add-name`, { method: 'POST', body: JSON.stringify({ language: 'pt-br', name: namePT }), headers: { 'Content-Type': 'application/json' } });
122
+ // await stub.fetch(`https://internal/add-name`, { method: 'POST', body: JSON.stringify({ language: 'en-us', name: nameEN }), headers: { 'Content-Type': 'application/json' } });
123
+ // await stub.fetch(`https://internal/add-name`, { method: 'POST', body: JSON.stringify({ language: 'pt-br', name: namePT }), headers: { 'Content-Type': 'application/json' } });
121
124
 
122
125
  Object.assign(existingEN, { name: nameEN, description: descriptionEN, poem: poemEN, status: 'idle' });
123
126
  await kvStore.put(kvKeyEN, JSON.stringify(existingEN));
@@ -179,6 +182,7 @@ export class ConceptService {
179
182
  .trim()
180
183
  .split(/\n+/)
181
184
  .map((line) => cleanText(line));
185
+
182
186
 
183
187
  const namePT = cleanText(ptMatch[1]);
184
188
  const descriptionPT = cleanText(ptMatch[2]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.208",
3
+ "version": "0.0.210",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -226,9 +226,9 @@ For the given combination, generate the following in both languages, ensuring th
226
226
  - The name must not include "and," "of," "with," "for," or similar linking words.
227
227
 
228
228
  Correct Examples:
229
- - EN: "The Amulet of Serene Strength Radiance"
229
+ - EN: "The Amulet of Serene Radiant Strength"
230
230
  - PT: "O Amuleto de Força Serena Radiante"
231
- - EN: "The Amulet of Healing Light Purity"
231
+ - EN: "The Amulet of Healing Pure Light"
232
232
  - PT: "O Amuleto de Luz Curativa Pura"
233
233
 
234
234
  Incorrect Examples: