feat: update webui extensions, models, and agent config
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { arch, freemem, hostname, platform, release, totalmem, type as osType } from "node:os";
|
||||
import { readWebuiAvatarSettings, writeWebuiAvatarSettings } from "../db/index.ts";
|
||||
import { setExtensionEnabled } from "../settings/extension-settings.ts";
|
||||
import { listMcpSettings, setMcpServerEnabled, setMcpToolEnabled } from "../settings/mcp-settings.ts";
|
||||
@@ -202,5 +203,23 @@ export function handleSettingsRoute(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (req.method === "GET" && pathname === "/api/environment") {
|
||||
json(res, {
|
||||
nodeVersion: process.version,
|
||||
platform: platform(),
|
||||
arch: arch(),
|
||||
osType: osType(),
|
||||
osRelease: release(),
|
||||
hostname: hostname(),
|
||||
pid: process.pid,
|
||||
cwd: process.cwd(),
|
||||
uptime: Math.floor(process.uptime()),
|
||||
totalMemMb: Math.round(totalmem() / 1024 / 1024),
|
||||
freeMemMb: Math.round(freemem() / 1024 / 1024),
|
||||
execPath: process.execPath,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user