@umialpha/dsh-client-ui-workspace-groups 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.i18n.yaml +73 -0
- package/README.md +233 -2
- package/README.zh.md +234 -0
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/lib/client.js +5151 -0
- package/lib/index.js +11 -0
- package/lib/types/client/WorkspacePicker.d.ts +59 -0
- package/lib/types/client/contract/slots.d.ts +473 -0
- package/lib/types/client/index.d.ts +39 -0
- package/lib/types/client/locales.d.ts +246 -0
- package/lib/types/client/navigation.d.ts +157 -0
- 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 +112 -0
- package/lib/types/client/rows/WorkspaceBrowser.d.ts +8 -0
- 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 +8 -0
- package/lib/types/client/session-actions/derived.d.ts +12 -0
- package/lib/types/client/shortcuts.d.ts +46 -0
- package/lib/types/client/stores.d.ts +56 -0
- package/lib/types/client/tree.d.ts +203 -0
- package/lib/types/index.d.ts +9 -0
- package/package.json +115 -3
|
@@ -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, useShortcuts, 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. An unnamed Session starts with an empty draft and requires a name.
|
|
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,8 @@
|
|
|
1
|
+
import type { RowToastProps } from '../contract/slots.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Render an operation notice, retaining recovery actions for six seconds.
|
|
4
|
+
* @param props - notice and viewing sources, dismissal and recovery callbacks, and localized copy.
|
|
5
|
+
* @returns the notice on display, or null.
|
|
6
|
+
*/
|
|
7
|
+
export declare function RowActionToast({ useToast, useStore, dismissToast, undoArchive, showArchived, openForkSource, t }: RowToastProps): import("react").JSX.Element | null;
|
|
8
|
+
//# 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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Workspace command registration and browser-owned opening requests. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
4
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
5
|
+
import type { UiWorkspace } from './navigation.ts';
|
|
6
|
+
/** Transient requests consumed by the existing workspace browser. */
|
|
7
|
+
export interface WorkspaceShortcutState {
|
|
8
|
+
readonly searchRequest: number;
|
|
9
|
+
readonly addRequested: boolean;
|
|
10
|
+
readonly directoryBusy: boolean;
|
|
11
|
+
readonly renameTarget: {
|
|
12
|
+
readonly sessionId: SessionId;
|
|
13
|
+
readonly currentTitle: string;
|
|
14
|
+
} | null;
|
|
15
|
+
readonly forkError: {
|
|
16
|
+
readonly reason: 'unavailable' | 'failed';
|
|
17
|
+
readonly seq: number;
|
|
18
|
+
} | null;
|
|
19
|
+
}
|
|
20
|
+
interface WorkspaceShortcutControls {
|
|
21
|
+
state: SnapshotStore<WorkspaceShortcutState>;
|
|
22
|
+
search: () => void;
|
|
23
|
+
add: () => void;
|
|
24
|
+
closeAdd: () => void;
|
|
25
|
+
directoryBusy: (busy: boolean) => void;
|
|
26
|
+
rename: (sessionId: SessionId, currentTitle: string) => void;
|
|
27
|
+
closeRename: () => void;
|
|
28
|
+
forkFailed: (reason: 'unavailable' | 'failed') => void;
|
|
29
|
+
dismissForkError: () => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create the private browser request source shared by commands and controls.
|
|
33
|
+
* @returns observable state and its complete mutation callbacks.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createWorkspaceShortcutControls(): WorkspaceShortcutControls;
|
|
36
|
+
/**
|
|
37
|
+
* Register navigation commands against the existing workspace owner.
|
|
38
|
+
* Rename requires a nonblank main Conversation with no modal obscuring it.
|
|
39
|
+
* @param ctx - plugin context with the shortcut, locale, and model services.
|
|
40
|
+
* @param navigation - session creation and forking from the pointer controls' navigation service.
|
|
41
|
+
* @param controls - browser-owned opening requests.
|
|
42
|
+
* @param archiveSession - shared archive action, including running-work confirmation and notices.
|
|
43
|
+
*/
|
|
44
|
+
export declare function installWorkspaceShortcuts(ctx: Context, navigation: Pick<UiWorkspace, 'startSession' | 'forkSession'>, controls: ReturnType<typeof createWorkspaceShortcutControls>, archiveSession: (sessionId: SessionId) => void): void;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=shortcuts.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workspace browser's viewing store: the session-list grouping mode,
|
|
3
|
+
* persisted across reloads. Module level exports the factory only (a
|
|
4
|
+
* module-level handle would pin the store identity across plugin reloads);
|
|
5
|
+
* register() receives the factory and the browser derives its PropsStore
|
|
6
|
+
* share from the return type.
|
|
7
|
+
*/
|
|
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';
|
|
12
|
+
/** Browser-local order account for the hierarchy-free flat Session list. */
|
|
13
|
+
export declare const FLAT_SESSION_ORDER_KEY = "__flat_session_order__";
|
|
14
|
+
/** Session-list grouping mode: sibling Workspace sections, a Workspace tree, or one flat list. */
|
|
15
|
+
export type SessionGroupBy = 'workspace' | 'workspace-tree' | 'flat';
|
|
16
|
+
/** Session order: saved manual positions or current recency. */
|
|
17
|
+
export type SessionOrderBy = 'manual' | 'updated';
|
|
18
|
+
/** Workspace browser viewing state persisted across surface remounts and reloads. */
|
|
19
|
+
type WorkspaceViewState = {
|
|
20
|
+
groupBy: SessionGroupBy;
|
|
21
|
+
orderBy: SessionOrderBy;
|
|
22
|
+
/** Explicit group expansion keyed by Workspace identity, including descendants in tree mode. */
|
|
23
|
+
groupExpansion: Record<string, boolean>;
|
|
24
|
+
/** Saved manual order per Workspace group plus the browser-local flat-list account. */
|
|
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'>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Annotation twin of the actions literal below (the export needs a declared
|
|
36
|
+
* return type); drift fails assignability at the defineStore call.
|
|
37
|
+
*/
|
|
38
|
+
type WorkspaceViewActions = {
|
|
39
|
+
setGroupBy: (draft: WorkspaceViewState, mode: SessionGroupBy) => void;
|
|
40
|
+
setOrderBy: (draft: WorkspaceViewState, mode: SessionOrderBy, initialOrders: Readonly<Record<string, readonly string[]>>) => void;
|
|
41
|
+
setGroupExpanded: (draft: WorkspaceViewState, key: string, expanded: boolean) => void;
|
|
42
|
+
retainAccountKeys: (draft: WorkspaceViewState, workspaceKeys: readonly string[]) => void;
|
|
43
|
+
syncSessionOrders: (draft: WorkspaceViewState, orders: Readonly<Record<string, readonly string[]>>) => void;
|
|
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;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Create the workspace browser viewing store handle.
|
|
50
|
+
* @returns the store handle (spec + type + identity + factory in one).
|
|
51
|
+
*/
|
|
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'];
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=stores.d.ts.map
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derives the workspace browser tree from caller-projected Workspace and
|
|
3
|
+
* Session order. Unassigned Sessions trail under Ungrouped; only the selected
|
|
4
|
+
* blank Session remains visible.
|
|
5
|
+
*/
|
|
6
|
+
import { type SessionListState, type SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
7
|
+
import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
|
|
8
|
+
import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client';
|
|
9
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
10
|
+
/** Group key for Sessions outside every Workspace. */
|
|
11
|
+
export declare const UNGROUPED_KEY = "";
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the Workspace browser group that owns one Session.
|
|
14
|
+
* @param workspaces - authoritative Workspace membership.
|
|
15
|
+
* @param sessionId - Session whose browser group is required.
|
|
16
|
+
* @returns owning Workspace id, or {@link UNGROUPED_KEY} when no Workspace accounts for it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function owningGroupKey(workspaces: readonly WorkspaceView[], sessionId: SessionId): string;
|
|
19
|
+
/** Pending interaction kinds with dedicated Workspace-row presentation. */
|
|
20
|
+
export type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question';
|
|
21
|
+
type SessionStatuses = SessionStatusSnapshot;
|
|
22
|
+
/** One top-level session row in a group or the flat list. */
|
|
23
|
+
export interface SessionNode {
|
|
24
|
+
id: SessionId;
|
|
25
|
+
/** Stored title, or empty; the renderer localizes blank and unnamed row labels. */
|
|
26
|
+
title: string;
|
|
27
|
+
/** The provisional blank session (renderer shows the localized New Session title). */
|
|
28
|
+
blank: boolean;
|
|
29
|
+
/** A Session-scoped UI consumer is awaiting this user. */
|
|
30
|
+
pendingInteraction?: SessionPendingInteractionStatus;
|
|
31
|
+
running: boolean;
|
|
32
|
+
/** Running direct children in the loaded subagent catalog. */
|
|
33
|
+
runningSubagentCount: number;
|
|
34
|
+
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
35
|
+
completed: boolean;
|
|
36
|
+
/** In the registry-global pin set: leads its section, reorderable only among pinned rows. */
|
|
37
|
+
pinned: boolean;
|
|
38
|
+
/** In the registry-global archive set: shown grayed in place and not openable. */
|
|
39
|
+
archived: boolean;
|
|
40
|
+
updatedAt: number;
|
|
41
|
+
}
|
|
42
|
+
/** Session order selected by the Workspace browser. */
|
|
43
|
+
export type SessionOrderBy = 'manual' | 'updated';
|
|
44
|
+
/** One workspace group section: header row facts + visible top-level session rows. */
|
|
45
|
+
export interface GroupNode {
|
|
46
|
+
/** Group key: the workspace id or {@link UNGROUPED_KEY}. */
|
|
47
|
+
key: string;
|
|
48
|
+
/** Backing Workspace id; absent only for the ungrouped bucket. */
|
|
49
|
+
workspaceId: WorkspaceId | undefined;
|
|
50
|
+
cwd: string | undefined;
|
|
51
|
+
/** Workspace creation time (epoch ms); absent only for the ungrouped bucket. */
|
|
52
|
+
createdAt: number | undefined;
|
|
53
|
+
label: string;
|
|
54
|
+
/** Total visible sessions in the group. */
|
|
55
|
+
sessionCount: number;
|
|
56
|
+
expanded: boolean;
|
|
57
|
+
/** The group contains the selected session (active folder tint; supplied here so the renderer never scans). */
|
|
58
|
+
containsCurrent: boolean;
|
|
59
|
+
/** Visible session rows (empty while the group is folded). */
|
|
60
|
+
sessions: readonly SessionNode[];
|
|
61
|
+
}
|
|
62
|
+
/** One flat search row combining list metadata with an optional content match. */
|
|
63
|
+
export interface SearchResultNode {
|
|
64
|
+
id: SessionId;
|
|
65
|
+
title: string;
|
|
66
|
+
workspace: string;
|
|
67
|
+
/** A Session-scoped UI consumer is awaiting this user. */
|
|
68
|
+
pendingInteraction?: SessionPendingInteractionStatus;
|
|
69
|
+
running: boolean;
|
|
70
|
+
/** Running direct children in the loaded subagent catalog. */
|
|
71
|
+
runningSubagentCount: number;
|
|
72
|
+
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
73
|
+
completed: boolean;
|
|
74
|
+
/** In the registry-global archive set: shown grayed and not openable. */
|
|
75
|
+
archived: boolean;
|
|
76
|
+
snippet?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Bounded merged search projection plus the refine-query hint bit. */
|
|
79
|
+
export interface SearchResultSet {
|
|
80
|
+
items: readonly SearchResultNode[];
|
|
81
|
+
hasMore: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** Viewing state consumed by the derivation. */
|
|
84
|
+
export interface TreeView {
|
|
85
|
+
expandedGroups: readonly string[];
|
|
86
|
+
/** Browser-local order for Sessions without a backing Workspace account. */
|
|
87
|
+
ungroupedOrder?: readonly string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Directory display label: basename of the path (both separators accepted).
|
|
91
|
+
* Ungrouped-bucket fallback for surfaces without a workspace title.
|
|
92
|
+
* @param cwd - directory path, or undefined for the ungrouped bucket.
|
|
93
|
+
* @returns basename, the raw cwd when it has no basename, or an empty ungrouped marker.
|
|
94
|
+
*/
|
|
95
|
+
export declare function workspaceLabel(cwd: string | undefined): string;
|
|
96
|
+
/**
|
|
97
|
+
* Project known account members by current Session recency.
|
|
98
|
+
* @param sessionIds - authoritative account membership.
|
|
99
|
+
* @param summaries - current Session summaries; members without a summary are omitted until it arrives.
|
|
100
|
+
* @returns known members newest first, with Session identity as the deterministic tie-break.
|
|
101
|
+
*/
|
|
102
|
+
export declare function orderByRecency(sessionIds: readonly SessionId[], summaries: SessionListState['byId']): SessionId[];
|
|
103
|
+
/**
|
|
104
|
+
* Reconcile a browser-local manual order with current account membership.
|
|
105
|
+
* New ordinary forks precede their sources without changing saved entries' relative order.
|
|
106
|
+
* @param memberIds - authoritative account membership.
|
|
107
|
+
* @param savedOrder - previously saved browser-local order.
|
|
108
|
+
* @param summaries - current Session metadata; unknown new members wait for their summaries.
|
|
109
|
+
* @param rowState - global pin and archive membership; only account members can supplement the order.
|
|
110
|
+
* @returns saved relative positions plus missing members ordered by pin, fork source, recency, and archive status.
|
|
111
|
+
*/
|
|
112
|
+
export declare function reconcileManualOrder(memberIds: readonly SessionId[], savedOrder: readonly string[] | undefined, summaries: SessionListState['byId'], rowState?: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>): SessionId[];
|
|
113
|
+
/**
|
|
114
|
+
* Keep the selected provisional New Session ahead of either base order.
|
|
115
|
+
* @param order - recency or reconciled manual order.
|
|
116
|
+
* @param currentBlank - selected blank Session in this account, when present.
|
|
117
|
+
* @returns a copy with the selected blank first and no duplicate slot.
|
|
118
|
+
*/
|
|
119
|
+
export declare function pinCurrentBlank(order: readonly SessionId[], currentBlank: SessionId | undefined): SessionId[];
|
|
120
|
+
/**
|
|
121
|
+
* Archived-row visibility choice: the default hides archived rows, `show`
|
|
122
|
+
* mixes them into their kept slots, and `only` restricts the view (and
|
|
123
|
+
* search) to archived rows.
|
|
124
|
+
*/
|
|
125
|
+
export type ArchivedFilter = 'default' | 'show' | 'only';
|
|
126
|
+
/** Registry-global row state consumed by every tree derivation. */
|
|
127
|
+
export interface SessionRowState {
|
|
128
|
+
/** Registry-global pin ids; pinned rows lead their section in the local order. */
|
|
129
|
+
pinnedSessionIds: readonly SessionId[];
|
|
130
|
+
/** Archive set; members keep their slots and show grayed while visible. */
|
|
131
|
+
archivedSessionIds: readonly SessionId[];
|
|
132
|
+
/** Archived-row visibility choice applied to lists and search alike. */
|
|
133
|
+
archivedFilter: ArchivedFilter;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Derive the workspace browser groups with every session as a top-level row.
|
|
137
|
+
*
|
|
138
|
+
* Every group shows, except that the archived-only filter drops groups
|
|
139
|
+
* without visible members; sessions populate under expanded groups with
|
|
140
|
+
* pinned rows leading in the selected local order. Blank sessions are
|
|
141
|
+
* excluded except for the selected provisional New Session row; archived
|
|
142
|
+
* sessions keep their slots and appear per the archived filter. Content
|
|
143
|
+
* search lives outside this derivation (see {@link deriveSearchResults}).
|
|
144
|
+
* @param list - sessions list snapshot (`mainView` retention feeds containsCurrent).
|
|
145
|
+
* @param workspaces - real Workspaces in Host group order with caller-projected Session order.
|
|
146
|
+
* @param rowState - registry-global pin and archive sets plus the archived filter.
|
|
147
|
+
* @param statuses - unified UI status by Session.
|
|
148
|
+
* @param view - local expansion arrays.
|
|
149
|
+
* @returns group sections in render order.
|
|
150
|
+
*/
|
|
151
|
+
export declare function deriveGroups(list: SessionListState, workspaces: readonly WorkspaceView[], rowState: SessionRowState, statuses: SessionStatuses, view: TreeView): GroupNode[];
|
|
152
|
+
/**
|
|
153
|
+
* Select complete flat-list membership, independently of archive visibility.
|
|
154
|
+
* @param list - sessions list snapshot.
|
|
155
|
+
* @returns known ordinary Session ids, including archives and only the current blank.
|
|
156
|
+
*/
|
|
157
|
+
export declare function sessionMemberIds(list: SessionListState): SessionId[];
|
|
158
|
+
/**
|
|
159
|
+
* Select visible flat-list members without deriving row presentation or ordering.
|
|
160
|
+
* @param list - sessions list snapshot.
|
|
161
|
+
* @param archivedSessionIds - registry-global archive set.
|
|
162
|
+
* @param archivedFilter - archived-row visibility choice.
|
|
163
|
+
* @returns known visible Session ids in list order, including ordinary forks and only the current blank.
|
|
164
|
+
*/
|
|
165
|
+
export declare function visibleSessionIds(list: SessionListState, archivedSessionIds: readonly SessionId[], archivedFilter: ArchivedFilter): SessionId[];
|
|
166
|
+
/**
|
|
167
|
+
* Derive flat rows from the browser's complete ordered Session ids, with
|
|
168
|
+
* pinned rows fronted ahead of the supplied order.
|
|
169
|
+
* @param list - sessions list snapshot used to select the ids.
|
|
170
|
+
* @param sessionIds - complete account members in the selected order, including hidden archives.
|
|
171
|
+
* @param rowState - registry-global pin and archive sets plus the archived filter.
|
|
172
|
+
* @param statuses - unified UI status by Session.
|
|
173
|
+
* @returns flat rows in sectioned order with current status indicators.
|
|
174
|
+
*/
|
|
175
|
+
export declare function deriveFlat(list: SessionListState, sessionIds: readonly SessionId[], rowState: SessionRowState, statuses: SessionStatuses): SessionNode[];
|
|
176
|
+
/**
|
|
177
|
+
* Merge immediate title/Workspace substring matches with ranked Host content
|
|
178
|
+
* matches. Local rows lead newest-first, content-only rows retain backend
|
|
179
|
+
* order, and duplicate sessions receive the backend snippet in place.
|
|
180
|
+
* @param list - session metadata authority.
|
|
181
|
+
* @param workspaces - Workspace membership and display labels.
|
|
182
|
+
* @param query - caller text; surrounding whitespace is ignored.
|
|
183
|
+
* @param archivedSessionIds - registry-global archive set (members match per the archived filter).
|
|
184
|
+
* @param archivedFilter - archived-row visibility choice; search follows it.
|
|
185
|
+
* @param statuses - unified UI status by Session.
|
|
186
|
+
* @param content - ranked Host content-search page.
|
|
187
|
+
* @param limit - protocol-owned maximum merged row count.
|
|
188
|
+
* @returns bounded deduplicated flat rows and a refine-query hint bit.
|
|
189
|
+
*/
|
|
190
|
+
export declare function deriveSearchResults(list: SessionListState, workspaces: readonly WorkspaceView[], query: string, archivedSessionIds: readonly SessionId[], archivedFilter: ArchivedFilter, statuses: SessionStatuses, content: {
|
|
191
|
+
items: readonly SessionSearchResultItem[];
|
|
192
|
+
hasMore: boolean;
|
|
193
|
+
}, limit: number): SearchResultSet;
|
|
194
|
+
/**
|
|
195
|
+
* Find the nearest registered ancestor, excluding the Workspace directory itself.
|
|
196
|
+
* Paths use Host spelling; matching is case-sensitive, like Workspace identity.
|
|
197
|
+
* @param path - Workspace directory.
|
|
198
|
+
* @param parents - registered Workspace directory paths.
|
|
199
|
+
* @returns the owning parent path, or undefined when no parent contains the Workspace.
|
|
200
|
+
*/
|
|
201
|
+
export declare function owningParentFolder(path: string, parents: readonly string[]): string | undefined;
|
|
202
|
+
export {};
|
|
203
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace picker plugin, node half. Pure UI plugin: the empty apply exists
|
|
3
|
+
* so the plugin appears in the host cordis.yml / Loader (load and lifecycle
|
|
4
|
+
* follow the host; the browser half ships via exports["./client"], discovered
|
|
5
|
+
* through the package.json dsh.client declaration).
|
|
6
|
+
*/
|
|
7
|
+
/** Host plugin body — no host-side behavior for the workspace picker plugin. */
|
|
8
|
+
export declare function apply(): void;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,118 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umialpha/dsh-client-ui-workspace-groups",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "Version-pinned Workspace replacement with an optional Session groups slot",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": "umialpha <roy236977634@gmail.com>",
|
|
6
|
+
"homepage": "https://github.com/umialpha/dsh-session-groups#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/umialpha/dsh-session-groups/issues"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/umialpha/dsh-session-groups.git",
|
|
16
|
+
"directory": "packages/client/ui-workspace-groups"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "lib/index.js",
|
|
20
|
+
"types": "lib/types/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./lib/types/index.d.ts",
|
|
24
|
+
"default": "./lib/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./client": {
|
|
27
|
+
"types": "./lib/types/client/index.d.ts",
|
|
28
|
+
"default": "./lib/client.js"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"dsh": {
|
|
33
|
+
"client": {
|
|
34
|
+
"inject": [
|
|
35
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
36
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
37
|
+
"@deepseek-ai/dsh-api-workspace-controller",
|
|
38
|
+
"@deepseek-ai/dsh-client-connection",
|
|
39
|
+
"@deepseek-ai/dsh-client-locale",
|
|
40
|
+
"@deepseek-ai/dsh-client-shortcuts",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-sidebar"
|
|
46
|
+
],
|
|
47
|
+
"platform": "web"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.1-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.1-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-product-analytics": "0.2.1-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-shortcuts": "0.2.1-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.1-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-jobs": "0.2.1-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-schedule": "0.2.1-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.2"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
|
|
78
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.1-alpha.2",
|
|
79
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.2",
|
|
80
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.1-alpha.2",
|
|
81
|
+
"@deepseek-ai/dsh-client-connection": "0.2.1-alpha.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-alpha.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-product-analytics": "0.2.1-alpha.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-shortcuts": "0.2.1-alpha.2",
|
|
85
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.2",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.1-alpha.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.2",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.2",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.2",
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-alpha.2",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.2",
|
|
93
|
+
"@deepseek-ai/dsh-jobs": "0.2.1-alpha.2",
|
|
94
|
+
"@deepseek-ai/dsh-schedule": "0.2.1-alpha.2",
|
|
95
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.2",
|
|
96
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
|
|
97
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.2",
|
|
98
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.2",
|
|
99
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.2",
|
|
100
|
+
"@types/react": "~18.3.1",
|
|
101
|
+
"clsx": "^2.0.0",
|
|
102
|
+
"react": "^18.2.0"
|
|
103
|
+
},
|
|
104
|
+
"files": [
|
|
105
|
+
"README.md",
|
|
106
|
+
"README.zh.md",
|
|
107
|
+
"README.i18n.yaml",
|
|
108
|
+
"LICENSE",
|
|
109
|
+
"THIRD_PARTY_NOTICES.md",
|
|
110
|
+
"lib/index.js",
|
|
111
|
+
"lib/client.js",
|
|
112
|
+
"lib/types/**/*.d.ts"
|
|
113
|
+
],
|
|
114
|
+
"scripts": {
|
|
115
|
+
"bundle": "tsdown --config-loader native",
|
|
116
|
+
"watch": "tsdown --config-loader native --watch"
|
|
117
|
+
}
|
|
6
118
|
}
|