viberadar 0.3.43 → 0.3.44
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/dist/ui/dashboard.html +33 -1
- package/package.json +1 -1
package/dist/ui/dashboard.html
CHANGED
|
@@ -668,6 +668,12 @@
|
|
|
668
668
|
font-size: 14px; padding: 3px 6px; border-radius: 4px; line-height: 1;
|
|
669
669
|
}
|
|
670
670
|
.agent-panel-close:hover { background: var(--border); color: var(--text); }
|
|
671
|
+
.agent-panel-copy {
|
|
672
|
+
background: none; border: none; color: var(--dim); cursor: pointer;
|
|
673
|
+
font-size: 13px; padding: 3px 7px; border-radius: 4px; line-height: 1;
|
|
674
|
+
}
|
|
675
|
+
.agent-panel-copy:hover { background: var(--border); color: var(--text); }
|
|
676
|
+
.agent-panel-copy.copied { color: var(--green); }
|
|
671
677
|
.agent-panel-cancel {
|
|
672
678
|
background: none; border: 1px solid var(--yellow); color: var(--yellow);
|
|
673
679
|
cursor: pointer; font-size: 11px; padding: 2px 8px; border-radius: 4px;
|
|
@@ -818,6 +824,7 @@
|
|
|
818
824
|
<span class="agent-queue-badge" id="agentQueueBadge" style="display:none">📋 <span id="agentQueueCount">0</span> в очереди</span>
|
|
819
825
|
<button class="agent-panel-cancel" id="agentQueueClearBtn" onclick="clearAgentQueue()" title="Очистить очередь" style="display:none">🗑 очередь</button>
|
|
820
826
|
<button class="agent-panel-cancel" id="agentCancelBtn" onclick="cancelAgent()" title="Сбросить состояние агента" style="display:none">⏹ сброс</button>
|
|
827
|
+
<button class="agent-panel-copy" id="agentCopyBtn" onclick="copyTerminalContent()" title="Скопировать содержимое вкладки в буфер обмена">⎘</button>
|
|
821
828
|
<button class="agent-panel-close" onclick="closeAgentPanel()">✕</button>
|
|
822
829
|
</div>
|
|
823
830
|
<div class="agent-tabs-bar" id="agentTabsBar"></div>
|
|
@@ -984,7 +991,9 @@ function renderTabs() {
|
|
|
984
991
|
bar.innerHTML = consoleSessions.map(s => {
|
|
985
992
|
const isActive = s.id === activeSessionId;
|
|
986
993
|
const safe = s.title.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
987
|
-
return `<div class="agent-tab${isActive ? ' active' : ''}"
|
|
994
|
+
return `<div class="agent-tab${isActive ? ' active' : ''}"
|
|
995
|
+
onclick="switchSession('${s.id}')"
|
|
996
|
+
onmousedown="if(event.button===1){event.preventDefault();event.stopPropagation();closeSession('${s.id}')}">
|
|
988
997
|
<span class="tab-dot tab-dot-${s.status}"></span>
|
|
989
998
|
<span class="agent-tab-title" title="${safe}">${safe}</span>
|
|
990
999
|
<button class="agent-tab-close" onclick="event.stopPropagation();closeSession('${s.id}')" title="Закрыть вкладку">×</button>
|
|
@@ -994,6 +1003,29 @@ function renderTabs() {
|
|
|
994
1003
|
if (active) active.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
995
1004
|
}
|
|
996
1005
|
|
|
1006
|
+
function copyTerminalContent() {
|
|
1007
|
+
const s = consoleSessions.find(s => s.id === activeSessionId);
|
|
1008
|
+
if (!s || s.lines.length === 0) return;
|
|
1009
|
+
// Extract plain text from each line (strip HTML for rich nodes)
|
|
1010
|
+
const text = s.lines.map(l => {
|
|
1011
|
+
if (l.text !== undefined) return l.text;
|
|
1012
|
+
if (l.html) {
|
|
1013
|
+
const tmp = document.createElement('div');
|
|
1014
|
+
tmp.innerHTML = l.html;
|
|
1015
|
+
return tmp.innerText;
|
|
1016
|
+
}
|
|
1017
|
+
return '';
|
|
1018
|
+
}).filter(Boolean).join('\n');
|
|
1019
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
1020
|
+
const btn = document.getElementById('agentCopyBtn');
|
|
1021
|
+
if (!btn) return;
|
|
1022
|
+
const prev = btn.textContent;
|
|
1023
|
+
btn.textContent = '✓';
|
|
1024
|
+
btn.classList.add('copied');
|
|
1025
|
+
setTimeout(() => { btn.textContent = prev; btn.classList.remove('copied'); }, 1500);
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
|
|
997
1029
|
function renderActiveSession() {
|
|
998
1030
|
const term = document.getElementById('agentTerminal');
|
|
999
1031
|
if (!term) return;
|