@sparkelf/dsh-patch-session-log-trajectory-toolbar 0.2.0-rc.9 → 0.2.1-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/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"formatVersion": 1,
|
|
5
5
|
"variants": [
|
|
6
6
|
{
|
|
7
|
-
"dsh": ">=0.
|
|
7
|
+
"dsh": ">=0.2.0-rc.2",
|
|
8
8
|
"file": "./patches/session-log-trajectory-toolbar.patch",
|
|
9
9
|
"id": "session-log-desktop-trajectory-toolbar",
|
|
10
10
|
"target": {
|
|
11
|
-
"baseRevision": "
|
|
11
|
+
"baseRevision": "5badb15009ae1756c3afe0ae0cef1faafc290ccc",
|
|
12
12
|
"kind": "dsh-source",
|
|
13
13
|
"paths": [
|
|
14
14
|
"packages/client/ui-trajectory/",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
|
-
"version": "0.2.
|
|
35
|
+
"version": "0.2.1-alpha.2"
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
|
|
2
|
-
index
|
|
2
|
+
index ac89529bd5..72f290101a 100644
|
|
3
3
|
--- a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
|
|
4
4
|
+++ b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
|
|
5
5
|
@@ -165,13 +165,19 @@
|
|
@@ -24,7 +24,7 @@ index c286665..66365f0 100644
|
|
|
24
24
|
gap: 4px;
|
|
25
25
|
border: 0.5px solid var(--dsw-alias-border-l4);
|
|
26
26
|
diff --git a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
|
|
27
|
-
index
|
|
27
|
+
index c3861f03a9..a63ac8823b 100644
|
|
28
28
|
--- a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
|
|
29
29
|
+++ b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
|
|
30
30
|
@@ -1,5 +1,6 @@
|
|
@@ -32,7 +32,7 @@ index 92d7ce9..dfbc88f 100644
|
|
|
32
32
|
|
|
33
33
|
+import type { ReactNode } from 'react'
|
|
34
34
|
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots'
|
|
35
|
-
import {
|
|
35
|
+
import { IconSearchOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
36
36
|
import type { NS } from './locales.ts'
|
|
37
37
|
@@ -26,6 +27,8 @@ export interface TrajectoryToolbarProps {
|
|
38
38
|
searchQuery: string
|
|
@@ -58,11 +58,11 @@ index 92d7ce9..dfbc88f 100644
|
|
|
58
58
|
- <div className={css.search}>
|
|
59
59
|
+ <div className={css.utilities} data-trajectory-toolbar-utilities="">{utilities}</div>
|
|
60
60
|
+ <div className={css.search} data-trajectory-search="">
|
|
61
|
-
<
|
|
61
|
+
<IconSearchOutlineRegular size={11} className={css.searchIcon} />
|
|
62
62
|
<input
|
|
63
63
|
type="search"
|
|
64
64
|
diff --git a/packages/client/ui-trajectory/src/client/TrajectoryView.tsx b/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
|
|
65
|
-
index
|
|
65
|
+
index 6c2cd98ec8..97c614b584 100644
|
|
66
66
|
--- a/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
|
|
67
67
|
+++ b/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
|
|
68
68
|
@@ -133,7 +133,9 @@ export function TrajectoryView({
|
|
@@ -85,7 +85,7 @@ index 6c2cd98..97c614b 100644
|
|
|
85
85
|
/>
|
|
86
86
|
<TrajectoryTimeline
|
|
87
87
|
diff --git a/packages/client/ui-trajectory/src/client/index.ts b/packages/client/ui-trajectory/src/client/index.ts
|
|
88
|
-
index
|
|
88
|
+
index 935a43ff2c..0e978fa263 100644
|
|
89
89
|
--- a/packages/client/ui-trajectory/src/client/index.ts
|
|
90
90
|
+++ b/packages/client/ui-trajectory/src/client/index.ts
|
|
91
91
|
@@ -37,6 +37,13 @@ export type {
|
|
@@ -111,18 +111,33 @@ index 935a43f..0e978fa 100644
|
|
|
111
111
|
inject: (sessionId: SessionId): TrajectoryViewInjected => {
|
|
112
112
|
const session = ctx.sessions.binding(sessionId)?.session
|
|
113
113
|
diff --git a/packages/session-query/session-log-export/package.json b/packages/session-query/session-log-export/package.json
|
|
114
|
-
index
|
|
114
|
+
index b9545681c5..6a5790a5fc 100644
|
|
115
115
|
--- a/packages/session-query/session-log-export/package.json
|
|
116
116
|
+++ b/packages/session-query/session-log-export/package.json
|
|
117
|
-
@@ -
|
|
118
|
-
"@deepseek-ai/dsh-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"@deepseek-ai/
|
|
123
|
-
|
|
124
|
-
"@deepseek-ai/dsh-
|
|
125
|
-
|
|
117
|
+
@@ -47,8 +47,8 @@
|
|
118
|
+
"@deepseek-ai/dsh-session-persistence": "workspace:*"
|
|
119
|
+
},
|
|
120
|
+
"devDependencies": {
|
|
121
|
+
- "@deepseek-ai/cordis": "workspace:~",
|
|
122
|
+
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
|
123
|
+
+ "@deepseek-ai/cordis": "workspace:~",
|
|
124
|
+
"@deepseek-ai/dsh-agent": "workspace:*",
|
|
125
|
+
"@deepseek-ai/dsh-attachment": "workspace:*",
|
|
126
|
+
"@deepseek-ai/dsh-client-connection": "workspace:*",
|
|
127
|
+
@@ -61,10 +61,11 @@
|
|
128
|
+
"@deepseek-ai/dsh-client-ui-renderer": "workspace:*",
|
|
129
|
+
"@deepseek-ai/dsh-client-ui-session": "workspace:*",
|
|
130
|
+
"@deepseek-ai/dsh-client-ui-slots": "workspace:*",
|
|
131
|
+
+ "@deepseek-ai/dsh-client-ui-trajectory": "workspace:*",
|
|
132
|
+
"@deepseek-ai/dsh-commands": "workspace:*",
|
|
133
|
+
- "@deepseek-ai/dsh-session": "workspace:*",
|
|
134
|
+
"@deepseek-ai/dsh-session-persistence": "workspace:*",
|
|
135
|
+
"@deepseek-ai/dsh-session-query": "workspace:*",
|
|
136
|
+
+ "@deepseek-ai/dsh-session": "workspace:*",
|
|
137
|
+
"@types/react": "~18.3.1",
|
|
138
|
+
"react": "^18.2.0"
|
|
139
|
+
},
|
|
140
|
+
@@ -75,7 +76,8 @@
|
|
126
141
|
"@deepseek-ai/dsh-client-ui-commands",
|
|
127
142
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
128
143
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
@@ -133,13 +148,15 @@ index 75d7432..ad92134 100644
|
|
|
133
148
|
"platform": "web"
|
|
134
149
|
}
|
|
135
150
|
diff --git a/packages/session-query/session-log-export/src/client/HeaderAction.module.css b/packages/session-query/session-log-export/src/client/HeaderAction.module.css
|
|
136
|
-
index
|
|
151
|
+
index 90ca1eedbc..aa22e45ead 100644
|
|
137
152
|
--- a/packages/session-query/session-log-export/src/client/HeaderAction.module.css
|
|
138
153
|
+++ b/packages/session-query/session-log-export/src/client/HeaderAction.module.css
|
|
139
|
-
@@ -
|
|
140
|
-
|
|
141
|
-
|
|
154
|
+
@@ -10,3 +10,46 @@
|
|
155
|
+
width: 15px;
|
|
156
|
+
height: 15px;
|
|
142
157
|
}
|
|
158
|
+
+/* The Header action is the shared compact Button; the Trajectory action below
|
|
159
|
+
+ replaces it from 768px, where the header has room for a labelled control. */
|
|
143
160
|
+
|
|
144
161
|
+.trajectoryButton {
|
|
145
162
|
+ display: none;
|
|
@@ -182,36 +199,46 @@ index cc13d3f..1d22e64 100644
|
|
|
182
199
|
+ .trajectoryButton { display: inline-flex; }
|
|
183
200
|
+}
|
|
184
201
|
diff --git a/packages/session-query/session-log-export/src/client/HeaderAction.tsx b/packages/session-query/session-log-export/src/client/HeaderAction.tsx
|
|
185
|
-
index
|
|
202
|
+
index 5104dee910..64086ee343 100644
|
|
186
203
|
--- a/packages/session-query/session-log-export/src/client/HeaderAction.tsx
|
|
187
204
|
+++ b/packages/session-query/session-log-export/src/client/HeaderAction.tsx
|
|
188
|
-
@@ -1,
|
|
205
|
+
@@ -1,11 +1,11 @@
|
|
189
206
|
import { useState } from 'react'
|
|
190
207
|
import type { ReactNode } from 'react'
|
|
191
|
-
import {
|
|
192
|
-
-import {
|
|
208
|
+
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
|
|
209
|
+
-import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots'
|
|
193
210
|
+import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
211
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
212
|
+
import { Button, IconDownloadOutlineRegular, IconEllipsisOutlineRegular, IconPaperPlaneOutlineRegular, Menu } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
213
|
+
-import { SessionLogDownloadDialog, type SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
214
|
+
-import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
|
|
194
215
|
+import { NS } from './locales.ts'
|
|
195
216
|
+import { SessionLogDownloadDialog, type SessionLogDownloadDialogInjected, type SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
196
217
|
import css from './HeaderAction.module.css'
|
|
197
218
|
|
|
219
|
+
/** Session download controls with observable feedback availability and a Session feedback action. */
|
|
220
|
+
@@ -21,6 +21,12 @@ export interface SessionLogDownloadHeaderInjected extends SessionLogDownloadDial
|
|
221
|
+
/** Session download props plus the optional feedback action. */
|
|
222
|
+
export type SessionLogDownloadHeaderProps = SessionLogDownloadDialogProps & InjectFace<SessionLogDownloadHeaderInjected>
|
|
223
|
+
|
|
224
|
+
+/** Trajectory toolbar presentation of the same download controller. */
|
|
198
225
|
+type SessionLogDownloadToolbarActionProps =
|
|
199
226
|
+ PropsRuntime<'conversation.trajectory.toolbar.utilities'>
|
|
200
227
|
+ & PropsLocale<typeof NS>
|
|
201
228
|
+ & InjectFace<SessionLogDownloadDialogInjected>
|
|
202
229
|
+
|
|
203
230
|
/**
|
|
204
|
-
* Render the Session Header
|
|
231
|
+
* Render the Session Header menu with download and optional feedback actions.
|
|
205
232
|
* @param props - Session runtime, download controller, and localized copy.
|
|
206
|
-
@@ -
|
|
207
|
-
<
|
|
208
|
-
|
|
233
|
+
@@ -53,6 +59,7 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
|
|
234
|
+
<Button
|
|
235
|
+
size="sm"
|
|
209
236
|
className={css.moreButton}
|
|
210
237
|
+ data-session-log-header
|
|
211
238
|
aria-label={t('header.more')}
|
|
212
239
|
aria-haspopup="menu"
|
|
213
240
|
aria-expanded={open}
|
|
214
|
-
@@ -
|
|
241
|
+
@@ -67,3 +74,31 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
|
|
215
242
|
</>
|
|
216
243
|
)
|
|
217
244
|
}
|
|
@@ -238,33 +265,45 @@ index cb20cb9..6f5eefa 100644
|
|
|
238
265
|
+ title={t('header.action')}
|
|
239
266
|
+ onClick={() => { void request(sessionId) }}
|
|
240
267
|
+ >
|
|
241
|
-
+ <
|
|
268
|
+
+ <IconDownloadOutlineRegular size={11} />
|
|
242
269
|
+ <span>{t('header.action')}</span>
|
|
243
270
|
+ </button>
|
|
244
271
|
+ )
|
|
245
272
|
+}
|
|
246
273
|
diff --git a/packages/session-query/session-log-export/src/client/index.ts b/packages/session-query/session-log-export/src/client/index.ts
|
|
247
|
-
index
|
|
274
|
+
index bcba0dd581..ed8e67e4d0 100644
|
|
248
275
|
--- a/packages/session-query/session-log-export/src/client/index.ts
|
|
249
276
|
+++ b/packages/session-query/session-log-export/src/client/index.ts
|
|
250
|
-
@@ -
|
|
251
|
-
import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
277
|
+
@@ -8,9 +8,14 @@ import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
252
278
|
import type {} from '@deepseek-ai/dsh-client-ui-renderer/client'
|
|
253
279
|
import type {} from '@deepseek-ai/dsh-client-ui-session/client'
|
|
280
|
+
import type {} from '@deepseek-ai/dsh-client-ui-message-feedback/client'
|
|
254
281
|
+import type {} from '@deepseek-ai/dsh-client-ui-trajectory/client'
|
|
282
|
+
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
|
|
255
283
|
import { SessionLogDownloadController } from './controller.ts'
|
|
256
|
-
|
|
257
|
-
|
|
284
|
+
-import { SessionLogDownloadHeaderAction, type SessionLogDownloadHeaderInjected } from './HeaderAction.tsx'
|
|
285
|
+
+import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
|
|
258
286
|
+import {
|
|
259
287
|
+ SessionLogDownloadHeaderAction, SessionLogDownloadToolbarAction,
|
|
288
|
+
+ type SessionLogDownloadHeaderInjected,
|
|
260
289
|
+} from './HeaderAction.tsx'
|
|
261
290
|
import { en, NS, zh, type SessionLogDownloadKey } from './locales.ts'
|
|
262
291
|
|
|
263
292
|
declare module '@deepseek-ai/cordis' {
|
|
264
|
-
@@ -
|
|
293
|
+
@@ -35,6 +40,21 @@ export const inject = ['slots', 'locale']
|
|
265
294
|
*/
|
|
266
295
|
export function apply(ctx: ClientContext): void {
|
|
267
296
|
const controller = new SessionLogDownloadController()
|
|
297
|
+
+ // The Header presentation carries the feedback action the official tree added, so its
|
|
298
|
+
+ // injection supplies that hook; the Trajectory presentation is download-only and shares
|
|
299
|
+
+ // the same controller, request, and dismiss.
|
|
300
|
+
+ const injectHeaderAction = (): SessionLogDownloadHeaderInjected => ({
|
|
301
|
+
+ hooks: { sessionLogDownload: controller.store, feedbackAvailable },
|
|
302
|
+
+ request: (sessionId: SessionId) => controller.download(sessionId),
|
|
303
|
+
+ dismiss: (sessionId: SessionId) => { controller.dismiss(sessionId) },
|
|
304
|
+
+ // The feedback plugin can unload between the menu render and this click.
|
|
305
|
+
+ openFeedback: (sessionId: SessionId) => { ctx.get('feedbackUi')?.openSession(sessionId) },
|
|
306
|
+
+ })
|
|
268
307
|
+ const injectAction = (): SessionLogDownloadDialogInjected => ({
|
|
269
308
|
+ hooks: { sessionLogDownload: controller.store },
|
|
270
309
|
+ request: (sessionId: SessionId) => controller.download(sessionId),
|
|
@@ -273,16 +312,18 @@ index 9718731..a6ca23e 100644
|
|
|
273
312
|
ctx.provide('sessionLogDownload', controller)
|
|
274
313
|
ctx.effect(() => async () => { await controller.dispose() }, 'session-log-download: browser download lifecycle')
|
|
275
314
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'session-log-download: browser dictionaries')
|
|
276
|
-
@@ -
|
|
315
|
+
@@ -52,14 +72,14 @@ export function apply(ctx: ClientContext): void {
|
|
277
316
|
name: 'conversation.session.header.utilities',
|
|
278
317
|
id: 'session-log-download',
|
|
279
318
|
locale: NS,
|
|
280
|
-
- inject: ():
|
|
281
|
-
- hooks: { sessionLogDownload: controller.store },
|
|
319
|
+
- inject: (): SessionLogDownloadHeaderInjected => ({
|
|
320
|
+
- hooks: { sessionLogDownload: controller.store, feedbackAvailable },
|
|
282
321
|
- request: (sessionId: SessionId) => controller.download(sessionId),
|
|
283
322
|
- dismiss: (sessionId: SessionId) => { controller.dismiss(sessionId) },
|
|
323
|
+
- // The feedback plugin can unload between the menu render and this click.
|
|
324
|
+
- openFeedback: (sessionId: SessionId) => { ctx.get('feedbackUi')?.openSession(sessionId) },
|
|
284
325
|
- }),
|
|
285
|
-
+ inject:
|
|
326
|
+
+ inject: injectHeaderAction,
|
|
286
327
|
}, SessionLogDownloadHeaderAction))
|
|
287
328
|
+ ctx.slots.inject('conversation.trajectory.toolbar.utilities', () => ctx.slots.register({
|
|
288
329
|
+ name: 'conversation.trajectory.toolbar.utilities',
|
|
@@ -294,10 +335,10 @@ index 9718731..a6ca23e 100644
|
|
|
294
335
|
|
|
295
336
|
export type { SessionLogDownloadDialogInjected, SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
296
337
|
diff --git a/packages/session-query/session-log-export/tsconfig.client.json b/packages/session-query/session-log-export/tsconfig.client.json
|
|
297
|
-
index
|
|
338
|
+
index 1735561ff3..e5b6da6a26 100644
|
|
298
339
|
--- a/packages/session-query/session-log-export/tsconfig.client.json
|
|
299
340
|
+++ b/packages/session-query/session-log-export/tsconfig.client.json
|
|
300
|
-
@@ -
|
|
341
|
+
@@ -25,6 +25,7 @@
|
|
301
342
|
{ "path": "../../client/ui-renderer" },
|
|
302
343
|
{ "path": "../../client/ui-session" },
|
|
303
344
|
{ "path": "../../client/ui-slots" },
|