@sparkelf/dsh-plus 0.2.8-alpha.50 → 0.2.9-alpha.101
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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/cordis.patch.yml +29 -7
- package/lib/{apply-DmICvIGh.js → apply-CvePS57c.js} +213 -43
- package/lib/{apply-08huHfLG.js → apply-DycMqLJO.js} +240 -53
- package/lib/apply-c_7SZFSh.js +1193 -0
- package/lib/apply.js +2 -2
- package/lib/bin.js +20 -319
- package/lib/types/apply.d.ts +14 -1
- package/lib/types/apply.js +275 -53
- package/lib/types/capabilities.js +25 -36
- package/lib/types/manifest.d.ts +24 -0
- package/lib/types/manifest.js +51 -0
- package/lib/types/profile.d.ts +1 -0
- package/lib/types/profile.js +14 -3
- package/package.json +531 -577
- package/patches/approval-allow-policy.patch +3 -3
- package/patches/atomic-write-zombie-lock-holder.patch +1 -1
- package/patches/bootstrap-exempt-names.patch +6 -6
- package/patches/composer-popover-boundaries.patch +41 -283
- package/patches/image-offload-hoist-replay.patch +34 -31
- package/patches/input-trigger-source-label.patch +63 -0
- package/patches/legacy-code-preset.patch +5 -5
- package/patches/llm-pi-ai-transport-truncation.patch +4 -4
- package/patches/mobile-journal-generation.patch +2 -2
- package/patches/office-preview-stable-load.patch +1 -1
- package/patches/officecli-deliverables.patch +2 -2
- package/patches/ptc-mcp-schema-types.patch +3 -3
- package/patches/responses-reasoning-status.patch +197 -48
- package/patches/session-controller-image-downgrade-and-tool-visibility.patch +16 -14
- package/patches/session-export-chinese.patch +11 -11
- package/patches/session-format-legacy-restart.patch +1 -1
- package/patches/sidebar-right-tab-menu.patch +119 -0
- package/patches/state-dot-brand-blue.patch +2 -2
- package/patches/ui-settings-compact-phone.patch +2 -9
- package/patches/ui-sidebar-right-global-panel.patch +3 -3
- package/patches/workspace-hide-group-rooms.patch +38 -0
- package/patches/workspace-storage-restore.patch +21 -5
- package/patches/wsl-native-open.patch +8 -8
- package/lib/apply-e0aMC4B4.js +0 -601
- package/lib/types/standalone-capabilities.d.ts +0 -139
- package/lib/types/standalone-capabilities.js +0 -688
- package/lib/types/standalone-cli.d.ts +0 -17
- package/lib/types/standalone-cli.js +0 -913
- package/lib/types/standalone-profile.d.ts +0 -258
- package/lib/types/standalone-profile.js +0 -747
- package/lib/types/standalone-server.d.ts +0 -70
- package/lib/types/standalone-server.js +0 -158
- package/patches/browser-auth-mode.patch +0 -127
- package/patches/diagram-preview.patch +0 -562
- package/patches/dsh-resource-ref-chip.patch +0 -40
- package/patches/session-envelope-ignorable.patch +0 -63
- package/patches/session-log-trajectory-toolbar.patch +0 -352
- package/patches/ui-schedule-plaza-tab.patch +0 -217
- package/patches/web-runtime-compat.patch +0 -83
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/bundle/base/cordis.patch.yml b/packages/bundle/base/cordis.patch.yml
|
|
2
|
-
index
|
|
2
|
+
index 18286618..a70a0aec 100644
|
|
3
3
|
--- a/packages/bundle/base/cordis.patch.yml
|
|
4
4
|
+++ b/packages/bundle/base/cordis.patch.yml
|
|
5
5
|
@@ -259,7 +259,7 @@
|
|
@@ -21,7 +21,7 @@ index 863d194bf5..2d1a7d4c40 100644
|
|
|
21
21
|
- id: shell-env
|
|
22
22
|
name: '@deepseek-ai/dsh-shell-env'
|
|
23
23
|
diff --git a/packages/interaction/permission-presets/src/index.ts b/packages/interaction/permission-presets/src/index.ts
|
|
24
|
-
index
|
|
24
|
+
index b071d029..628f8f42 100644
|
|
25
25
|
--- a/packages/interaction/permission-presets/src/index.ts
|
|
26
26
|
+++ b/packages/interaction/permission-presets/src/index.ts
|
|
27
27
|
@@ -111,7 +111,7 @@ const permissionStateSchema: zod.ZodType<PermissionProjectionState> = zod.object
|
|
@@ -34,7 +34,7 @@ index b071d0297a..628f8f42ea 100644
|
|
|
34
34
|
}).strict()
|
|
35
35
|
|
|
36
36
|
diff --git a/packages/interaction/user-approval/src/index.ts b/packages/interaction/user-approval/src/index.ts
|
|
37
|
-
index
|
|
37
|
+
index df48aca5..82c3f39f 100644
|
|
38
38
|
--- a/packages/interaction/user-approval/src/index.ts
|
|
39
39
|
+++ b/packages/interaction/user-approval/src/index.ts
|
|
40
40
|
@@ -64,20 +64,27 @@ const OUTCOMES: readonly ApprovalOutcome[] = ['allowed-once', 'rejected', 'cance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/util/atomic-write/src/index.ts b/packages/util/atomic-write/src/index.ts
|
|
2
|
-
index
|
|
2
|
+
index 60e2c67b..cfe7c782 100644
|
|
3
3
|
--- a/packages/util/atomic-write/src/index.ts
|
|
4
4
|
+++ b/packages/util/atomic-write/src/index.ts
|
|
5
5
|
@@ -12,6 +12,7 @@
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
diff --git a/packages/boot/app-boot/src/index.ts b/packages/boot/app-boot/src/index.ts
|
|
2
|
-
index
|
|
2
|
+
index 40ff3068..e0e6f7c4 100644
|
|
3
3
|
--- a/packages/boot/app-boot/src/index.ts
|
|
4
4
|
+++ b/packages/boot/app-boot/src/index.ts
|
|
5
|
-
@@ -
|
|
5
|
+
@@ -157,6 +157,19 @@ const BOOTSTRAP_NAMES = new Set([
|
|
6
6
|
/** Name prefixes no discovered file may set. */
|
|
7
7
|
const BOOTSTRAP_PREFIXES = ['DSH_', 'XDG_', 'DYLD_', 'BASH_FUNC_']
|
|
8
8
|
|
|
@@ -19,10 +19,10 @@ index 22332c3..ae00ae0 100644
|
|
|
19
19
|
+ */
|
|
20
20
|
+const BOOTSTRAP_EXEMPT_NAMES = new Set(['DSH_OFFICE_FONT_DIR'])
|
|
21
21
|
+
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@@ -
|
|
22
|
+
/** Proxy names the Harness-home `.env` may set in any letter case: proxy clients read both spellings. */
|
|
23
|
+
const HOME_LAYER_PROXY_NAMES = new Set(['HTTP_PROXY', 'HTTPS_PROXY', 'ALL_PROXY', 'NO_PROXY'])
|
|
24
|
+
|
|
25
|
+
@@ -190,6 +203,7 @@ function isHomeLayerRouteName(name: string): boolean {
|
|
26
26
|
*/
|
|
27
27
|
function isBootstrapOnly(name: string): boolean {
|
|
28
28
|
const upper = name.toUpperCase()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/apps/web/tests/access-confirmation.e2e.ts b/apps/web/tests/access-confirmation.e2e.ts
|
|
2
|
-
index
|
|
2
|
+
index bb9b3d20..450a69d2 100644
|
|
3
3
|
--- a/apps/web/tests/access-confirmation.e2e.ts
|
|
4
4
|
+++ b/apps/web/tests/access-confirmation.e2e.ts
|
|
5
5
|
@@ -151,6 +151,12 @@ describe('web e2e: experimental Auto and Full access confirmation', () => {
|
|
@@ -16,10 +16,10 @@ index f97978d346..edab518be0 100644
|
|
|
16
16
|
const dialog = page.getByRole('dialog', { name: '确认启用完全权限?' })
|
|
17
17
|
await dialog.waitFor({ timeout: 10_000 })
|
|
18
18
|
diff --git a/apps/web/tests/default-model.e2e.ts b/apps/web/tests/default-model.e2e.ts
|
|
19
|
-
index
|
|
19
|
+
index afd89b3c..5a568f38 100644
|
|
20
20
|
--- a/apps/web/tests/default-model.e2e.ts
|
|
21
21
|
+++ b/apps/web/tests/default-model.e2e.ts
|
|
22
|
-
@@ -
|
|
22
|
+
@@ -482,6 +482,13 @@ describe('web e2e: the composer model switch is the default for later sessions',
|
|
23
23
|
await trigger.waitFor({ timeout: 15_000 })
|
|
24
24
|
expect(await trigger.evaluate(element => getComputedStyle(element).fontWeight)).toBe('400')
|
|
25
25
|
await trigger.click()
|
|
@@ -34,10 +34,10 @@ index 9625333287..c71f8c02de 100644
|
|
|
34
34
|
const composerBounds = await page.locator('[data-composer-card]').first().boundingBox()
|
|
35
35
|
expect(modelMenuBounds!.width).toBeLessThan(composerBounds!.width)
|
|
36
36
|
diff --git a/packages/client/ui-layout/README.md b/packages/client/ui-layout/README.md
|
|
37
|
-
index
|
|
37
|
+
index 8a204762..b91e932d 100644
|
|
38
38
|
--- a/packages/client/ui-layout/README.md
|
|
39
39
|
+++ b/packages/client/ui-layout/README.md
|
|
40
|
-
@@ -
|
|
40
|
+
@@ -62,7 +62,7 @@ The root registration supplies folded-landscape posture through an injected obse
|
|
41
41
|
|
|
42
42
|
`selectPanel(id)` checks the live `main` registry before changing selection; an absent key throws and leaves the current panel intact. `beginNavigation()` returns an abort signal for an asynchronous UI navigation. A later call, a valid panel selection (including repeated selection), or layout disposal aborts that signal without cancelling underlying Session creation. Consumers check the signal before committing navigation or moving drafts.
|
|
43
43
|
|
|
@@ -47,291 +47,49 @@ index 43c61b89d1..8fa5117005 100644
|
|
|
47
47
|
</details>
|
|
48
48
|
|
|
49
49
|
diff --git a/packages/client/ui-layout/src/client/AppFrame.tsx b/packages/client/ui-layout/src/client/AppFrame.tsx
|
|
50
|
-
index
|
|
50
|
+
index 23e71c9c..50e1d3a9 100644
|
|
51
51
|
--- a/packages/client/ui-layout/src/client/AppFrame.tsx
|
|
52
52
|
+++ b/packages/client/ui-layout/src/client/AppFrame.tsx
|
|
53
|
-
@@ -
|
|
53
|
+
@@ -39,7 +39,7 @@ export type AppFrameProps =
|
|
54
54
|
|
|
55
55
|
/** Center column grid item (session-body building block). */
|
|
56
|
-
function CenterColumn(props: { children?: ReactNode }) {
|
|
57
|
-
- return <div className={css.centerCol}>{props.children}</div>
|
|
58
|
-
+ return <div className={css.centerCol} data-dsh-center-col>{props.children}</div>
|
|
56
|
+
function CenterColumn(props: { children?: ReactNode; inert: boolean }) {
|
|
57
|
+
- return <div className={css.centerCol} {...{ inert: props.inert ? '' : undefined }}>{props.children}</div>
|
|
58
|
+
+ return <div className={css.centerCol} data-dsh-center-col {...{ inert: props.inert ? '' : undefined }}>{props.children}</div>
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/** Subscribe to the main key without subscribing the column frame to each panel id. */
|
|
62
|
-
diff --git a/packages/client/ui-model-selection/src/client/ModelSelect.module.css b/packages/client/ui-model-selection/src/client/ModelSelect.module.css
|
|
63
|
-
index c36809acaa..21fb6c73b8 100644
|
|
64
|
-
--- a/packages/client/ui-model-selection/src/client/ModelSelect.module.css
|
|
65
|
-
+++ b/packages/client/ui-model-selection/src/client/ModelSelect.module.css
|
|
66
|
-
@@ -97,7 +97,9 @@
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
/* Let the visible pane's rows set the card width, but keep pathological ids
|
|
70
|
-
- and narrow screens inside a bounded card where ellipsis remains. */
|
|
71
|
-
+ and narrow screens inside a bounded card where ellipsis remains. The card's
|
|
72
|
-
+ own pad is part of that bound, as it is on the Menu primitive's surface. */
|
|
73
|
-
+ box-sizing: border-box;
|
|
74
|
-
width: max-content;
|
|
75
|
-
min-width: min(240px, calc(100vw - 32px));
|
|
76
|
-
max-width: min(420px, calc(100vw - 32px));
|
|
77
62
|
diff --git a/packages/client/ui-model-selection/src/client/ModelSelect.tsx b/packages/client/ui-model-selection/src/client/ModelSelect.tsx
|
|
78
|
-
index f68d355317..c8a0089c19 100644
|
|
79
63
|
--- a/packages/client/ui-model-selection/src/client/ModelSelect.tsx
|
|
80
64
|
+++ b/packages/client/ui-model-selection/src/client/ModelSelect.tsx
|
|
81
|
-
@@ -
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
+
|
|
86
|
-
+
|
|
87
|
-
+
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
+
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
+
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
--- a/packages/client/ui-model-selection/tests/model-select.client.spec.tsx
|
|
113
|
-
+++ b/packages/client/ui-model-selection/tests/model-select.client.spec.tsx
|
|
114
|
-
@@ -454,14 +454,19 @@ describe('ModelSelect reasoning effort', () => {
|
|
115
|
-
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', { configurable: true, get: () => 200 })
|
|
116
|
-
Object.defineProperty(HTMLElement.prototype, 'offsetHeight', { configurable: true, get: () => 300 })
|
|
117
|
-
try {
|
|
118
|
-
- const { container } = render(<ModelSelect renderSlot={renderLabel}
|
|
119
|
-
+ const { container } = render(<div data-dsh-center-col><ModelSelect renderSlot={renderLabel}
|
|
120
|
-
locked={false}
|
|
121
|
-
available
|
|
122
|
-
directory={createSnapshotStore(state())}
|
|
123
|
-
load={vi.fn()} resolveText={resolveText}
|
|
124
|
-
select={vi.fn().mockResolvedValue({ ok: true, value: undefined })}
|
|
125
|
-
t={t}
|
|
126
|
-
- />)
|
|
127
|
-
+ /></div>)
|
|
128
|
-
+ // The composer card's own rect is a zero rect in jsdom; the column's is not.
|
|
129
|
-
+ Object.defineProperty(container.firstElementChild, 'getBoundingClientRect', {
|
|
130
|
-
+ configurable: true,
|
|
131
|
-
+ value: () => ({ left: 280, right: 520, top: 0, bottom: 700, width: 240, height: 700, x: 280, y: 0, toJSON: () => ({}) }),
|
|
132
|
-
+ })
|
|
133
|
-
const trigger = screen.getByRole('button', { name: /选择模型/ })
|
|
134
|
-
fireEvent.click(trigger)
|
|
135
|
-
const menu = screen.getByRole('menu')
|
|
136
|
-
@@ -469,8 +474,9 @@ describe('ModelSelect reasoning effort', () => {
|
|
137
|
-
expect(container.contains(menu)).toBe(false)
|
|
138
|
-
expect(menu.parentElement).toBe(document.body)
|
|
139
|
-
// jsdom anchor rects are all zero, so the measured 200x300 card clamps
|
|
140
|
-
- // to the 12px viewport margin on both axes.
|
|
141
|
-
- expect(menu.style.left).toBe('12px')
|
|
142
|
-
+ // to the centre column's 12px inset horizontally and the viewport's on
|
|
143
|
-
+ // the vertical axis.
|
|
144
|
-
+ expect(menu.style.left).toBe('292px')
|
|
145
|
-
expect(menu.style.top).toBe('12px')
|
|
146
|
-
// Interactions inside the trigger subtree or the portaled card stay open.
|
|
147
|
-
expect(fireEvent.mouseDown(menu)).toBe(true)
|
|
148
|
-
diff --git a/packages/client/ui-permission-presets/src/client/PermissionSelect.tsx b/packages/client/ui-permission-presets/src/client/PermissionSelect.tsx
|
|
149
|
-
index 0281c41a24..f44f20a8fc 100644
|
|
150
|
-
--- a/packages/client/ui-permission-presets/src/client/PermissionSelect.tsx
|
|
151
|
-
+++ b/packages/client/ui-permission-presets/src/client/PermissionSelect.tsx
|
|
152
|
-
@@ -1,4 +1,4 @@
|
|
153
|
-
-import { useEffect, useState } from 'react'
|
|
154
|
-
+import { useEffect, useRef, useState } from 'react'
|
|
155
|
-
import type { ReactNode } from 'react'
|
|
156
|
-
import clsx from 'clsx'
|
|
157
|
-
import {
|
|
158
|
-
@@ -81,6 +81,8 @@ export function PermissionSelect({
|
|
159
|
-
const catalog = usePermissionCatalog(state => state.value)
|
|
160
|
-
const [pick, setPick] = useState<string | null>(null)
|
|
161
|
-
const [open, setOpen] = useState(false)
|
|
162
|
-
+ /** The center column this trigger sits in; the portaled menu clamps to it. */
|
|
163
|
-
+ const boundaryRef = useRef<HTMLElement | null>(null)
|
|
164
|
-
const [confirmation, setConfirmation] = useState<string | null>(null)
|
|
165
|
-
const [acknowledged, setAcknowledged] = useState(false)
|
|
166
|
-
|
|
167
|
-
@@ -171,8 +173,12 @@ export function PermissionSelect({
|
|
168
|
-
onClose={() => { setOpen(false) }}
|
|
169
|
-
side="top"
|
|
170
|
-
portal
|
|
171
|
-
+ boundaryRef={boundaryRef}
|
|
172
|
-
anchor={
|
|
173
|
-
<button
|
|
174
|
-
+ ref={(node) => {
|
|
175
|
-
+ boundaryRef.current = node?.closest<HTMLElement>('[data-dsh-center-col]') ?? null
|
|
176
|
-
+ }}
|
|
177
|
-
type="button"
|
|
178
|
-
className={css.trigger}
|
|
179
|
-
aria-label={t('mode', { name: currentLabel })}
|
|
180
|
-
diff --git a/packages/client/ui-primitives/README.md b/packages/client/ui-primitives/README.md
|
|
181
|
-
index d95d802886..bb1d53df18 100644
|
|
182
|
-
--- a/packages/client/ui-primitives/README.md
|
|
183
|
-
+++ b/packages/client/ui-primitives/README.md
|
|
184
|
-
@@ -49,7 +49,7 @@ Check this table before writing a control in a feature package. A plugin cannot
|
|
185
|
-
| `Input` | Single-line text entry for search boxes and inline forms. Its ref targets the native input for focus and is cleared on unmount. |
|
|
186
|
-
| `InlineEditor` | Autofocused multi-line inline editor for short drafts such as queued messages and goals. It grows with its text and its width up to six lines, then scrolls; Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing, and Escape cancels. The caller supplies the localized `label` and rebinds the scrollbar on an elevated surface. |
|
|
187
|
-
| `ZoomControls`, `DOCUMENT_ZOOM` | Floating document zoom controls with localized labels, fixed presets, and visibility/activity callbacks. An omitted `fit` hides the fitting row. The toolbar carries `data-document-zoom-controls`, plus `data-document-zoom-visible` while visible. An owner `className` overrides `bottom` and `max-width` regardless of stylesheet order; `inset-inline-start` and `transform` center the toolbar and move it on enter and exit, `opacity` fades it, and all three stay with the primitive. Renderers share the published scale limits. |
|
|
188
|
-
-| `Menu`, `MenuItemButton` | Dropdown of `items` data rows, separators, and group labels, with nested submenus; `children` adds component rows, each a `MenuItemButton` (`separatorBefore` starts a new group), in the same list. `MenuItemButton.current` exposes the current page or view through `aria-current` without changing selection or appearance. Every row shares the styling, the keyboard walk, and the focus return; closing stays the owner's state change for both kinds. While open, ↑/↓ (with Home and End) walk the list, Tab settles the focused row, and Escape or Shift+Tab close back to the anchor; selecting a row also returns the keyboard to the anchor unless the owner moved it itself. Only a keyboard on the anchor or inside the list is intercepted, and `autoFocus` decides solely whether opening focuses the first row. |
|
|
189
|
-
+| `Menu`, `MenuItemButton` | Dropdown of `items` data rows, separators, and group labels, with nested submenus; `children` adds component rows, each a `MenuItemButton` (`separatorBefore` starts a new group), in the same list. `MenuItemButton.current` exposes the current page or view through `aria-current` without changing selection or appearance. Every row shares the styling, the keyboard walk, and the focus return; closing stays the owner's state change for both kinds. While open, ↑/↓ (with Home and End) walk the list, Tab settles the focused row, and Escape or Shift+Tab close back to the anchor; selecting a row also returns the keyboard to the anchor unless the owner moved it itself. Only a keyboard on the anchor or inside the list is intercepted, and `autoFocus` decides solely whether opening focuses the first row. A portaled list may intersect viewport clamping with an owner boundary. |
|
|
190
|
-
| `MenuGroup`, `observeStickyMenuGroups` | Localized, accessible groups for custom menus and listboxes, with shared sticky-heading styling and native intersection/size observation; the caller owns the observer's lifetime. |
|
|
191
|
-
| `Pill` | Selectable capsule button for view switchers and filters; takes `active` and `onClick`. |
|
|
192
|
-
| `SegmentedTabs` | Controlled equal-width tabs with a sliding indicator and Left/Right, Home, and End navigation. The caller supplies labels, tab/panel ids, and panel content. Default `size="md"` is 42px tall with a 4px inset; `size="sm"` is 34px tall with a 2px inset. |
|
|
193
|
-
diff --git a/packages/client/ui-primitives/README.zh.md b/packages/client/ui-primitives/README.zh.md
|
|
194
|
-
index 115e1defe5..9972ffe785 100644
|
|
195
|
-
--- a/packages/client/ui-primitives/README.zh.md
|
|
196
|
-
+++ b/packages/client/ui-primitives/README.zh.md
|
|
197
|
-
@@ -25,7 +25,7 @@ kind: "package-library"
|
|
198
|
-
<a id="use-this-package"></a>
|
|
199
|
-
## 使用本包
|
|
200
|
-
|
|
201
|
-
-`Toast` 在浅色和深色模式下均使用主题的系统提示背景与文字颜色。`Menu` 数据条目与 `MenuItemButton` 组件条目接收功能 owner 提供的有效快捷键,并在末端以无背景的浅灰色文字对齐显示,子菜单也采用同一呈现。主指针为粗指针(`pointer: coarse`)且未使用[键盘导航](#input-modality)时,菜单隐藏这些提示。键盘导航会显示提示,直到下一次指针按下;快捷键绑定始终生效。`ShortcutKeys` 默认以无方块的按键文字显示菜单和行内提示。`tooltip` 变体在深色气泡上使用稍浅的键帽,以加号连接的组合则共用一个填充色块。`Tooltip.shortcutKeys` 将键帽与可选的本地化操作文本垂直居中排列,标签为空时只显示按键。可选的 `className` 供调用方设置交互状态样式。`Modal` 使用框架共享的浮层起点,视口边距至少为 24px。其遮罩不绘制 Windows 顶栏区域,覆盖整个视口的模态层仍阻挡背景点击。`Modal` 与设置外壳通过 `useModalLayer` 共用顶层 Esc 和 Tab 处理,关闭时恢复先前焦点。`closeTopModal(document)` 请求前台弹窗当前的关闭操作;上层菜单或未注册的对话框会阻止关闭其后方弹窗。组件通过 `isBehindModal` 避免将焦点移到嵌套弹窗后方。菜单先消费自己的 Esc,再由模态层处理关闭。 `observeComposition` 为局部弹层和录键处理提供相同的 composition-end 与旧版 IME 保护;调用方随交互生命周期释放其 document 监听。
|
|
202
|
-
+`Toast` 在浅色和深色模式下均使用主题的系统提示背景与文字颜色。`Menu` 数据条目与 `MenuItemButton` 组件条目接收功能 owner 提供的有效快捷键,并在末端以无背景的浅灰色文字对齐显示,子菜单也采用同一呈现。主指针为粗指针(`pointer: coarse`)且未使用[键盘导航](#input-modality)时,菜单隐藏这些提示。键盘导航会显示提示,直到下一次指针按下;快捷键绑定始终生效。`ShortcutKeys` 默认以无方块的按键文字显示菜单和行内提示。`tooltip` 变体在深色气泡上使用稍浅的键帽,以加号连接的组合则共用一个填充色块。`Tooltip.shortcutKeys` 将键帽与可选的本地化操作文本垂直居中排列,标签为空时只显示按键。可选的 `className` 供调用方设置交互状态样式。`Modal` 使用框架共享的浮层起点,视口边距至少为 24px。其遮罩不绘制 Windows 顶栏区域,覆盖整个视口的模态层仍阻挡背景点击。`Modal` 与设置外壳通过 `useModalLayer` 共用顶层 Esc 和 Tab 处理,关闭时恢复先前焦点。`closeTopModal(document)` 请求前台弹窗当前的关闭操作;上层菜单或未注册的对话框会阻止关闭其后方弹窗。组件通过 `isBehindModal` 避免将焦点移到嵌套弹窗后方。菜单先消费自己的 Esc,再由模态层处理关闭。 portal 模式的列表可把视口钳制与 owner boundary 取交集。 `observeComposition` 为局部弹层和录键处理提供相同的 composition-end 与旧版 IME 保护;调用方随交互生命周期释放其 document 监听。
|
|
203
|
-
|
|
204
|
-
`isMobileDevice()` 识别 iOS 和 Android 手机及平板,供自动聚焦和收起键盘使用。它识别 UA 中的 `Android`、`iPhone`、`iPad` 或 `iPod`,以及报告 `MacIntel` 且触摸点数大于一的 iPad。其他设备(包括 Windows 触屏电脑)返回 false,不受窗口宽度影响。函数缓存首次判断结果,供页面内的所有调用方共享;组件重新挂载会复用该结果,重新加载页面时会再次读取浏览器环境。识别出的移动设备需要用户主动聚焦文本输入框。隐藏移动平台信息的浏览器模式或自定义 UA 可能导致识别失败;未识别的 UA 返回 false。仅凭桌面 UA 无法区分 Android 平板与 Linux 电脑。
|
|
205
|
-
|
|
206
|
-
diff --git a/packages/client/ui-primitives/src/Menu.tsx b/packages/client/ui-primitives/src/Menu.tsx
|
|
207
|
-
index 68b3a5766e..e25866591a 100644
|
|
208
|
-
--- a/packages/client/ui-primitives/src/Menu.tsx
|
|
209
|
-
+++ b/packages/client/ui-primitives/src/Menu.tsx
|
|
210
|
-
@@ -1,5 +1,5 @@
|
|
211
|
-
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
|
212
|
-
-import type { CSSProperties, ReactNode, SyntheticEvent } from 'react'
|
|
213
|
-
+import type { CSSProperties, ReactNode, RefObject, SyntheticEvent } from 'react'
|
|
214
|
-
import { createPortal } from 'react-dom'
|
|
215
|
-
import clsx from 'clsx'
|
|
216
|
-
import { IconCheckOutlineRegular } from './icons/index.tsx'
|
|
217
|
-
@@ -154,6 +154,10 @@ const MEASURE_STYLE: CSSProperties = { visibility: 'hidden', left: 0, top: 0 }
|
|
218
|
-
* wrapper there races the host's layout effects). Called on open, each animation
|
|
219
|
-
* frame, and scroll/resize; return null to skip placement for that frame.
|
|
220
|
-
* @param props.minWidthFromAnchor - in portal mode, keep the menu at least as wide as its anchor, bounded by viewport margins.
|
|
221
|
-
+ * @param props.boundaryRef - portal mode only: intersect horizontal placement
|
|
222
|
-
+ * with this owner element's rect as well as the viewport, so a menu owned by a
|
|
223
|
-
+ * column stays inside that column when a sidebar or panel leaves a narrow
|
|
224
|
-
+ * center.
|
|
225
|
-
* @param props.footer - rows pinned below the scrolling items area, separated
|
|
226
|
-
* by a hairline; they stay visible while the items above scroll.
|
|
227
|
-
* @param props.children - component rows rendered after `items` in the same
|
|
228
|
-
@@ -170,7 +174,7 @@ const MEASURE_STYLE: CSSProperties = { visibility: 'hidden', left: 0, top: 0 }
|
|
229
|
-
* document.body outside the owner's DOM subtree.
|
|
230
|
-
* @returns anchor wrapper with the conditional list.
|
|
231
|
-
*/
|
|
232
|
-
-export function Menu({ open, anchor, items = [], children, selectedId, selectedIds, onSelect, onClose, align = 'start', side = 'bottom', portal = false, closeOnPointerLeave = false, dense = false, compact = false, autoFocus = false, selection = 'check', getAnchorRect, minWidthFromAnchor = false, footer, className, listClassName }: {
|
|
233
|
-
+export function Menu({ open, anchor, items = [], children, selectedId, selectedIds, onSelect, onClose, align = 'start', side = 'bottom', portal = false, closeOnPointerLeave = false, dense = false, compact = false, autoFocus = false, selection = 'check', getAnchorRect, minWidthFromAnchor = false, boundaryRef, footer, className, listClassName }: {
|
|
234
|
-
open: boolean
|
|
235
|
-
autoFocus?: boolean
|
|
236
|
-
anchor: ReactNode
|
|
237
|
-
@@ -190,6 +194,7 @@ export function Menu({ open, anchor, items = [], children, selectedId, selectedI
|
|
238
|
-
selection?: 'check' | 'fill'
|
|
239
|
-
getAnchorRect?: () => DOMRect | null
|
|
240
|
-
minWidthFromAnchor?: boolean
|
|
241
|
-
+ boundaryRef?: RefObject<HTMLElement | null>
|
|
242
|
-
className?: string | undefined
|
|
243
|
-
listClassName?: string | undefined
|
|
244
|
-
}) {
|
|
245
|
-
@@ -262,12 +267,19 @@ export function Menu({ open, anchor, items = [], children, selectedId, selectedI
|
|
246
|
-
const GAP = 4
|
|
247
|
-
const vw = window.innerWidth
|
|
248
|
-
const vh = window.innerHeight
|
|
249
|
-
+ // The owner boundary narrows both clamp edges; without one the viewport
|
|
250
|
-
+ // alone decides, exactly as before.
|
|
251
|
-
+ const boundary = boundaryRef?.current?.getBoundingClientRect()
|
|
252
|
-
+ const minX = Math.max(MARGIN, (boundary?.left ?? 0) + MARGIN)
|
|
253
|
-
+ const maxX = Math.min(vw - MARGIN, (boundary?.right ?? vw) - MARGIN)
|
|
254
|
-
+ const availableWidth = Math.max(0, maxX - minX)
|
|
255
|
-
const listEl = listRef.current
|
|
256
|
-
if (listEl !== null) {
|
|
257
|
-
const minimum = minWidthFromAnchor ? `${Math.min(r.width, Math.max(0, vw - MARGIN * 2))}px` : ''
|
|
258
|
-
if (listEl.style.minWidth !== minimum) listEl.style.minWidth = minimum
|
|
259
|
-
}
|
|
260
|
-
const lw = listEl?.offsetWidth ?? 0
|
|
261
|
-
+ const placedWidth = boundary === undefined ? lw : Math.min(lw, availableWidth)
|
|
262
|
-
const lh = listEl?.offsetHeight ?? 0
|
|
263
|
-
|
|
264
|
-
let x: number
|
|
265
|
-
@@ -279,14 +291,22 @@ export function Menu({ open, anchor, items = [], children, selectedId, selectedI
|
|
266
|
-
x = r.left
|
|
267
|
-
y = side === 'bottom' ? r.bottom + GAP : r.top - lh - GAP
|
|
268
|
-
} else {
|
|
269
|
-
- x = r.right - lw
|
|
270
|
-
+ x = r.right - placedWidth
|
|
271
|
-
y = side === 'bottom' ? r.bottom + GAP : r.top - lh - GAP
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
- if (lw > 0) x = Math.min(Math.max(x, MARGIN), vw - lw - MARGIN)
|
|
275
|
-
+ if (lw > 0) x = Math.min(Math.max(x, minX), maxX - placedWidth)
|
|
276
|
-
if (lh > 0) y = Math.min(Math.max(y, overlayTopMargin(MARGIN, r, GAP)), vh - lh - MARGIN)
|
|
277
|
-
|
|
278
|
-
- setFixedPos(current => current?.left === x && current.top === y ? current : { left: x, top: y })
|
|
279
|
-
+ // A bounded card takes the owner's width: the same 12px inset on both
|
|
280
|
-
+ // sides, never wider than the room between them.
|
|
281
|
-
+ const bounds = boundary === undefined
|
|
282
|
-
+ ? {}
|
|
283
|
-
+ : { minWidth: Math.min(218, availableWidth), maxWidth: availableWidth }
|
|
284
|
-
+ setFixedPos(current => current?.left === x && current.top === y
|
|
285
|
-
+ && current.minWidth === bounds.minWidth && current.maxWidth === bounds.maxWidth
|
|
286
|
-
+ ? current
|
|
287
|
-
+ : { left: x, top: y, ...bounds })
|
|
288
|
-
}
|
|
289
|
-
// First run measures the hidden pre-render (same commit as `open`), so
|
|
290
|
-
// end/top alignment and clamping use real dimensions before anything
|
|
291
|
-
@@ -305,7 +325,7 @@ export function Menu({ open, anchor, items = [], children, selectedId, selectedI
|
|
292
|
-
window.removeEventListener('scroll', place, true)
|
|
293
|
-
window.removeEventListener('resize', place)
|
|
294
|
-
}
|
|
295
|
-
- }, [open, portal, align, side, getAnchorRect, minWidthFromAnchor])
|
|
296
|
-
+ }, [open, portal, align, side, getAnchorRect, minWidthFromAnchor, boundaryRef])
|
|
297
|
-
|
|
298
|
-
// Opening remembers where the keyboard was, so closing can hand it back to
|
|
299
|
-
// that control — an anchor wrapping several (a split button) cannot be asked
|
|
300
|
-
diff --git a/packages/client/ui-primitives/tests/atoms.client.spec.tsx b/packages/client/ui-primitives/tests/atoms.client.spec.tsx
|
|
301
|
-
index 8b198e4365..592c56641d 100644
|
|
302
|
-
--- a/packages/client/ui-primitives/tests/atoms.client.spec.tsx
|
|
303
|
-
+++ b/packages/client/ui-primitives/tests/atoms.client.spec.tsx
|
|
304
|
-
@@ -596,6 +596,33 @@ describe('Menu', () => {
|
|
305
|
-
expect(menu.style.top).toBe('132px')
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
+ it('portal mode intersects viewport clamping with an owner boundary', () => {
|
|
309
|
-
+ const offsetWidth = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'offsetWidth')!
|
|
310
|
-
+ Object.defineProperty(HTMLElement.prototype, 'offsetWidth', { configurable: true, get: () => 300 })
|
|
311
|
-
+ const anchor = { left: 480, right: 500, top: 100, bottom: 128, width: 20, height: 28, x: 480, y: 100, toJSON: () => ({}) } as DOMRect
|
|
312
|
-
+ const boundary = { left: 280, right: 520, top: 0, bottom: 700, width: 240, height: 700, x: 280, y: 0, toJSON: () => ({}) } as DOMRect
|
|
313
|
-
+ try {
|
|
314
|
-
+ render(<Menu
|
|
315
|
-
+ portal
|
|
316
|
-
+ open
|
|
317
|
-
+ align="end"
|
|
318
|
-
+ getAnchorRect={() => anchor}
|
|
319
|
-
+ boundaryRef={{ current: { getBoundingClientRect: () => boundary } as HTMLElement }}
|
|
320
|
-
+ anchor={null}
|
|
321
|
-
+ items={items}
|
|
322
|
-
+ onSelect={() => {}}
|
|
323
|
-
+ onClose={() => {}}
|
|
324
|
-
+ />)
|
|
325
|
-
+ const menu = screen.getByRole('menu')
|
|
326
|
-
+ // The owner is 240px wide, so the 12px insets leave 216px for a 300px card.
|
|
327
|
-
+ expect(menu.style.left).toBe('292px')
|
|
328
|
-
+ expect(menu.style.minWidth).toBe('216px')
|
|
329
|
-
+ expect(menu.style.maxWidth).toBe('216px')
|
|
330
|
-
+ } finally {
|
|
331
|
-
+ Object.defineProperty(HTMLElement.prototype, 'offsetWidth', offsetWidth)
|
|
332
|
-
+ }
|
|
333
|
-
+ })
|
|
334
|
-
+
|
|
335
|
-
it('portal mode skips the frame when getAnchorRect returns null (no menu until a rect exists)', () => {
|
|
336
|
-
render(
|
|
337
|
-
<Menu
|
|
65
|
+
@@ -93,11 +93,19 @@
|
|
66
|
+
const lastActionRef = useRef<'load' | 'select'>('load')
|
|
67
|
+
const [toast, setToast] = useState<{ seq: number; text: string } | null>(null)
|
|
68
|
+
const toastSeq = useRef(0)
|
|
69
|
+
+ // The composer's center column is narrower than the viewport, so the card's
|
|
70
|
+
+ // viewport-derived width limit is clamped to the column while it is open.
|
|
71
|
+
+ const [columnWidth, setColumnWidth] = useState<number | null>(null)
|
|
72
|
+
const rootRef = useRef<HTMLDivElement | null>(null)
|
|
73
|
+
const triggerRef = useRef<HTMLButtonElement | null>(null)
|
|
74
|
+
const searchRef = useRef<HTMLInputElement | null>(null)
|
|
75
|
+
const menuRef = useRef<HTMLDivElement | null>(null)
|
|
76
|
+
const groupsRef = useRef<HTMLDivElement | null>(null)
|
|
77
|
+
+ useLayoutEffect(() => {
|
|
78
|
+
+ if (!open) return
|
|
79
|
+
+ const column = triggerRef.current?.closest<HTMLElement>('[data-dsh-center-col]')
|
|
80
|
+
+ setColumnWidth(column?.getBoundingClientRect().width ?? null)
|
|
81
|
+
+ }, [open])
|
|
82
|
+
const itemRefs = useRef<(HTMLButtonElement | null)[]>([])
|
|
83
|
+
const id = useId()
|
|
84
|
+
const anchorStyle: CSSProperties & Record<'--dsh-model-anchor', string> = {
|
|
85
|
+
@@ -538,7 +546,9 @@
|
|
86
|
+
tabIndex={pane.kind === 'detail' ? -1 : undefined}
|
|
87
|
+
id={`${id}-menu`}
|
|
88
|
+
className={clsx(css.menu, (pane.kind === 'root' || pane.kind === 'detail') && css.settingsMenu)}
|
|
89
|
+
- style={anchorStyle}
|
|
90
|
+
+ style={{ ...anchorStyle, ...(columnWidth === null
|
|
91
|
+
+ ? {}
|
|
92
|
+
+ : { maxWidth: Math.max(0, columnWidth - 24) }) }}
|
|
93
|
+
// A detail pane holds plugin controls and prose, not menu items.
|
|
94
|
+
role={pane.kind === 'model' || pane.kind === 'detail' ? 'group' : 'menu'}
|
|
95
|
+
aria-label={pane.kind === 'detail' ? pane.pane.title : t('menu.aria')}
|
|
@@ -118,10 +118,19 @@ index 1dd0e81b..ce88e9a4 100644
|
|
|
118
118
|
return messages
|
|
119
119
|
},
|
|
120
120
|
diff --git a/packages/compaction/compaction-image-offload/tests/projection.spec.ts b/packages/compaction/compaction-image-offload/tests/projection.spec.ts
|
|
121
|
-
index
|
|
121
|
+
index 3eaa2dc..246702a 100644
|
|
122
122
|
--- a/packages/compaction/compaction-image-offload/tests/projection.spec.ts
|
|
123
123
|
+++ b/packages/compaction/compaction-image-offload/tests/projection.spec.ts
|
|
124
|
-
@@ -
|
|
124
|
+
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest'
|
|
125
|
+
import { brandString } from '@deepseek-ai/dsh-brand'
|
|
126
|
+
import { createAssistantMessage, createToolResultMessage, createUserMessage, type ToolCallId } from '@deepseek-ai/dsh-llm'
|
|
127
|
+
import type { ContentBlock, ImageBlock } from '@deepseek-ai/dsh-llm'
|
|
128
|
+
-import { deriveEventMessage, foldSurface, Session, type SessionId, SessionLogOffset, SessionSeq } from '@deepseek-ai/dsh-session'
|
|
129
|
+
+import { deriveEventMessage, foldSurface, Session, SessionId, SessionLogOffset, SessionSeq } from '@deepseek-ai/dsh-session'
|
|
130
|
+
import type { SessionEvent, SessionEventMap } from '@deepseek-ai/dsh-session'
|
|
131
|
+
import { imageOffloadProjection } from '../src/projection.ts'
|
|
132
|
+
|
|
133
|
+
@@ -138,4 +138,49 @@ describe('durable image selections', () => {
|
|
125
134
|
}, { surfaceOp: 'append' })
|
|
126
135
|
expect(() => session.append('image/offload', { targets: [{ seq: assistant.seq, imageIndexes: [0] }] })).toThrow(/must be user\/message/)
|
|
127
136
|
})
|
|
@@ -172,12 +181,11 @@ index 0c82575d..e3217782 100644
|
|
|
172
181
|
+ })
|
|
173
182
|
})
|
|
174
183
|
diff --git a/packages/session-query/session-query-sqlite/src/index.ts b/packages/session-query/session-query-sqlite/src/index.ts
|
|
175
|
-
index 7c95afa2..97d1763e 100644
|
|
176
184
|
--- a/packages/session-query/session-query-sqlite/src/index.ts
|
|
177
185
|
+++ b/packages/session-query/session-query-sqlite/src/index.ts
|
|
178
|
-
@@ -
|
|
179
|
-
import type { DatabaseSync } from 'node:sqlite'
|
|
186
|
+
@@ -10,11 +10,12 @@
|
|
180
187
|
import { Context, Service, type Fiber } from '@deepseek-ai/cordis'
|
|
188
|
+
import { brandString } from '@deepseek-ai/dsh-brand'
|
|
181
189
|
import z from '@deepseek-ai/schemastery'
|
|
182
190
|
-import type { Session, SessionEvent, SessionHeader, SessionId, SessionLogOffset } from '@deepseek-ai/dsh-session'
|
|
183
191
|
+import type { Session, SessionEvent, SessionHeader, SessionId, SessionLogOffset, SessionMessageProjection } from '@deepseek-ai/dsh-session'
|
|
@@ -192,7 +200,7 @@ index 7c95afa2..97d1763e 100644
|
|
|
192
200
|
} from '@deepseek-ai/dsh-session-persistence'
|
|
193
201
|
import SessionQueryEngine, {
|
|
194
202
|
SESSION_QUERY_DEFAULT_PERSISTED_INSPECT_CONCURRENCY,
|
|
195
|
-
@@ -24,6 +25,7 @@
|
|
203
|
+
@@ -24,6 +25,7 @@
|
|
196
204
|
assertSessionHeadersCompatible,
|
|
197
205
|
buildSessionEventSearchDocuments,
|
|
198
206
|
readColdSessionLog,
|
|
@@ -200,7 +208,7 @@ index 7c95afa2..97d1763e 100644
|
|
|
200
208
|
} from '@deepseek-ai/dsh-session-query'
|
|
201
209
|
import type {
|
|
202
210
|
Config as SessionQueryConfig,
|
|
203
|
-
@@ -
|
|
211
|
+
@@ -520,10 +522,27 @@
|
|
204
212
|
// live-preferred.
|
|
205
213
|
if (initiallyLive.has(entry.header.id) || this.ctx.sessions.get(entry.header.id) !== undefined) continue
|
|
206
214
|
assertNotAborted(signal)
|
|
@@ -230,7 +238,7 @@ index 7c95afa2..97d1763e 100644
|
|
|
230
238
|
}
|
|
231
239
|
assertNotAborted(signal)
|
|
232
240
|
const afterSnapshots = await persistence.list(listOptions)
|
|
233
|
-
@@ -
|
|
241
|
+
@@ -548,7 +567,7 @@
|
|
234
242
|
}
|
|
235
243
|
const live = new Map<SessionId, ObservedSession>()
|
|
236
244
|
for (const session of this.ctx.sessions.list()) {
|
|
@@ -239,7 +247,7 @@ index 7c95afa2..97d1763e 100644
|
|
|
239
247
|
const durable = persisted.get(session.id)
|
|
240
248
|
if (durable !== undefined) assertSessionHeadersCompatible(observed.header, durable.header)
|
|
241
249
|
live.set(session.id, observed)
|
|
242
|
-
@@ -
|
|
250
|
+
@@ -614,6 +633,34 @@
|
|
243
251
|
}
|
|
244
252
|
}
|
|
245
253
|
|
|
@@ -274,7 +282,7 @@ index 7c95afa2..97d1763e 100644
|
|
|
274
282
|
private _replaceLiveSession(entry: ObservedSession, generation: number, persisted: boolean): void {
|
|
275
283
|
this._deleteSession('live', entry.header.id)
|
|
276
284
|
const db = this._requireDb()
|
|
277
|
-
@@ -
|
|
285
|
+
@@ -869,22 +916,23 @@
|
|
278
286
|
]
|
|
279
287
|
}
|
|
280
288
|
|
|
@@ -365,18 +373,17 @@ index 8788c8ea..d191b9cc 100644
|
|
|
365
373
|
throw new SessionQueryError(
|
|
366
374
|
/* v8 ignore next -- foldSurface throws Error instances */
|
|
367
375
|
diff --git a/packages/session-query/session-query/src/index.ts b/packages/session-query/session-query/src/index.ts
|
|
368
|
-
index 838ce4c7..83b105fe 100644
|
|
369
376
|
--- a/packages/session-query/session-query/src/index.ts
|
|
370
377
|
+++ b/packages/session-query/session-query/src/index.ts
|
|
371
|
-
@@ -
|
|
372
|
-
SessionSeq,
|
|
378
|
+
@@ -12,6 +12,7 @@
|
|
373
379
|
snapshotSessionEvent,
|
|
380
|
+
validateSessionLog,
|
|
374
381
|
type SessionId,
|
|
375
382
|
+ type SessionMessageProjection,
|
|
376
383
|
type SessionSeq as SessionSeqType,
|
|
377
384
|
} from '@deepseek-ai/dsh-session'
|
|
378
|
-
import {
|
|
379
|
-
@@ -
|
|
385
|
+
import type { ProjectionHandle } from '@deepseek-ai/dsh-session-projection'
|
|
386
|
+
@@ -136,6 +137,23 @@
|
|
380
387
|
this._observations = new SessionObservationReader(ctx, preparedSessionCacheSize)
|
|
381
388
|
}
|
|
382
389
|
|
|
@@ -385,13 +392,9 @@ index 838ce4c7..83b105fe 100644
|
|
|
385
392
|
+ *
|
|
386
393
|
+ * A log is interpreted by whichever projections were mounted when its durable
|
|
387
394
|
+ * decisions were written, so a cold read must use the mounted set rather than
|
|
388
|
-
+ * the first-party catalog alone.
|
|
389
|
-
+ *
|
|
390
|
-
+ *
|
|
391
|
-
+ * earlier carrier, so the recorded depth-first indexes no longer resolve.
|
|
392
|
-
+ *
|
|
393
|
-
+ * Catalog definitions are kept first; a live contribution of the same event
|
|
394
|
-
+ * type is dropped because the fold rejects duplicate ownership anyway.
|
|
395
|
+
+ * the first-party catalog alone. Catalog definitions are kept first; a live
|
|
396
|
+
+ * contribution of the same event type is dropped because the fold rejects
|
|
397
|
+
+ * duplicate ownership anyway.
|
|
395
398
|
+ * @returns borrowed catalog definitions followed by live plugin contributions.
|
|
396
399
|
+ */
|
|
397
400
|
+ protected get replayMessageProjections(): readonly SessionMessageProjection[] {
|
|
@@ -401,19 +404,19 @@ index 838ce4c7..83b105fe 100644
|
|
|
401
404
|
+ return [...currentSessionMessageProjections, ...live.filter(projection => !seen.has(projection.type))]
|
|
402
405
|
+ }
|
|
403
406
|
+
|
|
404
|
-
/**
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
@@ -
|
|
407
|
+
/** Register the Session-list metadata projection for this service's lifetime. */
|
|
408
|
+
protected async [Service.init](): Promise<void> {
|
|
409
|
+
this._listMetadata = await this.ctx.sessionProjections.register(sessionListMetadataDefinition)
|
|
410
|
+
@@ -207,7 +225,7 @@
|
|
408
411
|
loaded.events,
|
|
409
|
-
loaded.header,
|
|
410
412
|
loaded.inheritedEventCount,
|
|
413
|
+
undefined,
|
|
411
414
|
- currentSessionMessageProjections,
|
|
412
415
|
+ this.replayMessageProjections,
|
|
413
416
|
)
|
|
414
417
|
return {
|
|
415
418
|
session: structuredClone(loaded.header),
|
|
416
|
-
@@ -
|
|
419
|
+
@@ -287,7 +305,7 @@
|
|
417
420
|
*/
|
|
418
421
|
async listEvents(sessionId: SessionId): Promise<SessionEventRecord[]> {
|
|
419
422
|
const loaded = await this._corpus.load(sessionId)
|
|
@@ -422,7 +425,7 @@ index 838ce4c7..83b105fe 100644
|
|
|
422
425
|
}
|
|
423
426
|
|
|
424
427
|
/**
|
|
425
|
-
@@ -
|
|
428
|
+
@@ -316,7 +334,7 @@
|
|
426
429
|
filters: readonly SessionEventResultFilter[],
|
|
427
430
|
): Promise<SessionEventSearchDocument[]> {
|
|
428
431
|
const loaded = await this._corpus.load(sessionId)
|
|
@@ -431,7 +434,7 @@ index 838ce4c7..83b105fe 100644
|
|
|
431
434
|
return filterSessionEventDocuments(documents, filters)
|
|
432
435
|
}
|
|
433
436
|
|
|
434
|
-
@@ -
|
|
437
|
+
@@ -332,7 +350,7 @@
|
|
435
438
|
session: structuredClone(loaded.header),
|
|
436
439
|
inheritedEventCount: loaded.inheritedEventCount,
|
|
437
440
|
capturedThroughSeq: loaded.events.at(-1)?.seq ?? null,
|
|
@@ -440,7 +443,7 @@ index 838ce4c7..83b105fe 100644
|
|
|
440
443
|
}
|
|
441
444
|
}
|
|
442
445
|
|
|
443
|
-
@@ -
|
|
446
|
+
@@ -361,7 +379,7 @@
|
|
444
447
|
signal?.throwIfAborted()
|
|
445
448
|
return {
|
|
446
449
|
session: loaded.header,
|