@sparkelf/dsh-patch-session-log-trajectory-toolbar 0.2.0-rc.2 → 0.2.0-rc.21
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.1.
|
|
7
|
+
"dsh": ">=0.1.7-alpha.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": "00102833dfaee1da9f48a3a8eae9d34005a75218",
|
|
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.0-rc.
|
|
35
|
+
"version": "0.2.0-rc.21"
|
|
36
36
|
}
|
|
@@ -24,7 +24,7 @@ index c286665666..66365f0adc 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 92d7ce9ab0..dfbc88f1e3 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,16 +58,16 @@ index 92d7ce9ab0..dfbc88f1e3 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({
|
|
69
69
|
useSession, useTrajectory, useDuration, loadOlder, loadImage, setActualDuration,
|
|
70
|
-
viewRequest, completeViewRequest, renderSlot, t,
|
|
70
|
+
viewRequest, completeViewRequest, renderSlot, t, jsonStringWrapping,
|
|
71
71
|
}: ConvViewProps
|
|
72
72
|
- & PropsRenderSlots<'conversation.trajectory.images'>
|
|
73
73
|
+ & PropsRenderSlots<
|
|
@@ -76,7 +76,7 @@ index 4f8bc63d9c..cedf2511ea 100644
|
|
|
76
76
|
& InjectFace<TrajectoryViewInjected>
|
|
77
77
|
& PropsLocale<'trajectory'>) {
|
|
78
78
|
const [collapsedTurns, setCollapsedTurns] = useState<ReadonlySet<number>>(EMPTY_TURN_IDS)
|
|
79
|
-
@@ -
|
|
79
|
+
@@ -526,6 +528,7 @@ export function TrajectoryView({
|
|
80
80
|
onToggleAllAssistants={toggleAllAssistants}
|
|
81
81
|
searchQuery={searchQuery}
|
|
82
82
|
onSearchQueryChange={setSearchQuery}
|
|
@@ -85,10 +85,10 @@ index 4f8bc63d9c..cedf2511ea 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 {
|
|
92
92
|
UseTrajectory,
|
|
93
93
|
} from './trajectory-contract.ts'
|
|
94
94
|
|
|
@@ -102,7 +102,7 @@ index 118f3b2c28..a8c71cf9ee 100644
|
|
|
102
102
|
/** Required services: the conversation slot, registries, ordinary Session paging, and the locale service. */
|
|
103
103
|
export const inject = ['slots', 'sessions', 'uiSession', 'uiConversation', 'locale']
|
|
104
104
|
|
|
105
|
-
@@ -
|
|
105
|
+
@@ -84,6 +91,7 @@ export function apply(ctx: Context): void {
|
|
106
106
|
label: () => t('view.trajectory'),
|
|
107
107
|
children: {
|
|
108
108
|
'conversation.trajectory.images': { kind: 'single', scope: 'session' },
|
|
@@ -111,18 +111,33 @@ index 118f3b2c28..a8c71cf9ee 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 6812223661..473e7b63dd 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",
|
|
@@ -182,28 +197,38 @@ index cc13d3f49d..1d22e64cfd 100644
|
|
|
182
197
|
+ .trajectoryButton { display: inline-flex; }
|
|
183
198
|
+}
|
|
184
199
|
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
|
|
200
|
+
index 9810fb86d3..44a8e042d7 100644
|
|
186
201
|
--- a/packages/session-query/session-log-export/src/client/HeaderAction.tsx
|
|
187
202
|
+++ b/packages/session-query/session-log-export/src/client/HeaderAction.tsx
|
|
188
|
-
@@ -1,
|
|
203
|
+
@@ -1,11 +1,11 @@
|
|
189
204
|
import { useState } from 'react'
|
|
190
205
|
import type { ReactNode } from 'react'
|
|
191
|
-
import {
|
|
192
|
-
-import {
|
|
206
|
+
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
|
|
207
|
+
-import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots'
|
|
193
208
|
+import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
209
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
210
|
+
import { IconDownloadOutlineRegular, IconEllipsisOutlineRegular, IconPaperPlaneOutlineRegular, Menu } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
211
|
+
-import { SessionLogDownloadDialog, type SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
212
|
+
-import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
|
|
194
213
|
+import { NS } from './locales.ts'
|
|
195
214
|
+import { SessionLogDownloadDialog, type SessionLogDownloadDialogInjected, type SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
196
215
|
import css from './HeaderAction.module.css'
|
|
197
216
|
|
|
217
|
+
/** Session download controls with observable feedback availability and a Session feedback action. */
|
|
218
|
+
@@ -21,6 +21,12 @@ export interface SessionLogDownloadHeaderInjected extends SessionLogDownloadDial
|
|
219
|
+
/** Session download props plus the optional feedback action. */
|
|
220
|
+
export type SessionLogDownloadHeaderProps = SessionLogDownloadDialogProps & InjectFace<SessionLogDownloadHeaderInjected>
|
|
221
|
+
|
|
222
|
+
+/** Trajectory toolbar presentation of the same download controller. */
|
|
198
223
|
+type SessionLogDownloadToolbarActionProps =
|
|
199
224
|
+ PropsRuntime<'conversation.trajectory.toolbar.utilities'>
|
|
200
225
|
+ & PropsLocale<typeof NS>
|
|
201
226
|
+ & InjectFace<SessionLogDownloadDialogInjected>
|
|
202
227
|
+
|
|
203
228
|
/**
|
|
204
|
-
* Render the Session Header
|
|
229
|
+
* Render the Session Header menu with download and optional feedback actions.
|
|
205
230
|
* @param props - Session runtime, download controller, and localized copy.
|
|
206
|
-
@@ -
|
|
231
|
+
@@ -53,6 +59,7 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
|
|
207
232
|
<button
|
|
208
233
|
type="button"
|
|
209
234
|
className={css.moreButton}
|
|
@@ -211,7 +236,7 @@ index cb20cb9f9d..6f5eefab95 100644
|
|
|
211
236
|
aria-label={t('header.more')}
|
|
212
237
|
aria-haspopup="menu"
|
|
213
238
|
aria-expanded={open}
|
|
214
|
-
@@ -
|
|
239
|
+
@@ -67,3 +74,31 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
|
|
215
240
|
</>
|
|
216
241
|
)
|
|
217
242
|
}
|
|
@@ -238,33 +263,45 @@ index cb20cb9f9d..6f5eefab95 100644
|
|
|
238
263
|
+ title={t('header.action')}
|
|
239
264
|
+ onClick={() => { void request(sessionId) }}
|
|
240
265
|
+ >
|
|
241
|
-
+ <
|
|
266
|
+
+ <IconDownloadOutlineRegular size={11} />
|
|
242
267
|
+ <span>{t('header.action')}</span>
|
|
243
268
|
+ </button>
|
|
244
269
|
+ )
|
|
245
270
|
+}
|
|
246
271
|
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
|
|
272
|
+
index bcba0dd581..ed8e67e4d0 100644
|
|
248
273
|
--- a/packages/session-query/session-log-export/src/client/index.ts
|
|
249
274
|
+++ b/packages/session-query/session-log-export/src/client/index.ts
|
|
250
|
-
@@ -
|
|
251
|
-
import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
275
|
+
@@ -8,9 +8,14 @@ import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
252
276
|
import type {} from '@deepseek-ai/dsh-client-ui-renderer/client'
|
|
253
277
|
import type {} from '@deepseek-ai/dsh-client-ui-session/client'
|
|
278
|
+
import type {} from '@deepseek-ai/dsh-client-ui-message-feedback/client'
|
|
254
279
|
+import type {} from '@deepseek-ai/dsh-client-ui-trajectory/client'
|
|
280
|
+
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
|
|
255
281
|
import { SessionLogDownloadController } from './controller.ts'
|
|
256
|
-
|
|
257
|
-
|
|
282
|
+
-import { SessionLogDownloadHeaderAction, type SessionLogDownloadHeaderInjected } from './HeaderAction.tsx'
|
|
283
|
+
+import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
|
|
258
284
|
+import {
|
|
259
285
|
+ SessionLogDownloadHeaderAction, SessionLogDownloadToolbarAction,
|
|
286
|
+
+ type SessionLogDownloadHeaderInjected,
|
|
260
287
|
+} from './HeaderAction.tsx'
|
|
261
288
|
import { en, NS, zh, type SessionLogDownloadKey } from './locales.ts'
|
|
262
289
|
|
|
263
290
|
declare module '@deepseek-ai/cordis' {
|
|
264
|
-
@@ -
|
|
291
|
+
@@ -35,6 +40,21 @@ export const inject = ['slots', 'locale']
|
|
265
292
|
*/
|
|
266
293
|
export function apply(ctx: ClientContext): void {
|
|
267
294
|
const controller = new SessionLogDownloadController()
|
|
295
|
+
+ // The Header presentation carries the feedback action the official tree added, so its
|
|
296
|
+
+ // injection supplies that hook; the Trajectory presentation is download-only and shares
|
|
297
|
+
+ // the same controller, request, and dismiss.
|
|
298
|
+
+ const injectHeaderAction = (): SessionLogDownloadHeaderInjected => ({
|
|
299
|
+
+ hooks: { sessionLogDownload: controller.store, feedbackAvailable },
|
|
300
|
+
+ request: (sessionId: SessionId) => controller.download(sessionId),
|
|
301
|
+
+ dismiss: (sessionId: SessionId) => { controller.dismiss(sessionId) },
|
|
302
|
+
+ // The feedback plugin can unload between the menu render and this click.
|
|
303
|
+
+ openFeedback: (sessionId: SessionId) => { ctx.get('feedbackUi')?.openSession(sessionId) },
|
|
304
|
+
+ })
|
|
268
305
|
+ const injectAction = (): SessionLogDownloadDialogInjected => ({
|
|
269
306
|
+ hooks: { sessionLogDownload: controller.store },
|
|
270
307
|
+ request: (sessionId: SessionId) => controller.download(sessionId),
|
|
@@ -273,16 +310,18 @@ index 97187311fa..a6ca23e3b3 100644
|
|
|
273
310
|
ctx.provide('sessionLogDownload', controller)
|
|
274
311
|
ctx.effect(() => async () => { await controller.dispose() }, 'session-log-download: browser download lifecycle')
|
|
275
312
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'session-log-download: browser dictionaries')
|
|
276
|
-
@@ -
|
|
313
|
+
@@ -52,14 +72,14 @@ export function apply(ctx: ClientContext): void {
|
|
277
314
|
name: 'conversation.session.header.utilities',
|
|
278
315
|
id: 'session-log-download',
|
|
279
316
|
locale: NS,
|
|
280
|
-
- inject: ():
|
|
281
|
-
- hooks: { sessionLogDownload: controller.store },
|
|
317
|
+
- inject: (): SessionLogDownloadHeaderInjected => ({
|
|
318
|
+
- hooks: { sessionLogDownload: controller.store, feedbackAvailable },
|
|
282
319
|
- request: (sessionId: SessionId) => controller.download(sessionId),
|
|
283
320
|
- dismiss: (sessionId: SessionId) => { controller.dismiss(sessionId) },
|
|
321
|
+
- // The feedback plugin can unload between the menu render and this click.
|
|
322
|
+
- openFeedback: (sessionId: SessionId) => { ctx.get('feedbackUi')?.openSession(sessionId) },
|
|
284
323
|
- }),
|
|
285
|
-
+ inject:
|
|
324
|
+
+ inject: injectHeaderAction,
|
|
286
325
|
}, SessionLogDownloadHeaderAction))
|
|
287
326
|
+ ctx.slots.inject('conversation.trajectory.toolbar.utilities', () => ctx.slots.register({
|
|
288
327
|
+ name: 'conversation.trajectory.toolbar.utilities',
|
|
@@ -294,10 +333,10 @@ index 97187311fa..a6ca23e3b3 100644
|
|
|
294
333
|
|
|
295
334
|
export type { SessionLogDownloadDialogInjected, SessionLogDownloadDialogProps } from './Dialog.tsx'
|
|
296
335
|
diff --git a/packages/session-query/session-log-export/tsconfig.client.json b/packages/session-query/session-log-export/tsconfig.client.json
|
|
297
|
-
index
|
|
336
|
+
index 1735561ff3..e5b6da6a26 100644
|
|
298
337
|
--- a/packages/session-query/session-log-export/tsconfig.client.json
|
|
299
338
|
+++ b/packages/session-query/session-log-export/tsconfig.client.json
|
|
300
|
-
@@ -
|
|
339
|
+
@@ -25,6 +25,7 @@
|
|
301
340
|
{ "path": "../../client/ui-renderer" },
|
|
302
341
|
{ "path": "../../client/ui-session" },
|
|
303
342
|
{ "path": "../../client/ui-slots" },
|