Skip to content

Commit e4abbc1

Browse files
committed
style(skills-hub): apply biome formatting
1 parent 211d7aa commit e4abbc1

1 file changed

Lines changed: 27 additions & 38 deletions

File tree

crates/agent-gui/src/pages/skills-hub/SkillsHubPage.tsx

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ function classifyInstalledSkill(skill: SkillSummary): ClawHubCategorySlug[] {
131131
});
132132
}
133133

134-
const STORE_CATEGORY_OPTIONS: readonly StoreCategoryValue[] = [
135-
"all",
136-
...CLAWHUB_CATEGORY_SLUGS,
137-
];
134+
const STORE_CATEGORY_OPTIONS: readonly StoreCategoryValue[] = ["all", ...CLAWHUB_CATEGORY_SLUGS];
138135

139136
/** 选中分类后若本地过滤结果少于该值且还有下一页,自动继续拉取补齐。 */
140137
const STORE_CATEGORY_FILL_TARGET = 12;
@@ -1095,11 +1092,7 @@ export function SkillsHubPage(props: SkillsHubPageProps) {
10951092

10961093
// 在批量模式下点击某张已安装卡片。Shift+点击时以上一次锚点为起点,把可见列表
10971094
// 中该区间内的技能统一设为「与被点技能翻转后一致」的状态。
1098-
function handleBulkInstalledCardClick(
1099-
name: string,
1100-
orderedNames: string[],
1101-
shiftKey: boolean,
1102-
) {
1095+
function handleBulkInstalledCardClick(name: string, orderedNames: string[], shiftKey: boolean) {
11031096
if (isAlwaysEnabledSkillName(name)) return;
11041097
const currentlyOn = selected.has(name);
11051098
const target = !currentlyOn;
@@ -1366,31 +1359,31 @@ export function SkillsHubPage(props: SkillsHubPageProps) {
13661359
</button>
13671360
) : null}
13681361
<div className="relative w-full min-w-0 max-w-md">
1369-
<Search className="absolute left-3.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
1370-
<input
1371-
type="text"
1372-
value={
1373-
view === "installed" ? filter : view === "store" ? storeQuery : importQuery
1374-
}
1375-
onChange={(e) => {
1376-
const value = e.currentTarget.value;
1377-
if (view === "installed") {
1378-
setFilter(value);
1379-
} else if (view === "store") {
1380-
setStoreQuery(value);
1381-
} else {
1382-
setImportQuery(value);
1362+
<Search className="absolute left-3.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
1363+
<input
1364+
type="text"
1365+
value={
1366+
view === "installed" ? filter : view === "store" ? storeQuery : importQuery
13831367
}
1384-
}}
1385-
placeholder={
1386-
view === "installed"
1387-
? t("settings.skillsSearch")
1388-
: view === "store"
1389-
? t("settings.skillsStoreSearch")
1390-
: t("settings.skillsImportSearchPlaceholder")
1391-
}
1392-
className="h-10 w-full rounded-xl border border-border/40 bg-background/60 pl-10 pr-3 text-[13px] outline-hidden backdrop-blur-xl transition-all placeholder:text-muted-foreground/60 focus:border-border/60 focus:bg-background/85 focus:ring-2 focus:ring-foreground/10"
1393-
/>
1368+
onChange={(e) => {
1369+
const value = e.currentTarget.value;
1370+
if (view === "installed") {
1371+
setFilter(value);
1372+
} else if (view === "store") {
1373+
setStoreQuery(value);
1374+
} else {
1375+
setImportQuery(value);
1376+
}
1377+
}}
1378+
placeholder={
1379+
view === "installed"
1380+
? t("settings.skillsSearch")
1381+
: view === "store"
1382+
? t("settings.skillsStoreSearch")
1383+
: t("settings.skillsImportSearchPlaceholder")
1384+
}
1385+
className="h-10 w-full rounded-xl border border-border/40 bg-background/60 pl-10 pr-3 text-[13px] outline-hidden backdrop-blur-xl transition-all placeholder:text-muted-foreground/60 focus:border-border/60 focus:bg-background/85 focus:ring-2 focus:ring-foreground/10"
1386+
/>
13941387
</div>
13951388
</div>
13961389
) : null}
@@ -2946,11 +2939,7 @@ function SkillsStoreView(props: {
29462939
</div>
29472940
) : null}
29482941

2949-
{items.length > 0 &&
2950-
filteredItems.length === 0 &&
2951-
!loading &&
2952-
!loadingMore &&
2953-
!cursor ? (
2942+
{items.length > 0 && filteredItems.length === 0 && !loading && !loadingMore && !cursor ? (
29542943
<GlassPanel tone="muted" className="hub-panel-enter">
29552944
<p className="py-2 text-center text-sm text-muted-foreground">
29562945
{t("settings.skillsStoreEmptyTitle")}

0 commit comments

Comments
 (0)