nothumanallowed 9.2.1 → 9.2.3
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/constants.mjs +1 -1
- package/src/services/web-ui.mjs +19 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.3",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents + 50 tools + web search. Streaming chat, multi-conversation, export. Gmail, Calendar, Drive, GitHub, Notion, Slack. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '9.2.
|
|
8
|
+
export const VERSION = '9.2.3';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -46,10 +46,7 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
46
46
|
|
|
47
47
|
/* ---- LAYOUT: mobile-first ---- */
|
|
48
48
|
.app{display:flex;flex-direction:column;height:100vh;height:100dvh}
|
|
49
|
-
|
|
50
|
-
.header__burger{background:none;color:var(--green);font-size:22px;padding:4px 8px;line-height:1}
|
|
51
|
-
.header__title{font-size:14px;color:var(--bright);font-weight:700;flex:1}
|
|
52
|
-
.header__clock{font-size:10px;color:var(--dim)}
|
|
49
|
+
/* header removed — info moved to sidebar brand */
|
|
53
50
|
|
|
54
51
|
.sidebar{display:none;position:fixed;top:0;left:0;width:260px;height:100vh;height:100dvh;background:var(--bg2);border-right:1px solid var(--border);z-index:200;flex-direction:column;overflow-y:auto;box-shadow:4px 0 20px rgba(0,0,0,0.8)}
|
|
55
52
|
.sidebar--open{display:flex}
|
|
@@ -202,6 +199,7 @@ var chatHistory = [];
|
|
|
202
199
|
var activeConvId = null;
|
|
203
200
|
var convList = [];
|
|
204
201
|
var dash = {emails:[],events:[],tasks:[],plan:null,status:null};
|
|
202
|
+
var dashLoaded = {emails:false,events:false,tasks:false,contacts:false,notes:false,drive:false,github:false,notion:false,slack:false};
|
|
205
203
|
var chatStreaming = false;
|
|
206
204
|
|
|
207
205
|
function loadConvList(){return apiGet('/api/conversations').then(function(r){convList=(r&&r.conversations)||[];renderConvSidebar();})}
|
|
@@ -225,10 +223,8 @@ function switchView(v) {
|
|
|
225
223
|
if(el.dataset.view===v){el.classList.add('nav-item--active')}else{el.classList.remove('nav-item--active')}
|
|
226
224
|
});
|
|
227
225
|
var titles = {dashboard:'Dashboard',chat:'Chat',plan:'Daily Plan',tasks:'Tasks',emails:'Emails',calendar:'Calendar',drive:'Drive',contacts:'Contacts',notes:'Notes',onedrive:'OneDrive',mstodo:'Microsoft To Do',agents:'Agents',settings:'Settings'};
|
|
228
|
-
document.getElementById('
|
|
229
|
-
|
|
230
|
-
var hdr=document.querySelector('.header');
|
|
231
|
-
if(hdr)hdr.style.display=v==='chat'?'none':'';
|
|
226
|
+
var spt=document.getElementById('sidebarPageTitle');
|
|
227
|
+
if(spt)spt.textContent=titles[v]||v;
|
|
232
228
|
closeSidebar();
|
|
233
229
|
render();
|
|
234
230
|
}
|
|
@@ -262,6 +258,7 @@ function apiPatch(p){return fetch(API+p,{method:'PATCH'}).then(function(r){retur
|
|
|
262
258
|
function loadDash(){
|
|
263
259
|
return Promise.all([apiGet('/api/status'),apiGet('/api/emails'),apiGet('/api/calendar'),apiGet('/api/tasks')]).then(function(r){
|
|
264
260
|
dash.status=r[0];dash.emails=(r[1]&&r[1].emails)||[];dash.events=(r[2]&&r[2].events)||[];dash.tasks=(r[3]&&r[3].tasks)||[];
|
|
261
|
+
dashLoaded.emails=true;dashLoaded.events=true;dashLoaded.tasks=true;
|
|
265
262
|
updateBadges();
|
|
266
263
|
});
|
|
267
264
|
}
|
|
@@ -277,6 +274,7 @@ function updateBadges(){
|
|
|
277
274
|
// ---- HELPERS ----
|
|
278
275
|
function esc(s){return s?String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'):''}
|
|
279
276
|
function fmtTime(iso){if(!iso)return '';try{return new Date(iso).toLocaleTimeString('en',{hour:'2-digit',minute:'2-digit',hour12:true})}catch(e){return iso}}
|
|
277
|
+
function loadingHTML(label){return '<div style="text-align:center;padding:40px"><div class="spinner"></div><div style="color:var(--dim);margin-top:8px;font-size:12px">Loading '+esc(label)+'...</div></div>'}
|
|
280
278
|
|
|
281
279
|
// ---- RENDER ----
|
|
282
280
|
function render(){
|
|
@@ -305,6 +303,7 @@ function render(){
|
|
|
305
303
|
|
|
306
304
|
// ---- DASHBOARD ----
|
|
307
305
|
function renderDash(el){
|
|
306
|
+
if(!dashLoaded.emails){el.innerHTML=loadingHTML('dashboard');return}
|
|
308
307
|
var t=dash.tasks,e=dash.emails,ev=dash.events;
|
|
309
308
|
var done=t.filter(function(x){return x.status==='done'}).length;
|
|
310
309
|
var pend=t.length-done;
|
|
@@ -332,8 +331,7 @@ function renderChat(el){
|
|
|
332
331
|
'</div>'+
|
|
333
332
|
'<div style="flex:1;display:flex;flex-direction:column;min-width:0">'+
|
|
334
333
|
'<div style="padding:6px 12px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px">'+
|
|
335
|
-
'<button onclick="
|
|
336
|
-
'<button onclick="toggleConvSidebar()" style="background:none;border:none;cursor:pointer;font-size:12px;color:var(--dim);padding:2px 6px" title="Toggle conversations">💬</button>'+
|
|
334
|
+
'<button onclick="toggleConvSidebar()" style="background:none;border:none;cursor:pointer;font-size:14px;color:var(--dim);padding:2px 6px" title="Toggle conversations">💬</button>'+
|
|
337
335
|
'<span id="convTitle" style="flex:1;font-size:12px;color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap">New Chat</span>'+
|
|
338
336
|
'<button onclick="createNewConv()" style="background:none;border:1px solid var(--green);color:var(--green);padding:4px 10px;border-radius:var(--r);cursor:pointer;font-size:10px">+ New</button>'+
|
|
339
337
|
'<button onclick="exportConvMd()" style="background:none;border:1px solid var(--border);color:var(--dim);padding:4px 8px;border-radius:var(--r);cursor:pointer;font-size:10px" title="Export Markdown">Export</button>'+
|
|
@@ -577,8 +575,9 @@ function refreshPlan(){
|
|
|
577
575
|
|
|
578
576
|
// ---- EMAILS ----
|
|
579
577
|
function renderEmails(el){
|
|
578
|
+
if(!dashLoaded.emails){el.innerHTML=loadingHTML('emails');return}
|
|
580
579
|
var e=dash.emails;
|
|
581
|
-
if(e.length===0){el.innerHTML='<div class="card" style="text-align:center;color:var(--dim);padding:30px">
|
|
580
|
+
if(e.length===0){el.innerHTML='<div class="card" style="text-align:center;color:var(--dim);padding:30px">Inbox zero — no emails</div>';return}
|
|
582
581
|
var unreadCount=e.filter(function(x){return x.isUnread}).length;
|
|
583
582
|
var h='<div style="display:flex;gap:8px;margin-bottom:10px;align-items:center">';
|
|
584
583
|
h+='<span style="font-size:12px;color:var(--dim)">'+e.length+' emails'+( unreadCount>0?' ('+unreadCount+' unread)':'')+'</span>';
|
|
@@ -1732,8 +1731,13 @@ init();
|
|
|
1732
1731
|
<div class="app">
|
|
1733
1732
|
<nav class="sidebar" id="sidebar">
|
|
1734
1733
|
<div class="sidebar__brand">
|
|
1735
|
-
<div
|
|
1736
|
-
|
|
1734
|
+
<div style="display:flex;align-items:center;gap:8px">
|
|
1735
|
+
<div class="sidebar__brand-name">NHA</div>
|
|
1736
|
+
<span id="wsIndicator" style="color:var(--dim);font-size:8px" title="Daemon WebSocket">●</span>
|
|
1737
|
+
<span style="font-size:9px;color:var(--dim)">v${VERSION}</span>
|
|
1738
|
+
</div>
|
|
1739
|
+
<div id="sidebarPageTitle" style="font-size:11px;color:var(--bright);margin-top:4px;font-weight:600">Dashboard</div>
|
|
1740
|
+
<div class="sidebar__brand-sub" id="clock"></div>
|
|
1737
1741
|
</div>
|
|
1738
1742
|
<div class="sidebar__section">
|
|
1739
1743
|
<div class="sidebar__label">Overview</div>
|
|
@@ -1776,15 +1780,10 @@ init();
|
|
|
1776
1780
|
<a href="https://nothumanallowed.com/docs/agents" target="_blank" class="nav-item" style="text-decoration:none"><span class="nav-item__icon">🤖</span> Agents Guide</a>
|
|
1777
1781
|
<a href="https://nothumanallowed.com/docs/mobile" target="_blank" class="nav-item" style="text-decoration:none"><span class="nav-item__icon">📱</span> Mobile App</a>
|
|
1778
1782
|
</div>
|
|
1779
|
-
<div style="padding:12px 16px;margin-top:auto;border-top:1px solid var(--border);font-size:10px;color:var(--dim)">
|
|
1783
|
+
<div style="padding:12px 16px;margin-top:auto;border-top:1px solid var(--border);font-size:10px;color:var(--dim)">nothumanallowed.com</div>
|
|
1780
1784
|
</nav>
|
|
1781
1785
|
|
|
1782
|
-
<
|
|
1783
|
-
<button class="header__burger" onclick="toggleSidebar()">☰</button>
|
|
1784
|
-
<span class="header__title" id="headerTitle">Dashboard</span>
|
|
1785
|
-
<span id="wsIndicator" style="color:var(--dim);font-size:8px;margin-right:4px" title="Daemon WebSocket">●</span>
|
|
1786
|
-
<span class="header__clock" id="clock"></span>
|
|
1787
|
-
</div>
|
|
1786
|
+
<button onclick="openSidebar()" style="position:fixed;top:8px;left:8px;z-index:100;background:var(--bg2);border:1px solid var(--border);border-radius:var(--r);color:var(--green);font-size:20px;padding:4px 10px;cursor:pointer;line-height:1" id="mobileBurger">☰</button>
|
|
1788
1787
|
|
|
1789
1788
|
<div class="content" id="content"></div>
|
|
1790
1789
|
</div>
|