clawaid 1.1.4 โ†’ 1.1.5

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/package.json +1 -1
  2. package/web/index.html +79 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawaid",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "AI-powered diagnostic and repair tool for OpenClaw",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/web/index.html CHANGED
@@ -209,15 +209,15 @@
209
209
 
210
210
  <div class="hdr">
211
211
  <div class="logo">๐Ÿฆž๐Ÿฉน</div>
212
- <h1>ClawAid</h1>
213
- <p>Automatic diagnostics & repair for OpenClaw</p>
212
+ <h1 id="hdr-title">ClawAid</h1>
213
+ <p id="hdr-subtitle">Automatic diagnostics & repair for OpenClaw</p>
214
214
  </div>
215
215
 
216
216
  <!-- Start screen -->
217
217
  <div id="start-screen">
218
218
  <div class="start-card">
219
- <p>ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.</p>
220
- <ul>
219
+ <p id="privacy-text">ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.</p>
220
+ <ul id="privacy-list">
221
221
  <li>API keys are redacted before leaving your machine</li>
222
222
  <li>Data is sent to our diagnostic service โ€” never stored</li>
223
223
  <li>All commands run locally on your machine</li>
@@ -242,6 +242,55 @@
242
242
  const feed = document.getElementById('feed');
243
243
  const startScreen = document.getElementById('start-screen');
244
244
 
245
+ // โ”€โ”€โ”€ i18n โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
246
+ const isZh = /^zh/i.test(navigator.language || '');
247
+ const T = {
248
+ startScan: isZh ? '๐Ÿฉบ ๅผ€ๅง‹ๆ‰ซๆ' : '๐Ÿฉบ Start Scan',
249
+ title: 'ClawAid',
250
+ subtitle: isZh ? 'ไธ€ๆกๅ‘ฝไปค๏ผŒ่‡ชๅŠจ่ฏŠๆ–ญๅนถไฟฎๅค OpenClaw' : 'One command to diagnose and fix OpenClaw',
251
+ privacy: isZh ? 'ClawAid ไผš่ฏปๅ–ไฝ ็š„ OpenClaw ้…็ฝฎใ€gateway ็Šถๆ€ๅ’Œๆ—ฅๅฟ—ๆฅ่ฏŠๆ–ญ้—ฎ้ข˜ใ€‚' : 'ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.',
252
+ scanning: isZh ? 'ๆญฃๅœจๆ‰ซๆไฝ ็š„็ณป็ปŸ...' : 'Scanning your system...',
253
+ scanned: isZh ? '็ณป็ปŸๆ•ฐๆฎๅทฒๆ”ถ้›†' : 'System data collected',
254
+ allClear: isZh ? 'ไธ€ๅˆ‡ๆญฃๅธธ๏ผ' : 'All clear!',
255
+ fixed: isZh ? 'ๅทฒไฟฎๅค๏ผ' : 'Fixed!',
256
+ notFixed: isZh ? 'ๆ— ๆณ•่‡ชๅŠจไฟฎๅค' : "Couldn't fix automatically",
257
+ healthyDesc: isZh ? 'ไฝ ็š„ OpenClaw ่ฟ่กŒๆญฃๅธธใ€‚' : 'Your OpenClaw is running normally.',
258
+ fixedDesc: isZh ? 'OpenClaw ๅทฒไฟฎๅคใ€‚' : 'OpenClaw has been repaired.',
259
+ notFixedDesc: isZh ? 'ๅคšๆฌกๅฐ่ฏ•ๅŽ้—ฎ้ข˜ไป็„ถๅญ˜ๅœจใ€‚' : 'After multiple attempts, the issue persists.',
260
+ scanAgain: isZh ? '๐Ÿ”„ ้‡ๆ–ฐๆ‰ซๆ' : '๐Ÿ”„ Scan Again',
261
+ tryAgain: isZh ? '๐Ÿ”„ ๅ†่ฏ•ไธ€ๆฌก' : '๐Ÿ”„ Try Again',
262
+ warnings: isZh ? 'โš ๏ธ ๅ…ถไป–้œ€่ฆๆณจๆ„็š„' : 'โš ๏ธ Other things to know',
263
+ wasHelpful: isZh ? '้—ฎ้ข˜่งฃๅ†ณไบ†ๅ—๏ผŸ' : 'Was this helpful?',
264
+ feedbackYes: isZh ? '๐Ÿ‘ ่งฃๅ†ณไบ†' : '๐Ÿ‘ Yes',
265
+ feedbackNo: isZh ? '๐Ÿ‘Ž ๆฒก่งฃๅ†ณ' : '๐Ÿ‘Ž No',
266
+ thanksYes: isZh ? 'ๅคชๅฅฝไบ†๏ผๅพˆ้ซ˜ๅ…ดๅธฎๅˆฐไฝ  ๐ŸŽ‰' : 'Thanks! Glad it helped ๐ŸŽ‰',
267
+ thanksNo: isZh ? 'ๆŠฑๆญ‰ๆฒก่งฃๅ†ณ๏ผŒ่”็ณปๆˆ‘ไปฌๅธฎไฝ ๆžๅฎš ๐Ÿ‘‡' : "Sorry to hear that. Reach out below โ€” we'll help! ๐Ÿ‘‡",
268
+ contact: isZh ? '๐Ÿ’ฌ ๆœ‰้—ฎ้ข˜๏ผŸ' : '๐Ÿ’ฌ Questions or feedback?',
269
+ allowQ: isZh ? '่ฟ™ๅฐ†ไฟฎๆ”นไฝ ็š„็ณป็ปŸ๏ผŒๅ…่ฎธๆ‰ง่กŒๅ—๏ผŸ' : 'This will modify your system. Allow?',
270
+ allow: isZh ? 'โœ“ ๅ…่ฎธ' : 'โœ“ Allow',
271
+ skip: isZh ? '่ทณ่ฟ‡' : 'Skip',
272
+ whatsWrong: isZh ? '้‡ๅˆฐไป€ไนˆ้—ฎ้ข˜๏ผŸ' : "What's going on?",
273
+ descHint: isZh ? 'ๆ่ฟฐไฝ ็š„้—ฎ้ข˜๏ผŒๆˆ–่€…็›ดๆŽฅๆ‰ซๆโ€”โ€”ClawAid ไผš่‡ชๅŠจ่ฏŠๆ–ญใ€‚' : 'Describe the problem, or just scan โ€” ClawAid will figure it out.',
274
+ descPlaceholder: isZh ? 'ไพ‹ๅฆ‚๏ผšๆ›ดๆ–ฐๅŽ OpenClaw ๅฐฑไธๅ“ๅบ”ไบ†...๏ผˆๅฏ้€‰๏ผ‰' : 'e.g. OpenClaw stopped responding after I updated... (optional)',
275
+ sendDiagnose: isZh ? '๐Ÿ“ ๅ‘้€ๅนถ่ฏŠๆ–ญ' : '๐Ÿ“ Send & diagnose',
276
+ justScan: isZh ? '๐Ÿ” ็›ดๆŽฅๆ‰ซๆไฟฎๅค' : '๐Ÿ” Just scan & fix',
277
+ privacyList: isZh
278
+ ? ['API ๅฏ†้’ฅๅœจๅ‘้€ๅ‰ๅทฒ่„ฑๆ•', 'ๆ•ฐๆฎๅ‘้€ๅˆฐ่ฏŠๆ–ญๆœๅŠก๏ผŒไธไผšๅญ˜ๅ‚จ', 'ๆ‰€ๆœ‰ๅ‘ฝไปคๅœจไฝ ็š„ๆœฌๆœบๆ‰ง่กŒ']
279
+ : ['API keys are redacted before leaving your machine', 'Data is sent to our diagnostic service โ€” never stored', 'All commands run locally on your machine'],
280
+ };
281
+
282
+ // Apply i18n to static elements
283
+ if (isZh) {
284
+ const sub = document.getElementById('hdr-subtitle');
285
+ if (sub) sub.textContent = '่‡ชๅŠจ่ฏŠๆ–ญๅนถไฟฎๅค OpenClaw';
286
+ const pv = document.getElementById('privacy-text');
287
+ if (pv) pv.textContent = T.privacy;
288
+ const pl = document.getElementById('privacy-list');
289
+ if (pl) pl.innerHTML = T.privacyList.map(t => '<li>' + t + '</li>').join('');
290
+ const btn = document.getElementById('btn-start');
291
+ if (btn) btn.textContent = T.startScan;
292
+ }
293
+
245
294
  // โ”€โ”€โ”€ Helpers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
246
295
 
247
296
  function esc(s) {
@@ -251,8 +300,8 @@
251
300
  function sendFeedback(value, btn) {
252
301
  const container = btn.parentElement;
253
302
  container.innerHTML = value === 'yes'
254
- ? '<span style="color:#34a853;font-size:13px;">Thanks! Glad it helped ๐ŸŽ‰</span>'
255
- : '<span style="color:#ea4335;font-size:13px;">Sorry to hear that. Reach out below โ€” we\'ll help! ๐Ÿ‘‡</span>';
303
+ ? '<span style="color:#34a853;font-size:13px;">' + T.thanksYes + '</span>'
304
+ : '<span style="color:#ea4335;font-size:13px;">' + T.thanksNo + '</span>';
256
305
  fetch('/api/feedback', {
257
306
  method: 'POST',
258
307
  headers: { 'Content-Type': 'application/json' },
@@ -331,9 +380,9 @@
331
380
  bar.className = 'confirm-bar' + (risk === 'high' ? ' risk-high' : '');
332
381
  bar.id = 'confirm-bar-' + index;
333
382
  bar.innerHTML = `
334
- <span style="font-size:13px; color:var(--text); flex:1;">This will modify your system. Allow?</span>
335
- <button class="btn btn-green" id="btn-yes-${index}">โœ“ Allow</button>
336
- <button class="btn btn-ghost" id="btn-no-${index}">Skip</button>
383
+ <span style="font-size:13px; color:var(--text); flex:1;">${T.allowQ}</span>
384
+ <button class="btn btn-green" id="btn-yes-${index}">${T.allow}</button>
385
+ <button class="btn btn-ghost" id="btn-no-${index}">${T.skip}</button>
337
386
  `;
338
387
  card.appendChild(bar);
339
388
  card.classList.add('open'); // auto-expand so user sees what's about to run
@@ -359,7 +408,7 @@
359
408
  div.innerHTML = `
360
409
  <div class="step-top" onclick="this.parentElement.classList.toggle('open')">
361
410
  <div class="step-icon">๐Ÿ“ก</div>
362
- <div class="step-title" id="scan-title">Scanning your system...</div>
411
+ <div class="step-title" id="scan-title">${T.scanning}</div>
363
412
  <div class="step-status" id="scan-status"><div class="spinner"></div></div>
364
413
  </div>
365
414
  <div class="step-detail" id="scan-detail"></div>
@@ -371,14 +420,14 @@
371
420
  const el = document.getElementById('scan-status');
372
421
  if (el) el.innerHTML = 'โœ“';
373
422
  const title = document.getElementById('scan-title');
374
- if (title) title.textContent = 'System data collected';
423
+ if (title) title.textContent = T.scanned;
375
424
  }
376
425
 
377
426
  // โ”€โ”€โ”€ Result cards โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
378
427
 
379
428
  function renderWarnings(warnings) {
380
429
  if (!warnings || warnings.length === 0) return '';
381
- let html = '<div class="warnings-list"><div class="warnings-title">โš ๏ธ Other things to know</div>';
430
+ let html = '<div class="warnings-list"><div class="warnings-title">' + T.warnings + '</div>';
382
431
  for (const w of warnings) {
383
432
  html += `<div class="warning-item"><span class="wi-icon">๐Ÿ’ก</span><span class="wi-text">${esc(w)}</span><button class="wi-dismiss" title="Dismiss" onclick="(function(btn){var item=btn.closest('.warning-item');item.classList.add('dismissing');setTimeout(function(){item.remove();},300);})(this)">ร—</button></div>`;
384
433
  }
@@ -393,13 +442,13 @@
393
442
 
394
443
  const feedbackHtml = `
395
444
  <div style="margin-top:18px;padding:14px;background:#f8f9fa;border-radius:10px;border:1px solid #e0e0e0;">
396
- <div style="font-size:13px;color:#555;margin-bottom:8px;">Was this helpful?</div>
445
+ <div style="font-size:13px;color:#555;margin-bottom:8px;">${T.wasHelpful}</div>
397
446
  <div style="display:flex;gap:8px;margin-bottom:12px;">
398
- <button class="btn btn-ghost" onclick="sendFeedback('yes',this)" style="flex:1;">๐Ÿ‘ Yes</button>
399
- <button class="btn btn-ghost" onclick="sendFeedback('no',this)" style="flex:1;">๐Ÿ‘Ž No</button>
447
+ <button class="btn btn-ghost" onclick="sendFeedback('yes',this)" style="flex:1;">${T.feedbackYes}</button>
448
+ <button class="btn btn-ghost" onclick="sendFeedback('no',this)" style="flex:1;">${T.feedbackNo}</button>
400
449
  </div>
401
450
  <div style="font-size:12px;color:#888;line-height:1.5;">
402
- ๐Ÿ’ฌ Questions or feedback?<br>
451
+ ${T.contact}<br>
403
452
  WeChat: <b>oliver56666</b> ยท <a href="https://github.com/jjj5666/clawaid/issues" target="_blank" style="color:#1a73e8;">GitHub Issues</a>
404
453
  </div>
405
454
  </div>
@@ -408,29 +457,29 @@
408
457
  if (data.healthy) {
409
458
  div.innerHTML = `
410
459
  <div class="result-icon">๐Ÿ’š</div>
411
- <div class="result-title">All clear!</div>
412
- <div class="result-desc">${esc(data.summary || 'Your OpenClaw is running normally.')}</div>
460
+ <div class="result-title">${T.allClear}</div>
461
+ <div class="result-desc">${esc(data.summary || T.healthyDesc)}</div>
413
462
  ${warningsHtml}
414
463
  ${feedbackHtml}
415
- <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">๐Ÿ”„ Scan Again</button>
464
+ <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.scanAgain}</button>
416
465
  `;
417
466
  } else if (data.fixed) {
418
467
  div.innerHTML = `
419
468
  <div class="result-icon">โœ…</div>
420
- <div class="result-title">Fixed!</div>
421
- <div class="result-desc">${esc(data.summary || 'OpenClaw has been repaired.')}</div>
469
+ <div class="result-title">${T.fixed}</div>
470
+ <div class="result-desc">${esc(data.summary || T.fixedDesc)}</div>
422
471
  ${warningsHtml}
423
472
  ${feedbackHtml}
424
- <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">๐Ÿ”„ Scan Again</button>
473
+ <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.scanAgain}</button>
425
474
  `;
426
475
  } else {
427
476
  div.innerHTML = `
428
477
  <div class="result-icon">๐Ÿ˜”</div>
429
- <div class="result-title">Couldn't fix automatically</div>
430
- <div class="result-desc">${esc(data.summary || 'After multiple attempts, the issue persists.')}</div>
478
+ <div class="result-title">${T.notFixed}</div>
479
+ <div class="result-desc">${esc(data.summary || T.notFixedDesc)}</div>
431
480
  ${warningsHtml}
432
481
  ${feedbackHtml}
433
- <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">๐Ÿ”„ Try Again</button>
482
+ <button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.tryAgain}</button>
434
483
  `;
435
484
  }
436
485
 
@@ -605,11 +654,11 @@
605
654
  div.className = 'start-card';
606
655
  div.id = 'desc-input-card';
607
656
  div.innerHTML = `
608
- <p style="font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px;">What's going on?</p>
609
- <p style="font-size:13px; color:var(--text2); margin-bottom:12px;">Describe the problem, or just scan โ€” ClawAid will figure it out.</p>
657
+ <p style="font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px;">${T.whatsWrong}</p>
658
+ <p style="font-size:13px; color:var(--text2); margin-bottom:12px;">${T.descHint}</p>
610
659
  <div class="desc-input-wrap">
611
660
  <div class="desc-textarea-wrap">
612
- <textarea class="desc-textarea" id="desc-text" placeholder="e.g. OpenClaw stopped responding after I updated... (optional)"></textarea>
661
+ <textarea class="desc-textarea" id="desc-text" placeholder="${T.descPlaceholder}"></textarea>
613
662
  <button class="desc-camera-btn" id="desc-camera-btn" title="Add screenshot">๐Ÿ“ท</button>
614
663
  <input type="file" id="screenshot-input" accept="image/*" style="display:none;" />
615
664
  </div>
@@ -620,8 +669,8 @@
620
669
  </div>
621
670
  </div>
622
671
  <div class="btn-row" style="margin-top:10px;">
623
- <button class="btn btn-primary" id="btn-desc-submit" disabled>๐Ÿ“ Send &amp; diagnose</button>
624
- <button class="btn btn-green" id="btn-desc-skip">๐Ÿ” Just scan &amp; fix</button>
672
+ <button class="btn btn-primary" id="btn-desc-submit" disabled>${T.sendDiagnose}</button>
673
+ <button class="btn btn-green" id="btn-desc-skip">${T.justScan}</button>
625
674
  </div>
626
675
  `;
627
676
  feed.appendChild(div);