@dungsil/dsh-plugin-ui-sidebar-inbox 0.1.0 → 0.2.0
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 +6 -6
- package/dist/client.js +51 -8
- package/locale/zh.json +6 -0
- package/package.json +14 -11
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @dungsil/dsh-plugin-ui-sidebar-inbox
|
|
2
2
|
|
|
3
|
-
DSH의 기존 사이드바 모양을 유지하면서, 프로젝트별 목록을 T3 Code Nightly처럼 상태별 목록으로 배치합니다.
|
|
3
|
+
DSH의 기존 사이드바 모양을 유지하면서, 프로젝트별 목록을 T3 Code Nightly처럼 상태별 목록으로 배치합니다. 설치 후 최초 활성화 시 `[그룹 기준] > [하나의 목록]`과 `[정렬 기준] > [에이전트 활동]`을 자동으로 선택합니다. 이후 사용자가 바꾼 보기 옵션은 유지합니다.
|
|
4
4
|
|
|
5
5
|
기존 `@dungsil/dsh-plugin-sidebar-inbox`를 대체하는 패키지이며, 새 이름의 첫 버전은 `0.1.0`입니다. 기존 패키지의 모든 버전은 사용 중단(deprecated) 대상입니다. 기존 패키지를 비활성화하고 새 패키지를 설치·활성화합니다. 두 패키지를 동시에 활성화하지 마세요. 기존 정렬 선택과 이전 정렬 복원 설정은 유지됩니다.
|
|
6
6
|
|
|
@@ -21,14 +21,14 @@ DSH `0.2.2-alpha.2`의 영어 UI에서 예시 세션으로 촬영한 화면입
|
|
|
21
21
|
|
|
22
22
|
목록 제목과 메뉴 항목은 DSH UI 언어를 따릅니다. 한국어 UI에서는 정렬 항목이 `에이전트 활동`, 영역 제목이 `작업 중`·`보관됨`으로 표시됩니다. 번역 사전은 이 플러그인이 직접 포함하므로 한국어 UI 언어 팩을 따로 설치하지 않아도 됩니다.
|
|
23
23
|
|
|
24
|
-
Pinned와 Inbox는 별도 제목 없이 위쪽 목록에 표시합니다. Working과 Archived는
|
|
24
|
+
Pinned와 Inbox는 별도 제목 없이 위쪽 목록에 표시합니다. Working과 Archived는 펼친 영역의 전체 높이가 사이드바 표시 영역에 들어갈 때 하단에 붙어 있습니다. 높이가 표시 영역을 넘으면 하단 고정을 해제하므로 제목과 모든 세션을 목록 스크롤로 확인할 수 있습니다. 영역을 접거나 사이드바 높이를 늘려 다시 들어가면 하단 고정이 복원됩니다. 기본값은 Working을 펼치고 Archived를 접은 상태입니다. 두 제목을 누르거나 키보드로 활성화하면 각 영역이 부드럽게 펼쳐지고 접힙니다. Archived는 세션 필터가 `모든 대화 (보관된 세션 포함)`일 때만 접을 수 있습니다. `보관된 세션만` 필터에서는 보관한 세션이 목록 전체이므로 접지 않고 그대로 표시합니다. 새로고침하면 기본값으로 돌아갑니다.
|
|
25
25
|
|
|
26
26
|
이 배치와 제목은 `그룹 기준`이 `하나의 목록`일 때만 적용됩니다. `작업 공간`·`작업 공간 트리` 그룹에서는 DSH 기본 표시를 따르며, 정렬을 켠 채 그룹 기준을 바꾸면 자동으로 해제됩니다.
|
|
27
27
|
|
|
28
28
|
## 사용법
|
|
29
29
|
|
|
30
|
-
1.
|
|
31
|
-
2.
|
|
30
|
+
1. 설치 후 최초 활성화하면 **하나의 목록 / 에이전트 활동**이 자동으로 적용됩니다. 세션 필터는 바꾸지 않습니다.
|
|
31
|
+
2. 나중에 다시 켜려면 사이드바의 **보기 옵션**(필터 아이콘)에서 **그룹 기준**을 **하나의 목록**, **정렬 기준**을 **에이전트 활동**으로 맞춥니다.
|
|
32
32
|
3. 그만 쓰려면 **수동**이나 **최근 수정일**을 선택하거나 같은 **에이전트 활동** 항목을 다시 선택합니다. 전자는 고른 정렬로 바뀌고, 후자는 에이전트 활동을 켜기 전에 쓰던 정렬로 돌아갑니다.
|
|
33
33
|
4. 정리할 세션의 `⋯` 메뉴에서 `세션 보관`을 선택합니다.
|
|
34
34
|
5. 사이드바의 세션 필터를 `모든 대화 (보관된 세션 포함)`으로 바꾸면 보관한 세션이 하단 `Archived` 영역에 접힌 채로 표시됩니다.
|
|
@@ -55,7 +55,7 @@ DSH의 플러그인 관리 화면에서 **Sidebar Inbox / 사이드바 수신함
|
|
|
55
55
|
|
|
56
56
|
## 동작 범위
|
|
57
57
|
|
|
58
|
-
-
|
|
58
|
+
- 이전 정렬 복원 설정이 없는 새 설치에서는 최초 활성화 시에만 `하나의 목록 / 에이전트 활동`을 적용합니다. 기존 복원 설정이 있으면 사용자가 선택한 보기 옵션을 유지하며, 새로고침이나 재활성화로 정렬을 강제로 켜지 않습니다. 브라우저 저장소를 사용할 수 없으면 자동 적용하지 않습니다. `세션 필터`는 바꾸지 않으며, `에이전트 활동` 정렬을 선택한 동안에만 순서를 계산합니다.
|
|
59
59
|
- 플러그인은 DSH의 공유 Workspace 보기 저장소에 `agent-activity` 정렬 값을 저장합니다. DSH는 이 값을 수동 정렬처럼 읽으므로 화면 순서와 DOM 순서가 일치하고, 새로고침 후에도 선택이 유지됩니다.
|
|
60
60
|
- 정렬은 `그룹 기준`이 `하나의 목록`일 때만 활성화됩니다. 다른 그룹 기준에서는 보기 옵션의 `에이전트 활동` 항목이 비활성화되고, 정렬을 켠 채 그룹 기준을 바꾸면 이전 정렬 기준으로 자동 해제됩니다. 정렬을 선택한 동안에는 `하나의 목록`의 순서만 갱신합니다.
|
|
61
61
|
- 행을 드래그하면 DSH가 수동 정렬로 전환하므로 에이전트 활동이 자동으로 해제됩니다. DSH의 정렬 변경 규칙을 그대로 따르므로, 에이전트 활동을 켜기 전에 드래그해 둔 수동 배치는 복원되지 않습니다.
|
|
@@ -74,4 +74,4 @@ pnpm --filter @dungsil/dsh-plugin-ui-sidebar-inbox typecheck
|
|
|
74
74
|
pnpm --filter @dungsil/dsh-plugin-ui-sidebar-inbox test
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
자동 테스트는 기본
|
|
77
|
+
자동 테스트는 새 설치에서의 기본 정렬 적용과 이후 선택 유지, 정렬 항목 주입과 키보드 순서·선택 표시, 하나의 목록에서의 상태별 순서, 그룹 기준이 다를 때 정렬 항목 비활성화와 자동 해제, 보관한 세션의 하단 배치, 보관 필터별 표시, Working과 Archived의 기본 펼침·접힘과 제목 토글, 보관 해제 반영, UI 언어 전환에 따른 제목 갱신, 정렬 해제와 이전 정렬 복원을 확인합니다.
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({ id: "@dungsil/dsh-plugin-ui-sidebar-inbox", factory(require) { const module = { exports: {} }; const exports = module.exports;
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_dom_client = require("react-dom/client");
|
|
5
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
3
6
|
// src/inbox.ts
|
|
4
7
|
/**
|
|
5
8
|
* Archive is DSH's own explicit state, not a synonym for completion or viewing a
|
|
@@ -53,6 +56,7 @@ function placeSessions(list, statuses, pinned, archived) {
|
|
|
53
56
|
*/
|
|
54
57
|
function installHeadings(placements, labels, archivedCollapsible, active = () => true) {
|
|
55
58
|
const headings = /* @__PURE__ */ new Map();
|
|
59
|
+
const icons = /* @__PURE__ */ new Map();
|
|
56
60
|
const trees = /* @__PURE__ */ new Set();
|
|
57
61
|
const wrappers = /* @__PURE__ */ new Set();
|
|
58
62
|
/** Each footer opens independently; a reload resets to these defaults. */
|
|
@@ -69,6 +73,9 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
69
73
|
position: sticky; z-index: 1; background: var(--dsw-specific-sidebar-fill);
|
|
70
74
|
bottom: var(--dsh-inbox-bottom, 0px);
|
|
71
75
|
}
|
|
76
|
+
/* A footer stack taller than the viewport overlaps its own heading and
|
|
77
|
+
pins rows in place even while scrolling. Let the native list scroll it. */
|
|
78
|
+
[data-dsh-inbox-overflow] > [data-dsh-inbox-footer] { position: static; }
|
|
72
79
|
[data-dsh-inbox-first] { margin-top: auto !important; }
|
|
73
80
|
/* Closed rows keep their box at zero height, so a heading press animates in
|
|
74
81
|
both directions without moving or cloning React-owned rows. */
|
|
@@ -92,11 +99,10 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
92
99
|
color: var(--dsw-alias-label-tertiary); font-weight: 500;
|
|
93
100
|
}
|
|
94
101
|
[data-dsh-inbox-heading] button {
|
|
95
|
-
display:
|
|
102
|
+
display: flex; align-items: center; width: 100%; padding: 0; border: 0; background: none;
|
|
96
103
|
color: inherit; font: inherit; text-align: left; cursor: pointer;
|
|
97
104
|
}
|
|
98
|
-
[data-dsh-inbox-heading] button
|
|
99
|
-
[data-dsh-inbox-heading] button[aria-expanded="true"]::before { content: '▾'; }
|
|
105
|
+
[data-dsh-inbox-heading] button > span:first-child { display: flex; flex: 0 0 16px; }
|
|
100
106
|
`;
|
|
101
107
|
document.head.append(style);
|
|
102
108
|
const clearWrapper = (wrapper) => {
|
|
@@ -114,6 +120,7 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
114
120
|
const height = wrapper.offsetHeight;
|
|
115
121
|
if (height > 0) bottom += height + 2;
|
|
116
122
|
}
|
|
123
|
+
tree.toggleAttribute("data-dsh-inbox-overflow", Math.max(0, bottom - 2) > tree.clientHeight);
|
|
117
124
|
}
|
|
118
125
|
};
|
|
119
126
|
const resize = new ResizeObserver(positionFooters);
|
|
@@ -128,12 +135,17 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
128
135
|
const wanted = /* @__PURE__ */ new Map();
|
|
129
136
|
const foldable = archivedCollapsible();
|
|
130
137
|
resize.disconnect();
|
|
131
|
-
for (const tree of trees)
|
|
138
|
+
for (const tree of trees) {
|
|
139
|
+
delete tree.dataset.dshInboxTree;
|
|
140
|
+
delete tree.dataset.dshInboxOverflow;
|
|
141
|
+
}
|
|
132
142
|
trees.clear();
|
|
133
143
|
for (const wrapper of wrappers) clearWrapper(wrapper);
|
|
134
144
|
wrappers.clear();
|
|
135
145
|
if (!active()) {
|
|
136
146
|
for (const [wrapper, heading] of headings) {
|
|
147
|
+
icons.get(heading)?.unmount();
|
|
148
|
+
icons.delete(heading);
|
|
137
149
|
heading.remove();
|
|
138
150
|
headings.delete(wrapper);
|
|
139
151
|
}
|
|
@@ -164,6 +176,8 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
164
176
|
if (trees.has(tree)) resize.observe(tree);
|
|
165
177
|
}
|
|
166
178
|
for (const [wrapper, heading] of headings) if (!wanted.has(wrapper)) {
|
|
179
|
+
icons.get(heading)?.unmount();
|
|
180
|
+
icons.delete(heading);
|
|
167
181
|
heading.remove();
|
|
168
182
|
headings.delete(wrapper);
|
|
169
183
|
}
|
|
@@ -177,6 +191,8 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
177
191
|
headings.set(wrapper, heading);
|
|
178
192
|
}
|
|
179
193
|
if (heading.dataset.dshInboxSection !== section) {
|
|
194
|
+
icons.get(heading)?.unmount();
|
|
195
|
+
icons.delete(heading);
|
|
180
196
|
heading.textContent = "";
|
|
181
197
|
heading.dataset.dshInboxSection = section;
|
|
182
198
|
}
|
|
@@ -184,6 +200,10 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
184
200
|
if (!button) {
|
|
185
201
|
button = document.createElement("button");
|
|
186
202
|
button.type = "button";
|
|
203
|
+
const icon = document.createElement("span");
|
|
204
|
+
icon.setAttribute("aria-hidden", "true");
|
|
205
|
+
icons.set(heading, (0, react_dom_client.createRoot)(icon));
|
|
206
|
+
button.append(icon, document.createElement("span"));
|
|
187
207
|
button.onclick = (event) => {
|
|
188
208
|
event.stopPropagation();
|
|
189
209
|
const current = heading.dataset.dshInboxSection;
|
|
@@ -194,9 +214,14 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
194
214
|
heading.append(button);
|
|
195
215
|
}
|
|
196
216
|
const text = section === "Archived" ? labels().archived : labels().working;
|
|
197
|
-
|
|
217
|
+
const label = button.lastElementChild;
|
|
218
|
+
if (label.textContent !== text) label.textContent = text;
|
|
198
219
|
button.setAttribute("aria-label", text);
|
|
199
|
-
|
|
220
|
+
const expanded = String(open[section]);
|
|
221
|
+
if (button.getAttribute("aria-expanded") !== expanded) {
|
|
222
|
+
button.setAttribute("aria-expanded", expanded);
|
|
223
|
+
icons.get(heading).render((0, react.createElement)(open[section] ? _deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular : _deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 16 }));
|
|
224
|
+
}
|
|
200
225
|
if (wrapper.firstChild !== heading) wrapper.prepend(heading);
|
|
201
226
|
}
|
|
202
227
|
positionFooters();
|
|
@@ -219,9 +244,14 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
|
|
|
219
244
|
disposed = true;
|
|
220
245
|
observer.disconnect();
|
|
221
246
|
resize.disconnect();
|
|
247
|
+
for (const root of icons.values()) root.unmount();
|
|
248
|
+
icons.clear();
|
|
222
249
|
for (const heading of headings.values()) heading.remove();
|
|
223
250
|
headings.clear();
|
|
224
|
-
for (const tree of trees)
|
|
251
|
+
for (const tree of trees) {
|
|
252
|
+
delete tree.dataset.dshInboxTree;
|
|
253
|
+
delete tree.dataset.dshInboxOverflow;
|
|
254
|
+
}
|
|
225
255
|
for (const wrapper of wrappers) clearWrapper(wrapper);
|
|
226
256
|
style.remove();
|
|
227
257
|
}
|
|
@@ -448,7 +478,7 @@ const FLAT_ORDER = "__flat_session_order__";
|
|
|
448
478
|
* order is what the sidebar renders while this mode is selected.
|
|
449
479
|
*/
|
|
450
480
|
const AGENT_ACTIVITY = "agent-activity";
|
|
451
|
-
/** Remembers the native sort
|
|
481
|
+
/** Remembers the native sort; its presence also marks first-use setup complete. */
|
|
452
482
|
const PREVIOUS_SORT_KEY = "dungsil.sidebar-inbox.sort.v1";
|
|
453
483
|
function isAgentActivity(orderBy) {
|
|
454
484
|
return String(orderBy) === AGENT_ACTIVITY;
|
|
@@ -520,6 +550,19 @@ function apply(ctx) {
|
|
|
520
550
|
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);
|
|
521
551
|
if (!entry?.store || typeof entry.store === "function") throw new Error("Sidebar Inbox requires the DSH 0.2.1 workspace view store");
|
|
522
552
|
view = entry.store.create();
|
|
553
|
+
try {
|
|
554
|
+
if (localStorage.getItem(PREVIOUS_SORT_KEY) === null && !isActive()) {
|
|
555
|
+
const current = view.getSnapshot();
|
|
556
|
+
if (current.orderBy === "manual" || current.orderBy === "updated") {
|
|
557
|
+
localStorage.setItem(PREVIOUS_SORT_KEY, current.orderBy);
|
|
558
|
+
view.store.set({
|
|
559
|
+
...current,
|
|
560
|
+
groupBy: "flat",
|
|
561
|
+
orderBy: AGENT_ACTIVITY
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
} catch {}
|
|
523
566
|
const headings = installHeadings(() => placements, () => ({
|
|
524
567
|
working: translate("heading.working"),
|
|
525
568
|
archived: translate("heading.archived")
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dungsil/dsh-plugin-ui-sidebar-inbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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",
|
|
@@ -22,12 +22,6 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsdown",
|
|
27
|
-
"typecheck": "tsc --noEmit",
|
|
28
|
-
"test": "node --test test/*.test.mjs",
|
|
29
|
-
"prepack": "pnpm build"
|
|
30
|
-
},
|
|
31
25
|
"devDependencies": {
|
|
32
26
|
"@deepseek-ai/cordis": "4.0.5",
|
|
33
27
|
"@deepseek-ai/dsh-api-session-controller": "0.2.1-rc.5",
|
|
@@ -41,10 +35,12 @@
|
|
|
41
35
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
|
|
42
36
|
"@deepseek-ai/dsh-client-ui-workspace": "0.2.1-rc.5",
|
|
43
37
|
"@deepseek-ai/dsh-session": "0.2.1-rc.5",
|
|
44
|
-
"@dungsil/dsh-tsconfig": "
|
|
38
|
+
"@dungsil/dsh-tsconfig": "0.0.0",
|
|
45
39
|
"@types/react": "18.3.18",
|
|
40
|
+
"@types/react-dom": "18.3.7",
|
|
46
41
|
"happy-dom": "21.0.4",
|
|
47
42
|
"react": "18.3.1",
|
|
43
|
+
"react-dom": "18.3.1",
|
|
48
44
|
"tsdown": "0.23.4"
|
|
49
45
|
},
|
|
50
46
|
"engines": {
|
|
@@ -69,11 +65,13 @@
|
|
|
69
65
|
"order": 5,
|
|
70
66
|
"title": {
|
|
71
67
|
"en": "Sidebar Inbox",
|
|
72
|
-
"ko": "사이드바 수신함"
|
|
68
|
+
"ko": "사이드바 수신함",
|
|
69
|
+
"zh": "侧边栏收件箱"
|
|
73
70
|
},
|
|
74
71
|
"description": {
|
|
75
72
|
"en": "Groups sidebar sessions into Inbox, Working, and Archived lists without changing the existing sidebar.",
|
|
76
|
-
"ko": "기존 사이드바 모양을 유지하면서 세션 목록을 수신함·작업 중·보관됨으로 나눠 배치합니다."
|
|
73
|
+
"ko": "기존 사이드바 모양을 유지하면서 세션 목록을 수신함·작업 중·보관됨으로 나눠 배치합니다.",
|
|
74
|
+
"zh": "将侧边栏会话分为收件箱、进行中和已归档列表,不改变现有侧边栏外观。"
|
|
77
75
|
},
|
|
78
76
|
"category": "ui",
|
|
79
77
|
"labels": [],
|
|
@@ -83,5 +81,10 @@
|
|
|
83
81
|
"inbox",
|
|
84
82
|
"archived"
|
|
85
83
|
]
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"build": "tsdown",
|
|
87
|
+
"typecheck": "tsc --noEmit",
|
|
88
|
+
"test": "node --test test/*.test.mjs"
|
|
86
89
|
}
|
|
87
|
-
}
|
|
90
|
+
}
|