@fonlan/dsh-model-parameters 0.1.2 → 0.1.3

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/README.en.md CHANGED
@@ -137,6 +137,16 @@ pnpm typecheck
137
137
  node scripts/verify-catalog.mjs # matching-logic check against a models.dev dump
138
138
  ```
139
139
 
140
+ ## Release
141
+
142
+ Tagging auto-publishes to npm (GitHub Actions `Publish to npm` verifies the tag matches the package.json version, then runs `npm publish`; requires an `NPM_TOKEN` secret on the repo):
143
+
144
+ ```bash
145
+ npm run release:patch # npm version patch && git push && git push --tags
146
+ npm run release:minor
147
+ npm run release:major
148
+ ```
149
+
140
150
  ## License
141
151
 
142
152
  MIT
package/README.md CHANGED
@@ -107,6 +107,16 @@ pnpm typecheck
107
107
  node scripts/verify-catalog.mjs # 用 models.dev dump 校验匹配逻辑
108
108
  ```
109
109
 
110
+ ## 发布
111
+
112
+ 打 tag 自动发布到 npm(GitHub Actions `Publish to npm`,校验 tag 与 package.json 版本一致后执行 `npm publish`,需仓库配置 `NPM_TOKEN` secret):
113
+
114
+ ```bash
115
+ npm run release:patch # npm version patch && git push && git push --tags
116
+ npm run release:minor
117
+ npm run release:major
118
+ ```
119
+
110
120
  ## License
111
121
 
112
122
  MIT
package/lib/client.js CHANGED
@@ -135,7 +135,7 @@ window.__ModuleLoader__.load({
135
135
  setConfig: (patch) => call("set-config", { patch })
136
136
  };
137
137
  //#endregion
138
- //#region \0dsh-css:/Users/fonlan/Repos/dsh-model-parameters/src/client/settings-card.css.mjs
138
+ //#region \0dsh-css:/home/runner/work/dsh-model-parameters/dsh-model-parameters/src/client/settings-card.css.mjs
139
139
  const css = "/**\n * Styles for the Model Parameters Settings Card (设置 → 插件 → 插件配置).\n *\n * The expandable chrome mirrors the built-in plugin cards\n * (dsh-client-ui-settings-plugins PluginCard.module.css): external plugins\n * cannot import PluginCard, so the shell/head/chevron/body are re-drawn with\n * the same tokens and geometry. Inner controls follow the built-in cards'\n * field language (ValueField): border-l2 inputs on bg-layer-3, inverted\n * primary buttons, divider-separated groups.\n */\n\n/* ── card chrome (aligned with the built-in PluginCard) ─────────────────── */\n\n.mp-card {\n border: 1px solid var(--dsw-alias-border-l2, #2a3346);\n background: var(--dsw-alias-bg-layer-3, #0d1017);\n border-radius: 12px;\n list-style: none;\n transition: border-color .16s, background .16s;\n}\n\n.mp-card:hover {\n border-color: var(--dsw-alias-label-dimmed, #4a5468);\n}\n\n.mp-card[data-open] {\n background: var(--dsw-alias-bg-layer-2, #141a26);\n border-color: var(--dsw-alias-label-dimmed, #4a5468);\n}\n\n.mp-card-head {\n appearance: none;\n width: 100%;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: 12px;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n display: flex;\n}\n\n.mp-card-head:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f8cff);\n outline-offset: -2px;\n}\n\n.mp-card-headText {\n flex-direction: column;\n flex: 1;\n gap: 4px;\n min-width: 0;\n display: flex;\n}\n\n.mp-card-title {\n color: var(--dsw-alias-label-primary, #e6e6e6);\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.mp-card-sub {\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.mp-card-chevron {\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n flex: none;\n transition: transform .16s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mp-card-chevron[data-open] {\n transform: rotate(180deg);\n}\n\n.mp-card-body {\n border-top: 1px solid var(--dsw-alias-border-l2, #2a3346);\n margin: 0 16px;\n padding: 12px 0 8px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n/* ── body layout ────────────────────────────────────────────────────────── */\n\n.mp-body {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.mp-group {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.mp-group-title {\n margin: 0;\n color: var(--dsw-alias-label-primary, #e6e6e6);\n font-size: 13px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.mp-divider {\n border: none;\n border-top: 1px solid var(--dsw-alias-border-l2, #2a3346);\n margin: 0;\n}\n\n.mp-desc {\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n font-size: 12px;\n line-height: 1.6;\n}\n\n.mp-muted {\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n font-size: 13px;\n line-height: 1.6;\n}\n\n.mp-error {\n margin: 0;\n color: var(--dsw-alias-label-error, #ff8f8f);\n font-size: 13px;\n line-height: 1.6;\n}\n\n/* ── toggles ────────────────────────────────────────────────────────────── */\n\n.mp-toggle {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n cursor: pointer;\n}\n\n.mp-toggle input[type='checkbox'] {\n margin-top: 3px;\n accent-color: var(--dsw-alias-brand-primary, #4f8cff);\n}\n\n.mp-toggle-sub {\n padding-left: 22px;\n}\n\n.mp-toggle-body {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.mp-toggle-label {\n color: var(--dsw-alias-label-primary, #e6e6e6);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.mp-toggle-desc {\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n font-size: 12px;\n line-height: 1.5;\n}\n\n/* ── catalog meta / ttl ─────────────────────────────────────────────────── */\n\n.mp-meta {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 16px;\n color: var(--dsw-alias-label-secondary, #aab2c5);\n font-size: 13px;\n line-height: 1.6;\n}\n\n.mp-ttl {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n color: var(--dsw-alias-label-secondary, #aab2c5);\n font-size: 13px;\n line-height: 1.6;\n}\n\n/* ── inputs (ValueField language) ───────────────────────────────────────── */\n\n.mp-input {\n border: 1px solid var(--dsw-alias-border-l2, #2a3346);\n background: var(--dsw-alias-bg-layer-3, #0d1017);\n color: var(--dsw-alias-label-primary, #e6e6e6);\n height: 34px;\n border-radius: 8px;\n padding: 0 12px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n}\n\n.mp-input:focus-visible {\n border-color: var(--dsw-alias-brand-primary, #4f8cff);\n outline: none;\n}\n\n.mp-input:disabled {\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n cursor: default;\n}\n\n.mp-input-narrow {\n width: 72px;\n}\n\n/* ── mapping rows ───────────────────────────────────────────────────────── */\n\n.mp-map-row {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mp-map-row .mp-input {\n flex: 1;\n min-width: 0;\n}\n\n.mp-map-arrow {\n color: var(--dsw-alias-label-tertiary, #8b93a7);\n flex: none;\n}\n\n/* ── buttons (PluginCard footer language) ────────────────────────────────── */\n\n.mp-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.mp-button {\n appearance: none;\n font: inherit;\n cursor: pointer;\n border: 1px solid transparent;\n border-radius: 8px;\n padding: 5px 14px;\n font-size: 13px;\n line-height: 1.5;\n background: var(--dsw-alias-label-primary, #e6e6e6);\n color: var(--dsw-alias-bg-layer-3, #0d1017);\n}\n\n.mp-button:hover:not(:disabled) {\n opacity: .9;\n}\n\n.mp-button:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.mp-button:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f8cff);\n outline-offset: 1px;\n}\n\n.mp-button-ghost {\n background: transparent;\n color: var(--dsw-alias-label-secondary, #aab2c5);\n border-color: var(--dsw-alias-border-l2, #2a3346);\n}\n\n.mp-button-ghost:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary, #e6e6e6);\n border-color: var(--dsw-alias-label-dimmed, #4a5468);\n}\n\n/* ── report / badges / code ─────────────────────────────────────────────── */\n\n.mp-report {\n margin: 0;\n padding-left: 18px;\n color: var(--dsw-alias-label-secondary, #aab2c5);\n font-size: 13px;\n line-height: 1.7;\n}\n\n.mp-code {\n background: var(--dsw-alias-bg-module-platform, rgba(128, 128, 128, 0.15));\n border-radius: 4px;\n padding: 1px 5px;\n font-size: 12px;\n word-break: break-all;\n}\n\n.mp-badge {\n white-space: nowrap;\n font-size: 11px;\n font-weight: 500;\n line-height: 17px;\n padding: 1px 8px;\n border-radius: 999px;\n margin-left: 4px;\n}\n\n.mp-badge-ok {\n background: rgba(52, 199, 89, 0.18);\n color: #34c759;\n}\n\n.mp-badge-warn {\n background: rgba(255, 149, 0, 0.18);\n color: #ff9500;\n}\n";
140
140
  const tagId = "@fonlan/dsh-model-parameters/settings-card.css";
141
141
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonlan/dsh-model-parameters",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "DSH plugin: when a provider's model sync returns only ids, automatically fill display name, context window, max output tokens, reasoning efforts, and input modalities from the models.dev catalog (cached, TTL-refreshed), and surface a settings page with toggles, refresh, and a fill report.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,7 +49,10 @@
49
49
  "build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown",
50
50
  "prepare": "npm run build",
51
51
  "typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.client.json",
52
- "watch": "tsdown --watch"
52
+ "watch": "tsdown --watch",
53
+ "release:patch": "npm version patch && git push && git push --tags",
54
+ "release:minor": "npm version minor && git push && git push --tags",
55
+ "release:major": "npm version major && git push && git push --tags"
53
56
  },
54
57
  "dsh": {
55
58
  "bundle": {