nothumanallowed 13.5.178 → 13.5.179
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 +5 -1
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.179",
|
|
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/commands/ui.mjs
CHANGED
|
@@ -715,8 +715,12 @@ export async function cmdUI(args) {
|
|
|
715
715
|
desc: d.hourly?.[4]?.weatherDesc?.[0]?.value || '',
|
|
716
716
|
rain: d.hourly?.[4]?.chanceofrain || '0',
|
|
717
717
|
}));
|
|
718
|
+
// Use the user-provided location as display name — wttr.in nearest_area
|
|
719
|
+
// often resolves to a nearby suburb (e.g. "Modena" → "Sant'Agnese") which
|
|
720
|
+
// is confusing. The weather data itself is correct regardless.
|
|
721
|
+
const displayCity = loc.includes(',') ? loc.split(',')[0].trim() : loc;
|
|
718
722
|
sendJSON(res, 200, {
|
|
719
|
-
city:
|
|
723
|
+
city: displayCity,
|
|
720
724
|
country: area?.country?.[0]?.value || '',
|
|
721
725
|
tempC: cur.temp_C,
|
|
722
726
|
feelsC: cur.FeelsLikeC,
|
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 = '13.5.
|
|
8
|
+
export const VERSION = '13.5.179';
|
|
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
|
@@ -309,9 +309,10 @@ function loadWeather(){
|
|
|
309
309
|
var latLng=pos.coords.latitude.toFixed(4)+','+pos.coords.longitude.toFixed(4);
|
|
310
310
|
fetchWeather(latLng);
|
|
311
311
|
// Also resolve city name for display — save for next time
|
|
312
|
-
fetch('https://nominatim.openstreetmap.org/reverse?lat='+pos.coords.latitude+'&lon='+pos.coords.longitude+'&format=json&accept-language=en')
|
|
312
|
+
fetch('https://nominatim.openstreetmap.org/reverse?lat='+pos.coords.latitude+'&lon='+pos.coords.longitude+'&format=json&accept-language=en&zoom=10')
|
|
313
313
|
.then(function(r){return r.json();}).then(function(d){
|
|
314
|
-
|
|
314
|
+
// zoom=10 = city level — avoids resolving to suburbs/villages
|
|
315
|
+
var city=d.address&&(d.address.city||d.address.town||d.address.county||'');
|
|
315
316
|
if(city)localStorage.setItem('nha_weather_location',city);
|
|
316
317
|
}).catch(function(){});
|
|
317
318
|
},function(){ipFallback();},{timeout:6000,maximumAge:300000});
|