@michengai/dsh-codex-ui 2.4.8 → 2.4.9
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 +7 -0
- package/CHANGELOG.zh-CN.md +7 -0
- package/lib/client.js +27 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.9] - 2026-11-28
|
|
4
|
+
|
|
5
|
+
- **Fix Sidebar "New Session" Button and Quick Entry Placement When Coexisting with Claude Style (Issue #117)**:
|
|
6
|
+
- Keep the host's native "New Session" button intact whenever `Claude Style` (`body[data-dsh-claude-style]`) is active so its inline action styling no longer hides or crowds out the button label, and automatically restore the flat Codex style as soon as the theme is turned off;
|
|
7
|
+
- Treat the `Claude Style` search entry (`dsh-claude-style.search`) as a fixed pinned entry ordered before "Plugins" while preserving its direct search click handler (automatically restoring it from saved "More" layouts);
|
|
8
|
+
- Known limitation: while coexisting with `Claude Style`, keeping the native "New Session" button disables dragging sidebar panels onto the "New Session" row to pin them to the top; drop panels directly onto the pinned section instead.
|
|
9
|
+
|
|
3
10
|
## [2.4.8] - 2026-11-28
|
|
4
11
|
|
|
5
12
|
- **Preserve Third-Party New-Session Action Buttons in Sidebar (Issue #116)**:
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [2.4.9] - 2026-11-28
|
|
4
|
+
|
|
5
|
+
- **修复与 Claude Style 共存时侧栏「新会话」按钮异常与快捷入口位置问题(Issue #117)**:
|
|
6
|
+
- 检测到 `Claude Style`(`body[data-dsh-claude-style]`)启用时自动保留宿主原生「新会话」按钮,避免同行主操作标记被替换后造成按钮文字被挤掉或不可见,并在关闭该主题后实时恢复 Codex 扁平样式;
|
|
7
|
+
- 将 `Claude Style` 的搜索入口(`dsh-claude-style.search`)列为常驻固定入口并排在「插件管理」之前,保留其直接触发搜索的交互行为(即使此前被保存在「更多」折叠区也会自动恢复);
|
|
8
|
+
- 已知限制:与 `Claude Style` 共存时因保留宿主原生「新会话」按钮,面板拖拽「拖放至新会话行以置顶」交互暂不可用,请直接拖放至常驻面板区完成置顶排序。
|
|
9
|
+
|
|
3
10
|
## [2.4.8] - 2026-11-28
|
|
4
11
|
|
|
5
12
|
- **保留侧边栏第三方「新会话」扩展按钮入口(Issue #116)**:
|
package/lib/client.js
CHANGED
|
@@ -12427,8 +12427,11 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12427
12427
|
* 只保存「常驻顺序」与「收入更多的顺序」,入口本身仍由宿主注册与渲染。
|
|
12428
12428
|
* 纯函数,方便单测;不读写 localStorage。
|
|
12429
12429
|
*/
|
|
12430
|
-
/**
|
|
12431
|
-
|
|
12430
|
+
/**
|
|
12431
|
+
* 始终常驻的入口;Claude Style 搜索是直接操作,放在面板导航前。
|
|
12432
|
+
* 'dsh-claude-style.search' 源自 dsh-claude-style packages/client/src/features/search/search-trigger.ts (SEARCH_PANEL_ID)。
|
|
12433
|
+
*/
|
|
12434
|
+
const FIXED_PANEL_IDS = ["dsh-claude-style.search", "plugins"];
|
|
12432
12435
|
const SIDEBAR_LAYOUT_KEY = "michengai.codex-ui.sidebar-layout.v1";
|
|
12433
12436
|
const isStringArray$1 = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
12434
12437
|
/** 解析持久化内容;格式不符时返回 undefined,由调用方回退默认布局。 */
|
|
@@ -12711,7 +12714,7 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12711
12714
|
const isDraggingRef = (0, react.useRef)(null);
|
|
12712
12715
|
useNativeDragAcceptance((0, react.useCallback)(() => Boolean(isDraggingRef.current), []));
|
|
12713
12716
|
const commitDrop = (0, react.useCallback)((draggedId, zone, target) => {
|
|
12714
|
-
if (!draggedId ||
|
|
12717
|
+
if (!draggedId || isFixed(draggedId)) return;
|
|
12715
12718
|
const currentLayout = layoutRef.current;
|
|
12716
12719
|
if (target === "__more_trigger__") {
|
|
12717
12720
|
const next = moveEntry(currentLayout, {
|
|
@@ -12748,7 +12751,7 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12748
12751
|
if (zone === "more") setMoreOpen(true);
|
|
12749
12752
|
}, [persistLayout]);
|
|
12750
12753
|
const handleDragStart = (0, react.useCallback)((e, id, label) => {
|
|
12751
|
-
if (
|
|
12754
|
+
if (isFixed(id)) {
|
|
12752
12755
|
e.preventDefault();
|
|
12753
12756
|
return;
|
|
12754
12757
|
}
|
|
@@ -12773,7 +12776,7 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12773
12776
|
e.stopPropagation();
|
|
12774
12777
|
if (e.dataTransfer) e.dataTransfer.dropEffect = "move";
|
|
12775
12778
|
const list = zone === "pinned" ? layoutRef.current.pinned : layoutRef.current.more;
|
|
12776
|
-
if (targetId
|
|
12779
|
+
if (isFixed(targetId)) {
|
|
12777
12780
|
const firstPanel = list[0];
|
|
12778
12781
|
updateDragOver({
|
|
12779
12782
|
zone: "pinned",
|
|
@@ -12881,9 +12884,9 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12881
12884
|
"data-zone": "pinned",
|
|
12882
12885
|
onDragOver: (e) => handleDragOverZone(e, "pinned"),
|
|
12883
12886
|
onDrop: (e) => handleDropZone(e, "pinned"),
|
|
12884
|
-
children: [fixedPanels.map((panel) => {
|
|
12887
|
+
children: [fixedPanels.map((panel, index) => {
|
|
12885
12888
|
const active = activePanelId === panel.id;
|
|
12886
|
-
const
|
|
12889
|
+
const showDropAfter = index === fixedPanels.length - 1 && dragOver?.zone === "pinned" && dragOver.target === "__end__" && userPinnedPanels.length === 0;
|
|
12887
12890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
12888
12891
|
type: "button",
|
|
12889
12892
|
className: `dcu-sb-row ${active ? "dcu-sb-row-active" : ""}`,
|
|
@@ -12891,15 +12894,9 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12891
12894
|
title: t("sidebar.fixed", "始终常驻"),
|
|
12892
12895
|
"aria-current": active ? "page" : void 0,
|
|
12893
12896
|
"data-dcu-panel-id": panel.id,
|
|
12894
|
-
"data-drag-over":
|
|
12897
|
+
"data-drag-over": showDropAfter ? "after" : void 0,
|
|
12895
12898
|
draggable: false,
|
|
12896
12899
|
onClick: () => handleSelectPanel(panel.id),
|
|
12897
|
-
onKeyDown: (e) => {
|
|
12898
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
12899
|
-
e.preventDefault();
|
|
12900
|
-
handleSelectPanel(panel.id);
|
|
12901
|
-
}
|
|
12902
|
-
},
|
|
12903
12900
|
onDragOver: (e) => handleDragOverRow(e, panel.id, "pinned"),
|
|
12904
12901
|
onDragLeave: (e) => handleDragLeaveRow(e, panel.id),
|
|
12905
12902
|
onDrop: (e) => handleDropRow(e, panel.id, "pinned"),
|
|
@@ -13496,6 +13493,8 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13496
13493
|
//#endregion
|
|
13497
13494
|
//#region src/client/sidebar/index.ts
|
|
13498
13495
|
const CONTAINER_CLASS = "dcu-sidebar-nav-root";
|
|
13496
|
+
/** 上游出处:dsh-claude-style packages/client/src/constants.ts (STYLE_STAMP_ATTR) 写入 document.body 的标记属性。 */
|
|
13497
|
+
const CLAUDE_STYLE_ATTR = "data-dsh-claude-style";
|
|
13499
13498
|
function resolveNewSessionLabel(ctx, t) {
|
|
13500
13499
|
try {
|
|
13501
13500
|
const direct = t?.("sidebar.newSession");
|
|
@@ -13506,15 +13505,24 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13506
13505
|
return "新会话";
|
|
13507
13506
|
}
|
|
13508
13507
|
function createSessionActionLayer(ctx) {
|
|
13508
|
+
const shouldReplace = () => getSidebarEnabled() && (typeof document === "undefined" || !document.body?.hasAttribute(CLAUDE_STYLE_ATTR));
|
|
13509
13509
|
const SessionActionLayer = ({ wide = false, children, t }) => {
|
|
13510
|
-
const [
|
|
13510
|
+
const [replace, setReplace] = (0, react.useState)(shouldReplace);
|
|
13511
13511
|
(0, react.useEffect)(() => {
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
|
|
13512
|
+
const sync = () => setReplace(shouldReplace());
|
|
13513
|
+
const unsubscribe = subscribeSidebarEnabled(sync);
|
|
13514
|
+
const observer = new MutationObserver(sync);
|
|
13515
|
+
observer.observe(document.body, {
|
|
13516
|
+
attributes: true,
|
|
13517
|
+
attributeFilter: [CLAUDE_STYLE_ATTR]
|
|
13515
13518
|
});
|
|
13519
|
+
sync();
|
|
13520
|
+
return () => {
|
|
13521
|
+
observer.disconnect();
|
|
13522
|
+
unsubscribe();
|
|
13523
|
+
};
|
|
13516
13524
|
}, []);
|
|
13517
|
-
if (!
|
|
13525
|
+
if (!replace || !wide || !resolveStartSession(ctx)) return react.default.createElement(react.default.Fragment, null, children);
|
|
13518
13526
|
return react.default.createElement(NewSessionButton, {
|
|
13519
13527
|
ctx,
|
|
13520
13528
|
label: resolveNewSessionLabel(ctx, t),
|
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.9",
|
|
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": {
|