@morehao/dsh-github-trending 0.8.12 → 0.8.14

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.
package/client.js CHANGED
@@ -162,7 +162,6 @@ var DICT = {
162
162
  "scope.weekly": "每周",
163
163
  "scope.monthly": "每月",
164
164
  "scope.languages": "语言",
165
- "scope.topN": "每语言条数",
166
165
  "card.schedule.title": "调度",
167
166
  "schedule.enabled": "定时运行",
168
167
  "schedule.periods": "自动产出周期",
@@ -278,6 +277,7 @@ var DICT = {
278
277
  "shell.update.failed": "更新失败",
279
278
  "shell.update.checkFailed": "检查失败,可稍后重试",
280
279
  "shell.update.available": "有新版本 v{latest}",
280
+ "shell.update.badgeTitle": "最新版本 v{version}",
281
281
  "shell.update.latest": "已是最新 v{version}",
282
282
  "shell.update.apply": "更新到 v{version}",
283
283
  "shell.update.confirmHint": "更新会重装插件,需重启 DSH 生效",
@@ -358,6 +358,7 @@ var DICT = {
358
358
  "runs.prUnknown": "状态未知",
359
359
  "runs.prCreated": "PR 已创建",
360
360
  "runs.legacy": "旧记录",
361
+ "runs.degraded.tag": "降级",
361
362
  "runs.legacyHint": "旧记录没有预览副本,内容哈希使用旧算法,不能与 v2 直接比较。",
362
363
  "runs.detail.coreModel": "核心 / 模型",
363
364
  "runs.detail.date": "运行日期",
@@ -386,6 +387,7 @@ var DICT = {
386
387
  "digest.copied": "已复制",
387
388
  "digest.openPr": "打开 PR",
388
389
  "digest.truncated": "已截断到 512 KB",
390
+ "digest.degraded.badge": "本次为降级数据:抓取或摘要存在降级,详见下方说明",
389
391
  "digest.loading": "读取预览…",
390
392
  "digest.tag.preview": "有预览",
391
393
  "digest.tag.failed": "运行失败",
@@ -713,7 +715,6 @@ var DICT = {
713
715
  "scope.weekly": "Weekly",
714
716
  "scope.monthly": "Monthly",
715
717
  "scope.languages": "Languages",
716
- "scope.topN": "Per language",
717
718
  "card.schedule.title": "Schedule",
718
719
  "schedule.enabled": "Scheduled runs",
719
720
  "schedule.periods": "Auto periods",
@@ -829,6 +830,7 @@ var DICT = {
829
830
  "shell.update.failed": "Update failed",
830
831
  "shell.update.checkFailed": "Check failed, try again later",
831
832
  "shell.update.available": "v{latest} available",
833
+ "shell.update.badgeTitle": "Latest version v{version}",
832
834
  "shell.update.latest": "Up to date · v{version}",
833
835
  "shell.update.apply": "Update to v{version}",
834
836
  "shell.update.confirmHint": "Reinstalls the plugin; restart DSH to apply",
@@ -909,6 +911,7 @@ var DICT = {
909
911
  "runs.prUnknown": "State unknown",
910
912
  "runs.prCreated": "PR created",
911
913
  "runs.legacy": "Legacy",
914
+ "runs.degraded.tag": "Degraded",
912
915
  "runs.legacyHint": "Legacy records have no preview copy and use the old hash algorithm, so they cannot be compared with v2 directly.",
913
916
  "runs.detail.coreModel": "Core / model",
914
917
  "runs.detail.date": "Run date",
@@ -937,6 +940,7 @@ var DICT = {
937
940
  "digest.copied": "Copied",
938
941
  "digest.openPr": "Open PR",
939
942
  "digest.truncated": "Truncated at 512 KB",
943
+ "digest.degraded.badge": "Degraded data: fetching or summarizing was degraded — see the note below",
940
944
  "digest.loading": "Loading preview…",
941
945
  "digest.tag.preview": "Preview",
942
946
  "digest.tag.failed": "Failed",
@@ -1331,6 +1335,7 @@ var CSS = `
1331
1335
  .dshgt-empty{padding:48px 0;text-align:center;color:var(--gt-muted);font-size:13px;}
1332
1336
  .dshgt-tag{display:inline-flex;align-items:center;height:20px;padding:0 7px;border:1px solid var(--gt-border);border-radius:999px;font-size:11px;color:var(--gt-muted);background:var(--gt-bg);white-space:nowrap;}
1333
1337
  .dshgt-inline-tag{margin-left:6px;vertical-align:1px;}
1338
+ .dshgt-tag-warn{color:var(--gt-warn,#c08a00);border-color:color-mix(in srgb,var(--gt-warn,#c08a00) 45%,var(--gt-border));}
1334
1339
 
1335
1340
  /* ——— 顶部身份条(第一行):名称 / 版本 / 完整包名 / GitHub / 检查更新 ——— */
1336
1341
  .dshgt-idbar{display:flex;align-items:center;gap:9px;height:48px;padding:0 var(--dshgt-inset);border-bottom:1px solid var(--gt-border);flex:none;background:var(--gt-bg);min-width:0;}
@@ -1341,15 +1346,34 @@ var CSS = `
1341
1346
  .dshgt-id-sep{width:1px;height:16px;background:var(--gt-border);flex:none;}
1342
1347
  .dshgt-id-pkg{appearance:none;border:0;background:none;padding:2px 4px;border-radius:5px;color:var(--gt-muted);cursor:pointer;font-size:12px;max-width:min(44vw,360px);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;}
1343
1348
  .dshgt-id-pkg:hover{color:var(--gt-fg);background:color-mix(in srgb,var(--gt-fg) 5%,var(--gt-bg));}
1344
- .dshgt-idbar-right{margin-left:auto;display:flex;align-items:center;gap:10px;flex:none;min-width:0;}
1349
+ .dshgt-idbar-actions{margin-left:auto;position:relative;display:flex;align-items:center;gap:10px;flex:none;min-width:0;}
1345
1350
  .dshgt-id-gh{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--gt-muted);border:1px solid transparent;flex:none;}
1346
1351
  .dshgt-id-gh:hover{color:var(--gt-fg);background:color-mix(in srgb,var(--gt-fg) 6%,var(--gt-bg));border-color:var(--gt-border);}
1347
- .dshgt-id-upd{display:flex;align-items:center;gap:10px;min-width:0;}
1348
- .dshgt-id-status{font-size:12px;color:var(--gt-muted);white-space:nowrap;display:inline-flex;align-items:center;gap:6px;min-width:0;overflow:hidden;text-overflow:ellipsis;}
1349
- .dshgt-id-status.ok{color:var(--gt-ok);}
1350
- .dshgt-id-status.new{color:var(--gt-warn);}
1351
- .dshgt-id-status.err{color:var(--gt-err);}
1352
- .dshgt-id-actions{display:flex;align-items:center;gap:8px;flex:none;}
1352
+ /* 更新入口:版本徽标 + 纯图标刷新,作为一个整体;与 GitHub 图标同形制 */
1353
+ .dshgt-upd-unit{display:inline-flex;align-items:center;gap:4px;flex:none;}
1354
+ /* 版本徽标:仅「有新版本」时出现,透明底细描边,高度对齐图标按钮中线 */
1355
+ .dshgt-ver-badge{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:22px;padding:0 8px;border-radius:999px;
1356
+ border:1px solid color-mix(in srgb,var(--gt-warn) 42%,transparent);background:transparent;color:var(--gt-warn);
1357
+ font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;
1358
+ transition:background .12s ease,border-color .12s ease;}
1359
+ .dshgt-ver-badge:hover{background:color-mix(in srgb,var(--gt-warn) 12%,transparent);border-color:color-mix(in srgb,var(--gt-warn) 60%,transparent);}
1360
+ .dshgt-ver-badge:focus-visible{outline:2px solid var(--gt-accent);outline-offset:1px;}
1361
+ /* 纯图标刷新:状态靠图标颜色 + 角标 + 旋转表达,文案走 title(tooltip) */
1362
+ .dshgt-refresh{position:relative;}
1363
+ .dshgt-refresh svg{display:block;transition:color .12s ease;}
1364
+ .dshgt-refresh[data-state="available"]{color:var(--gt-warn);}
1365
+ .dshgt-refresh[data-state="available"]::after{content:"";position:absolute;top:3px;right:3px;width:6px;height:6px;border-radius:50%;background:var(--gt-warn);box-shadow:0 0 0 1.5px var(--gt-bg);}
1366
+ .dshgt-refresh[data-state="checking"]{color:var(--gt-muted);cursor:default;}
1367
+ .dshgt-refresh[data-state="checking"] svg{animation:dshgt-refresh-spin .9s linear infinite;}
1368
+ .dshgt-refresh[data-state="error"]{color:var(--gt-err);}
1369
+ .dshgt-refresh[data-state="ok-flash"]{color:var(--gt-ok);}
1370
+ @keyframes dshgt-refresh-spin{to{transform:rotate(360deg);}}
1371
+ /* 确认气泡:贴刷新图标右下方弹出 */
1372
+ .dshgt-confirm-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:30;box-sizing:border-box;min-width:210px;max-width:280px;
1373
+ display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:var(--gt-card);border:1px solid var(--gt-border);
1374
+ box-shadow:0 12px 32px rgba(0,0,0,.28);}
1375
+ .dshgt-confirm-title{font-size:12.5px;color:var(--gt-fg);line-height:1.45;}
1376
+ .dshgt-confirm-actions{display:flex;gap:8px;justify-content:flex-end;}
1353
1377
 
1354
1378
  /* ——— 横向 tab(第二行)+ 右侧状态 ——— */
1355
1379
  .dshgt-tabsbar{display:flex;align-items:stretch;gap:12px;height:46px;padding:0 var(--dshgt-inset);border-bottom:1px solid var(--gt-border);flex:none;background:var(--gt-bg);min-width:0;}
@@ -1443,6 +1467,8 @@ var CSS = `
1443
1467
  .dshgt-seg button.on{background:var(--gt-card);color:var(--gt-fg);font-weight:600;white-space:nowrap;}
1444
1468
  .dshgt-digest-doc{padding:26px 32px 22px;min-width:0;}
1445
1469
  .dshgt-doc-meta{display:flex;gap:12px;flex-wrap:wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:var(--gt-muted);padding-bottom:12px;border-bottom:1px solid color-mix(in srgb,var(--gt-border) 70%,transparent);}
1470
+ .dshgt-degraded-badge{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--gt-warn,#c08a00) 45%,var(--gt-border));border-radius:8px;font-size:12px;line-height:1.5;color:var(--gt-fg);background:color-mix(in srgb,var(--gt-warn,#c08a00) 12%,transparent);}
1471
+ .dshgt-degraded-icon{font-size:14px;line-height:1;}
1446
1472
  .dshgt-digest-raw{margin:0;padding:22px 28px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.75;white-space:pre-wrap;word-break:break-word;color:var(--gt-muted);background:color-mix(in srgb,var(--gt-fg) 2.5%,var(--gt-card));max-height:640px;overflow:auto;}
1447
1473
  .dshgt-digest-loading{padding:40px 28px;color:var(--gt-muted);font-size:13px;}
1448
1474
  .dshgt-digest-empty{padding:42px 36px 46px;}
@@ -2701,13 +2727,6 @@ function SettingsView(props) {
2701
2727
  )
2702
2728
  )
2703
2729
  ),
2704
- h(
2705
- Row,
2706
- { label: t("scope.topN") },
2707
- h(Input, { mono: true, width: 70, value: String(draft.trending.topN), onInput: (value) => update((next) => {
2708
- next.trending.topN = Math.round(Number(value) || 0);
2709
- }) })
2710
- ),
2711
2730
  h(
2712
2731
  Row,
2713
2732
  { label: t("scope.languages") },
@@ -3756,6 +3775,10 @@ var FILTERS = [
3756
3775
  { id: "failed", key: "runs.filter.failed" },
3757
3776
  { id: "dry", key: "runs.filter.dry" }
3758
3777
  ];
3778
+ function isDegradedRecord(record) {
3779
+ if (!record.ok || record.skipped) return false;
3780
+ return Array.isArray(record.warnings) && record.warnings.some((w) => w.includes("降级"));
3781
+ }
3759
3782
  function recordSummary(t, record) {
3760
3783
  if (!record.ok) {
3761
3784
  return [record.errorCode, record.errorMessage].filter((item) => item !== void 0 && item !== "").join(" · ") || t("state.failed");
@@ -3901,7 +3924,8 @@ function RunsView(props) {
3901
3924
  record.kind === "dry-run" ? t("state.dry") : record.skipped ? t("state.skipped") : record.ok ? t("state.ok") : t("state.failed"),
3902
3925
  h("span", { className: "dshgt-run-muted" }, recordSummary(t, record)),
3903
3926
  record.legacy === true ? h("span", { className: "dshgt-tag dshgt-inline-tag" }, t("runs.legacy")) : null,
3904
- record.forced === true ? h("span", { className: "dshgt-tag dshgt-inline-tag" }, t("run.forced.tag")) : null
3927
+ record.forced === true ? h("span", { className: "dshgt-tag dshgt-inline-tag" }, t("run.forced.tag")) : null,
3928
+ isDegradedRecord(record) ? h("span", { className: "dshgt-tag dshgt-inline-tag dshgt-tag-warn" }, t("runs.degraded.tag")) : null
3905
3929
  ),
3906
3930
  h("span", { className: "dshgt-run-files" }, t("runs.files", { count: record.files })),
3907
3931
  record.tokens === void 0 ? null : h("span", { className: "dshgt-run-tokens dshgt-mono", title: t("run.usage.tokens") }, `${formatTokens(record.tokens)} tok`),
@@ -4801,6 +4825,7 @@ function DigestView(props) {
4801
4825
  rendered === null ? null : h(
4802
4826
  import_react.default.Fragment,
4803
4827
  null,
4828
+ rendered.meta.degraded === "true" ? degradedBadge(t) : null,
4804
4829
  metaLine(rendered),
4805
4830
  h("div", { className: "dshgt-md" }, rendered.nodes)
4806
4831
  )
@@ -4809,6 +4834,14 @@ function DigestView(props) {
4809
4834
  )
4810
4835
  );
4811
4836
  }
4837
+ function degradedBadge(t) {
4838
+ return h(
4839
+ "div",
4840
+ { className: "dshgt-degraded-badge", role: "note" },
4841
+ h("span", { className: "dshgt-degraded-icon" }, "⚠️"),
4842
+ h("span", null, t("digest.degraded.badge"))
4843
+ );
4844
+ }
4812
4845
  function metaLine(rendered) {
4813
4846
  const entries = META_KEYS.filter((key) => rendered.meta[key] !== void 0 && rendered.meta[key] !== "");
4814
4847
  if (entries.length === 0) return null;
@@ -5881,48 +5914,54 @@ function githubIcon() {
5881
5914
  d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"
5882
5915
  }));
5883
5916
  }
5917
+ function refreshIcon() {
5918
+ return h(
5919
+ "svg",
5920
+ { width: 15, height: 15, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" },
5921
+ h("path", { d: "M20 12a8 8 0 1 1-2.34-5.66" }),
5922
+ h("path", { d: "M20 4v5h-5" })
5923
+ );
5924
+ }
5884
5925
  function IdentityBar(props) {
5885
5926
  const { t, plugin } = props;
5886
5927
  const [confirming, setConfirming] = import_react.default.useState(false);
5887
5928
  const [updateState, controller] = usePluginUpdate();
5888
5929
  const view = updateState.view;
5889
5930
  const status = updateState.status;
5890
- import_react.default.useEffect(() => {
5891
- if (status === "applying" || status === "restart-required" || status === "applied") setConfirming(false);
5892
- }, [status]);
5893
5931
  const busy = status === "checking" || status === "applying";
5894
5932
  const settled = status === "restart-required" || status === "applied";
5895
5933
  const latestVersion = view === null ? "" : view.latestVersion ?? "";
5896
5934
  const updateAvailable = view !== null && view.updateAvailable;
5897
- const actionable = updateAvailable && view !== null && view.canApply && !settled && !busy;
5935
+ const actionable = updateAvailable && view !== null && view.canApply && !busy && !settled;
5898
5936
  const currentVersion = view === null ? plugin.version : view.currentVersion ?? plugin.version;
5899
- function statusLine() {
5900
- if (status === "checking" || view === null) return { text: t("shell.update.checking"), kind: "muted" };
5901
- if (status === "applying") return { text: t("shell.update.applying", { version: latestVersion }), kind: "muted" };
5902
- if (status === "restart-required" || status === "applied") return { text: t("shell.update.done", { version: latestVersion }), kind: "ok" };
5903
- if (status === "failed") return { text: updateState.error?.code === "CHECK_FAILED" ? t("shell.update.checkFailed") : t("shell.update.failed"), kind: "err" };
5904
- if (view.checkFailed) return { text: t("shell.update.checkFailed"), kind: "err" };
5905
- if (view.updateAvailable) return { text: t("shell.update.available", { latest: view.latestVersion ?? "" }), kind: "new" };
5906
- return { text: t("shell.update.latest", { version: currentVersion }), kind: "ok" };
5937
+ import_react.default.useEffect(() => {
5938
+ if (!updateAvailable || busy || settled) setConfirming(false);
5939
+ }, [updateAvailable, busy, settled]);
5940
+ function stateAndTip() {
5941
+ if (status === "checking" || view === null) return { state: "checking", tip: t("shell.update.checking") };
5942
+ if (status === "applying") return { state: "checking", tip: t("shell.update.applying", { version: latestVersion }) };
5943
+ if (status === "restart-required" || status === "applied") return { state: "ok-flash", tip: t("shell.update.done", { version: latestVersion }) };
5944
+ if (status === "failed") return { state: "error", tip: updateState.error?.code === "CHECK_FAILED" ? t("shell.update.checkFailed") : t("shell.update.failed") };
5945
+ if (view.checkFailed) return { state: "error", tip: t("shell.update.checkFailed") };
5946
+ if (view.updateAvailable) return { state: "available", tip: t("shell.update.available", { latest: latestVersion }) };
5947
+ return { state: "latest", tip: t("shell.update.latest", { version: currentVersion }) };
5907
5948
  }
5908
- function action() {
5909
- if (status === "applying") return h(Btn, { small: true, disabled: true }, t("shell.update.applyingShort"));
5949
+ const st = stateAndTip();
5950
+ function onRefreshClick() {
5951
+ if (busy) return;
5910
5952
  if (actionable) {
5911
- if (confirming) {
5912
- return [
5913
- h(Btn, { key: "yes", small: true, variant: "danger", onClick: () => {
5914
- setConfirming(false);
5915
- writePendingUpdate(currentVersion, latestVersion);
5916
- void controller.apply();
5917
- } }, t("shell.update.confirmYes")),
5918
- h(Btn, { key: "no", small: true, onClick: () => setConfirming(false) }, t("shell.update.cancel"))
5919
- ];
5920
- }
5921
- return h(Btn, { small: true, variant: "primary", onClick: () => setConfirming(true) }, t("shell.update.apply", { version: latestVersion }));
5953
+ setConfirming((v) => !v);
5954
+ return;
5922
5955
  }
5923
- return h(Btn, { small: true, disabled: busy, onClick: () => void controller.check({ fresh: true }) }, t("shell.update.check"));
5956
+ void controller.check({ fresh: true });
5924
5957
  }
5925
- const line = statusLine();
5958
+ function onConfirmUpdate() {
5959
+ setConfirming(false);
5960
+ writePendingUpdate(currentVersion, latestVersion);
5961
+ void controller.apply();
5962
+ }
5963
+ const showBadge = Boolean(updateAvailable && view?.canApply && !busy && !settled);
5964
+ const confirmOpen = confirming && actionable;
5926
5965
  return h(
5927
5966
  "div",
5928
5967
  { className: "dshgt-idbar" },
@@ -5942,11 +5981,45 @@ function IdentityBar(props) {
5942
5981
  "div",
5943
5982
  { className: "dshgt-idbar-right" },
5944
5983
  h(
5945
- "span",
5946
- { className: "dshgt-id-upd" },
5947
- confirming ? h("span", { className: "dshgt-id-status new" }, t("shell.update.confirmHint")) : h("span", { className: `dshgt-id-status ${line.kind}` }, line.text),
5948
- h("span", { className: "dshgt-id-actions" }, action())
5949
- )
5984
+ "div",
5985
+ { className: "dshgt-upd-unit" },
5986
+ showBadge ? h(
5987
+ "button",
5988
+ {
5989
+ type: "button",
5990
+ className: "dshgt-ver-badge",
5991
+ title: t("shell.update.badgeTitle", { version: latestVersion }),
5992
+ "aria-label": t("shell.update.badgeTitle", { version: latestVersion }),
5993
+ onClick: () => setConfirming((v) => !v)
5994
+ },
5995
+ `v${latestVersion}`
5996
+ ) : null,
5997
+ h(
5998
+ "button",
5999
+ {
6000
+ type: "button",
6001
+ className: "dshgt-id-gh dshgt-refresh",
6002
+ "data-state": st.state,
6003
+ disabled: busy,
6004
+ title: st.tip,
6005
+ "aria-label": st.tip,
6006
+ "aria-expanded": confirmOpen ? "true" : void 0,
6007
+ onClick: onRefreshClick
6008
+ },
6009
+ refreshIcon()
6010
+ )
6011
+ ),
6012
+ confirmOpen ? h(
6013
+ "div",
6014
+ { className: "dshgt-confirm-pop", role: "dialog", "aria-label": t("shell.update.confirmHint") },
6015
+ h("div", { className: "dshgt-confirm-title" }, t("shell.update.confirmHint")),
6016
+ h(
6017
+ "div",
6018
+ { className: "dshgt-confirm-actions" },
6019
+ h(Btn, { small: true, onClick: () => setConfirming(false) }, t("shell.update.cancel")),
6020
+ h(Btn, { small: true, variant: "primary", onClick: onConfirmUpdate }, t("shell.update.confirmYes"))
6021
+ )
6022
+ ) : null
5950
6023
  )
5951
6024
  );
5952
6025
  }
@@ -58,7 +58,7 @@ var DEFAULT_SETTINGS = {
58
58
  labels: []
59
59
  },
60
60
  github: { authMode: "gh", tokenRef: "GITHUB_TOKEN" },
61
- trending: { since: "daily", languages: ["all", "typescript", "python", "go", "rust"], topN: 25 },
61
+ trending: { since: "daily", languages: ["all", "typescript", "python", "go", "rust"] },
62
62
  summarize: {
63
63
  batchSize: 10,
64
64
  maxRetries: 1,
@@ -211,8 +211,7 @@ function normalizeSettings(input) {
211
211
  },
212
212
  trending: {
213
213
  since: isPeriod(since) ? since : "daily",
214
- languages: strArray(trending.languages, DEFAULT_SETTINGS.trending.languages),
215
- topN: Math.round(num(trending.topN, DEFAULT_SETTINGS.trending.topN))
214
+ languages: strArray(trending.languages, DEFAULT_SETTINGS.trending.languages)
216
215
  },
217
216
  summarize: {
218
217
  batchSize: Math.round(num(summarize.batchSize, DEFAULT_SETTINGS.summarize.batchSize)),
@@ -308,9 +307,6 @@ function validateSettings(settings, providers = CORE_PROVIDERS) {
308
307
  } else if (!path.isAbsolute(repo.path)) {
309
308
  problems.push({ field: "repo.path", code: "CONFIG_INVALID", message: "\u4ED3\u5E93\u8DEF\u5F84\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84" });
310
309
  }
311
- if (!Number.isInteger(trending.topN) || trending.topN <= 0) {
312
- problems.push({ field: "trending.topN", code: "CONFIG_INVALID", message: "\u6BCF\u8BED\u8A00\u6761\u6570\u5FC5\u987B\u662F\u6B63\u6574\u6570" });
313
- }
314
310
  if (!isEnrich(summarize.enrich)) {
315
311
  problems.push({ field: "summarize.enrich", code: "CONFIG_INVALID", message: "enrich \u5FC5\u987B\u662F none / repo / readme" });
316
312
  }
@@ -401,8 +397,7 @@ function toCoreConfig(settings, apiKey, baseURLOverride, period, repoCount = 0)
401
397
  },
402
398
  trending: {
403
399
  languages: settings.trending.languages,
404
- since: period ?? settings.trending.since,
405
- perLanguage: settings.trending.topN
400
+ since: period ?? settings.trending.since
406
401
  },
407
402
  summarize: {
408
403
  batchSize: settings.summarize.batchSize,
@@ -3972,9 +3967,6 @@ function importFromCli(filePath, base = DEFAULT_SETTINGS) {
3972
3967
  take(imported, "trending.since", asString(trending.since), (value) => {
3973
3968
  patch.trending.since = value === "weekly" ? "weekly" : "daily";
3974
3969
  });
3975
- take(imported, "trending.perLanguage", asNumber(trending.perLanguage), (value) => {
3976
- patch.trending.topN = Math.round(value);
3977
- });
3978
3970
  take(imported, "output.dir", asString(output.dir), (value) => {
3979
3971
  patch.output.dir = value;
3980
3972
  });
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  createUpdateService,
10
10
  ensureGithubFlow,
11
11
  readPluginInfo
12
- } from "./chunk-OMQY3T3V.js";
12
+ } from "./chunk-6YH4NOBR.js";
13
13
 
14
14
  // src/index.ts
15
15
  var name = "dsh-github-trending";
package/lib/internal.d.ts CHANGED
@@ -262,7 +262,6 @@ interface GithubSettings {
262
262
  interface TrendingSettings {
263
263
  since: Since;
264
264
  languages: string[];
265
- topN: number;
266
265
  }
267
266
  interface OutputSettings {
268
267
  dir: string;
@@ -413,7 +412,6 @@ interface CoreConfig {
413
412
  trending: {
414
413
  languages: string[];
415
414
  since: string;
416
- perLanguage: number;
417
415
  };
418
416
  summarize: {
419
417
  batchSize: number;
package/lib/internal.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  tools_exports,
28
28
  update_exports,
29
29
  version_exports
30
- } from "./chunk-OMQY3T3V.js";
30
+ } from "./chunk-6YH4NOBR.js";
31
31
 
32
32
  // src/internal.ts
33
33
  import * as exec from "@morehao/dsh-plugin-kit/exec";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.8.12",
3
+ "version": "0.8.14",
4
4
  "description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "core": {
62
62
  "repo": "morehao/trendradar",
63
- "version": "0.8.3"
63
+ "version": "0.8.4"
64
64
  },
65
65
  "client": {
66
66
  "platform": "web",