@deepseek-ai/dsh-client-ui-workspace 0.1.6-alpha.2 → 0.1.7-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 +2 -2
- package/README.md +102 -11
- package/README.zh.md +102 -11
- package/lib/client.js +2182 -1015
- package/lib/types/client/contract/slots.d.ts +253 -16
- package/lib/types/client/index.d.ts +6 -2
- package/lib/types/client/locales.d.ts +84 -2
- package/lib/types/client/navigation.d.ts +39 -6
- package/lib/types/client/pin-order.d.ts +31 -0
- package/lib/types/client/rows/AnimatedRows.d.ts +44 -0
- package/lib/types/client/rows/Rows.d.ts +15 -15
- package/lib/types/client/rows/WorkspaceBrowser.d.ts +1 -1
- package/lib/types/client/session-actions/ArchiveSession.d.ts +23 -0
- package/lib/types/client/session-actions/ForkSession.d.ts +9 -0
- package/lib/types/client/session-actions/PinSession.d.ts +14 -0
- package/lib/types/client/session-actions/RenameSession.d.ts +18 -0
- package/lib/types/client/session-actions/RowActionToast.d.ts +11 -0
- package/lib/types/client/session-actions/derived.d.ts +12 -0
- package/lib/types/client/stores.d.ts +14 -0
- package/lib/types/client/tree.d.ts +53 -20
- package/package.json +26 -23
- package/lib/types/client/subagent-lineage.d.ts +0 -21
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** React-commit-driven movement and entry/exit fades for the sidebar's keyed rows. */
|
|
2
|
+
import { Component, type ReactNode } from 'react';
|
|
3
|
+
interface AnimatedRowsProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Unique DOM-order keys matching the rendered data-row-key attributes. */
|
|
8
|
+
rowKeys: readonly string[];
|
|
9
|
+
ready: boolean;
|
|
10
|
+
/** Changes that replace the view or reveal hidden rows settle immediately. */
|
|
11
|
+
resetKey: string;
|
|
12
|
+
}
|
|
13
|
+
interface RowPosition {
|
|
14
|
+
element: HTMLElement;
|
|
15
|
+
rect: DOMRect;
|
|
16
|
+
opacity: number;
|
|
17
|
+
}
|
|
18
|
+
interface RowSnapshot {
|
|
19
|
+
positions: Map<string, RowPosition>;
|
|
20
|
+
removed: Map<string, RowPosition>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Animates keyed sidebar rows only when their rendered membership or order changes.
|
|
24
|
+
* Motion starts after the first pointer or keyboard input inside the mounted list.
|
|
25
|
+
* The parent supplies a positioned container for the inert exit overlay.
|
|
26
|
+
*/
|
|
27
|
+
export declare class AnimatedRows extends Component<AnimatedRowsProps> {
|
|
28
|
+
private armed;
|
|
29
|
+
private readonly list;
|
|
30
|
+
private readonly overlay;
|
|
31
|
+
private readonly movements;
|
|
32
|
+
private readonly exits;
|
|
33
|
+
getSnapshotBeforeUpdate(previous: AnimatedRowsProps): RowSnapshot | null;
|
|
34
|
+
componentDidUpdate(previous: AnimatedRowsProps, _state: unknown, snapshot: RowSnapshot | null): void;
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
private readPositions;
|
|
37
|
+
private move;
|
|
38
|
+
private cancelMovements;
|
|
39
|
+
private removeExit;
|
|
40
|
+
private clear;
|
|
41
|
+
render(): ReactNode;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=AnimatedRows.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
|
|
1
2
|
import type { WorkspaceBrowserProps } from '../contract/slots.ts';
|
|
2
3
|
import type { GroupNode, SearchResultNode, SessionNode } from '../tree.ts';
|
|
3
4
|
/** The standard locale seat, prop-passed from the browser root. */
|
|
@@ -56,46 +57,45 @@ export declare function ProjectRowItem({ group, containsCurrentDescendant, onTog
|
|
|
56
57
|
/**
|
|
57
58
|
* One flat search result: title, Workspace context, and optional content
|
|
58
59
|
* excerpt. Search navigation opens the session only; it does not address an
|
|
59
|
-
* event inside the conversation.
|
|
60
|
+
* event inside the conversation. Archived rows carry a hover unarchive
|
|
61
|
+
* button, because search is where the filter surfaces them for recovery.
|
|
60
62
|
* @param props.result - merged local/content search row.
|
|
61
63
|
* @param props.currentId - selected session id.
|
|
62
64
|
* @param props.onOpen - open the selected session.
|
|
65
|
+
* @param props.onUnarchive - unarchive an archived result row.
|
|
63
66
|
* @param props.t - Workspace-browser translation seat.
|
|
64
|
-
* @returns the result
|
|
67
|
+
* @returns the result row.
|
|
65
68
|
*/
|
|
66
|
-
export declare function SearchResultItem({ result, currentId, onOpen, t }: {
|
|
69
|
+
export declare function SearchResultItem({ result, currentId, onOpen, onUnarchive, t }: {
|
|
67
70
|
result: SearchResultNode;
|
|
68
71
|
currentId: string | undefined;
|
|
69
72
|
onOpen: (id: SearchResultNode['id']) => void;
|
|
73
|
+
onUnarchive: (id: SearchResultNode['id']) => void;
|
|
70
74
|
t: RowTranslate;
|
|
71
75
|
}): import("react").JSX.Element;
|
|
72
76
|
/**
|
|
73
77
|
* One top-level 34px session row: status dot (pending user interaction outranks
|
|
74
|
-
* own or descendant activity), title, relative time
|
|
78
|
+
* own or descendant activity), title, relative time or compact pending label,
|
|
79
|
+
* and the row actions menu.
|
|
75
80
|
* @param props.node - derived session node.
|
|
76
81
|
* @param props.currentId - selected session id (row highlight).
|
|
77
82
|
* @param props.now - epoch ms for relative-time formatting.
|
|
78
83
|
* @param props.onOpen - open a session by id.
|
|
79
|
-
* @param props.
|
|
80
|
-
* @param props.
|
|
81
|
-
* @param props.onArchive - archive a session by id.
|
|
84
|
+
* @param props.onRenameRequest - open the rename dialog from a title double-click (id + current title).
|
|
85
|
+
* @param props.renderSlot - render the row's `sidebar.workspaces.session.menu.item` and `sidebar.workspaces.session.row.action` lists.
|
|
82
86
|
* @param props.onReveal - scroll this row into view after search navigation, then acknowledge it.
|
|
83
87
|
* @param props.drag - optional row-drag target wiring; blank rows cannot start a drag.
|
|
84
88
|
* @param props.flat - omit the empty status slot in the hierarchy-free flat list.
|
|
85
89
|
* @param props.t - the browser root's locale seat.
|
|
86
90
|
* @returns the session row.
|
|
87
91
|
*/
|
|
88
|
-
export declare function SessionNodeItem({ node, currentId, now, onOpen,
|
|
92
|
+
export declare function SessionNodeItem({ node, currentId, now, onOpen, onRenameRequest, renderSlot, onReveal, drag, flat, t, }: {
|
|
89
93
|
node: SessionNode;
|
|
90
94
|
currentId: string | undefined;
|
|
91
95
|
now: number;
|
|
92
96
|
onOpen: (id: SessionNode['id']) => void;
|
|
93
|
-
/** Open the
|
|
94
|
-
|
|
95
|
-
/** Fork a session at its last completed turn (row menu action). */
|
|
96
|
-
onFork: (id: SessionNode['id']) => void;
|
|
97
|
-
/** Archive this session (row menu action; commits without a dialog). */
|
|
98
|
-
onArchive: (id: SessionNode['id']) => void;
|
|
97
|
+
/** Open the rename dialog from a title double-click (id + current title). */
|
|
98
|
+
onRenameRequest: (id: SessionNode['id'], currentTitle: string) => void;
|
|
99
99
|
/** Scroll this row into view after search navigation, then acknowledge it. */
|
|
100
100
|
onReveal?: (() => void) | undefined;
|
|
101
101
|
/** Present on reorderable-list rows so every row can remain a drop target. */
|
|
@@ -103,6 +103,6 @@ export declare function SessionNodeItem({ node, currentId, now, onOpen, onRename
|
|
|
103
103
|
/** The row is rendered without a parent Workspace header. */
|
|
104
104
|
flat?: boolean | undefined;
|
|
105
105
|
t: RowTranslate;
|
|
106
|
-
}): import("react").JSX.Element;
|
|
106
|
+
} & PropsRenderSlots<'sidebar.workspaces.session.menu.item' | 'sidebar.workspaces.session.row.action'>): import("react").JSX.Element;
|
|
107
107
|
export {};
|
|
108
108
|
//# sourceMappingURL=Rows.d.ts.map
|
|
@@ -4,5 +4,5 @@ import type { WorkspaceBrowserProps } from '../contract/slots.ts';
|
|
|
4
4
|
* @param props - composed slot props (shell owner share + store + injected actions).
|
|
5
5
|
* @returns the region element tree.
|
|
6
6
|
*/
|
|
7
|
-
export declare function WorkspaceBrowser({ wide, usePanelInfo, expandSidebar, useSessions, useSessionStatus, useWorkspaces, useStore, actions, startSession, open,
|
|
7
|
+
export declare function WorkspaceBrowser({ wide, usePanelInfo, expandSidebar, useSessions, useSessionStatus, useWorkspaces, useStore, actions, startSession, open, requestSessionRename, notifyArchivedNotOpenable, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, unarchiveSession, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow, useHostInfo, renderSlot, t, }: WorkspaceBrowserProps): import("react").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=WorkspaceBrowser.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ArchiveSessionInjected, SessionArchiveConfirmProps, SessionMenuItemProps, SessionRowActionProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Menu row (order 400): archive, or restore an archived row.
|
|
4
|
+
* @param props - owner share, the archive share, and the menu open state.
|
|
5
|
+
* @returns the row.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ArchiveSessionMenuItem({ sessionId, useArchived, useMenuOpenState, archiveSession, unarchiveSession, t, }: SessionMenuItemProps<ArchiveSessionInjected>): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Hover button (order 100): archive, or restore an archived row.
|
|
10
|
+
* @param props - owner share and the archive share.
|
|
11
|
+
* @returns the button.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ArchiveSessionRowButton({ sessionId, useArchived, archiveSession, unarchiveSession, t, }: SessionRowActionProps<ArchiveSessionInjected>): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* The `shell.overlay` entry: nothing while no confirmation is pending,
|
|
16
|
+
* otherwise one dialog per request (keyed by the Session). Confirming asks
|
|
17
|
+
* the Host to stop the listed work and archive; cancelling leaves the
|
|
18
|
+
* Session running and visible.
|
|
19
|
+
* @param props - the request hook, its settlement, the stop-and-archive hop, and the locale seat.
|
|
20
|
+
* @returns the open dialog, or null.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SessionArchiveConfirmDialog({ useArchiveRequest, settleSessionArchive, stopAndArchiveSession, t, }: SessionArchiveConfirmProps): import("react").JSX.Element | null;
|
|
23
|
+
//# sourceMappingURL=ArchiveSession.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ForkSessionInjected, SessionMenuItemProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Menu row (order 300): fork at the Session's last completed turn; the child
|
|
4
|
+
* arrives through the Host list beside its source.
|
|
5
|
+
* @param props - owner share, menu open state, and the fork share.
|
|
6
|
+
* @returns the row.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ForkSessionMenuItem({ sessionId, useMenuOpenState, forkSession, t }: SessionMenuItemProps<ForkSessionInjected>): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ForkSession.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PinSessionInjected, SessionMenuItemProps, SessionRowActionProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Menu row (order 100): pin or unpin by the row's current state; absent on archived rows.
|
|
4
|
+
* @param props - owner share, the pin share, and the menu open state.
|
|
5
|
+
* @returns the row, or null for an archived Session.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PinSessionMenuItem(props: SessionMenuItemProps<PinSessionInjected>): import("react").JSX.Element | null;
|
|
8
|
+
/**
|
|
9
|
+
* Hover button (order 200, rightmost: it lands where the rest-state pin marker sits); absent on archived rows.
|
|
10
|
+
* @param props - owner share and the pin share.
|
|
11
|
+
* @returns the button, or null for an archived Session.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PinSessionRowButton(props: SessionRowActionProps<PinSessionInjected>): import("react").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=PinSession.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RenameSessionInjected, SessionMenuItemProps, SessionRenameDialogProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Menu row (order 200): ask for the rename dialog, seeded with the row's current title.
|
|
4
|
+
* @param props - owner share, menu open state, and the rename share.
|
|
5
|
+
* @returns the row.
|
|
6
|
+
*/
|
|
7
|
+
export declare function RenameSessionMenuItem({ sessionId, displayTitle, useMenuOpenState, requestSessionRename, t, }: SessionMenuItemProps<RenameSessionInjected>): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* The `shell.overlay` entry: nothing while no rename is requested, otherwise
|
|
10
|
+
* one dialog per request (keyed by the Session, so a new request starts a
|
|
11
|
+
* fresh draft). Sessions have no client-side name-conflict rule (the host
|
|
12
|
+
* normalizes), and unlike Workspace rename an unchanged title is NOT
|
|
13
|
+
* blocked: confirming the current automatic title is the gesture that pins it.
|
|
14
|
+
* @param props - the request hook, its settlement, the rename hop, and the locale seat.
|
|
15
|
+
* @returns the open dialog, or null.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SessionRenameDialog({ useRenameRequest, settleSessionRename, renameSession, t }: SessionRenameDialogProps): import("react").JSX.Element | null;
|
|
18
|
+
//# sourceMappingURL=RenameSession.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RowToastProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Render the current notice: the archived and stopped-and-archived notices
|
|
4
|
+
* with their undo and show-archived actions on a 6 s hold, a refused Session
|
|
5
|
+
* creation with the Host's reason on the same hold, or a plain warning for a
|
|
6
|
+
* failed pin, an archived row that was clicked, or default Workspace creation.
|
|
7
|
+
* @param props - the notice hook, its dismissal, the two archived-notice actions, and the locale seat.
|
|
8
|
+
* @returns the notice on display, or null.
|
|
9
|
+
*/
|
|
10
|
+
export declare function RowActionToast({ useToast, dismissToast, undoArchive, showArchived, t }: RowToastProps): import("react").JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=RowActionToast.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Derived observable sources for the row actions' injected hooks. */
|
|
2
|
+
import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/**
|
|
4
|
+
* Project one observable into another, recomputing only when the source
|
|
5
|
+
* snapshot changes identity, so consumers that select from the projection
|
|
6
|
+
* (a Set lookup per row) never rebuild it per read.
|
|
7
|
+
* @param source - the observable to project.
|
|
8
|
+
* @param project - pure projection of one source snapshot.
|
|
9
|
+
* @returns the projected observable, subscribing through the source.
|
|
10
|
+
*/
|
|
11
|
+
export declare function derive<S, T>(source: HostObservable<S>, project: (snapshot: S) => T): HostObservable<T>;
|
|
12
|
+
//# sourceMappingURL=derived.d.ts.map
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* share from the return type.
|
|
7
7
|
*/
|
|
8
8
|
import { type EngineStoreHandle } from '@deepseek-ai/dsh-client-store';
|
|
9
|
+
import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
10
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
11
|
+
import { type ArchivedFilter, type SessionRowState } from './tree.ts';
|
|
9
12
|
/** Browser-local order account for the hierarchy-free flat Session list. */
|
|
10
13
|
export declare const FLAT_SESSION_ORDER_KEY = "__flat_session_order__";
|
|
11
14
|
/** Session-list grouping mode: sibling Workspace sections, a Workspace tree, or one flat list. */
|
|
@@ -20,6 +23,13 @@ type WorkspaceViewState = {
|
|
|
20
23
|
groupExpansion: Record<string, boolean>;
|
|
21
24
|
/** Saved manual order per Workspace group plus the browser-local flat-list account. */
|
|
22
25
|
sessionOrderByAccount: Record<string, string[]>;
|
|
26
|
+
/** Archived-row visibility; omitted in pre-filter v5 snapshots and read as 'default'. */
|
|
27
|
+
archivedFilter?: ArchivedFilter;
|
|
28
|
+
};
|
|
29
|
+
type SessionOrderSource = {
|
|
30
|
+
members: Readonly<Record<string, readonly SessionId[]>>;
|
|
31
|
+
summaries: SessionListState['byId'];
|
|
32
|
+
rowState: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>;
|
|
23
33
|
};
|
|
24
34
|
/**
|
|
25
35
|
* Annotation twin of the actions literal below (the export needs a declared
|
|
@@ -32,11 +42,15 @@ type WorkspaceViewActions = {
|
|
|
32
42
|
retainAccountKeys: (draft: WorkspaceViewState, workspaceKeys: readonly string[]) => void;
|
|
33
43
|
syncSessionOrders: (draft: WorkspaceViewState, orders: Readonly<Record<string, readonly string[]>>) => void;
|
|
34
44
|
setSessionOrder: (draft: WorkspaceViewState, accountKey: string, order: readonly string[], initialOrders: Readonly<Record<string, readonly string[]>>) => void;
|
|
45
|
+
pinSessionOrder: (draft: WorkspaceViewState, sessionId: string, accountKeys: readonly string[], source: SessionOrderSource) => void;
|
|
46
|
+
setArchivedFilter: (draft: WorkspaceViewState, filter: ArchivedFilter) => void;
|
|
35
47
|
};
|
|
36
48
|
/**
|
|
37
49
|
* Create the workspace browser viewing store handle.
|
|
38
50
|
* @returns the store handle (spec + type + identity + factory in one).
|
|
39
51
|
*/
|
|
40
52
|
export declare function createWorkspaceViewStore(): EngineStoreHandle<WorkspaceViewState, WorkspaceViewActions>;
|
|
53
|
+
/** The bound write set of one viewing-store instance (what the UiWorkspace service drives). */
|
|
54
|
+
export type WorkspaceViewStoreActions = ReturnType<ReturnType<typeof createWorkspaceViewStore>['create']>['actions'];
|
|
41
55
|
export {};
|
|
42
56
|
//# sourceMappingURL=stores.d.ts.map
|
|
@@ -29,12 +29,16 @@ export interface SessionNode {
|
|
|
29
29
|
/** A Session-scoped UI consumer is awaiting this user. */
|
|
30
30
|
pendingInteraction?: SessionPendingInteractionStatus;
|
|
31
31
|
running: boolean;
|
|
32
|
-
/** Running
|
|
32
|
+
/** Running direct children in the loaded subagent catalog. */
|
|
33
33
|
runningSubagentCount: number;
|
|
34
34
|
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
35
35
|
completed: boolean;
|
|
36
36
|
/** The current list projection contains at least one active Schedule record. */
|
|
37
37
|
hasActiveSchedule: boolean;
|
|
38
|
+
/** In the registry-global pin set: leads its section, reorderable only among pinned rows. */
|
|
39
|
+
pinned: boolean;
|
|
40
|
+
/** In the registry-global archive set: shown grayed in place and not openable. */
|
|
41
|
+
archived: boolean;
|
|
38
42
|
updatedAt: number;
|
|
39
43
|
}
|
|
40
44
|
/** Session order selected by the Workspace browser. */
|
|
@@ -65,12 +69,14 @@ export interface SearchResultNode {
|
|
|
65
69
|
/** A Session-scoped UI consumer is awaiting this user. */
|
|
66
70
|
pendingInteraction?: SessionPendingInteractionStatus;
|
|
67
71
|
running: boolean;
|
|
68
|
-
/** Running
|
|
72
|
+
/** Running direct children in the loaded subagent catalog. */
|
|
69
73
|
runningSubagentCount: number;
|
|
70
74
|
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
71
75
|
completed: boolean;
|
|
72
76
|
/** The current list projection contains at least one active Schedule record. */
|
|
73
77
|
hasActiveSchedule: boolean;
|
|
78
|
+
/** In the registry-global archive set: shown grayed and not openable. */
|
|
79
|
+
archived: boolean;
|
|
74
80
|
snippet?: string;
|
|
75
81
|
}
|
|
76
82
|
/** Bounded merged search projection plus the refine-query hint bit. */
|
|
@@ -100,12 +106,14 @@ export declare function workspaceLabel(cwd: string | undefined): string;
|
|
|
100
106
|
export declare function orderByRecency(sessionIds: readonly SessionId[], summaries: SessionListState['byId']): SessionId[];
|
|
101
107
|
/**
|
|
102
108
|
* Reconcile a browser-local manual order with current account membership.
|
|
109
|
+
* New ordinary forks precede their sources without changing saved entries' relative order.
|
|
103
110
|
* @param memberIds - authoritative account membership.
|
|
104
111
|
* @param savedOrder - previously saved browser-local order.
|
|
105
|
-
* @param summaries - current Session
|
|
106
|
-
* @
|
|
112
|
+
* @param summaries - current Session metadata; unknown new members wait for their summaries.
|
|
113
|
+
* @param rowState - global pin and archive membership; only account members can supplement the order.
|
|
114
|
+
* @returns saved relative positions plus missing members ordered by pin, fork source, recency, and archive status.
|
|
107
115
|
*/
|
|
108
|
-
export declare function reconcileManualOrder(memberIds: readonly SessionId[], savedOrder: readonly string[] | undefined, summaries: SessionListState['byId']): SessionId[];
|
|
116
|
+
export declare function reconcileManualOrder(memberIds: readonly SessionId[], savedOrder: readonly string[] | undefined, summaries: SessionListState['byId'], rowState?: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>): SessionId[];
|
|
109
117
|
/**
|
|
110
118
|
* Keep the selected provisional New Session ahead of either base order.
|
|
111
119
|
* @param order - recency or reconciled manual order.
|
|
@@ -113,37 +121,61 @@ export declare function reconcileManualOrder(memberIds: readonly SessionId[], sa
|
|
|
113
121
|
* @returns a copy with the selected blank first and no duplicate slot.
|
|
114
122
|
*/
|
|
115
123
|
export declare function pinCurrentBlank(order: readonly SessionId[], currentBlank: SessionId | undefined): SessionId[];
|
|
124
|
+
/**
|
|
125
|
+
* Archived-row visibility choice: the default hides archived rows, `show`
|
|
126
|
+
* mixes them into their kept slots, and `only` restricts the view (and
|
|
127
|
+
* search) to archived rows.
|
|
128
|
+
*/
|
|
129
|
+
export type ArchivedFilter = 'default' | 'show' | 'only';
|
|
130
|
+
/** Registry-global row state consumed by every tree derivation. */
|
|
131
|
+
export interface SessionRowState {
|
|
132
|
+
/** Registry-global pin ids; pinned rows lead their section in the local order. */
|
|
133
|
+
pinnedSessionIds: readonly SessionId[];
|
|
134
|
+
/** Archive set; members keep their slots and show grayed while visible. */
|
|
135
|
+
archivedSessionIds: readonly SessionId[];
|
|
136
|
+
/** Archived-row visibility choice applied to lists and search alike. */
|
|
137
|
+
archivedFilter: ArchivedFilter;
|
|
138
|
+
}
|
|
116
139
|
/**
|
|
117
140
|
* Derive the workspace browser groups with every session as a top-level row.
|
|
118
141
|
*
|
|
119
|
-
* Every group shows; sessions populate under expanded groups
|
|
120
|
-
* local order. Blank sessions are
|
|
121
|
-
* provisional New Session row; archived
|
|
122
|
-
*
|
|
123
|
-
* (see {@link deriveSearchResults}).
|
|
142
|
+
* Every group shows; sessions populate under expanded groups with pinned rows
|
|
143
|
+
* leading in the selected local order. Blank sessions are
|
|
144
|
+
* excluded except for the selected provisional New Session row; archived
|
|
145
|
+
* sessions keep their slots and appear per the archived filter. Content
|
|
146
|
+
* search lives outside this derivation (see {@link deriveSearchResults}).
|
|
124
147
|
* @param list - sessions list snapshot (`mainView` retention feeds containsCurrent).
|
|
125
148
|
* @param workspaces - real Workspaces in Host group order with caller-projected Session order.
|
|
126
|
-
* @param
|
|
149
|
+
* @param rowState - registry-global pin and archive sets plus the archived filter.
|
|
127
150
|
* @param statuses - unified UI status by Session.
|
|
128
151
|
* @param view - local expansion arrays.
|
|
129
152
|
* @returns group sections in render order.
|
|
130
153
|
*/
|
|
131
|
-
export declare function deriveGroups(list: SessionListState, workspaces: readonly WorkspaceView[],
|
|
154
|
+
export declare function deriveGroups(list: SessionListState, workspaces: readonly WorkspaceView[], rowState: SessionRowState, statuses: SessionStatuses, view: TreeView): GroupNode[];
|
|
155
|
+
/**
|
|
156
|
+
* Select complete flat-list membership, independently of archive visibility.
|
|
157
|
+
* @param list - sessions list snapshot.
|
|
158
|
+
* @returns known ordinary Session ids, including archives and only the current blank.
|
|
159
|
+
*/
|
|
160
|
+
export declare function sessionMemberIds(list: SessionListState): SessionId[];
|
|
132
161
|
/**
|
|
133
|
-
* Select flat-list members without deriving row presentation or ordering.
|
|
162
|
+
* Select visible flat-list members without deriving row presentation or ordering.
|
|
134
163
|
* @param list - sessions list snapshot.
|
|
135
164
|
* @param archivedSessionIds - registry-global archive set.
|
|
165
|
+
* @param archivedFilter - archived-row visibility choice.
|
|
136
166
|
* @returns known visible Session ids in list order, including ordinary forks and only the current blank.
|
|
137
167
|
*/
|
|
138
|
-
export declare function visibleSessionIds(list: SessionListState, archivedSessionIds: readonly SessionId[]): SessionId[];
|
|
168
|
+
export declare function visibleSessionIds(list: SessionListState, archivedSessionIds: readonly SessionId[], archivedFilter: ArchivedFilter): SessionId[];
|
|
139
169
|
/**
|
|
140
|
-
* Derive flat rows from the browser's ordered
|
|
170
|
+
* Derive flat rows from the browser's complete ordered Session ids, with
|
|
171
|
+
* pinned rows fronted ahead of the supplied order.
|
|
141
172
|
* @param list - sessions list snapshot used to select the ids.
|
|
142
|
-
* @param sessionIds -
|
|
173
|
+
* @param sessionIds - complete account members in the selected order, including hidden archives.
|
|
174
|
+
* @param rowState - registry-global pin and archive sets plus the archived filter.
|
|
143
175
|
* @param statuses - unified UI status by Session.
|
|
144
|
-
* @returns flat rows in
|
|
176
|
+
* @returns flat rows in sectioned order with current status indicators.
|
|
145
177
|
*/
|
|
146
|
-
export declare function deriveFlat(list: SessionListState, sessionIds: readonly SessionId[], statuses: SessionStatuses): SessionNode[];
|
|
178
|
+
export declare function deriveFlat(list: SessionListState, sessionIds: readonly SessionId[], rowState: SessionRowState, statuses: SessionStatuses): SessionNode[];
|
|
147
179
|
/**
|
|
148
180
|
* Merge immediate title/Workspace substring matches with ranked Host content
|
|
149
181
|
* matches. Local rows lead newest-first, content-only rows retain backend
|
|
@@ -151,13 +183,14 @@ export declare function deriveFlat(list: SessionListState, sessionIds: readonly
|
|
|
151
183
|
* @param list - session metadata authority.
|
|
152
184
|
* @param workspaces - Workspace membership and display labels.
|
|
153
185
|
* @param query - caller text; surrounding whitespace is ignored.
|
|
154
|
-
* @param archivedSessionIds - registry-global archive set (members
|
|
186
|
+
* @param archivedSessionIds - registry-global archive set (members match per the archived filter).
|
|
187
|
+
* @param archivedFilter - archived-row visibility choice; search follows it.
|
|
155
188
|
* @param statuses - unified UI status by Session.
|
|
156
189
|
* @param content - ranked Host content-search page.
|
|
157
190
|
* @param limit - protocol-owned maximum merged row count.
|
|
158
191
|
* @returns bounded deduplicated flat rows and a refine-query hint bit.
|
|
159
192
|
*/
|
|
160
|
-
export declare function deriveSearchResults(list: SessionListState, workspaces: readonly WorkspaceView[], query: string, archivedSessionIds: readonly SessionId[], statuses: SessionStatuses, content: {
|
|
193
|
+
export declare function deriveSearchResults(list: SessionListState, workspaces: readonly WorkspaceView[], query: string, archivedSessionIds: readonly SessionId[], archivedFilter: ArchivedFilter, statuses: SessionStatuses, content: {
|
|
161
194
|
items: readonly SessionSearchResultItem[];
|
|
162
195
|
hasMore: boolean;
|
|
163
196
|
}, limit: number): SearchResultSet;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-workspace",
|
|
3
3
|
"description": "Workspace picker plugin: one WorkspacePicker registered into the sidebar and empty-state workspace slots",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -44,32 +44,35 @@
|
|
|
44
44
|
},
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@deepseek-ai/cordis": "
|
|
47
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/react": "~18.3.1",
|
|
51
|
-
"react": "^18.2.0",
|
|
52
51
|
"clsx": "^2.0.0",
|
|
53
|
-
"
|
|
54
|
-
"@deepseek-ai/
|
|
55
|
-
"@deepseek-ai/dsh-api-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-client-
|
|
60
|
-
"@deepseek-ai/dsh-client-
|
|
61
|
-
"@deepseek-ai/dsh-client-
|
|
62
|
-
"@deepseek-ai/dsh-client-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
52
|
+
"react": "^18.2.0",
|
|
53
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
54
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.7-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.7-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.1.7-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-connection": "0.1.7-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-test-runtime": "0.1.7-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.7-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.1.7-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-jobs": "0.1.7-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-schedule": "0.1.7-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-session": "0.1.7-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-subagent": "0.1.7-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.7-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-alpha.2",
|
|
74
|
+
"@deepseek-ai/dsh-util-values": "0.1.7-alpha.2",
|
|
75
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.1.7-alpha.2"
|
|
73
76
|
},
|
|
74
77
|
"files": [
|
|
75
78
|
"lib/index.js",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** UI Workspace-owned projection of descendant counts from Session summaries. */
|
|
2
|
-
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
|
-
interface LineageEntry {
|
|
4
|
-
readonly id: SessionId;
|
|
5
|
-
readonly parentId?: SessionId;
|
|
6
|
-
readonly origin?: 'subagent';
|
|
7
|
-
readonly running: boolean;
|
|
8
|
-
}
|
|
9
|
-
/** Descendant counts for one possible parent Session. */
|
|
10
|
-
export interface SubagentDescendantSummary {
|
|
11
|
-
readonly count: number;
|
|
12
|
-
readonly runningCount: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Index uninterrupted subagent descendants under each ancestor.
|
|
16
|
-
* @param summaries - Session summaries keyed by id.
|
|
17
|
-
* @returns descendant totals keyed by possible parent id.
|
|
18
|
-
*/
|
|
19
|
-
export declare function indexSubagentDescendants(summaries: Readonly<Record<SessionId, LineageEntry>>): ReadonlyMap<SessionId, SubagentDescendantSummary>;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=subagent-lineage.d.ts.map
|