natureco-cli 2.13.20 → 2.13.21
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.
- package/package.json +1 -1
- package/src/commands/dashboard.js +2 -2
- package/src/commands/migrate.js +18 -6
package/package.json
CHANGED
|
@@ -211,7 +211,7 @@ body::before{
|
|
|
211
211
|
<div class="header-bot-name" id="header-bot-name">Nature Bot</div>
|
|
212
212
|
<div class="header-bot-model" id="header-bot-model">NatureCo</div>
|
|
213
213
|
</div>
|
|
214
|
-
<div class="version-badge" id="version-badge">v2.13.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.13.21</div>
|
|
215
215
|
</div>
|
|
216
216
|
<div class="messages" id="messages"></div>
|
|
217
217
|
<div class="input-area">
|
|
@@ -341,7 +341,7 @@ function dashboard(action) {
|
|
|
341
341
|
apiKey: cfg.apiKey,
|
|
342
342
|
defaultBot: cfg.defaultBot,
|
|
343
343
|
defaultBotId: cfg.defaultBotId,
|
|
344
|
-
version: 'v2.13.
|
|
344
|
+
version: 'v2.13.21',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/commands/migrate.js
CHANGED
|
@@ -206,6 +206,7 @@ async function migrate(options) {
|
|
|
206
206
|
|
|
207
207
|
// Fallback: Extract botName from cron job names if still not found
|
|
208
208
|
// "Ichigo Brain — 3 Saatlik Döngü" → "Ichigo"
|
|
209
|
+
// "İchigo Briefing" → "İchigo"
|
|
209
210
|
if (!memory.botName) {
|
|
210
211
|
try {
|
|
211
212
|
const cronJobsPath = path.join(openclawDir, 'cron', 'jobs.json');
|
|
@@ -214,14 +215,25 @@ async function migrate(options) {
|
|
|
214
215
|
const cronData = JSON.parse(fs.readFileSync(cronJobsPath, 'utf8'));
|
|
215
216
|
const jobs = cronData.jobs || cronData || [];
|
|
216
217
|
|
|
217
|
-
// Skip
|
|
218
|
-
const
|
|
218
|
+
// Skip words: generic names that are not bot names
|
|
219
|
+
const skipWords = [
|
|
220
|
+
'natureco', 'gmail', 'product', 'reddit', 'forum', 'main',
|
|
221
|
+
'twitter', 'weekly', 'daily', 'morning', 'natureco-', 'nco'
|
|
222
|
+
];
|
|
219
223
|
|
|
220
224
|
for (const job of jobs) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
+
if (!job.name) continue;
|
|
226
|
+
|
|
227
|
+
// Extract first word (split by space, dash, or em-dash)
|
|
228
|
+
const firstWord = job.name.split(/[\s\-—]/)[0];
|
|
229
|
+
const firstWordLower = firstWord?.toLowerCase();
|
|
230
|
+
|
|
231
|
+
// Check if valid: length > 3 and not in skip list
|
|
232
|
+
if (firstWordLower &&
|
|
233
|
+
firstWordLower.length > 3 &&
|
|
234
|
+
!skipWords.some(s => firstWordLower.includes(s))) {
|
|
235
|
+
// Keep original case (Ichigo or İchigo)
|
|
236
|
+
memory.botName = firstWord;
|
|
225
237
|
break;
|
|
226
238
|
}
|
|
227
239
|
}
|