viberadar 0.3.217 → 0.3.218

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.
@@ -7757,6 +7757,33 @@ function updateLoadLiveStats() {
7757
7757
  if (fill) fill.style.width = `${stats.progressPct}%`;
7758
7758
  }
7759
7759
 
7760
+ async function copyLoadLog(btn) {
7761
+ const text = (loadLogLines || []).join('\n');
7762
+ if (!text.trim()) return;
7763
+ const original = btn ? btn.textContent : '';
7764
+ try {
7765
+ if (navigator.clipboard && window.isSecureContext) {
7766
+ await navigator.clipboard.writeText(text);
7767
+ } else {
7768
+ const ta = document.createElement('textarea');
7769
+ ta.value = text;
7770
+ ta.style.position = 'fixed';
7771
+ ta.style.left = '-9999px';
7772
+ document.body.appendChild(ta);
7773
+ ta.focus();
7774
+ ta.select();
7775
+ document.execCommand('copy');
7776
+ ta.remove();
7777
+ }
7778
+ if (btn) {
7779
+ btn.textContent = 'Скопировано';
7780
+ setTimeout(() => { btn.textContent = original || 'Копировать лог'; }, 1400);
7781
+ }
7782
+ } catch (e) {
7783
+ alert('Не удалось скопировать лог: ' + e.message);
7784
+ }
7785
+ }
7786
+
7760
7787
  function drawLoadChart(id, buckets, valFn, color, label) {
7761
7788
  const canvas = document.getElementById(id);
7762
7789
  if (!canvas) return;
@@ -8257,13 +8284,16 @@ function renderLoad(c) {
8257
8284
  <div class="load-btns" style="margin-top:12px">
8258
8285
  <button class="load-btn" style="background:#1a2a3a;border-color:var(--blue);color:var(--blue)" onclick="loadAiAnalysis()">🤖 AI-анализ результатов</button>
8259
8286
  </div>
8260
- </div>` : ''}
8261
-
8262
- <div class="load-section">
8263
- <div class="load-section-title">Лог k6</div>
8264
- <div class="load-log" id="loadLogContent">
8265
- ${loadLogLines.map(l => `<div class="load-log-line">${escapeHtml(l)}</div>`).join('')}
8266
- </div>
8287
+ </div>` : ''}
8288
+
8289
+ <div class="load-section">
8290
+ <div class="load-section-title" style="display:flex;align-items:center;justify-content:space-between;gap:10px">
8291
+ <span>Лог k6</span>
8292
+ <button class="load-btn" style="padding:4px 10px;text-transform:none;letter-spacing:0;font-weight:500" onclick="copyLoadLog(this)" ${loadLogLines.length ? '' : 'disabled'}>Копировать лог</button>
8293
+ </div>
8294
+ <div class="load-log" id="loadLogContent">
8295
+ ${loadLogLines.map(l => `<div class="load-log-line">${escapeHtml(l)}</div>`).join('')}
8296
+ </div>
8267
8297
  </div>
8268
8298
 
8269
8299
  </div>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viberadar",
3
- "version": "0.3.217",
3
+ "version": "0.3.218",
4
4
  "description": "Live module map with test coverage for vibecoding projects",
5
5
  "main": "./dist/cli.js",
6
6
  "bin": {