@cccarv82/freya 2.18.0 → 2.19.0

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.
Files changed (2) hide show
  1. package/cli/web-ui.js +33 -9
  2. package/package.json +1 -1
package/cli/web-ui.js CHANGED
@@ -196,12 +196,11 @@
196
196
  var num = 0;
197
197
 
198
198
  // Match append_daily_log / appenddailylog actions
199
- var logRe = /"type"\s*:\s*"append_?daily_?log"\s*,\s*"text"\s*:\s*"([^"]{1,300})/gi;
199
+ var logRe = /"type"\s*:\s*"append_?daily_?log"\s*,\s*"text"\s*:\s*"([^"]{1,2000})/gi;
200
200
  var m;
201
201
  while ((m = logRe.exec(text)) !== null) {
202
202
  num++;
203
- var t = m[1].slice(0, 140);
204
- lines.push(num + '. \u{1F4DD} **Registrar no log:** ' + t + (m[1].length > 140 ? '...' : ''));
203
+ lines.push(num + '. \u{1F4DD} **Registrar no log:** ' + m[1]);
205
204
  }
206
205
 
207
206
  // Match create_task actions
@@ -247,8 +246,8 @@
247
246
  var num = i + 1;
248
247
 
249
248
  if (type === 'appenddailylog') {
250
- var t = String(a.text || '').slice(0, 140);
251
- return num + '. ' + icon + ' **Registrar no log:** ' + t + (String(a.text || '').length > 140 ? '...' : '');
249
+ var t = String(a.text || '');
250
+ return num + '. ' + icon + ' **Registrar no log:** ' + t;
252
251
  }
253
252
  if (type === 'createtask') {
254
253
  var desc = String(a.description || '').slice(0, 120);
@@ -2386,12 +2385,20 @@
2386
2385
  clearPastedImages();
2387
2386
  syncChatThreadVisibility();
2388
2387
 
2388
+ // Typing indicator while processing
2389
+ var saveTypingId = 'typing-save-' + Date.now();
2390
+ chatAppend('assistant', '<div class="typing-indicator"><span></span><span></span><span></span></div>', { id: saveTypingId, html: true });
2391
+
2389
2392
  setPill('run', 'salvando…');
2390
2393
  await api('/api/inbox/add', { dir: dirOrDefault(), text, attachments });
2391
2394
 
2392
2395
  setPill('run', attachments.length ? 'processando texto + imagens…' : 'processando…');
2393
2396
  const r = await api('/api/agents/plan', { dir: dirOrDefault(), text, attachments });
2394
2397
 
2398
+ // Remove typing indicator
2399
+ var typEl = $(saveTypingId);
2400
+ if (typEl) typEl.remove();
2401
+
2395
2402
  state.lastPlan = r.plan || '';
2396
2403
 
2397
2404
  // Show plan output in Preview panel
@@ -2409,8 +2416,12 @@
2409
2416
  }
2410
2417
 
2411
2418
  if (state.autoApply) {
2412
- setPill('run', 'applying…');
2419
+ var applyTypingId = 'typing-apply-' + Date.now();
2420
+ chatAppend('assistant', '<div class="typing-indicator"><span></span><span></span><span></span></div>', { id: applyTypingId, html: true });
2421
+ setPill('run', 'aplicando…');
2413
2422
  await applyPlan();
2423
+ var applyEl = $(applyTypingId);
2424
+ if (applyEl) applyEl.remove();
2414
2425
  const a = state.lastApplied || {};
2415
2426
  setPill('ok', `applied(${a.tasks || 0}t, ${a.blockers || 0}b)`);
2416
2427
  if (state.autoRunReports) {
@@ -2474,10 +2485,23 @@
2474
2485
  state.lastApplied = r.applied || null;
2475
2486
  const summary = r.applied || {};
2476
2487
 
2477
- let msg = '## Apply result\n\n' + JSON.stringify(summary, null, 2);
2488
+ // Build human-friendly summary instead of raw JSON
2489
+ var parts = [];
2490
+ var tasks = Number(summary.tasks || 0);
2491
+ var blockers = Number(summary.blockers || 0);
2492
+ var skippedT = Number(summary.tasksSkipped || 0);
2493
+ var skippedB = Number(summary.blockersSkipped || 0);
2494
+
2495
+ if (tasks > 0) parts.push('✅ **' + tasks + ' tarefa' + (tasks > 1 ? 's' : '') + '** criada' + (tasks > 1 ? 's' : ''));
2496
+ if (blockers > 0) parts.push('🚧 **' + blockers + ' blocker' + (blockers > 1 ? 's' : '') + '** registrado' + (blockers > 1 ? 's' : ''));
2497
+ if (skippedT > 0) parts.push('⏭️ ' + skippedT + ' tarefa' + (skippedT > 1 ? 's' : '') + ' já existente' + (skippedT > 1 ? 's' : ''));
2498
+ if (skippedB > 0) parts.push('⏭️ ' + skippedB + ' blocker' + (skippedB > 1 ? 's' : '') + ' já existente' + (skippedB > 1 ? 's' : ''));
2499
+ if (tasks === 0 && blockers === 0) parts.push('📝 Informação registrada no log diário');
2500
+
2501
+ let msg = parts.join('\n');
2502
+
2478
2503
  if (summary && Array.isArray(summary.reportsSuggested) && summary.reportsSuggested.length) {
2479
- msg += '\n\n## Suggested reports\n- ' + summary.reportsSuggested.join('\n- ');
2480
- msg += '\n\nUse: **Rodar relatórios sugeridos** (barra lateral)';
2504
+ msg += '\n\n📊 **Relatórios sugeridos:** ' + summary.reportsSuggested.join(', ');
2481
2505
  }
2482
2506
 
2483
2507
  setOut(msg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cccarv82/freya",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "Personal AI Assistant with local-first persistence",
5
5
  "scripts": {
6
6
  "health": "node scripts/validate-data.js && node scripts/validate-structure.js",