Files
boss/src/app/me/master-agent/takeover/page.tsx
2026-04-07 18:26:17 +08:00

32 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { RealtimeRefresh } from "@/components/app-runtime";
import { AppShell, PageNav, StatusBar } from "@/components/app-ui";
import { MasterAgentTakeoverClient } from "@/components/master-agent-takeover-client";
import { requirePageSession } from "@/lib/boss-auth";
import { getProjectAgentControls } from "@/lib/boss-data";
import { formatTimestampLabel } from "@/lib/boss-projections";
export const dynamic = "force-dynamic";
export default async function MasterAgentTakeoverPage() {
const session = await requirePageSession();
const projectControls = await getProjectAgentControls("master-agent", session.account);
return (
<AppShell bottomNav={false}>
<RealtimeRefresh events={["master_agent.settings.updated"]} />
<StatusBar />
<PageNav title="全局接管" backHref="/conversations/master-agent" />
<div className="px-[18px] pb-3">
<div className="rounded-2xl border border-[#E5E5EA] bg-white px-4 py-4 text-[13px] leading-6 text-[#57606A]">
<span className="font-semibold text-[#111111]">{session.account}</span>
</div>
</div>
<MasterAgentTakeoverClient
enabled={projectControls?.globalTakeoverEnabled ?? false}
updatedAt={projectControls?.updatedAt ? formatTimestampLabel(projectControls.updatedAt) : null}
/>
</AppShell>
);
}