nothumanallowed 9.4.1 → 9.4.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/commands/ui.mjs +10 -1
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents + 58 tools + browser automation + web search. Streaming chat, headless Chrome CDP, multi-conversation, export. Gmail, Calendar, Drive, GitHub, Notion, Slack. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -1226,7 +1226,15 @@ export async function cmdUI(args) {
|
|
|
1226
1226
|
const { textParts, actions } = parseActions(fullResponse);
|
|
1227
1227
|
const toolResults = [];
|
|
1228
1228
|
|
|
1229
|
+
// Auto-detect screenshot intent from user message
|
|
1230
|
+
const wantsScreenshot = /screenshot|screen\s*shot|schermo|cattura|foto|immagine/i.test(msg);
|
|
1231
|
+
|
|
1229
1232
|
for (const { action, params } of actions) {
|
|
1233
|
+
// Force screenshot=true on web_search if user asked for screenshot
|
|
1234
|
+
if (action === 'web_search' && wantsScreenshot && !params.screenshot) {
|
|
1235
|
+
params.screenshot = true;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1230
1238
|
sendSSE('tool', { action, status: 'executing' });
|
|
1231
1239
|
try {
|
|
1232
1240
|
// For browser_screenshot in web UI: capture and send base64 image
|
|
@@ -1287,7 +1295,6 @@ export async function cmdUI(args) {
|
|
|
1287
1295
|
// If the tool produced a screenshot (web_search with screenshot=true), send it via SSE
|
|
1288
1296
|
if (resultStr.includes('[Screenshot of results captured')) {
|
|
1289
1297
|
try {
|
|
1290
|
-
// Extract filename from result (tool-executor already saved it)
|
|
1291
1298
|
const fileMatch = resultStr.match(/file:(ss-\d+\.jpg)/);
|
|
1292
1299
|
if (fileMatch) {
|
|
1293
1300
|
const ssFilename = fileMatch[1];
|
|
@@ -1295,6 +1302,8 @@ export async function cmdUI(args) {
|
|
|
1295
1302
|
if (fs.existsSync(ssPath)) {
|
|
1296
1303
|
const ssBase64 = fs.readFileSync(ssPath).toString('base64');
|
|
1297
1304
|
sendSSE('screenshot', { base64: ssBase64, format: 'jpeg', filename: ssFilename });
|
|
1305
|
+
// Also send as browser_frame for the viewer
|
|
1306
|
+
sendSSE('browser_frame', { base64: ssBase64, format: 'jpeg', url: 'Search results' });
|
|
1298
1307
|
if (!res._screenshotFiles) res._screenshotFiles = [];
|
|
1299
1308
|
res._screenshotFiles.push(ssFilename);
|
|
1300
1309
|
}
|
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.4.
|
|
8
|
+
export const VERSION = '9.4.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
|
@@ -564,8 +564,8 @@ function sendChat(){
|
|
|
564
564
|
var label=toolLabels[data.action]||data.action;
|
|
565
565
|
var indicator=data.status==='executing'?'\\u23f3 '+label+'...':'\\u2705 '+label;
|
|
566
566
|
if(data.status==='error')indicator='\\u274c '+label+' failed';
|
|
567
|
-
// Show browser viewer for browser actions
|
|
568
|
-
var isBrowserAction=data.action&&data.action.startsWith('browser_');
|
|
567
|
+
// Show browser viewer for browser and web_search actions
|
|
568
|
+
var isBrowserAction=data.action&&(data.action.startsWith('browser_')||data.action==='web_search');
|
|
569
569
|
if(isBrowserAction&&data.status==='executing'){showBrowserViewer(label,'Executing...');}
|
|
570
570
|
if(isBrowserAction&&data.status==='done'){updateBrowserStatus('\\u2705 '+label);}
|
|
571
571
|
if(isBrowserAction&&data.status==='error'){updateBrowserStatus('\\u274c '+label);}
|