// ———— App Shell (Sidebar + Topbar) ————
const { useState, useEffect, useMemo, useRef } = React;
const NAV = [
{ id: "collect", label: "采集", icon: Icon.Collect, badge: null },
{ id: "library", label: "知识库", icon: Icon.Library, badge: null },
{ id: "search", label: "搜索", icon: Icon.SearchPage },
{ id: "settings", label: "设置", icon: Icon.Settings },
];
function Sidebar({ page, onNav, onLogout }) {
const email = window.API ? window.API.currentEmail() : "";
const initial = email ? email[0].toUpperCase() : "?";
return (
);
}
function Topbar({ page }) {
const titles = {
collect: "采集任务",
library: "知识库",
search: "语义搜索",
settings: "设置",
};
return (