@dungsil/dsh-plugin-ui-sidebar-inbox 0.2.1 → 0.2.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.md +12 -2
- package/assets/sidebar-preview-dark.webp +0 -0
- package/assets/sidebar-preview.webp +0 -0
- package/dist/client.js +47 -28
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -4,9 +4,19 @@ DSH의 기존 사이드바 모양을 유지하면서, 프로젝트별 목록을
|
|
|
4
4
|
|
|
5
5
|
기존 `@dungsil/dsh-plugin-sidebar-inbox`를 대체하는 패키지이며, 새 이름의 첫 버전은 `0.1.0`입니다. 기존 패키지의 모든 버전은 사용 중단(deprecated) 대상입니다. 기존 패키지를 비활성화하고 새 패키지를 설치·활성화합니다. 두 패키지를 동시에 활성화하지 마세요. 기존 정렬 선택과 이전 정렬 복원 설정은 유지됩니다.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 미리보기
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**라이트 · 영어** — 왼쪽은 Archived 접힘, 오른쪽은 펼침 상태입니다.
|
|
10
|
+
|
|
11
|
+
<img src="./assets/sidebar-preview.webp" alt="라이트 테마의 Sidebar Inbox: 상단의 고정·수신함 세션과 하단 Working 목록, 왼쪽 Archived 접힘과 오른쪽 펼침 비교" width="720" />
|
|
12
|
+
|
|
13
|
+
**다크 · 한국어** — 같은 예시 세션에서 보관됨의 접힘·펼침을 비교합니다.
|
|
14
|
+
|
|
15
|
+
<img src="./assets/sidebar-preview-dark.webp" alt="다크 테마의 한국어 Sidebar Inbox: 상단의 고정·수신함 세션과 하단 작업 중 목록, 왼쪽 보관됨 접힘과 오른쪽 펼침 비교" width="720" />
|
|
16
|
+
|
|
17
|
+
DSH `0.2.1-rc.5`의 별도 검증용 `web` 프로필에 최신 빌드한 플러그인을 활성화하고, 실제 DSH 웹 화면의 사이드바를 DPR 2로 캡처해 테마별로 나란히 배치했습니다. 한국어 화면에는 저장소의 `@dungsil/dsh-plugin-locale-ko`를 함께 활성화했습니다. 세션 제목은 두 언어 화면에서 동일한 영어 예시 데이터입니다.
|
|
18
|
+
|
|
19
|
+
캡처 전용 서버 fixture로 예시 세션 7개를 생성했습니다. 고정 1개와 보관 2개는 DSH의 실제 고정·보관 API로 설정하고, Working 2개는 세션 목록의 실행 상태를 fixture로 제공했습니다. 실제 모델 작업을 실행한 기록은 아닙니다. 세션 필터는 `모든 대화 (보관된 세션 포함)`이며, 행·상태 아이콘·테마·접힘과 펼침은 실제 DSH 및 이 플러그인의 렌더링입니다. Pinned와 Inbox에는 별도 제목이 없는 원래 배치를 그대로 보여줍니다.
|
|
10
20
|
|
|
11
21
|
## 배치 규칙
|
|
12
22
|
|
|
Binary file
|
|
Binary file
|
package/dist/client.js
CHANGED
|
@@ -123,6 +123,7 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
123
123
|
archiveAnimations.get(tree)?.();
|
|
124
124
|
const pane = panes.get(tree);
|
|
125
125
|
if (!pane) return;
|
|
126
|
+
pane.stopScrolling();
|
|
126
127
|
const slot = document.createElement("slot");
|
|
127
128
|
slot.dataset.dshInboxNative = "";
|
|
128
129
|
pane.root.replaceChildren(slot);
|
|
@@ -151,7 +152,14 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
151
152
|
::-webkit-scrollbar-thumb:hover { background-color: var(--dsh-scrollbar-thumb-hover); }
|
|
152
153
|
::-webkit-scrollbar-corner { background: transparent; }
|
|
153
154
|
.main { flex: 1; }
|
|
154
|
-
.footer {
|
|
155
|
+
.footer {
|
|
156
|
+
flex: none; max-block-size: 50%;
|
|
157
|
+
--dsh-scrollbar-thumb: transparent; --dsh-scrollbar-thumb-hover: transparent;
|
|
158
|
+
}
|
|
159
|
+
.footer[data-scrolling] {
|
|
160
|
+
--dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
|
|
161
|
+
--dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
|
|
162
|
+
}
|
|
155
163
|
@media (prefers-reduced-motion: reduce) { .footer { transition: none !important; } }
|
|
156
164
|
::slotted(*) { display: block; }
|
|
157
165
|
`;
|
|
@@ -165,12 +173,23 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
165
173
|
slot.name = "dsh-inbox-footer";
|
|
166
174
|
footer.append(slot);
|
|
167
175
|
const notifyScroll = () => tree.dispatchEvent(new Event("scroll"));
|
|
176
|
+
let scrollTimeout;
|
|
177
|
+
const stopScrolling = () => {
|
|
178
|
+
clearTimeout(scrollTimeout);
|
|
179
|
+
delete footer.dataset.scrolling;
|
|
180
|
+
};
|
|
168
181
|
main.addEventListener("scroll", notifyScroll);
|
|
169
|
-
footer.addEventListener("scroll",
|
|
182
|
+
footer.addEventListener("scroll", () => {
|
|
183
|
+
clearTimeout(scrollTimeout);
|
|
184
|
+
footer.dataset.scrolling = "";
|
|
185
|
+
scrollTimeout = setTimeout(stopScrolling, 150);
|
|
186
|
+
notifyScroll();
|
|
187
|
+
});
|
|
170
188
|
root.replaceChildren(sheet, main, footer);
|
|
171
189
|
panes.set(tree, {
|
|
172
190
|
root,
|
|
173
|
-
footer
|
|
191
|
+
footer,
|
|
192
|
+
stopScrolling
|
|
174
193
|
});
|
|
175
194
|
};
|
|
176
195
|
const sizeFooters = () => {
|
|
@@ -352,33 +371,33 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
352
371
|
}
|
|
353
372
|
};
|
|
354
373
|
}
|
|
374
|
+
// ../../tools/ui/src/icons/activity.svg
|
|
375
|
+
var activity_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M3 12h4l3-8 4 16 3-8h4\"/>\n</svg>\n";
|
|
376
|
+
// ../../tools/ui/src/icons/check.svg
|
|
377
|
+
var check_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m4 13 5 5L20 6\"/>\n</svg>\n";
|
|
378
|
+
// ../../tools/ui/src/icons-dom.ts
|
|
379
|
+
/** Accepts only trusted SVG assets bundled at build time. */
|
|
380
|
+
function createIconGlyph(svg) {
|
|
381
|
+
const template = document.createElement("template");
|
|
382
|
+
template.innerHTML = svg;
|
|
383
|
+
return template.content.querySelector("svg");
|
|
384
|
+
}
|
|
355
385
|
// src/menu.ts
|
|
386
|
+
/**
|
|
387
|
+
* Add one row to the native View Options menu without forking ui-workspace.
|
|
388
|
+
*
|
|
389
|
+
* DSH 0.2.x renders that menu from a hardcoded item list and exposes no slot,
|
|
390
|
+
* so the row is injected into the portaled menu DOM. The menu primitive walks
|
|
391
|
+
* `button[role="menuitem"]` nodes for its keyboard order, so an injected row
|
|
392
|
+
* joins the arrow/Tab walk for free; activation closes the menu through the
|
|
393
|
+
* same Escape path the primitive already handles, which also returns focus to
|
|
394
|
+
* the trigger. Only classes and spans are read from the native rows, so the
|
|
395
|
+
* injected row keeps the shipped styling without naming any hashed class.
|
|
396
|
+
*/
|
|
356
397
|
/** ui-workspace passes this CSS-module class to the View Options menu only. */
|
|
357
398
|
const MENU_SELECTOR = "[role=\"menu\"][class*=\"viewOptionsMenu\"]";
|
|
358
399
|
/** Marker on the injected wrapper so refreshes recognize their own node. */
|
|
359
400
|
const ROW_ATTRIBUTE = "data-dsh-inbox-sort-item";
|
|
360
|
-
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
361
|
-
/** Stroke glyph for "agent activity": a pulse line in the shipped icon grid. */
|
|
362
|
-
const ACTIVITY_PATH = "M2.25 8.5h2.9l1.55-4.5 2.55 8 1.55-4.5h2.95";
|
|
363
|
-
/** Fallback check glyph, used only when no selected native row exists to copy. */
|
|
364
|
-
const CHECK_PATH = "M2.25 8.5L5.5 11.75C5.9 12.15 6.57 12.13 6.95 11.7L13.75 4";
|
|
365
|
-
function createGlyph(path) {
|
|
366
|
-
const svg = document.createElementNS(SVG_NS, "svg");
|
|
367
|
-
svg.setAttribute("width", "16");
|
|
368
|
-
svg.setAttribute("height", "16");
|
|
369
|
-
svg.setAttribute("viewBox", "0 0 16 16");
|
|
370
|
-
svg.setAttribute("fill", "none");
|
|
371
|
-
svg.setAttribute("xmlns", SVG_NS);
|
|
372
|
-
svg.setAttribute("aria-hidden", "true");
|
|
373
|
-
const line = document.createElementNS(SVG_NS, "path");
|
|
374
|
-
line.setAttribute("d", path);
|
|
375
|
-
line.setAttribute("stroke", "currentColor");
|
|
376
|
-
line.setAttribute("stroke-width", "1");
|
|
377
|
-
line.setAttribute("stroke-linecap", "round");
|
|
378
|
-
line.setAttribute("stroke-linejoin", "round");
|
|
379
|
-
svg.append(line);
|
|
380
|
-
return svg;
|
|
381
|
-
}
|
|
382
401
|
/** A native row wraps one `role="menuitem"` button, optionally after a group separator. */
|
|
383
402
|
function isMenuRow(node) {
|
|
384
403
|
return node.tagName === "DIV" && [...node.children].some((child) => child.tagName === "BUTTON" && child.getAttribute("role") === "menuitem");
|
|
@@ -423,7 +442,7 @@ function buildRow(anchor, options) {
|
|
|
423
442
|
if (iconTemplate !== void 0) {
|
|
424
443
|
const icon = document.createElement("span");
|
|
425
444
|
icon.className = iconTemplate.className;
|
|
426
|
-
icon.append(
|
|
445
|
+
icon.append(createIconGlyph(activity_default));
|
|
427
446
|
button.append(icon);
|
|
428
447
|
}
|
|
429
448
|
const labelTemplate = [...template.children].find((child) => child.tagName === "SPAN" && child.querySelector("svg") === null && !child.hasAttribute("aria-hidden"));
|
|
@@ -456,7 +475,7 @@ function closeMenu() {
|
|
|
456
475
|
}
|
|
457
476
|
function syncCheck(button, active, check) {
|
|
458
477
|
const existing = [...button.children].find((child) => child.tagName === "svg");
|
|
459
|
-
if (active && existing === void 0) button.append(check === null ?
|
|
478
|
+
if (active && existing === void 0) button.append(check === null ? createIconGlyph(check_default) : check.cloneNode(true));
|
|
460
479
|
else if (!active && existing !== void 0) existing.remove();
|
|
461
480
|
if (active) button.setAttribute("aria-current", "true");
|
|
462
481
|
else button.removeAttribute("aria-current");
|
|
@@ -641,7 +660,7 @@ function apply(ctx) {
|
|
|
641
660
|
orderBy: AGENT_ACTIVITY
|
|
642
661
|
});
|
|
643
662
|
};
|
|
644
|
-
ctx.slots.inject("sidebar.workspaces.session.
|
|
663
|
+
ctx.slots.inject("sidebar.workspaces.session.row.action", () => {
|
|
645
664
|
const entry = ctx.slots.entries("sidebar.workspaces").find((candidate) => candidate.registrant === "@deepseek-ai/dsh-client-ui-workspace") ?? ctx.slots.entries("sidebar.workspaces").find((candidate) => (candidate.options.priority ?? 0) === 0);
|
|
646
665
|
if (!entry?.store || typeof entry.store === "function") throw new Error("Sidebar Inbox requires the DSH 0.2.1 workspace view store");
|
|
647
666
|
view = entry.store.create();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dungsil/dsh-plugin-ui-sidebar-inbox",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "State-based Inbox, Working and Archived sidebar ordering for DeepSeek Harness, selected from a native Agent activity sort option.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"locale",
|
|
13
|
+
"assets",
|
|
13
14
|
"cordis.patch.yml"
|
|
14
15
|
],
|
|
15
16
|
"type": "module",
|
|
@@ -23,28 +24,28 @@
|
|
|
23
24
|
"access": "public"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@deepseek-ai/cordis": "4.0
|
|
27
|
-
"@deepseek-ai/dsh-api-session-controller": "0.2.
|
|
28
|
-
"@deepseek-ai/dsh-api-workspace-controller": "0.2.
|
|
29
|
-
"@deepseek-ai/dsh-client-locale": "0.2.
|
|
30
|
-
"@deepseek-ai/dsh-client-store": "0.2.
|
|
31
|
-
"@deepseek-ai/dsh-client-ui-
|
|
32
|
-
"@deepseek-ai/dsh-client-ui-
|
|
33
|
-
"@deepseek-ai/dsh-client-ui-
|
|
34
|
-
"@deepseek-ai/dsh-client-ui-
|
|
35
|
-
"@deepseek-ai/dsh-client-ui-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.5",
|
|
27
|
+
"@deepseek-ai/cordis": "4.1.0",
|
|
28
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.1",
|
|
29
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.2-rc.1",
|
|
30
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
|
|
31
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
|
|
32
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
|
|
33
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.1",
|
|
34
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-rc.1",
|
|
35
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
|
|
36
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.1",
|
|
37
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.1",
|
|
38
38
|
"@dungsil/dsh-tsconfig": "0.0.0",
|
|
39
|
+
"@dungsil/dsh-tsdown": "0.0.0",
|
|
40
|
+
"@dungsil/dsh-ui": "0.0.0",
|
|
39
41
|
"@types/react": "18.3.18",
|
|
40
42
|
"@types/react-dom": "18.3.7",
|
|
41
|
-
"happy-dom": "21.0.4",
|
|
42
43
|
"react": "18.3.1",
|
|
43
44
|
"react-dom": "18.3.1",
|
|
44
45
|
"tsdown": "0.23.4"
|
|
45
46
|
},
|
|
46
47
|
"engines": {
|
|
47
|
-
"dsh": "^0.2.1-rc.5",
|
|
48
|
+
"dsh": "^0.2.1-rc.5 || ^0.2.2-rc.1",
|
|
48
49
|
"node": ">=24.9.0"
|
|
49
50
|
},
|
|
50
51
|
"dsh": {
|
|
@@ -84,7 +85,6 @@
|
|
|
84
85
|
},
|
|
85
86
|
"scripts": {
|
|
86
87
|
"build": "tsdown",
|
|
87
|
-
"typecheck": "tsc --noEmit"
|
|
88
|
-
"test": "node --test test/*.test.mjs"
|
|
88
|
+
"typecheck": "tsc --noEmit"
|
|
89
89
|
}
|
|
90
90
|
}
|