claude360 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,12 @@
1
1
  export function formatGroupOption(group) {
2
2
  const name = group?.name || "";
3
3
  const displayName = group?.display_name || name;
4
- const ratio = Number(group?.ratio);
5
- const ratioText = Number.isFinite(ratio) ? `(倍率 ${formatRatio(ratio)}x)` : "";
6
- return `${displayName} / ${name}${ratioText}`;
4
+ // ratio null/undefined(如 auto 分组)时不展示倍率,避免把 Number(null)=0 杜撰成 0.0x
5
+ const ratio = group?.ratio == null ? NaN : Number(group.ratio);
6
+ const ratioText = Number.isFinite(ratio) ? ` ${formatRatio(ratio)}x` : "";
7
+ const desc = group?.desc && group.desc !== displayName ? ` ${group.desc}` : "";
8
+ const recommended = group?.recommended ? " 推荐" : "";
9
+ return `${displayName}${ratioText}${desc}${recommended}`;
7
10
  }
8
11
 
9
12
  export async function loadGroups(api) {