feat(ui): interactive graph, strip context menus, days by activity, message times, limit status words

This commit is contained in:
hh
2026-09-02 04:24:15 +02:00
parent 025f2dbc3f
commit c6401f1114
27 changed files with 1619 additions and 381 deletions
+11 -4
View File
@@ -1,4 +1,6 @@
export interface NavItem {
// Lit only on its own path, not on its children (an index page).
exact?: boolean;
href: string;
key: string;
label: string;
@@ -14,20 +16,25 @@ export const SECTIONS: NavItem[] = [
export const SYSTEM: NavItem = { href: "/system", key: "5", label: "System" };
export const SYSTEM_PAGES: NavItem[] = [
{ href: "/system", key: "", label: "Sessions" },
{ exact: true, href: "/system", key: "", label: "Sessions" },
{ href: "/system/agents", key: "", label: "Agents & endpoints" },
{ href: "/system/jobs", key: "", label: "Jobs" },
{ href: "/system/tokens", key: "", label: "Tokens" },
{ href: "/system/audit", key: "", label: "Audit" },
];
export function isActive(pathname: string, base: string, href: string) {
export function isActive(
pathname: string,
base: string,
href: string,
exact = false
) {
const path = pathname.startsWith(base)
? pathname.slice(base.length)
: pathname;
const current = path || "/";
if (href === "/") {
return current === "/";
if (href === "/" || exact) {
return current === href;
}
return current === href || current.startsWith(`${href}/`);
}