Max versions shown (#83)
This commit is contained in:
@@ -52,6 +52,8 @@ export function ChatHeader({
|
|||||||
navigate({ to: "/" });
|
navigate({ to: "/" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// TODO: KEEP UP TO DATE WITH app_handlers.ts
|
||||||
|
const versionPostfix = versions.length === 10_000 ? `+` : "";
|
||||||
return (
|
return (
|
||||||
<div className="@container flex items-center justify-between py-1.5">
|
<div className="@container flex items-center justify-between py-1.5">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
@@ -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"
|
className="hidden @6xs:flex cursor-pointer items-center gap-1 text-sm px-2 py-1 rounded-md"
|
||||||
>
|
>
|
||||||
<History size={16} />
|
<History size={16} />
|
||||||
{loading ? "..." : `Version ${versions.length}`}
|
{loading ? "..." : `Version ${versions.length}${versionPostfix}`}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -474,7 +474,8 @@ export function registerAppHandlers() {
|
|||||||
const commits = await git.log({
|
const commits = await git.log({
|
||||||
fs,
|
fs,
|
||||||
dir: appPath,
|
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) => ({
|
return commits.map((commit) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user