fix: split agent permission and skill tabs

This commit is contained in:
AI Bot
2026-05-12 23:39:13 +08:00
parent 29740f35c7
commit 8d3f68cebe
3 changed files with 216 additions and 102 deletions

View File

@@ -41,6 +41,7 @@ import {
import {
buildBossAgentStatus,
detectLocalComputerPermissions,
normalizeBossAgentTab,
openBossAgentPermissionSettings,
renderBossAgentHtmlWithQr,
} from "./boss-agent-status.mjs";
@@ -1011,8 +1012,9 @@ const server = createServer(async (request, response) => {
if (requestUrl.pathname === "/" || requestUrl.pathname === "/boss-agent") {
const permissions = await detectLocalComputerPermissions();
const status = buildBossAgentStatus(config, runtime, { permissions });
const activeTab = normalizeBossAgentTab(requestUrl.searchParams.get("tab") ?? "overview");
response.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
response.end(await renderBossAgentHtmlWithQr(status));
response.end(await renderBossAgentHtmlWithQr(status, { activeTab }));
return;
}