mirror of
https://github.com/rohitg00/agentmemory.git
synced 2026-09-14 20:16:33 +08:00
3338f9d039
Nav - Replace overlay hamburger with a solid horizontal bar. - Use the real agentmemory icon from assets/icon.svg as the brand mark. - Single GitHub pill: GH icon + GITHUB label + gold star + live count, the entire pill links to the repo. No more separate icon button. - Server-rendered count pulled from api.github.com/repos/... with revalidate 3600. Falls back to 0 on rate limit. - Mobile (<720px) collapses to a hamburger sheet with sections + links. Command Center (new) - Tabbed section showing the shipped viewer (:3113), the iii console (:3114), the raw KV state browser, and OTel traces. - Real screenshots vendored into public/ (dashboard.png, states.png, traces-waterfall.png, demo.gif). - Each tab ships with a description, 4-5 capability bullets, and a copy-ready launch command. Features (new) - 12-tile grid covering 12 auto-hooks, 44 MCP tools, 49 REST endpoints, BM25+vector+graph recall, auto consolidation, JSONL replay, knowledge graph extraction, mesh federation, Obsidian export, 5 LLM providers, OTel observability, 0 external DBs. Agents - Replaced the flat tile grid with an agents.md-style two-tier layout. - Top row: 4 featured first-party integrations (Claude Code, OpenClaw, Hermes, Codex CLI) as big cards with real logos, brand accent colors, and integration pitch. - Bottom row: CSS keyframe marquee of every other supported agent (Claude Desktop, Cursor, Gemini CLI, OpenCode, Cline, Roo, Kilo, Goose, Aider, Windsurf) with real logos + brand borders on hover. Pauses on hover. Edges fade into the page. Respects prefers-reduced-motion. Install · step 3 · MCP wiring - Dropped the 10-tab toggle and the Cursor-only gold hero button. - Left column: equal-weight agent chips in a 2x3 grid — Cursor, VS Code, Claude Code, Claude Desktop, Gemini CLI, Codex CLI. Click copies the right snippet (JSON / CLI command / TOML) or fires the one-click deeplink where one exists. - Right column: UNIVERSAL MCP JSON — paste-ready block that works for Claude Desktop, Cursor, Cline, Windsurf, Gemini CLI, OpenCode. - Expando reveals Hermes, OpenClaw, and Codex TOML shapes. Infrastructure - lib/github.ts server-only fetch for repo stats. - lib/format.ts (client-safe) formatCompact. - next.config.ts: turbopack.root pinned to silence workspace warning, images.remotePatterns for github.com / GH avatars / Cursor / Windsurf logos. - layout.tsx: icon metadata wired to /icon.svg. Build: next build clean, 3 routes prerendered static, 0 vulns.
40 lines
1013 B
TypeScript
40 lines
1013 B
TypeScript
import "server-only";
|
|
|
|
export interface RepoStats {
|
|
stars: number;
|
|
forks: number;
|
|
issues: number;
|
|
}
|
|
|
|
const REPO = "rohitg00/agentmemory";
|
|
|
|
export async function fetchRepoStats(): Promise<RepoStats> {
|
|
const fallback: RepoStats = { stars: 0, forks: 0, issues: 0 };
|
|
try {
|
|
const headers: Record<string, string> = {
|
|
accept: "application/vnd.github+json",
|
|
"user-agent": "agentmemory-website",
|
|
};
|
|
if (process.env.GITHUB_TOKEN) {
|
|
headers.authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
|
}
|
|
const res = await fetch(`https://api.github.com/repos/${REPO}`, {
|
|
headers,
|
|
next: { revalidate: 3600 },
|
|
});
|
|
if (!res.ok) return fallback;
|
|
const data = (await res.json()) as {
|
|
stargazers_count?: number;
|
|
forks_count?: number;
|
|
open_issues_count?: number;
|
|
};
|
|
return {
|
|
stars: data.stargazers_count ?? 0,
|
|
forks: data.forks_count ?? 0,
|
|
issues: data.open_issues_count ?? 0,
|
|
};
|
|
} catch {
|
|
return fallback;
|
|
}
|
|
}
|