dsh-mcp-pill 0.2.10 → 0.2.11
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/lib/client.js +12 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -238,7 +238,13 @@ window.__ModuleLoader__.load({
|
|
|
238
238
|
const scope = props.scope
|
|
239
239
|
const api = props.api
|
|
240
240
|
const [tick, setTick] = React.useState(0)
|
|
241
|
-
|
|
241
|
+
// The collapsible body starts EXPANDED wherever this card renders ALONE —
|
|
242
|
+
// the row seat's `view === 'page'` branch and the `settings.section` page,
|
|
243
|
+
// which both pass `defaultOpen: true`. Collapsed is kept as the default for
|
|
244
|
+
// the legacy ≤ 0.1.5 `settings.plugin.item` seat, because there the card
|
|
245
|
+
// still sits inside the Plugins list of many cards, which is the reason
|
|
246
|
+
// the disclosure existed. The header button below folds it back either way.
|
|
247
|
+
const [open, setOpen] = React.useState(props.defaultOpen === true)
|
|
242
248
|
const [staged, setStaged] = React.useState({})
|
|
243
249
|
const [saving, setSaving] = React.useState(false)
|
|
244
250
|
const [failed, setFailed] = React.useState(false)
|
|
@@ -996,7 +1002,8 @@ window.__ModuleLoader__.load({
|
|
|
996
1002
|
if (props && props.view === 'summary') {
|
|
997
1003
|
return e('span', { className: 'dmpRowSummary' }, '显示状态胶囊开关(默认关闭)')
|
|
998
1004
|
}
|
|
999
|
-
|
|
1005
|
+
// view === 'page': this card is the whole page, so it starts expanded.
|
|
1006
|
+
return e(SettingsCard, { scope, api, defaultOpen: true })
|
|
1000
1007
|
})))
|
|
1001
1008
|
}
|
|
1002
1009
|
ctx.inject(['slots'], registerRowConfig)
|
|
@@ -1032,8 +1039,9 @@ window.__ModuleLoader__.load({
|
|
|
1032
1039
|
// The section owner shares `close` and nothing else; this card needs
|
|
1033
1040
|
// neither `close` nor the host-owned optional `form` prop, because
|
|
1034
1041
|
// values keep flowing through the one resolved transport — so the
|
|
1035
|
-
// page branch is literally the row seat's `view === 'page'` render
|
|
1036
|
-
|
|
1042
|
+
// page branch is literally the row seat's `view === 'page'` render,
|
|
1043
|
+
// including `defaultOpen: true`: one card alone on the page.
|
|
1044
|
+
return e(SettingsCard, { scope, api, defaultOpen: true })
|
|
1037
1045
|
})))
|
|
1038
1046
|
}
|
|
1039
1047
|
ctx.inject(['slots'], registerSettingsSection)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-pill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "EN: Lifecycle-safe MCP status pill and Settings card for DeepSeek Harness Web. ZH: 面向 DeepSeek Harness Web 的生命周期安全 MCP 状态胶囊与设置卡片。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|