dshmarket 1.66.36 → 1.66.37
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/client.js +13 -2
- package/package.json +1 -1
- package/src/client/MarketSection.tsx +21 -2
package/client/client.js
CHANGED
|
@@ -9420,7 +9420,8 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
9420
9420
|
const statusInstalled = installedMap(status.installed);
|
|
9421
9421
|
if (!sameInstalledMap(installed, statusInstalled)) refreshInstalled();
|
|
9422
9422
|
if (readSession("dshm-pending") !== null && busyUrl !== null && status.busy !== true) {
|
|
9423
|
-
|
|
9423
|
+
const url = busyUrl;
|
|
9424
|
+
if (data !== null && data.plugins.some((p) => p.url === url && isInstalled(p, statusInstalled, repoIdentities, data.plugins, repoHints))) {
|
|
9424
9425
|
idleStrikes.current = 0;
|
|
9425
9426
|
sessionStorage.removeItem("dshm-pending");
|
|
9426
9427
|
const recovered = recoveredInstall.current;
|
|
@@ -9428,7 +9429,12 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
9428
9429
|
setRecords((list) => drop(list, recovered.id));
|
|
9429
9430
|
recoveredInstall.current = null;
|
|
9430
9431
|
}
|
|
9431
|
-
|
|
9432
|
+
setRecords((list) => list.map((record) => record.kind === "install" && record.url === url && record.state === "running" ? {
|
|
9433
|
+
...record,
|
|
9434
|
+
state: "done",
|
|
9435
|
+
needsRefresh: true
|
|
9436
|
+
} : record));
|
|
9437
|
+
setDoneUrls((urls) => urls.includes(url) ? urls : urls.concat(url));
|
|
9432
9438
|
setBusyUrl(null);
|
|
9433
9439
|
} else if (++idleStrikes.current >= 2) {
|
|
9434
9440
|
idleStrikes.current = 0;
|
|
@@ -9438,6 +9444,11 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
9438
9444
|
setRecords((list) => drop(list, recovered.id));
|
|
9439
9445
|
recoveredInstall.current = null;
|
|
9440
9446
|
}
|
|
9447
|
+
setRecords((list) => list.map((record) => record.kind === "install" && record.url === url && record.state === "running" ? {
|
|
9448
|
+
...record,
|
|
9449
|
+
state: "failed",
|
|
9450
|
+
reason: t("installFail")
|
|
9451
|
+
} : record));
|
|
9441
9452
|
setBusyUrl(null);
|
|
9442
9453
|
setInstallError(t("installFail") + " — " + t("exportLog"));
|
|
9443
9454
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dshmarket",
|
|
3
3
|
"description": "Visual plugin market inside DeepSeek Harness — browse, search, and one-click install community plugins. · DSH 可视化插件市场:逛一逛,点一下,装好。",
|
|
4
|
-
"version": "1.66.
|
|
4
|
+
"version": "1.66.37",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
@@ -2950,8 +2950,9 @@ export function MarketSection(props: MarketSectionProps) {
|
|
|
2950
2950
|
// declare the install done nor count an idle strike yet — a
|
|
2951
2951
|
// premature banner here invited a restart click into a 409.
|
|
2952
2952
|
if (pending !== null && busyUrl !== null && status.busy !== true) {
|
|
2953
|
+
const url = busyUrl
|
|
2953
2954
|
const nowInstalled = data !== null && data.plugins.some(p =>
|
|
2954
|
-
p.url ===
|
|
2955
|
+
p.url === url && isInstalled(p, statusInstalled, repoIdentities, data.plugins, repoHints))
|
|
2955
2956
|
if (nowInstalled) {
|
|
2956
2957
|
idleStrikes.current = 0
|
|
2957
2958
|
sessionStorage.removeItem('dshm-pending')
|
|
@@ -2960,7 +2961,18 @@ export function MarketSection(props: MarketSectionProps) {
|
|
|
2960
2961
|
setRecords(list => drop(list, recovered.id))
|
|
2961
2962
|
recoveredInstall.current = null
|
|
2962
2963
|
}
|
|
2963
|
-
|
|
2964
|
+
// This poll is the only witness when the install response was
|
|
2965
|
+
// lost (#100): the record `doInstall` created is still
|
|
2966
|
+
// `running`, and releasing only the card's busy state leaves
|
|
2967
|
+
// the Tasks entry claiming "Installing 1/1" for the rest of
|
|
2968
|
+
// the mount — until settings travel remounts the section and
|
|
2969
|
+
// drops `records` with it. The install landed, so the record
|
|
2970
|
+
// has to land with it (#904).
|
|
2971
|
+
setRecords(list => list.map(record =>
|
|
2972
|
+
record.kind === 'install' && record.url === url && record.state === 'running'
|
|
2973
|
+
? { ...record, state: 'done' as const, needsRefresh: true }
|
|
2974
|
+
: record))
|
|
2975
|
+
setDoneUrls(urls => urls.includes(url) ? urls : urls.concat(url))
|
|
2964
2976
|
setBusyUrl(null)
|
|
2965
2977
|
} else if (++idleStrikes.current >= 2) {
|
|
2966
2978
|
// Host is idle and the plugin never landed: the install died
|
|
@@ -2973,6 +2985,13 @@ export function MarketSection(props: MarketSectionProps) {
|
|
|
2973
2985
|
setRecords(list => drop(list, recovered.id))
|
|
2974
2986
|
recoveredInstall.current = null
|
|
2975
2987
|
}
|
|
2988
|
+
// Same release for the record this mount created: an install
|
|
2989
|
+
// that died without a response must not leave the Tasks entry
|
|
2990
|
+
// "Installing 1/1" either (#904).
|
|
2991
|
+
setRecords(list => list.map(record =>
|
|
2992
|
+
record.kind === 'install' && record.url === url && record.state === 'running'
|
|
2993
|
+
? { ...record, state: 'failed' as const, reason: t('installFail') }
|
|
2994
|
+
: record))
|
|
2976
2995
|
setBusyUrl(null)
|
|
2977
2996
|
setInstallError(t('installFail') + ' — ' + t('exportLog'))
|
|
2978
2997
|
}
|