@fonlan/dsh-model-parameters 0.1.0 → 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 +16 -4
- package/README.md +14 -4
- package/lib/client.js +379 -302
- package/lib/client.js.map +1 -1
- package/package.json +5 -2
- package/src/client/index.tsx +35 -14
- package/src/client/locales.ts +6 -2
- package/src/client/settings-card.css +330 -0
- package/src/client/settings-card.tsx +395 -0
- package/src/client/settings-section.css +0 -172
- package/src/client/settings-section.tsx +0 -310
package/README.en.md
CHANGED
|
@@ -68,18 +68,20 @@ Models with no catalog match (e.g. a local gateway model like
|
|
|
68
68
|
`ttlDays` (default **7 days**).
|
|
69
69
|
- A failed fetch keeps the last good cache; with no cache at all the plugin
|
|
70
70
|
simply fills nothing until a refresh succeeds.
|
|
71
|
-
- The settings
|
|
71
|
+
- The settings card has an **Update catalog & fill now** button for a forced
|
|
72
72
|
refresh, and shows the last update time and freshness.
|
|
73
73
|
|
|
74
|
-
## Settings
|
|
74
|
+
## Settings card
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
An expandable "模型参数补全 / Model Parameters" card appears in DSH
|
|
77
|
+
settings → **Plugins → Plugin configuration** (styled like the built-in plugin
|
|
78
|
+
cards, collapsed by default):
|
|
77
79
|
|
|
78
80
|
- master enable switch plus per-field toggles (`fillName`, `fillContext`,
|
|
79
81
|
`fillMaxTokens`, `fillReasoning`, `fillInput`);
|
|
80
82
|
- catalog TTL in days;
|
|
81
83
|
- optional `provider → models.dev provider` mapping overrides;
|
|
82
|
-
- catalog freshness
|
|
84
|
+
- catalog freshness (entries, providers, last update);
|
|
83
85
|
- the last fill report: fields filled, providers touched, and the list of
|
|
84
86
|
unmatched model ids.
|
|
85
87
|
|
|
@@ -135,6 +137,16 @@ pnpm typecheck
|
|
|
135
137
|
node scripts/verify-catalog.mjs # matching-logic check against a models.dev dump
|
|
136
138
|
```
|
|
137
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
|
+
|
|
138
150
|
## License
|
|
139
151
|
|
|
140
152
|
MIT
|
package/README.md
CHANGED
|
@@ -44,16 +44,16 @@ models.dev 把同一模型挂在许多 provider 名下(`deepseek-v4-flash` 出
|
|
|
44
44
|
- 目录从 `https://models.dev/api.json` 拉取,缓存在 `~/.dsh/model-parameters/catalog.json`(约 4 MB)。
|
|
45
45
|
- 缓存超过 `ttlDays`(默认 **7 天**)后,在下一次 reconcile 时惰性刷新。
|
|
46
46
|
- 拉取失败则保留上次成功的缓存;完全没有缓存时插件什么都不补,直到刷新成功。
|
|
47
|
-
-
|
|
47
|
+
- 设置卡片有 **立即更新目录并补全** 按钮可强制刷新,并显示上次更新时间与新鲜度。
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## 设置卡片
|
|
50
50
|
|
|
51
|
-
DSH
|
|
51
|
+
在 DSH 设置 → **插件 → 插件配置** 中会出现一张 "模型参数补全 / Model Parameters" 可展开卡片(样式与内置插件卡片一致,默认折叠):
|
|
52
52
|
|
|
53
53
|
- 总开关 + 逐字段开关(`fillName`、`fillContext`、`fillMaxTokens`、`fillReasoning`、`fillInput`);
|
|
54
54
|
- 目录 TTL(天);
|
|
55
55
|
- 可选的 `provider → models.dev provider` 映射覆盖;
|
|
56
|
-
-
|
|
56
|
+
- 目录新鲜度(条目数、provider 数、上次更新);
|
|
57
57
|
- 上次补全报告:补全的字段、涉及的 provider、未匹配的模型 id 列表。
|
|
58
58
|
|
|
59
59
|
插件配置保存在 `model-parameters` 设置命名空间(`~/.dsh/settings.yaml`),例如:
|
|
@@ -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
|