@deepseek-ai/dsh-session-log-export 0.1.3-alpha.2 → 0.1.5-alpha.2

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/session-query/session-log-export/README.md
5
- README.md: db26d9c405b3408cc24f27e5947c94ccaa2393e8
6
- README.zh.md: 4e2eb00de94dd6520af8c1836155a00d187ef99f
5
+ README.md: 97e44c33ec09f96ec21f76b06c1928fd1de6fb0d
6
+ README.zh.md: 706a8fcd13cea8e0fbd5984238164f82a98913f5
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-session-log-export` lets the Web interface download a session's full history: a `Session log` button in the Session Header and an `/export` slash command both hand the session tree — the session, its sub-sessions, and attachments — to the browser as a ZIP download. The package owns the Host archive stream, its authenticated Fetch route, and the browser controls and feedback. The browser chooses the download destination. Setup and usage come first; implementation details follow.
12
+ `dsh-session-log-export` lets the Web interface download a session's full history: a `Download session log` menu item under the Session Header's more-actions button and an `/export` slash command both hand the session tree — the session, its sub-sessions, and attachments — to the browser as a ZIP download. The package owns the Host archive stream, its authenticated Fetch route, and the browser controls and feedback. The browser chooses the download destination. Setup and usage come first; implementation details follow.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
- Use this package when the Web bundle should let users export a session log. It requires Connection, the command registry, Session query and persistence, and attachments. Mount the plugin, then click `Session log` in the Session Header or type `/export`; the browser downloads `dsh-session-<id>.zip`.
28
+ Use this package when the Web bundle should let users export a session log. It requires Connection, the command registry, Session query and persistence, and attachments. Mount the plugin, then choose `Download session log` from the Session Header's more-actions menu or type `/export`; the browser downloads `dsh-session-<id>.zip`.
29
29
 
30
30
  ### When to choose it
31
31
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-session-log-export` 让 Web 界面可以下载会话的完整历史:Session Header 中的 `Session log` 按钮与 `/export` 斜杠命令都会把会话树——会话本身、其子会话与附件——作为 ZIP 交给浏览器下载。本包拥有 Host 归档流、经过认证的 Fetch 路由以及浏览器控制和反馈。下载目标位置由浏览器选择。设置与用法在前,随后说明实现细节。
12
+ `dsh-session-log-export` 让 Web 界面可以下载会话的完整历史:Session Header 更多操作按钮下的 `下载 Session 日志` 菜单项与 `/export` 斜杠命令都会把会话树——会话本身、其子会话与附件——作为 ZIP 交给浏览器下载。本包拥有 Host 归档流、经过认证的 Fetch 路由以及浏览器控制和反馈。下载目标位置由浏览器选择。设置与用法在前,随后说明实现细节。
13
13
 
14
14
  ## 目录
15
15
 
@@ -25,7 +25,7 @@ kind: "package-reference"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
- 当 Web bundle 需要让用户导出会话日志时使用本包。它需要 Connection、命令注册表、Session 查询与持久化以及附件服务。挂载插件,然后点击 Session Header 中的 `Session log` 或输入 `/export`;浏览器会下载 `dsh-session-<id>.zip`。
28
+ 当 Web bundle 需要让用户导出会话日志时使用本包。它需要 Connection、命令注册表、Session 查询与持久化以及附件服务。挂载插件,然后在 Session Header 的更多操作菜单中选择 `下载 Session 日志` 或输入 `/export`;浏览器会下载 `dsh-session-<id>.zip`。
29
29
 
30
30
  ### 何时选择
31
31
 
package/lib/client.js CHANGED
@@ -6,6 +6,7 @@ window.__ModuleLoader__.load({
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let react = require("react");
9
10
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
11
  //#region lib/types/client/controller.js
11
12
  /** Browser download state shared by the Session Header button and `/export`. */
@@ -141,7 +142,7 @@ window.__ModuleLoader__.load({
141
142
  //#endregion
142
143
  //#region lib/types/client/Dialog.js
143
144
  /**
144
- * Modal shared by the Session Header button and this browser's `/export` command.
145
+ * Modal shared by the Session Header download menu item and this browser's `/export` command.
145
146
  * @param props - Session runtime, bound controller state, actions, and localized copy.
146
147
  * @returns the modal portal contribution.
147
148
  */
@@ -169,7 +170,7 @@ window.__ModuleLoader__.load({
169
170
  }
170
171
  //#endregion
171
172
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/session-query/session-log-export/src/client/HeaderAction.module.css.mjs
172
- const css = ".nL4_yW_sessionLogButton{border:.5px solid var(--dsw-alias-border-l4);height:26px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);cursor:pointer;background:0 0;border-radius:13px;justify-content:center;align-items:center;gap:5px;padding:5px 10px;font-size:11px;font-weight:400;line-height:16px;display:inline-flex}.nL4_yW_sessionLogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.nL4_yW_sessionLogButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:wait}.nL4_yW_sessionLogButton span,.nL4_yW_sessionLogButton svg{flex:none}.nL4_yW_sessionLogButton svg{color:var(--dsw-alias-label-secondary)}.nL4_yW_sessionLogButton span{white-space:nowrap}";
173
+ const css = ".nL4_yW_moreButton{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:28px;flex:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.nL4_yW_moreButton svg{width:15px;height:15px}.nL4_yW_moreButton:hover{background:var(--dsw-alias-interactive-bg-hover)}";
173
174
  const tagId = "@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";
174
175
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
175
176
  const tag = document.createElement("style");
@@ -178,26 +179,47 @@ window.__ModuleLoader__.load({
178
179
  tag.textContent = css;
179
180
  document.head.appendChild(tag);
180
181
  }
181
- var HeaderAction_module_css_default = { "sessionLogButton": "nL4_yW_sessionLogButton" };
182
+ var HeaderAction_module_css_default = { "moreButton": "nL4_yW_moreButton" };
182
183
  //#endregion
183
184
  //#region lib/types/client/HeaderAction.js
184
185
  /**
185
- * Render the Session Header export capsule and its shared result dialog.
186
- * @param props - Session runtime, download controller, and localized dialog copy.
186
+ * Render the Session Header more-actions icon button, its download menu, and the shared result dialog.
187
+ * @param props - Session runtime, download controller, and localized copy.
187
188
  * @returns the persistent Header action and Session-scoped dialog.
188
189
  */
189
190
  function SessionLogDownloadHeaderAction(props) {
190
191
  const { sessionId, useSessionLogDownload, request, t } = props;
191
192
  const busy = useSessionLogDownload((state) => state.bySession[String(sessionId)])?.status === "downloading";
192
- return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("button", {
193
- type: "button",
194
- className: HeaderAction_module_css_default.sessionLogButton,
195
- disabled: busy,
196
- "aria-busy": busy,
197
- onClick: () => {
193
+ const [open, setOpen] = (0, react.useState)(false);
194
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
195
+ open,
196
+ align: "end",
197
+ dense: true,
198
+ onClose: () => {
199
+ setOpen(false);
200
+ },
201
+ items: [{
202
+ id: "download",
203
+ label: t("menu.download"),
204
+ icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDownloadOutline16, {}),
205
+ disabled: busy
206
+ }],
207
+ onSelect: () => {
208
+ setOpen(false);
198
209
  request(sessionId);
199
210
  },
200
- children: [(0, react_jsx_runtime.jsx)("span", { children: t("header.action") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDownloadOutline16, { size: 10 })]
211
+ anchor: (0, react_jsx_runtime.jsx)("button", {
212
+ type: "button",
213
+ className: HeaderAction_module_css_default.moreButton,
214
+ "aria-label": t("header.more"),
215
+ "aria-haspopup": "menu",
216
+ "aria-expanded": open,
217
+ "aria-busy": busy,
218
+ onClick: () => {
219
+ setOpen((value) => !value);
220
+ },
221
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, {})
222
+ })
201
223
  }), (0, react_jsx_runtime.jsx)(SessionLogDownloadDialog, { ...props })] });
202
224
  }
203
225
  //#endregion
@@ -206,7 +228,8 @@ window.__ModuleLoader__.load({
206
228
  const NS = "session-log-download";
207
229
  /** Simplified-Chinese Session export strings. */
208
230
  const zh = {
209
- "header.action": "Session 日志",
231
+ "header.more": "更多操作",
232
+ "menu.download": "下载 Session 日志",
210
233
  "dialog.preparingTitle": "正在导出 Session",
211
234
  "dialog.preparingDescription": "正在准备包含当前 Session、子 Session 和附件的 ZIP 文件。",
212
235
  "dialog.successTitle": "Session 导出已开始下载",
@@ -217,7 +240,8 @@ window.__ModuleLoader__.load({
217
240
  };
218
241
  /** English Session export strings. */
219
242
  const en = {
220
- "header.action": "Session log",
243
+ "header.more": "More actions",
244
+ "menu.download": "Download session log",
221
245
  "dialog.preparingTitle": "Exporting Session",
222
246
  "dialog.preparingDescription": "Preparing a ZIP containing this Session, its sub-Sessions, and attachments.",
223
247
  "dialog.successTitle": "Session download started",
@@ -13,7 +13,7 @@ export interface SessionLogDownloadDialogInjected {
13
13
  }
14
14
  export type SessionLogDownloadDialogProps = PropsRuntime<'conversation.session.header.utilities'> & PropsLocale<typeof NS> & InjectFace<SessionLogDownloadDialogInjected>;
15
15
  /**
16
- * Modal shared by the Session Header button and this browser's `/export` command.
16
+ * Modal shared by the Session Header download menu item and this browser's `/export` command.
17
17
  * @param props - Session runtime, bound controller state, actions, and localized copy.
18
18
  * @returns the modal portal contribution.
19
19
  */
@@ -1,8 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type SessionLogDownloadDialogProps } from './Dialog.tsx';
3
3
  /**
4
- * Render the Session Header export capsule and its shared result dialog.
5
- * @param props - Session runtime, download controller, and localized dialog copy.
4
+ * Render the Session Header more-actions icon button, its download menu, and the shared result dialog.
5
+ * @param props - Session runtime, download controller, and localized copy.
6
6
  * @returns the persistent Header action and Session-scoped dialog.
7
7
  */
8
8
  export declare function SessionLogDownloadHeaderAction(props: SessionLogDownloadDialogProps): ReactNode;
@@ -2,7 +2,8 @@
2
2
  export declare const NS = "session-log-download";
3
3
  /** Simplified-Chinese Session export strings. */
4
4
  export declare const zh: {
5
- readonly 'header.action': "Session 日志";
5
+ readonly 'header.more': "更多操作";
6
+ readonly 'menu.download': "下载 Session 日志";
6
7
  readonly 'dialog.preparingTitle': "正在导出 Session";
7
8
  readonly 'dialog.preparingDescription': "正在准备包含当前 Session、子 Session 和附件的 ZIP 文件。";
8
9
  readonly 'dialog.successTitle': "Session 导出已开始下载";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-log-export",
3
3
  "description": "Web Session-log export command and shared download dialog",
4
- "version": "0.1.3-alpha.2",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,35 +33,35 @@
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
35
  "fflate": "^0.8.2",
36
- "@deepseek-ai/dsh-session-format": "^0.1.3-alpha.2",
37
36
  "@deepseek-ai/schemastery": "^3.18.2",
38
- "@deepseek-ai/dsh-brand": "^0.1.3-alpha.2"
37
+ "@deepseek-ai/dsh-brand": "^0.1.5-alpha.2",
38
+ "@deepseek-ai/dsh-session-format": "^0.1.5-alpha.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@deepseek-ai/cordis": "^4.0.2",
42
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
43
- "@deepseek-ai/dsh-session-persistence": "^0.1.3-alpha.2"
42
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
43
+ "@deepseek-ai/dsh-session-persistence": "^0.1.5-alpha.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/react": "~18.3.1",
47
47
  "react": "^18.2.0",
48
48
  "@deepseek-ai/cordis": "^4.0.2",
49
- "@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
50
49
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
51
- "@deepseek-ai/dsh-client-connection": "^0.1.3-alpha.2",
52
- "@deepseek-ai/dsh-attachment": "^0.1.3-alpha.2",
53
- "@deepseek-ai/dsh-client-store": "^0.1.3-alpha.2",
54
- "@deepseek-ai/dsh-client-ui-commands": "^0.1.3-alpha.2",
55
- "@deepseek-ai/dsh-client-locale": "^0.1.3-alpha.2",
56
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.3-alpha.2",
57
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.3-alpha.2",
58
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.3-alpha.2",
59
- "@deepseek-ai/dsh-client-ui-session": "^0.1.3-alpha.2",
60
- "@deepseek-ai/dsh-commands": "^0.1.3-alpha.2",
61
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.3-alpha.2",
62
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
63
- "@deepseek-ai/dsh-session-persistence": "^0.1.3-alpha.2",
64
- "@deepseek-ai/dsh-session-query": "^0.1.3-alpha.2"
50
+ "@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
51
+ "@deepseek-ai/dsh-attachment": "^0.1.5-alpha.2",
52
+ "@deepseek-ai/dsh-client-connection": "^0.1.5-alpha.2",
53
+ "@deepseek-ai/dsh-client-locale": "^0.1.5-alpha.2",
54
+ "@deepseek-ai/dsh-client-store": "^0.1.5-alpha.2",
55
+ "@deepseek-ai/dsh-client-ui-commands": "^0.1.5-alpha.2",
56
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-alpha.2",
57
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.5-alpha.2",
58
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-alpha.2",
59
+ "@deepseek-ai/dsh-commands": "^0.1.5-alpha.2",
60
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
61
+ "@deepseek-ai/dsh-session-persistence": "^0.1.5-alpha.2",
62
+ "@deepseek-ai/dsh-session-query": "^0.1.5-alpha.2",
63
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-alpha.2",
64
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-alpha.2"
65
65
  },
66
66
  "dsh": {
67
67
  "client": {