From a720e0073d219c1759468a64ae6b820bcb5d10ab Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 5 May 2025 14:29:06 -0700 Subject: [PATCH] Max versions shown (#83) --- src/components/chat/ChatHeader.tsx | 4 +++- src/ipc/handlers/app_handlers.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/chat/ChatHeader.tsx b/src/components/chat/ChatHeader.tsx index 665738f..ecd52c7 100644 --- a/src/components/chat/ChatHeader.tsx +++ b/src/components/chat/ChatHeader.tsx @@ -52,6 +52,8 @@ export function ChatHeader({ navigate({ to: "/" }); } }; + // TODO: KEEP UP TO DATE WITH app_handlers.ts + const versionPostfix = versions.length === 10_000 ? `+` : ""; return (
@@ -69,7 +71,7 @@ export function ChatHeader({ className="hidden @6xs:flex cursor-pointer items-center gap-1 text-sm px-2 py-1 rounded-md" > - {loading ? "..." : `Version ${versions.length}`} + {loading ? "..." : `Version ${versions.length}${versionPostfix}`}
diff --git a/src/ipc/handlers/app_handlers.ts b/src/ipc/handlers/app_handlers.ts index 5249795..55b6563 100644 --- a/src/ipc/handlers/app_handlers.ts +++ b/src/ipc/handlers/app_handlers.ts @@ -474,7 +474,8 @@ export function registerAppHandlers() { const commits = await git.log({ fs, dir: appPath, - depth: 1000, // Limit to last 1000 commits for performance + // KEEP UP TO DATE WITH ChatHeader.tsx + depth: 10_000, // Limit to last 10_000 commits for performance }); return commits.map((commit) => ({