@zodic/shared 0.0.205 → 0.0.207
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.
|
@@ -51,6 +51,7 @@ export class ConceptService {
|
|
|
51
51
|
|
|
52
52
|
let attempts = 0;
|
|
53
53
|
const maxAttempts = 3;
|
|
54
|
+
const MAX_NAME_LENGTH = 44;
|
|
54
55
|
|
|
55
56
|
while (attempts < maxAttempts) {
|
|
56
57
|
let phase = 'generation';
|
|
@@ -86,14 +87,19 @@ export class ConceptService {
|
|
|
86
87
|
|
|
87
88
|
console.log(`🎭 Generated names: EN - "${nameEN}", PT - "${namePT}"`);
|
|
88
89
|
|
|
89
|
-
// ✅
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
90
|
+
// ✅ Forcefully trim the name to exactly 5 words if it's too long
|
|
91
|
+
const enforceWordLimit = (name: string): string => {
|
|
92
|
+
const words = name.split(/\s+/);
|
|
93
|
+
if (words.length > 5) {
|
|
94
|
+
return words.slice(0, 5).join(' ');
|
|
95
|
+
}
|
|
96
|
+
return name;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
nameEN = enforceWordLimit(nameEN);
|
|
100
|
+
namePT = enforceWordLimit(namePT);
|
|
101
|
+
|
|
102
|
+
console.log(`✂️ Trimmed names: EN - "${nameEN}", PT - "${namePT}"`);
|
|
97
103
|
|
|
98
104
|
// ✅ Check uniqueness before storing
|
|
99
105
|
if (allNamesEN.includes(nameEN) || allNamesPT.includes(namePT)) {
|
package/package.json
CHANGED
package/utils/conceptPrompts.ts
CHANGED
|
@@ -217,11 +217,24 @@ A list of previously used names will be provided. The new name must be unique an
|
|
|
217
217
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
218
218
|
|
|
219
219
|
1. Name (Nome)
|
|
220
|
-
- The name must contain exactly 5 words.
|
|
221
|
-
- It must start with "The Amulet of
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
220
|
+
- The name must contain exactly 5 words—no more, no less.
|
|
221
|
+
- It must start with "The Amulet of" in English and "O Amuleto de" in Portuguese.
|
|
222
|
+
- Only two additional words are allowed after "The Amulet of".
|
|
223
|
+
- These two words must each be a single, standalone word—do not use compound expressions or phrases.
|
|
224
|
+
- Do not include multiple symbolic elements. The name must focus on a single theme.
|
|
225
|
+
- Do not use conjunctions, extra descriptors, or additional prepositional phrases.
|
|
226
|
+
- The name must not include "and," "of," "with," "for," or similar linking words.
|
|
227
|
+
|
|
228
|
+
Correct Examples:
|
|
229
|
+
- EN: "The Amulet of Serene Strength"
|
|
230
|
+
- PT: "O Amuleto de Força Serena"
|
|
231
|
+
- EN: "The Amulet of Healing Light"
|
|
232
|
+
- PT: "O Amuleto de Luz Curativa"
|
|
233
|
+
|
|
234
|
+
Incorrect Examples:
|
|
235
|
+
- "The Amulet of Anchored Serenity and Flourishing Light" (Too long, uses conjunction "and")
|
|
236
|
+
- "The Amulet of the Eternal Sun" (Includes extra article "the")
|
|
237
|
+
- "The Amulet of Serenity’s Radiance" (Uses possessive form, which breaks structure)
|
|
225
238
|
|
|
226
239
|
2. Description (Descrição)
|
|
227
240
|
- Write a concise and grounded narrative that links the Amulet’s qualities to the traits of the zodiac combination.
|
|
@@ -240,19 +253,19 @@ Rules and Restrictions:
|
|
|
240
253
|
- Do not mention zodiac signs or planets.
|
|
241
254
|
- Do not include the Amulet’s name in the description or poem.
|
|
242
255
|
- Ensure both descriptions are structurally and emotionally equivalent.
|
|
243
|
-
- The poem must be free-flowing and symbolic, avoiding direct translation.
|
|
244
|
-
-
|
|
256
|
+
- The poem must be free-flowing and symbolic, avoiding direct translation.
|
|
257
|
+
- Ensure the name is exactly 5 words. The first three must be standard ("The Amulet of" / "O Amuleto de"), followed by two individual, standalone words only.
|
|
245
258
|
|
|
246
259
|
Response Format:
|
|
247
260
|
|
|
248
261
|
EN:
|
|
249
|
-
• Name: The Amulet of [Symbolic
|
|
262
|
+
• Name: The Amulet of [Symbolic Word] [Symbolic Word]
|
|
250
263
|
• Description: [Concise and grounded explanation]
|
|
251
264
|
• Poetic Passage:
|
|
252
265
|
[4 poetic lines uniquely written in English]
|
|
253
266
|
|
|
254
267
|
PT:
|
|
255
|
-
• Nome: O Amuleto de [
|
|
268
|
+
• Nome: O Amuleto de [Palavra Simbólica] [Palavra Simbólica]
|
|
256
269
|
• Descrição: [Explicação concisa e bem fundamentada]
|
|
257
270
|
• Passagem Poética:
|
|
258
271
|
[4 poetic lines uniquely written in Portuguese]
|