nothumanallowed 13.5.85 → 13.5.87
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/services/web-ui.mjs +61 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.87",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -6565,31 +6565,68 @@ var WC_DEFAULT_FILES = [
|
|
|
6565
6565
|
function wcEsc(s){return s?String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'):''}
|
|
6566
6566
|
|
|
6567
6567
|
function renderWebCraft(el) {
|
|
6568
|
-
|
|
6569
|
-
|
|
6568
|
+
// File sidebar — replaces horizontal tabs
|
|
6569
|
+
var _activeFile = wcState.generatedFiles[wcState.activeFile];
|
|
6570
|
+
|
|
6571
|
+
function wcFileSizeLabel(content) {
|
|
6572
|
+
if (!content) return '0 B';
|
|
6573
|
+
var bytes = new TextEncoder().encode(content).length;
|
|
6574
|
+
if (bytes < 1024) return bytes + ' B';
|
|
6575
|
+
if (bytes < 1024*1024) return (bytes/1024).toFixed(1) + ' KB';
|
|
6576
|
+
return (bytes/(1024*1024)).toFixed(2) + ' MB';
|
|
6577
|
+
}
|
|
6578
|
+
|
|
6579
|
+
var fileSidebarHtml = wcState.generatedFiles.length > 0
|
|
6580
|
+
? '<div style="width:190px;flex-shrink:0;border-left:1px solid var(--border);overflow-y:auto;display:flex;flex-direction:column">' +
|
|
6581
|
+
'<div style="padding:8px 10px;border-bottom:1px solid var(--border);font-size:9px;color:var(--dim);text-transform:uppercase;letter-spacing:.8px;flex-shrink:0">'+wcState.generatedFiles.length+' file</div>' +
|
|
6570
6582
|
wcState.generatedFiles.map(function(f,i){
|
|
6571
6583
|
var active = i === wcState.activeFile;
|
|
6572
6584
|
var hasErr = !!f._error || !!f._syntaxError;
|
|
6573
6585
|
var isPending = !!f._pending;
|
|
6574
|
-
var
|
|
6575
|
-
var
|
|
6576
|
-
var
|
|
6577
|
-
|
|
6586
|
+
var lines = isPending ? 0 : (f.content || '').split(String.fromCharCode(10)).length;
|
|
6587
|
+
var sizeLabel = isPending ? '...' : wcFileSizeLabel(f.content || '');
|
|
6588
|
+
var nameColor = hasErr ? '#f87171' : isPending ? '#4b5563' : active ? 'var(--text)' : 'var(--dim)';
|
|
6589
|
+
var bg = active ? 'var(--bg3)' : 'transparent';
|
|
6590
|
+
var borderLeft = hasErr ? '2px solid #f87171' : active ? '2px solid var(--green3)' : '2px solid transparent';
|
|
6591
|
+
var icon = isPending ? '⌛' : hasErr ? '⚠' : wcFileIcon(f.name);
|
|
6592
|
+
return '<button id="wcTab'+i+'" onclick="wcSetFile('+i+')" style="width:100%;text-align:left;padding:7px 10px 7px 10px;background:'+bg+';border:none;border-left:'+borderLeft+';cursor:pointer;display:flex;flex-direction:column;gap:2px;flex-shrink:0">' +
|
|
6593
|
+
'<span style="display:flex;align-items:center;gap:5px">' +
|
|
6594
|
+
'<span style="font-size:12px;flex-shrink:0">'+icon+'</span>' +
|
|
6595
|
+
'<span style="font-size:11px;font-family:var(--mono);color:'+nameColor+';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1" title="'+wcEsc(f.name)+'">'+wcEsc(f.name.split('/').pop())+'</span>' +
|
|
6596
|
+
'</span>' +
|
|
6597
|
+
(f.name.includes('/') ? '<span style="font-size:9px;color:#4b5563;font-family:var(--mono);padding-left:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">'+wcEsc(f.name.split('/').slice(0,-1).join('/'))+'</span>' : '') +
|
|
6598
|
+
(!isPending ? '<span style="font-size:9px;color:#4b5563;font-family:var(--mono);padding-left:17px">'+lines+' righe · '+sizeLabel+'</span>' : '') +
|
|
6599
|
+
'</button>';
|
|
6578
6600
|
}).join('') +
|
|
6579
6601
|
'</div>'
|
|
6580
6602
|
: '';
|
|
6581
6603
|
|
|
6582
|
-
var _activeFile = wcState.generatedFiles[wcState.activeFile];
|
|
6583
6604
|
var codeHtml = wcState.generatedFiles.length > 0 && _activeFile
|
|
6584
|
-
? '<div
|
|
6585
|
-
|
|
6586
|
-
|
|
6605
|
+
? '<div style="flex:1;display:flex;flex-direction:row;min-height:0;overflow:hidden">' +
|
|
6606
|
+
'<div id="wcCodeWrap" style="flex:1;overflow:auto;background:var(--bg3)">' +
|
|
6607
|
+
'<div style="padding:8px 14px;border-bottom:1px solid var(--border2);font-size:10px;color:var(--dim);font-family:var(--mono);display:flex;align-items:center;gap:8px;background:var(--bg2)">' +
|
|
6608
|
+
'<span style="font-size:13px">'+wcFileIcon(_activeFile.name)+'</span>' +
|
|
6609
|
+
'<span style="color:var(--text)">'+wcEsc(_activeFile.name)+'</span>' +
|
|
6610
|
+
(!_activeFile._pending && !_activeFile._error ? '<span style="margin-left:auto;color:#4b5563">'+(_activeFile.content||'').split(String.fromCharCode(10)).length+' righe · '+wcFileSizeLabel(_activeFile.content||'')+'</span>' : '') +
|
|
6611
|
+
'</div>' +
|
|
6612
|
+
(_activeFile._error ? '<div style="padding:8px 14px;background:rgba(239,68,68,0.12);border-bottom:1px solid rgba(239,68,68,0.3);font-size:11px;color:#f87171;display:flex;align-items:center;gap:6px">⚠ Generazione fallita — chiedi al modello di rigenerare questo file</div>' :
|
|
6613
|
+
_activeFile._syntaxError ? '<div style="padding:8px 14px;background:rgba(234,179,8,0.1);border-bottom:1px solid rgba(234,179,8,0.3);font-size:11px;color:#facc15;display:flex;align-items:center;gap:6px">⚠ Syntax error: '+wcEsc(_activeFile._syntaxError)+'</div>' : '') +
|
|
6614
|
+
(_activeFile._pending ? '<div style="display:flex;align-items:center;justify-content:center;height:120px;color:var(--dim);font-size:12px;gap:8px">⌛ In generazione...</div>' :
|
|
6615
|
+
'<pre style="margin:0;padding:14px 16px;font-size:11px;line-height:1.6;color:'+(_activeFile._error?'#f87171':_activeFile._syntaxError?'#fde68a':'var(--text)')+';font-family:var(--mono);white-space:pre-wrap;word-break:break-all">'+wcEsc(_activeFile.content)+'</pre>') +
|
|
6616
|
+
'</div>' +
|
|
6617
|
+
fileSidebarHtml +
|
|
6587
6618
|
'</div>'
|
|
6588
6619
|
: '<div style="flex:1;display:flex;align-items:center;justify-content:center;color:var(--dim);font-size:12px;flex-direction:column;gap:8px">' +
|
|
6589
6620
|
'<span style="font-size:36px;opacity:.25">🛠</span>' +
|
|
6590
6621
|
'<span>'+t('wc_no_files')+'</span>' +
|
|
6591
6622
|
'</div>';
|
|
6592
6623
|
|
|
6624
|
+
function wcFileIcon(name) {
|
|
6625
|
+
var ext = name.split('.').pop().toLowerCase();
|
|
6626
|
+
var icons = { js:'📄', ts:'📄', css:'🎨', html:'🌐', json:'{', md:'📑', sql:'🗂', env:'🔐', conf:'⚙', lock:'🔒' };
|
|
6627
|
+
return icons[ext] || '📄';
|
|
6628
|
+
}
|
|
6629
|
+
|
|
6593
6630
|
var authFieldsHtml = wcState.authFields.map(function(f,i){
|
|
6594
6631
|
return '<div style="display:flex;align-items:center;gap:6px;padding:5px 8px;background:var(--bg3);border-radius:6px;margin-bottom:4px;overflow:hidden">' +
|
|
6595
6632
|
'<input value="'+wcEsc(f.label)+'" onchange="wcUpdateField('+i+',this.value)" style="flex:1;min-width:0;background:transparent;border:none;color:var(--text);font-size:11px;font-family:var(--mono);width:0" />' +
|
|
@@ -6679,7 +6716,8 @@ function renderWebCraft(el) {
|
|
|
6679
6716
|
// Minimized: small pill in bottom-right corner
|
|
6680
6717
|
? '<div id="wcGenOverlay" onclick="wcOverlayRestore()" style="position:absolute;bottom:12px;right:12px;z-index:50;background:rgba(0,0,0,0.85);border:1px solid var(--green3);border-radius:20px;padding:5px 12px;display:flex;align-items:center;gap:7px;cursor:pointer;animation:wcBubbleIn .2s ease;backdrop-filter:blur(4px)">'
|
|
6681
6718
|
+'<span style="font-size:16px;animation:wcRobotBob .9s ease-in-out infinite">🤖</span>'
|
|
6682
|
-
+'<span style="font-size:10px;color:var(--green);font-weight:700">Generando
|
|
6719
|
+
+'<span id="wcPillLabel" style="font-size:10px;color:var(--green);font-weight:700;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">'+wcEsc(_wcGenOverlayState.name || 'Generando...')+'</span>'
|
|
6720
|
+
+'<span style="font-size:9px;color:var(--dim)">'+wcGenElapsed()+'</span>'
|
|
6683
6721
|
+'<span style="display:flex;gap:3px">'+[0,1,2].map(function(_,idx){ return '<span style="width:4px;height:4px;border-radius:50%;background:var(--green);animation:wcDot 1.1s ease-in-out infinite '+(idx*0.18)+'s"></span>'; }).join('')+'</span>'
|
|
6684
6722
|
+'</div>'
|
|
6685
6723
|
// Full overlay
|
|
@@ -6694,7 +6732,7 @@ function renderWebCraft(el) {
|
|
|
6694
6732
|
'<button onclick="wcTabFiles()" style="padding:8px 16px;background:'+(wcRightTab==='preview'?'transparent':'var(--bg3)')+';border:none;border-right:1px solid var(--border);color:'+(wcRightTab==='preview'?'var(--dim)':'var(--text)')+';font-size:11px;font-weight:600;cursor:pointer">📄 File</button>' +
|
|
6695
6733
|
'<button onclick="wcTabPreview()" style="padding:8px 16px;background:'+(wcRightTab==='preview'?'var(--bg3)':'transparent')+';border:none;color:'+(wcRightTab==='preview'?'var(--text)':'var(--dim)')+';font-size:11px;font-weight:600;cursor:pointer">🌐 Sandbox</button>' +
|
|
6696
6734
|
'</div>' +
|
|
6697
|
-
(wcRightTab === 'preview' ? wcSandboxPanelHtml() :
|
|
6735
|
+
(wcRightTab === 'preview' ? wcSandboxPanelHtml() : codeHtml) +
|
|
6698
6736
|
'</div>' +
|
|
6699
6737
|
'</div>' +
|
|
6700
6738
|
'</div>';
|
|
@@ -7893,7 +7931,15 @@ async function wcGenerate() {
|
|
|
7893
7931
|
if (_wcTimerInterval) clearInterval(_wcTimerInterval);
|
|
7894
7932
|
_wcTimerInterval = setInterval(function() {
|
|
7895
7933
|
if (!wcState.running) { clearInterval(_wcTimerInterval); _wcTimerInterval = null; return; }
|
|
7896
|
-
|
|
7934
|
+
if (_wcOverlayMinimized) {
|
|
7935
|
+
// Update pill label + elapsed without full re-render
|
|
7936
|
+
var pill = document.getElementById('wcPillLabel');
|
|
7937
|
+
if (pill) pill.textContent = _wcGenOverlayState.name || 'Generando...';
|
|
7938
|
+
var ov = document.getElementById('wcGenOverlay');
|
|
7939
|
+
if (ov) { var spans = ov.querySelectorAll('span'); if (spans[1]) spans[1].textContent = wcGenElapsed(); }
|
|
7940
|
+
} else {
|
|
7941
|
+
wcUpdateGenOverlay(_wcGenOverlayState.fi, _wcGenOverlayState.total, _wcGenOverlayState.name);
|
|
7942
|
+
}
|
|
7897
7943
|
}, 1000);
|
|
7898
7944
|
}
|
|
7899
7945
|
|
|
@@ -7910,9 +7956,9 @@ async function wcGenerate() {
|
|
|
7910
7956
|
: '';
|
|
7911
7957
|
ov.innerHTML =
|
|
7912
7958
|
'<div style="font-size:38px;animation:wcRobotBob 1s ease-in-out infinite">🤖</div>' +
|
|
7913
|
-
'<div style="font-size:13px;font-weight:700;color:var(--green);margin-top:12px">Generazione in corso
|
|
7959
|
+
'<div style="font-size:13px;font-weight:700;color:var(--green);margin-top:12px">' + (name.indexOf('Retry:') === 0 ? 'Retry in corso...' : name.indexOf('Fix:') === 0 ? 'Correzione in corso...' : 'Generazione in corso...') + '</div>' +
|
|
7914
7960
|
'<div style="font-size:10px;color:var(--dim);margin-top:2px">Clicca per navigare i file</div>' +
|
|
7915
|
-
'<div style="font-size:11px;color:var(--dim);font-family:var(--mono);max-width:300px;text-align:center;word-break:break-all;margin-top:8px">'+wcEsc(name)+'</div>' +
|
|
7961
|
+
'<div style="font-size:11px;color:'+(name.indexOf('Retry:')===0?'#fb923c':name.indexOf('Fix:')===0?'#facc15':'var(--dim)')+';font-family:var(--mono);max-width:300px;text-align:center;word-break:break-all;margin-top:8px">'+wcEsc(name)+'</div>' +
|
|
7916
7962
|
'<div style="width:220px;height:4px;background:rgba(255,255,255,0.1);border-radius:2px;overflow:hidden;margin-top:12px">' +
|
|
7917
7963
|
'<div style="height:100%;width:'+pct+'%;background:var(--green);border-radius:2px;transition:width .4s ease;animation:wcBarPulse 1.5s ease-in-out infinite"></div>' +
|
|
7918
7964
|
'</div>' +
|