@morlay/ui-conversation-manager 0.1.5 → 0.1.6

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/dist/index.cjs ADDED
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/index.ts
3
+ function apply() {}
4
+ //#endregion
5
+ exports.apply = apply;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/ui-conversation-manager",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "「对话管理」全局面板页(浏览器半):会话与统计两层 Tabs——会话视图给出全量会话(含已归档)的搜索、分页、归档 / 取消归档 / 导出 / 删除、导入为新会话与孤儿数据 GC,统计视图给出全部对话的 token 用量。",
5
5
  "keywords": [
6
6
  "archived-sessions",
@@ -23,11 +23,15 @@
23
23
  ],
24
24
  "type": "module",
25
25
  "exports": {
26
- ".": "./dist/index.mjs",
26
+ ".": {
27
+ "types": "./dist/index.d.mts",
28
+ "default": "./dist/index.mjs"
29
+ },
27
30
  "./package.json": "./package.json",
28
31
  "./client": {
29
- "types": "./dist/client.d.cts",
30
- "default": "./dist/client.cjs"
32
+ "types": "./dist/client.d.mts",
33
+ "import": "./dist/client.mjs",
34
+ "default": "./dist/client.mjs"
31
35
  },
32
36
  "./locale/*.json": "./locale/*.json"
33
37
  },
@@ -35,22 +39,22 @@
35
39
  "@testing-library/react": "^16.1.0",
36
40
  "@types/react": "~18.3.1",
37
41
  "@types/react-dom": "~18.3.0",
38
- "react": "^18.2.0",
39
42
  "react-dom": "^18.2.0"
40
43
  },
41
44
  "peerDependencies": {
42
- "@deepseek-ai/cordis": "^4.0.4",
43
- "@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.2",
44
- "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
45
- "@deepseek-ai/dsh-client-ui-layout": "^0.2.0-rc.2",
46
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.0-rc.2",
47
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.0-rc.2",
48
- "@deepseek-ai/dsh-client-ui-session": "^0.2.0-rc.2",
49
- "@deepseek-ai/dsh-client-ui-sidebar": "^0.2.0-rc.2",
50
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
51
- "@deepseek-ai/dsh-client-ui-workspace": "^0.2.0-rc.2",
52
- "@deepseek-ai/dsh-session": "^0.2.0-rc.2",
53
- "@morlay/dsh-client-ui-primitives": "0.0.8"
45
+ "@deepseek-ai/cordis": "^4.0.5-alpha.2",
46
+ "@deepseek-ai/dsh-api-session-controller": "^0.2.1-alpha.5",
47
+ "@deepseek-ai/dsh-client-locale": "^0.2.1-alpha.5",
48
+ "@deepseek-ai/dsh-client-ui-layout": "^0.2.1-alpha.5",
49
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-alpha.5",
50
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-alpha.5",
51
+ "@deepseek-ai/dsh-client-ui-session": "^0.2.1-alpha.5",
52
+ "@deepseek-ai/dsh-client-ui-sidebar": "^0.2.1-alpha.5",
53
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-alpha.5",
54
+ "@deepseek-ai/dsh-client-ui-workspace": "^0.2.1-alpha.5",
55
+ "@deepseek-ai/dsh-session": "^0.2.1-alpha.5",
56
+ "@morlay/dsh-client-ui-primitives": "0.0.9",
57
+ "react": "^18.2.0"
54
58
  },
55
59
  "dsh": {
56
60
  "client": {
@@ -0,0 +1,226 @@
1
+ /* 「对话管理」页的页面框架:**与上游一级页面同款**——上游没有这份框架的共享原子,它是每个一级页面自己
2
+ CSS Modules 里那套同样的度量(`ui-schedule/TaskManagerPage.module.css`、`ui-plugin-manager/PluginManagerPage.module.css`)。
3
+ 这里只放页面骨架与状态态:960px 居中列、标题行(28px 上边距 + macOS 顶栏让位)、过滤 chip 行、搜索行,
4
+ 以及读取 / 空 / 失败这三个整屏居中的状态。行内排版(列表行、统计视图)不在这里。 */
5
+
6
+ .page {
7
+ display: flex;
8
+ width: 100%;
9
+ height: 100%;
10
+ min-width: 0;
11
+ min-height: 0;
12
+ overflow: hidden;
13
+ color: var(--dsw-alias-label-primary);
14
+ background: var(--dsw-alias-bg-base);
15
+ font-size: 14px;
16
+ line-height: 1.6;
17
+ }
18
+
19
+ .listPane {
20
+ display: flex;
21
+ flex: 1;
22
+ flex-direction: column;
23
+ min-width: 0;
24
+ min-height: 0;
25
+ }
26
+
27
+ .pageScroll {
28
+ flex: 1;
29
+ min-height: 0;
30
+ overflow: auto;
31
+ scrollbar-gutter: stable;
32
+ }
33
+
34
+ /* 内容列:与上游一级页面同一个 960px 上限与 clamp(24–48px) 内距,底部 48px。 */
35
+ .pageContent {
36
+ max-width: 960px;
37
+ margin: 0 auto;
38
+ padding: 0 clamp(24px, 4vw, 48px) 48px;
39
+ }
40
+
41
+ /* 标题行:页面名与右侧动作同一行;28px 的上内距归这一行自己(列不再留顶部内距)。 */
42
+ .pageHeading {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: space-between;
46
+ gap: 16px;
47
+ padding-top: 28px;
48
+ margin-bottom: 24px;
49
+ }
50
+
51
+ /* macOS hiddenInset 标题栏:一级页面的头部在自身 28px 之上再加框架顶栏让位。 */
52
+ :global([data-platform="darwin"]) .pageHeading {
53
+ padding-top: calc(28px + var(--dsh-frame-top-clearance, 0px));
54
+ }
55
+
56
+ .pageHeading h1 {
57
+ flex: 1;
58
+ min-width: 0;
59
+ margin: 0;
60
+ font-size: 20px;
61
+ line-height: 28px;
62
+ font-weight: 500;
63
+ }
64
+
65
+ .headingActions {
66
+ display: flex;
67
+ flex: none;
68
+ align-items: center;
69
+ gap: 8px;
70
+ }
71
+
72
+ /* 过滤行:chip 组之间 20px、组内 8px,列表在它下面 14px。 */
73
+ .filters {
74
+ display: flex;
75
+ flex-wrap: wrap;
76
+ align-items: center;
77
+ gap: 8px 20px;
78
+ margin-bottom: 14px;
79
+ }
80
+
81
+ .filterTabs {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+ align-items: center;
85
+ gap: 8px 12px;
86
+ }
87
+
88
+ /* 过滤 chip:28px 盒、10px 两侧、14px 圆角;选中那档取 hover 填充 + 主标签色。 */
89
+ .filterTab {
90
+ display: inline-flex;
91
+ flex: none;
92
+ align-items: center;
93
+ height: 28px;
94
+ padding: 0 10px;
95
+ border: 0;
96
+ border-radius: 14px;
97
+ background: transparent;
98
+ color: var(--dsw-alias-label-tertiary);
99
+ font: inherit;
100
+ font-size: 14px;
101
+ line-height: 22px;
102
+ white-space: nowrap;
103
+ cursor: pointer;
104
+ }
105
+
106
+ .filterTab:hover {
107
+ background: var(--dsw-alias-interactive-bg-hover);
108
+ }
109
+
110
+ .filterTabActive {
111
+ background: var(--dsw-alias-interactive-bg-hover);
112
+ color: var(--dsw-alias-label-primary);
113
+ }
114
+
115
+ /* 搜索框:外层盒子负责那根 0.5px 细线与 12px 圆角,里面的官方 `Input` 只留图标与输入框。 */
116
+ .searchField {
117
+ display: flex;
118
+ align-items: center;
119
+ height: 36px;
120
+ margin: 0 0 16px;
121
+ padding: 0 10px;
122
+ border: 0.5px solid var(--dsw-alias-border-l3);
123
+ border-radius: 12px;
124
+ color: var(--dsw-alias-label-tertiary);
125
+ transition: border-color 0.15s;
126
+ }
127
+
128
+ .searchField:hover {
129
+ border-color: var(--dsw-alias-border-l2);
130
+ }
131
+
132
+ .searchField:focus-within {
133
+ border-color: var(--dsw-alias-state-business-primary);
134
+ }
135
+
136
+ .searchField > :first-child {
137
+ flex: 1;
138
+ min-width: 0;
139
+ height: 100%;
140
+ padding: 0;
141
+ border: 0;
142
+ border-radius: 0;
143
+ background: transparent;
144
+ }
145
+
146
+ .searchField > :first-child:focus-within {
147
+ border-color: transparent;
148
+ }
149
+
150
+ .searchField > :first-child svg {
151
+ width: 14px;
152
+ height: 14px;
153
+ }
154
+
155
+ .searchField input::placeholder {
156
+ color: var(--dsw-alias-label-caption);
157
+ }
158
+
159
+ .searchField input:focus-visible {
160
+ outline: none;
161
+ }
162
+
163
+ /* 清空搜索由右侧那个按钮负责,原生那个叉不要。 */
164
+ .searchField input::-webkit-search-cancel-button {
165
+ display: none;
166
+ }
167
+
168
+ .searchClear {
169
+ flex: none;
170
+ width: 28px;
171
+ height: 28px;
172
+ margin-right: -6px;
173
+ padding: 0;
174
+ color: var(--dsw-alias-label-tertiary);
175
+ }
176
+
177
+ .searchClear svg {
178
+ width: 14px;
179
+ height: 14px;
180
+ }
181
+
182
+ /* 列表区:行的内部排版归各行的组件(`Stack` / `Row`),这里只管列与间距。 */
183
+ .list {
184
+ display: flex;
185
+ flex-direction: column;
186
+ gap: 4px;
187
+ min-width: 0;
188
+ }
189
+
190
+ /* 整屏居中的状态态:列表还没就绪 / 一份会话都没有 / 读列表失败——这三种时候页面没有别的内容可看,
191
+ 状态占满整个面板并居中。 */
192
+ .status {
193
+ display: grid;
194
+ flex: 1;
195
+ place-items: center;
196
+ min-width: 0;
197
+ min-height: 0;
198
+ padding: 24px;
199
+ text-align: center;
200
+ }
201
+
202
+ .statusBody {
203
+ display: flex;
204
+ flex-direction: column;
205
+ align-items: center;
206
+ gap: 12px;
207
+ }
208
+
209
+ .statusText {
210
+ margin: 0;
211
+ color: var(--dsw-alias-label-tertiary);
212
+ font-size: 14px;
213
+ line-height: 22px;
214
+ }
215
+
216
+ .statusFailure {
217
+ color: var(--dsw-alias-state-error-primary);
218
+ }
219
+
220
+ /* 列表区里的空态(搜索结果为空这类):框架照旧在,只在列表位置上居中那行字。 */
221
+ .listStatus {
222
+ display: grid;
223
+ place-items: center;
224
+ padding: 32px 0;
225
+ text-align: center;
226
+ }