fix: skills count not displaying when adding

This commit is contained in:
fan
2026-03-05 14:50:48 +08:00
parent 27d21c23ac
commit ea13395207
4 changed files with 12 additions and 2 deletions
+5 -1
View File
@@ -74,11 +74,15 @@ export function RepoManager({
}
try {
await onAdd({
const repoToAdd: SkillRepo = {
owner: parsed.owner,
name: parsed.name,
branch: branch || "main",
enabled: true,
};
await onAdd({
...repoToAdd,
count: getSkillCount(repoToAdd),
});
setRepoUrl("");
+5 -1
View File
@@ -61,11 +61,15 @@ export function RepoManagerPanel({
}
try {
await onAdd({
const repoToAdd: SkillRepo = {
owner: parsed.owner,
name: parsed.name,
branch: branch || "main",
enabled: true,
};
await onAdd({
...repoToAdd,
count: getSkillCount(repoToAdd),
});
setRepoUrl("");
+1
View File
@@ -168,6 +168,7 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
t("skills.repo.addSuccess", {
owner: repo.owner,
name: repo.name,
count: repo.count || 0,
}),
{ closeButton: true },
);
+1
View File
@@ -67,6 +67,7 @@ export interface SkillRepo {
name: string;
branch: string;
enabled: boolean;
count?: number;
}
// ========== API ==========