@huanlin/dsh-plugin-ya-workspace-sidebar 0.5.0 → 0.6.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.
@@ -1,87 +1,87 @@
1
- /** Pure sidebar projections shared by the browser and unit tests. */
2
- import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
3
- import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
4
- import type { SessionId } from '@deepseek-ai/dsh-session/types';
5
- /** Pending-interaction kinds surfaced as a row status dot. */
6
- export type PendingInteractionKind = 'approval' | 'plan-review' | 'question';
7
- /** Renderer-visible view of ui-session's pending-interaction snapshot entries. */
8
- export type PendingInteractionEntry = {
9
- readonly kind: string;
10
- };
11
- /** Pending-interaction snapshot consumed by the derive functions. */
12
- export type PendingInteractionMap = ReadonlyMap<SessionId, PendingInteractionEntry>;
13
- /** Navigation key for sessions not accounted to a real workspace. */
14
- export declare const UNGROUPED: "__ya_ungrouped__";
15
- /** One sidebar session row. */
16
- export interface SessionRow {
17
- id: SessionId;
18
- title: string;
19
- blank: boolean;
20
- running: boolean;
21
- pendingInteraction?: PendingInteractionKind;
22
- completed: boolean;
23
- updatedAt: number;
24
- workspaceKey: WorkspaceId | typeof UNGROUPED;
25
- workspaceTitle: string;
26
- }
27
- /** One date-bucketed group. Empty `dateKey` is the undated trailing bucket. */
28
- export interface DateGroup<T> {
29
- /** Local calendar date `YYYY-MM-DD`, or `''` for rows with no timestamp. */
30
- dateKey: string;
31
- /** Days between today's local date and this group's local date (0=today, 1=yesterday, …). */
32
- dayOffset: number;
33
- rows: T[];
34
- }
35
- /** One date-bucketed group of session rows for the real-workspace level. */
36
- export type SessionDateGroup = DateGroup<SessionRow>;
37
- /** One date-bucketed group of first-level workspace rows. */
38
- export type WorkspaceDateGroup = DateGroup<WorkspaceRow>;
39
- /** One first-level workspace row. */
40
- export interface WorkspaceRow {
41
- key: WorkspaceId | typeof UNGROUPED;
42
- title: string;
43
- path?: string;
44
- createdAt?: string;
45
- /** Newest visible session `updatedAt`; empty real workspaces fall back to `createdAt`. */
46
- lastUsedAt?: number;
47
- count: number;
48
- real: boolean;
49
- }
50
- /** Resolve the first/second-level destination for one session. */
51
- export declare function workspaceKeyForSession(sessionId: SessionId | undefined, workspaces: readonly WorkspaceView[]): WorkspaceId | typeof UNGROUPED | null;
52
- /** Derive global recent sessions, newest first. */
53
- export declare function deriveRecent(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap, limit?: number): SessionRow[];
54
- /** Fixed occupied height of one recent-sessions row: 33px two-line row + 2px vertical margins. */
55
- export declare const RECENT_ROW_STRIDE = 35;
56
- /** Half-open render window `[start, end)` of a fixed-stride virtual list. */
57
- export interface VirtualWindow {
58
- start: number;
59
- end: number;
60
- }
61
- /**
62
- * Windowing math for the recent-sessions virtual list (fixed row stride).
63
- *
64
- * Clamps `scrollTop` into the valid range, then pads the visible row range
65
- * with `overscan` rows on both edges. Before the viewport has been measured
66
- * (`viewportHeight <= 0`) it still returns a small head window so the first
67
- * paint is never blank.
68
- */
69
- export declare function virtualWindow(scrollTop: number, viewportHeight: number, count: number, stride?: number, overscan?: number): VirtualWindow;
70
- /** Derive first-level workspaces plus Ungrouped, newest session activity first. */
71
- export declare function deriveWorkspaces(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[]): WorkspaceRow[];
72
- /** Derive the selected workspace's sessions in its canonical order. */
73
- export declare function deriveWorkspaceSessions(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap): SessionRow[];
74
- /**
75
- * Derive the selected real workspace's sessions grouped by local calendar date.
76
- *
77
- * - Only real workspaces: `Ungrouped` falls back to {@link deriveWorkspaceSessions}.
78
- * - Groups are ordered by date descending; rows within a group by `updatedAt` descending.
79
- * - {@link visible} filter is reused (archived / subagent / blank visibility).
80
- * - Future timestamps clamp to today's bucket (`dayOffset` 0).
81
- * - `now` is the reference timestamp for "today"; pass `Date.now()` in production.
82
- */
83
- export declare function deriveWorkspaceSessionGroups(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap, now: number): SessionDateGroup[];
84
- /** Group root workspace rows by local calendar date of `lastUsedAt`; undated rows trail with empty `dateKey`. */
85
- export declare function deriveWorkspaceGroups(rows: readonly WorkspaceRow[], now: number): WorkspaceDateGroup[];
86
- /** Case-insensitive local title/workspace matching used beside Host content search. */
87
- export declare function localMatches(rows: readonly SessionRow[], query: string): SessionRow[];
1
+ /** Pure sidebar projections shared by the browser and unit tests. */
2
+ import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
3
+ import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
4
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
5
+ /** Pending-interaction kinds surfaced as a row status dot. */
6
+ export type PendingInteractionKind = 'approval' | 'plan-review' | 'question';
7
+ /** Renderer-visible view of ui-session's pending-interaction snapshot entries. */
8
+ export type PendingInteractionEntry = {
9
+ readonly kind: string;
10
+ };
11
+ /** Pending-interaction snapshot consumed by the derive functions. */
12
+ export type PendingInteractionMap = ReadonlyMap<SessionId, PendingInteractionEntry>;
13
+ /** Navigation key for sessions not accounted to a real workspace. */
14
+ export declare const UNGROUPED: "__ya_ungrouped__";
15
+ /** One sidebar session row. */
16
+ export interface SessionRow {
17
+ id: SessionId;
18
+ title: string;
19
+ blank: boolean;
20
+ running: boolean;
21
+ pendingInteraction?: PendingInteractionKind;
22
+ completed: boolean;
23
+ updatedAt: number;
24
+ workspaceKey: WorkspaceId | typeof UNGROUPED;
25
+ workspaceTitle: string;
26
+ }
27
+ /** One date-bucketed group. Empty `dateKey` is the undated trailing bucket. */
28
+ export interface DateGroup<T> {
29
+ /** Local calendar date `YYYY-MM-DD`, or `''` for rows with no timestamp. */
30
+ dateKey: string;
31
+ /** Days between today's local date and this group's local date (0=today, 1=yesterday, …). */
32
+ dayOffset: number;
33
+ rows: T[];
34
+ }
35
+ /** One date-bucketed group of session rows for the real-workspace level. */
36
+ export type SessionDateGroup = DateGroup<SessionRow>;
37
+ /** One date-bucketed group of first-level workspace rows. */
38
+ export type WorkspaceDateGroup = DateGroup<WorkspaceRow>;
39
+ /** One first-level workspace row. */
40
+ export interface WorkspaceRow {
41
+ key: WorkspaceId | typeof UNGROUPED;
42
+ title: string;
43
+ path?: string;
44
+ createdAt?: string;
45
+ /** Newest visible session `updatedAt`; empty real workspaces fall back to `createdAt`. */
46
+ lastUsedAt?: number;
47
+ count: number;
48
+ real: boolean;
49
+ }
50
+ /** Resolve the first/second-level destination for one session. */
51
+ export declare function workspaceKeyForSession(sessionId: SessionId | undefined, workspaces: readonly WorkspaceView[]): WorkspaceId | typeof UNGROUPED | null;
52
+ /** Derive global recent sessions, newest first. */
53
+ export declare function deriveRecent(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap, limit?: number): SessionRow[];
54
+ /** Fixed occupied height of one recent-sessions row: 33px two-line row + 2px vertical margins. */
55
+ export declare const RECENT_ROW_STRIDE = 35;
56
+ /** Half-open render window `[start, end)` of a fixed-stride virtual list. */
57
+ export interface VirtualWindow {
58
+ start: number;
59
+ end: number;
60
+ }
61
+ /**
62
+ * Windowing math for the recent-sessions virtual list (fixed row stride).
63
+ *
64
+ * Clamps `scrollTop` into the valid range, then pads the visible row range
65
+ * with `overscan` rows on both edges. Before the viewport has been measured
66
+ * (`viewportHeight <= 0`) it still returns a small head window so the first
67
+ * paint is never blank.
68
+ */
69
+ export declare function virtualWindow(scrollTop: number, viewportHeight: number, count: number, stride?: number, overscan?: number): VirtualWindow;
70
+ /** Derive first-level workspaces plus Ungrouped, newest session activity first. */
71
+ export declare function deriveWorkspaces(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[]): WorkspaceRow[];
72
+ /** Derive the selected workspace's sessions in its canonical order. */
73
+ export declare function deriveWorkspaceSessions(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap): SessionRow[];
74
+ /**
75
+ * Derive the selected real workspace's sessions grouped by local calendar date.
76
+ *
77
+ * - Only real workspaces: `Ungrouped` falls back to {@link deriveWorkspaceSessions}.
78
+ * - Groups are ordered by date descending; rows within a group by `updatedAt` descending.
79
+ * - {@link visible} filter is reused (archived / subagent / blank visibility).
80
+ * - Future timestamps clamp to today's bucket (`dayOffset` 0).
81
+ * - `now` is the reference timestamp for "today"; pass `Date.now()` in production.
82
+ */
83
+ export declare function deriveWorkspaceSessionGroups(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap, now: number): SessionDateGroup[];
84
+ /** Group root workspace rows by local calendar date of `lastUsedAt`; undated rows trail with empty `dateKey`. */
85
+ export declare function deriveWorkspaceGroups(rows: readonly WorkspaceRow[], now: number): WorkspaceDateGroup[];
86
+ /** Case-insensitive local title/workspace matching used beside Host content search. */
87
+ export declare function localMatches(rows: readonly SessionRow[], query: string): SessionRow[];
@@ -1,41 +1,45 @@
1
- /**
2
- * Stand-in for the `uiWorkspace` navigation service owned by the official
3
- * ui-workspace client entry, which this bundle's patch disables.
4
- *
5
- * Since DSH v0.1.2-alpha.1 the ui-sidebar, ui-conversation, ui-agent-preset,
6
- * and the composed directory-picker client entries all inject `uiWorkspace`;
7
- * without a provider their fibers park forever and the whole WebUI boot
8
- * deadlocks. This port carries the semantics that moved here from the
9
- * pre-split client runtime: reuse-or-create Workspace connection, the
10
- * explicit/current/recent New Session fallback, archived-current clearing,
11
- * boot auto-selection, and the directory-picking wire calls.
12
- */
13
- import { Service, type Context } from '@deepseek-ai/cordis';
14
- import type { ISessions } from '@deepseek-ai/dsh-api-session-controller/client';
15
- import type { ClientRemote, DirectoryListing } from '@deepseek-ai/dsh-api-remotes/client';
16
- import type { IWorkspaces, WorkspaceId } from '@deepseek-ai/dsh-api-workspace-controller/client';
17
- import type { UiWorkspace } from '@deepseek-ai/dsh-client-ui-workspace/client';
18
- import type { SessionId } from '@deepseek-ai/dsh-session/types';
19
- /** Implements Workspace navigation and directory UI operations. */
20
- export declare class YaWorkspaceNavigation extends Service implements UiWorkspace {
21
- private readonly directoryPicker;
22
- private readonly workspaces;
23
- private readonly sessions;
24
- private readonly connecting;
25
- /**
26
- * @param ctx - Client root Context.
27
- * @param directoryPicker - the directory-picking Remote namespace.
28
- * @param workspaces - pure Workspace Controller.
29
- * @param sessions - pure Session Controller.
30
- */
31
- constructor(ctx: Context, directoryPicker: ClientRemote['directoryPicker'], workspaces: IWorkspaces, sessions: ISessions);
32
- connectWorkspace(workspaceId: WorkspaceId): Promise<SessionId>;
33
- startSession(workspaceId?: WorkspaceId): void;
34
- archiveSession(sessionId: SessionId): Promise<void>;
35
- pickDirectory(): Promise<string | null>;
36
- listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>;
37
- createDirectory(path: string, name: string): Promise<string>;
38
- private watchNavigation;
39
- /** @returns true when an archived current selection was cleared. */
40
- private clearArchivedCurrent;
41
- }
1
+ /**
2
+ * Stand-in for the `uiWorkspace` navigation service owned by the official
3
+ * ui-workspace client entry, which this bundle's patch disables.
4
+ *
5
+ * Since DSH v0.1.2-alpha.1 the ui-sidebar, ui-conversation, ui-agent-preset,
6
+ * and the composed directory-picker client entries all inject `uiWorkspace`;
7
+ * without a provider their fibers park forever and the whole WebUI boot
8
+ * deadlocks. This port carries the semantics that moved here from the
9
+ * pre-split client runtime: reuse-or-create Workspace connection, the
10
+ * explicit/current/recent New Session fallback, archived-current clearing,
11
+ * boot auto-selection, and the directory-picking wire calls.
12
+ */
13
+ import { Service, type Context } from '@deepseek-ai/cordis';
14
+ import type { ISessions } from '@deepseek-ai/dsh-api-session-controller/client';
15
+ import type { ClientRemote, DirectoryListing } from '@deepseek-ai/dsh-api-remotes/client';
16
+ import type { IWorkspaces, WorkspaceId } from '@deepseek-ai/dsh-api-workspace-controller/client';
17
+ import type { UiWorkspace } from '@deepseek-ai/dsh-client-ui-workspace/client';
18
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
19
+ /** Implements Workspace navigation and directory UI operations. */
20
+ export declare class YaWorkspaceNavigation extends Service implements UiWorkspace {
21
+ private readonly directoryPicker;
22
+ private readonly workspaces;
23
+ private readonly sessions;
24
+ private readonly connecting;
25
+ private readonly lifetime;
26
+ /**
27
+ * @param ctx - Client root Context.
28
+ * @param directoryPicker - the directory-picking Remote namespace.
29
+ * @param workspaces - pure Workspace Controller.
30
+ * @param sessions - pure Session Controller.
31
+ */
32
+ constructor(ctx: Context, directoryPicker: ClientRemote['directoryPicker'], workspaces: IWorkspaces, sessions: ISessions);
33
+ connectWorkspace(workspaceId: WorkspaceId): Promise<SessionId>;
34
+ openSession(sessionId: SessionId): void;
35
+ openWorkspace(workspaceId: WorkspaceId, beforeOpen?: (sessionId: SessionId) => void): Promise<void>;
36
+ forkSession(sessionId: SessionId): Promise<void>;
37
+ startSession(workspaceId?: WorkspaceId): void;
38
+ archiveSession(sessionId: SessionId): Promise<void>;
39
+ pickDirectory(): Promise<string | null>;
40
+ listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>;
41
+ createDirectory(path: string, name: string): Promise<string>;
42
+ private watchNavigation;
43
+ /** @returns true when an archived current selection was cleared. */
44
+ private clearArchivedCurrent;
45
+ }
@@ -1,37 +1,37 @@
1
- /**
2
- * Browser-local preference controlling whether the session row's destructive
3
- * action presents as Archive (default) or Delete. Delete mode renders the
4
- * row action red with a trash icon and gates the call behind a confirmation
5
- * modal; the underlying Host verb remains `archiveSession` (the only
6
- * session-level destructive API exposed by `ctx.workspaces`), which hides
7
- * the session from grouping surfaces while preserving its log.
8
- *
9
- * The preference is persisted to `localStorage` so it survives reloads and
10
- * remounts without host-side plumbing. Cross-device sync is intentionally
11
- * out of scope: this is a per-browser UX preference, not a deployment knob.
12
- */
13
- /** How the session row's destructive action presents and behaves. */
14
- export type SessionActionMode = 'archive' | 'delete';
15
- /** Current action mode snapshot. */
16
- export declare function getActionMode(): SessionActionMode;
17
- /** Switch the action mode and notify subscribers. */
18
- export declare function setActionMode(mode: SessionActionMode): void;
19
- /** Subscribe to action mode changes; returns an unsubscribe disposer. */
20
- export declare function subscribeActionMode(listener: () => void): () => void;
21
- /**
22
- * Browser-local height (px) of the recent-sessions virtual viewport, set by
23
- * dragging the separator between the recent block and the workspace browser
24
- * (or nudging it with arrow keys). `undefined` means "never adjusted" and the
25
- * stylesheet default (`min(280px, 40vh)`) applies. Persisted to
26
- * `localStorage` like the action mode; per-browser by design.
27
- */
28
- /** Lower bound of the recent-sessions viewport (about two rows). */
29
- export declare const RECENT_MIN_HEIGHT = 70;
30
- /** Absolute cap as a sanity net; the live drag clamps against free space. */
31
- export declare const RECENT_MAX_HEIGHT = 640;
32
- /** Current recent-sessions viewport height preference, if the user set one. */
33
- export declare function getRecentViewportHeight(): number | undefined;
34
- /** Store (or clear with `undefined`) the height preference and notify subscribers. */
35
- export declare function setRecentViewportHeight(height: number | undefined): void;
36
- /** Subscribe to recent height changes; returns an unsubscribe disposer. */
37
- export declare function subscribeRecentViewportHeight(listener: () => void): () => void;
1
+ /**
2
+ * Browser-local preference controlling whether the session row's destructive
3
+ * action presents as Archive (default) or Delete. Delete mode renders the
4
+ * row action red with a trash icon and gates the call behind a confirmation
5
+ * modal; the underlying Host verb remains `archiveSession` (the only
6
+ * session-level destructive API exposed by `ctx.workspaces`), which hides
7
+ * the session from grouping surfaces while preserving its log.
8
+ *
9
+ * The preference is persisted to `localStorage` so it survives reloads and
10
+ * remounts without host-side plumbing. Cross-device sync is intentionally
11
+ * out of scope: this is a per-browser UX preference, not a deployment knob.
12
+ */
13
+ /** How the session row's destructive action presents and behaves. */
14
+ export type SessionActionMode = 'archive' | 'delete';
15
+ /** Current action mode snapshot. */
16
+ export declare function getActionMode(): SessionActionMode;
17
+ /** Switch the action mode and notify subscribers. */
18
+ export declare function setActionMode(mode: SessionActionMode): void;
19
+ /** Subscribe to action mode changes; returns an unsubscribe disposer. */
20
+ export declare function subscribeActionMode(listener: () => void): () => void;
21
+ /**
22
+ * Browser-local height (px) of the recent-sessions virtual viewport, set by
23
+ * dragging the separator between the recent block and the workspace browser
24
+ * (or nudging it with arrow keys). `undefined` means "never adjusted" and the
25
+ * stylesheet default (`min(280px, 40vh)`) applies. Persisted to
26
+ * `localStorage` like the action mode; per-browser by design.
27
+ */
28
+ /** Lower bound of the recent-sessions viewport (about two rows). */
29
+ export declare const RECENT_MIN_HEIGHT = 70;
30
+ /** Absolute cap as a sanity net; the live drag clamps against free space. */
31
+ export declare const RECENT_MAX_HEIGHT = 640;
32
+ /** Current recent-sessions viewport height preference, if the user set one. */
33
+ export declare function getRecentViewportHeight(): number | undefined;
34
+ /** Store (or clear with `undefined`) the height preference and notify subscribers. */
35
+ export declare function setRecentViewportHeight(height: number | undefined): void;
36
+ /** Subscribe to recent height changes; returns an unsubscribe disposer. */
37
+ export declare function subscribeRecentViewportHeight(listener: () => void): () => void;
@@ -1,4 +1,4 @@
1
- /** One scoped stylesheet injected for the lifetime of the client activation. */
2
- export declare const CSS = "\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { position:relative; overflow-y:auto; overscroll-behavior:contain; min-height:0; max-height:min(280px, 40vh); }\n.ya-virtual-canvas { position:relative; width:100%; }\n.ya-virtual-slot { position:absolute; left:0; right:0; height:35px; box-sizing:border-box; padding:1px 0; display:flex; flex-direction:column; justify-content:center; }\n.ya-virtual-slot .ya-row { margin:0; min-height:33px; }\n.ya-recent-resizer { position:relative; flex:none; height:9px; margin:1px 0 3px; display:flex; align-items:center; justify-content:center; border-radius:5px; cursor:row-resize; touch-action:none; }\n.ya-recent-resizer::before { content:''; position:absolute; left:8px; right:8px; top:50%; height:1px; transform:translateY(-0.5px); background:var(--dsw-alias-border-l2); }\n.ya-recent-resizer::after { content:''; width:26px; height:3px; border-radius:2px; background:var(--dsw-alias-border-l2); transition:background 120ms ease-out; }\n.ya-recent-resizer:hover::after, .ya-recent-resizer:focus-visible::after, .ya-recent-resizer.ya-resizing::after { background:var(--dsw-alias-label-tertiary); }\n.ya-recent-resizer.ya-resizing::before { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n.ya-action-mode-toggle.ya-action-mode-delete { color:var(--dsw-alias-state-error-primary); }\n.ya-action-mode-toggle.ya-action-mode-delete:hover { background:var(--dsw-alias-interactive-bg-hover-danger); }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n";
3
- /** Install the stylesheet and return its disposer. */
4
- export declare function installStyles(): () => void;
1
+ /** One scoped stylesheet injected for the lifetime of the client activation. */
2
+ export declare const CSS = "\n[data-ya-workspace-sidebar] { flex:1; min-height:0; display:flex; flex-direction:column; box-sizing:border-box; padding-right:var(--dsh-sidebar-inline-padding); color:var(--dsw-alias-label-primary); }\n[data-ya-workspace-sidebar].ya-rail { padding-right:0; }\n.ya-section-header { flex:none; height:36px; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding-left:12px; margin-bottom:4px; box-sizing:border-box; color:var(--dsw-alias-label-tertiary); }\n.ya-section-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }\n.ya-icon-button { flex:none; width:28px; height:28px; border:0; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-secondary); background:transparent; cursor:pointer; }\n.ya-icon-button:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-search { flex:none; height:38px; margin:0 2px 10px; padding:0 14px; display:flex; align-items:center; gap:8px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:24px; background:var(--dsw-static-neutral-bluish-75); color:var(--dsw-alias-label-caption); }\nbody[data-ds-dark-theme] .ya-search { background:var(--dsw-static-neutral-bluish-900); }\n.ya-search-input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; }\n.ya-search-input::placeholder { color:var(--dsw-alias-label-tertiary); }\n.ya-search-icon { flex:none; display:inline-flex; border:0; padding:0; color:inherit; background:transparent; }\n.ya-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; margin-right:calc(-1 * var(--dsh-sidebar-inline-padding)); padding-right:var(--dsh-sidebar-inline-padding); }\n.ya-recent { flex:none; }\n.ya-recent-list-wrap { display:grid; grid-template-rows:1fr; transition:grid-template-rows 220ms ease-out; }\n.ya-recent-collapsed .ya-recent-list-wrap { grid-template-rows:0fr; }\n.ya-recent-list { position:relative; overflow-y:auto; overscroll-behavior:contain; min-height:0; max-height:min(280px, 40vh); }\n.ya-virtual-canvas { position:relative; width:100%; }\n.ya-virtual-slot { position:absolute; left:0; right:0; height:35px; box-sizing:border-box; padding:1px 0; display:flex; flex-direction:column; justify-content:center; }\n.ya-virtual-slot .ya-row { margin:0; min-height:33px; }\n.ya-recent-resizer { position:relative; flex:none; height:9px; margin:1px 0 3px; display:flex; align-items:center; justify-content:center; border-radius:5px; cursor:row-resize; touch-action:none; }\n.ya-recent-resizer::before { content:''; position:absolute; left:8px; right:8px; top:50%; height:1px; transform:translateY(-0.5px); background:var(--dsw-alias-border-l2); }\n.ya-recent-resizer::after { content:''; width:26px; height:3px; border-radius:2px; background:var(--dsw-alias-border-l2); transition:background 120ms ease-out; }\n.ya-recent-resizer:hover::after, .ya-recent-resizer:focus-visible::after, .ya-recent-resizer.ya-resizing::after { background:var(--dsw-alias-label-tertiary); }\n.ya-recent-resizer.ya-resizing::before { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-block-label { height:26px; display:flex; align-items:center; gap:2px; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; }\n.ya-block-label-toggle { flex:none; width:20px; height:20px; margin-left:auto; border:0; border-radius:6px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--dsw-alias-label-tertiary); cursor:pointer; transition:transform 180ms ease-out; }\n.ya-block-label-toggle:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-secondary); }\n.ya-block-label-toggle.ya-collapsed { transform:rotate(-90deg); }\n.ya-date-group-label { height:26px; display:flex; align-items:center; padding:0 8px; color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:600; letter-spacing:.02em; }\n.ya-breadcrumb { flex:none; height:34px; display:flex; align-items:center; gap:2px; padding:0 6px; color:var(--dsw-alias-label-tertiary); font-size:13px; }\n.ya-crumb { border:0; padding:4px 3px; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:default; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\nbutton.ya-crumb:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); cursor:pointer; }\n.ya-scroll { flex:1; min-height:0; overflow-y:auto; padding-bottom:12px; }\n.ya-row { position:relative; min-height:34px; display:flex; align-items:center; gap:6px; margin:1px 0; padding:0 7px; border-radius:9px; box-sizing:border-box; color:var(--dsw-alias-label-primary); cursor:pointer; user-select:none; }\n.ya-row:hover, .ya-row.ya-menu-open { background:var(--dsw-alias-interactive-bg-hover); }\n.ya-row.ya-selected { background:var(--dsw-alias-interactive-bg-selected); }\n.ya-workspace-row { min-height:40px; }\n.ya-row-main { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }\n.ya-row-line { display:flex; align-items:center; min-width:0; gap:6px; }\n.ya-row-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; }\n.ya-row-meta { flex:none; color:var(--dsw-alias-label-tertiary); font-size:11px; white-space:nowrap; }\n.ya-workspace-path { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; }\n.ya-row-actions { flex:none; display:flex; align-items:center; gap:2px; opacity:0; pointer-events:none; transition:opacity 120ms ease-out; }\n.ya-row:hover .ya-row-actions, .ya-menu-open .ya-row-actions { opacity:1; pointer-events:auto; }\n.ya-status-slot { flex:none; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--dsw-alias-label-tertiary); }\n.ya-recent .ya-row { min-height:31px; }\n.ya-search-workspace { color:var(--dsw-alias-label-tertiary); font-size:11px; line-height:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.ya-empty, .ya-status { padding:18px 10px; color:var(--dsw-alias-label-tertiary); text-align:center; font-size:13px; }\n.ya-warning { color:var(--dsw-alias-status-warning); }\n.ya-rename-input { width:100%; height:38px; box-sizing:border-box; border:1px solid var(--dsw-alias-border-l2); border-radius:9px; padding:0 11px; background:transparent; color:var(--dsw-alias-label-primary); outline:none; }\n.ya-error { margin-top:8px; color:var(--dsw-alias-status-error); font-size:12px; }\n.ya-rail .ya-section-header { padding-left:0; margin-bottom:12px; }\n.ya-rail .ya-icon-button, .ya-rail .ya-search { width:36px; height:36px; padding:0; margin:0 0 12px; border-color:transparent; background:transparent; }\n.ya-rail .ya-search { justify-content:center; }\n.ya-rail .ya-search-icon { cursor:pointer; color:var(--dsw-alias-label-primary); }\n.ya-picker-error { color:var(--dsw-alias-status-error); white-space:pre-wrap; }\n.ya-action-mode-toggle.ya-action-mode-delete { color:var(--dsw-alias-state-error-primary); }\n.ya-action-mode-toggle.ya-action-mode-delete:hover { background:var(--dsw-alias-interactive-bg-hover-danger); }\n@keyframes ya-slide-in-forward { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }\n@keyframes ya-slide-in-backward { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }\n.ya-level-enter-forward { animation:ya-slide-in-forward 180ms ease-out; }\n.ya-level-enter-backward { animation:ya-slide-in-backward 180ms ease-out; }\n";
3
+ /** Install the stylesheet and return its disposer. */
4
+ export declare function installStyles(): () => void;
@@ -1,3 +1,3 @@
1
- import type { Context } from '@deepseek-ai/cordis';
2
- export declare const name = "ya-workspace-sidebar";
3
- export declare function apply(ctx: Context): void;
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ export declare const name = "ya-workspace-sidebar";
3
+ export declare function apply(ctx: Context): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huanlin/dsh-plugin-ya-workspace-sidebar",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,6 +39,7 @@
39
39
  "@deepseek-ai/dsh-api-workspace-controller",
40
40
  "@deepseek-ai/dsh-client-locale",
41
41
  "@deepseek-ai/dsh-client-ui-conversation",
42
+ "@deepseek-ai/dsh-client-ui-layout",
42
43
  "@deepseek-ai/dsh-client-ui-primitives",
43
44
  "@deepseek-ai/dsh-client-ui-renderer",
44
45
  "@deepseek-ai/dsh-client-ui-session",
@@ -49,20 +50,21 @@
49
50
  }
50
51
  },
51
52
  "peerDependencies": {
52
- "@deepseek-ai/cordis": "^0.1.2-rc.1",
53
- "@deepseek-ai/dsh-api-remotes": "^0.1.2-rc.1",
54
- "@deepseek-ai/dsh-api-session-controller": "^0.1.2-rc.1",
55
- "@deepseek-ai/dsh-api-workspace-controller": "^0.1.2-rc.1",
56
- "@deepseek-ai/dsh-client-locale": "^0.1.2-rc.1",
57
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-rc.1",
58
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-rc.1",
59
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-rc.1",
60
- "@deepseek-ai/dsh-client-ui-session": "^0.1.2-rc.1",
61
- "@deepseek-ai/dsh-client-ui-sidebar": "^0.1.2-rc.1",
62
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-rc.1",
63
- "@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-rc.1",
64
- "@deepseek-ai/dsh-session": "^0.1.2-rc.1",
65
- "@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
53
+ "@deepseek-ai/cordis": "^0.1.5-rc.1",
54
+ "@deepseek-ai/dsh-api-remotes": "^0.1.5-rc.1",
55
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.5-rc.1",
56
+ "@deepseek-ai/dsh-api-workspace-controller": "^0.1.5-rc.1",
57
+ "@deepseek-ai/dsh-client-locale": "^0.1.5-rc.1",
58
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.1",
59
+ "@deepseek-ai/dsh-client-ui-layout": "^0.1.5-rc.1",
60
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.1",
61
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.1",
62
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.5-rc.1",
63
+ "@deepseek-ai/dsh-client-ui-sidebar": "^0.1.5-rc.1",
64
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.1",
65
+ "@deepseek-ai/dsh-client-ui-workspace": "^0.1.5-rc.1",
66
+ "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
67
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.1",
66
68
  "react": "^18.2.0"
67
69
  },
68
70
  "peerDependenciesMeta": {
@@ -84,6 +86,9 @@
84
86
  "@deepseek-ai/dsh-client-ui-conversation": {
85
87
  "optional": true
86
88
  },
89
+ "@deepseek-ai/dsh-client-ui-layout": {
90
+ "optional": true
91
+ },
87
92
  "@deepseek-ai/dsh-client-ui-primitives": {
88
93
  "optional": true
89
94
  },
@@ -113,20 +118,21 @@
113
118
  }
114
119
  },
115
120
  "devDependencies": {
116
- "@deepseek-ai/cordis": "link:C:/Users/Administrator/.dsh/source/current/vendor/cordis",
117
- "@deepseek-ai/dsh-api-remotes": "link:C:/Users/Administrator/.dsh/source/current/packages/api/remotes",
118
- "@deepseek-ai/dsh-api-session-controller": "link:C:/Users/Administrator/.dsh/source/current/packages/api/session-controller",
119
- "@deepseek-ai/dsh-api-workspace-controller": "link:C:/Users/Administrator/.dsh/source/current/packages/api/workspace-controller",
120
- "@deepseek-ai/dsh-client-locale": "link:C:/Users/Administrator/.dsh/source/current/packages/client/locale",
121
- "@deepseek-ai/dsh-client-ui-conversation": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-conversation",
122
- "@deepseek-ai/dsh-client-ui-primitives": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-primitives",
123
- "@deepseek-ai/dsh-client-ui-renderer": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-renderer",
124
- "@deepseek-ai/dsh-client-ui-session": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-session",
125
- "@deepseek-ai/dsh-client-ui-sidebar": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-sidebar",
126
- "@deepseek-ai/dsh-client-ui-slots": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-slots",
127
- "@deepseek-ai/dsh-client-ui-workspace": "link:C:/Users/Administrator/.dsh/source/current/packages/client/ui-workspace",
128
- "@deepseek-ai/dsh-session": "link:C:/Users/Administrator/.dsh/source/current/packages/core/session",
129
- "@deepseek-ai/dsh-typert-protocol": "link:C:/Users/Administrator/.dsh/source/current/packages/typert/protocol",
121
+ "@deepseek-ai/cordis": "link:D:/Projects/deepseek-harness/dsh/vendor/cordis",
122
+ "@deepseek-ai/dsh-api-remotes": "link:D:/Projects/deepseek-harness/dsh/packages/api/remotes",
123
+ "@deepseek-ai/dsh-api-session-controller": "link:D:/Projects/deepseek-harness/dsh/packages/api/session-controller",
124
+ "@deepseek-ai/dsh-api-workspace-controller": "link:D:/Projects/deepseek-harness/dsh/packages/api/workspace-controller",
125
+ "@deepseek-ai/dsh-client-locale": "link:D:/Projects/deepseek-harness/dsh/packages/client/locale",
126
+ "@deepseek-ai/dsh-client-ui-conversation": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-conversation",
127
+ "@deepseek-ai/dsh-client-ui-layout": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-layout",
128
+ "@deepseek-ai/dsh-client-ui-primitives": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-primitives",
129
+ "@deepseek-ai/dsh-client-ui-renderer": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-renderer",
130
+ "@deepseek-ai/dsh-client-ui-session": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-session",
131
+ "@deepseek-ai/dsh-client-ui-sidebar": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-sidebar",
132
+ "@deepseek-ai/dsh-client-ui-slots": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-slots",
133
+ "@deepseek-ai/dsh-client-ui-workspace": "link:D:/Projects/deepseek-harness/dsh/packages/client/ui-workspace",
134
+ "@deepseek-ai/dsh-session": "link:D:/Projects/deepseek-harness/dsh/packages/core/session",
135
+ "@deepseek-ai/dsh-typert-protocol": "link:D:/Projects/deepseek-harness/dsh/packages/typert/protocol",
130
136
  "@types/node": "^22.20.1",
131
137
  "@types/react": "~18.3.31",
132
138
  "lightningcss": "^1.33.0",