@michengai/dsh-codex-ui 2.4.0 → 2.4.1
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/CHANGELOG.md +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/lib/client.js +48 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.1] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
- **Fix Network Noise and Continuous Error Logs When Theme Feature is Disabled (Issue #107)**:
|
|
6
|
+
- Fixed an issue where disabling the theme feature in configuration caused the client to continuously request theme status and log 404 network errors in DevTools;
|
|
7
|
+
- Improved the status probing behavior so failed probes back off and stop polling indefinitely, keeping the network panel and error count clean without background noise.
|
|
8
|
+
|
|
3
9
|
## [2.4.0] - 2026-11-20
|
|
4
10
|
|
|
5
11
|
- **Searchable, keyboard-friendly workspace menu on the new-session page (PR #106)**:
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [2.4.1] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
- **修复主题子插件停用时的网络异常与持续报错(Issue #107)**:
|
|
6
|
+
- 修复了在配置中停用主题功能后,桌面端和网页端仍会持续尝试请求主题状态并产生 404 错误日志的问题;
|
|
7
|
+
- 优化了插件状态探活机制,探测失败时有界退避并自动终止轮询,避免在控制台和开发者工具网络面板中持续产生红色错误记录,保持网络请求和错误徽标干净。
|
|
8
|
+
|
|
3
9
|
## [2.4.0] - 2026-11-20
|
|
4
10
|
|
|
5
11
|
- **欢迎页工作区菜单支持搜索与键盘挑选(PR #106)**:
|
package/lib/client.js
CHANGED
|
@@ -3681,20 +3681,30 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3681
3681
|
//#region src/client/theme/index.ts
|
|
3682
3682
|
let globalThemeRuntime;
|
|
3683
3683
|
/**
|
|
3684
|
-
*
|
|
3685
|
-
*
|
|
3684
|
+
* 读取主题子插件在 Host 侧的状态。
|
|
3685
|
+
* 返回 enabled(是否激活)和 explicitlyDisabled(是否为服务端明确回报的停用)。
|
|
3686
3686
|
*/
|
|
3687
|
-
async function
|
|
3687
|
+
async function fetchThemeSubPluginStatus() {
|
|
3688
3688
|
try {
|
|
3689
3689
|
const base = typeof document !== "undefined" && document.baseURI ? document.baseURI : "http://localhost";
|
|
3690
3690
|
const normalizedBase = base.endsWith("/") ? base : `${base}/`;
|
|
3691
3691
|
const path = CODEX_UI_API_ENDPOINTS.theme.startsWith("/") ? CODEX_UI_API_ENDPOINTS.theme.slice(1) : CODEX_UI_API_ENDPOINTS.theme;
|
|
3692
3692
|
const url = new URL(path, normalizedBase).href;
|
|
3693
3693
|
const res = await fetch(url);
|
|
3694
|
-
if (!res.ok) return
|
|
3695
|
-
|
|
3694
|
+
if (!res.ok) return {
|
|
3695
|
+
enabled: false,
|
|
3696
|
+
explicitlyDisabled: false
|
|
3697
|
+
};
|
|
3698
|
+
const data = await res.json();
|
|
3699
|
+
return {
|
|
3700
|
+
enabled: data?.enabled === true,
|
|
3701
|
+
explicitlyDisabled: data?.enabled === false
|
|
3702
|
+
};
|
|
3696
3703
|
} catch {
|
|
3697
|
-
return
|
|
3704
|
+
return {
|
|
3705
|
+
enabled: false,
|
|
3706
|
+
explicitlyDisabled: false
|
|
3707
|
+
};
|
|
3698
3708
|
}
|
|
3699
3709
|
}
|
|
3700
3710
|
function tolerantRegistration(run) {
|
|
@@ -3931,11 +3941,13 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3931
3941
|
disposers.push(() => clearInterval(timer));
|
|
3932
3942
|
}
|
|
3933
3943
|
let healTimer;
|
|
3934
|
-
|
|
3944
|
+
let startupRetryCount = 0;
|
|
3945
|
+
const MAX_STARTUP_RETRIES = 3;
|
|
3946
|
+
const checkAndSync = async (allowStartupRetry = false) => {
|
|
3935
3947
|
if (disposed) return;
|
|
3936
|
-
const
|
|
3948
|
+
const status = await fetchThemeSubPluginStatus();
|
|
3937
3949
|
if (disposed) return;
|
|
3938
|
-
if (!enabled) {
|
|
3950
|
+
if (!status.enabled) {
|
|
3939
3951
|
setThemeSubPluginEnabled(false);
|
|
3940
3952
|
disposeGlassMode();
|
|
3941
3953
|
removeThemeSurfaceStyles();
|
|
@@ -3945,21 +3957,39 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3945
3957
|
restoreNativeThemePresentation(theme ?? globalThemeRuntime);
|
|
3946
3958
|
hasAppliedCustomTheme = false;
|
|
3947
3959
|
}
|
|
3948
|
-
if (
|
|
3949
|
-
if (
|
|
3950
|
-
|
|
3960
|
+
if (status.explicitlyDisabled) {
|
|
3961
|
+
if (healTimer) {
|
|
3962
|
+
clearTimeout(healTimer);
|
|
3963
|
+
healTimer = void 0;
|
|
3964
|
+
}
|
|
3965
|
+
return;
|
|
3966
|
+
}
|
|
3967
|
+
if (allowStartupRetry && startupRetryCount < MAX_STARTUP_RETRIES) {
|
|
3968
|
+
startupRetryCount++;
|
|
3969
|
+
if (!healTimer) {
|
|
3970
|
+
const delay = startupRetryCount * 1e3;
|
|
3971
|
+
healTimer = setTimeout(() => {
|
|
3972
|
+
healTimer = void 0;
|
|
3973
|
+
if (!disposed) checkAndSync(true);
|
|
3974
|
+
}, delay);
|
|
3975
|
+
}
|
|
3976
|
+
} else if (healTimer) {
|
|
3977
|
+
clearTimeout(healTimer);
|
|
3978
|
+
healTimer = void 0;
|
|
3979
|
+
}
|
|
3951
3980
|
return;
|
|
3952
3981
|
}
|
|
3953
3982
|
if (healTimer) {
|
|
3954
|
-
|
|
3983
|
+
clearTimeout(healTimer);
|
|
3955
3984
|
healTimer = void 0;
|
|
3956
3985
|
}
|
|
3986
|
+
startupRetryCount = 0;
|
|
3957
3987
|
setThemeSubPluginEnabled(true);
|
|
3958
3988
|
applyCurrentState(true);
|
|
3959
3989
|
};
|
|
3960
3990
|
globalCheckAndSync = checkAndSync;
|
|
3961
3991
|
const onFocus = () => {
|
|
3962
|
-
if (!disposed) checkAndSync();
|
|
3992
|
+
if (!disposed) checkAndSync(false);
|
|
3963
3993
|
};
|
|
3964
3994
|
if (typeof window !== "undefined") {
|
|
3965
3995
|
window.addEventListener("focus", onFocus);
|
|
@@ -3972,7 +4002,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3972
4002
|
if (e.target?.closest?.("[data-plugin-rows], [data-plugin-row], [data-shortcut-modal=\"settings\"], [role=\"switch\"]")) {
|
|
3973
4003
|
if (clickTimer) clearTimeout(clickTimer);
|
|
3974
4004
|
clickTimer = setTimeout(() => {
|
|
3975
|
-
if (!disposed) checkAndSync();
|
|
4005
|
+
if (!disposed) checkAndSync(false);
|
|
3976
4006
|
}, 150);
|
|
3977
4007
|
}
|
|
3978
4008
|
};
|
|
@@ -3994,7 +4024,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3994
4024
|
if (touchesSettings) {
|
|
3995
4025
|
if (settingsObserverTimer) clearTimeout(settingsObserverTimer);
|
|
3996
4026
|
settingsObserverTimer = setTimeout(() => {
|
|
3997
|
-
if (!disposed) checkAndSync();
|
|
4027
|
+
if (!disposed) checkAndSync(false);
|
|
3998
4028
|
}, 150);
|
|
3999
4029
|
}
|
|
4000
4030
|
});
|
|
@@ -4009,7 +4039,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
4009
4039
|
observer.disconnect();
|
|
4010
4040
|
});
|
|
4011
4041
|
}
|
|
4012
|
-
checkAndSync();
|
|
4042
|
+
checkAndSync(true);
|
|
4013
4043
|
applyCurrentState(false);
|
|
4014
4044
|
const offThemeChange = ctx.on("theme/change", () => {
|
|
4015
4045
|
if (disposed || !isThemeSubPluginEnabled()) return;
|
|
@@ -4024,7 +4054,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
4024
4054
|
return () => {
|
|
4025
4055
|
disposed = true;
|
|
4026
4056
|
if (globalCheckAndSync === checkAndSync) globalCheckAndSync = void 0;
|
|
4027
|
-
if (healTimer)
|
|
4057
|
+
if (healTimer) clearTimeout(healTimer);
|
|
4028
4058
|
unsubscribe();
|
|
4029
4059
|
offThemeChange?.();
|
|
4030
4060
|
disposeGlassMode();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤、模块化侧栏与桌面原生窗口菜单 · Input enhancement, settings skin, native glass theme, modular sidebar, and desktop titlebar menu for DSH",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|