@huanlin/dsh-plugin-ya-workspace-sidebar 0.3.2 → 0.5.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.
@@ -0,0 +1,20 @@
1
+ /** Fixed-stride virtual scroller for the global recent-sessions block. */
2
+ import { type ReactNode } from 'react';
3
+ import { type SessionRow } from './model.ts';
4
+ interface VirtualRecentListProps {
5
+ rows: readonly SessionRow[];
6
+ renderItem: (row: SessionRow) => ReactNode;
7
+ ariaLabel: string;
8
+ /** Receives the viewport element for external geometry (the drag resizer). */
9
+ viewportRef?: (node: HTMLDivElement | null) => void;
10
+ /** Overrides the stylesheet's default viewport cap, in px. */
11
+ maxHeight?: number;
12
+ }
13
+ /**
14
+ * Renders `rows` inside a bounded, scrollable viewport while mounting only
15
+ * the visible slice (plus overscan). The row stride is fixed
16
+ * ({@link RECENT_ROW_STRIDE}), so windowing is pure arithmetic — no per-row
17
+ * measurement — and the scroll position survives session-list updates.
18
+ */
19
+ export declare function VirtualRecentList({ rows, renderItem, ariaLabel, viewportRef, maxHeight }: VirtualRecentListProps): import("react").JSX.Element;
20
+ export {};
@@ -1,13 +1,13 @@
1
1
  /** Existing-workspace menu plus composed directory-adoption flow. */
2
2
  import type { ReactNode, RefObject } from 'react';
3
- import type { WorkspaceId, WorkspaceListState, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
4
4
  import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
5
5
  import type { DirectoryFlowOwnerProps, PickerProps } from './contract.ts';
6
6
  interface FlowProps {
7
7
  t: PickerProps['t'];
8
8
  open: boolean;
9
9
  anchorRef?: RefObject<HTMLElement | null>;
10
- useWorkspaces: <S>(selector: (state: WorkspaceListState) => S) => S;
10
+ useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
11
11
  createWorkspace: (input: {
12
12
  path: string;
13
13
  }) => Promise<WorkspaceView>;
@@ -1,6 +1,8 @@
1
1
  /** Slot contracts and injected Host actions for ya-workspace-sidebar. */
2
2
  import type { HostObservable, PropsLocale, PropsRenderSlots, PropsRuntime, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
3
- import type { SessionId, SessionSearchResultItem, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import type { SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client';
4
+ import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
5
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
4
6
  import type { YaWorkspaceKey } from './locales.ts';
5
7
  /** Directory-picker conversation owned by each trigger surface. */
6
8
  export interface DirectoryFlowOwnerProps {
@@ -11,6 +13,12 @@ export interface DirectoryFlowOwnerProps {
11
13
  onError: (message: string) => void;
12
14
  }
13
15
  declare module '@deepseek-ai/dsh-client-ui-slots' {
16
+ /** The official ui-workspace provider is disabled by this bundle's patch,
17
+ * so this plugin owns the global workspaces selector hook (bound from the
18
+ * Workspace Controller snapshot this apply installs via slots.provideRoot). */
19
+ interface GlobalStandardProps {
20
+ useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
21
+ }
14
22
  interface SlotMap {
15
23
  'sidebar.workspaces.directoryFlow': {
16
24
  kind: 'single';
@@ -1,5 +1,9 @@
1
- import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
2
- /** Services required by both replacement client entries. */
1
+ /** Client assembly for the replacement workspace sidebar and hero picker. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ /**
4
+ * Services required by the replacement client entries. `remote` and
5
+ * `remote.directoryPicker` feed the uiWorkspace stand-in's directory picking.
6
+ */
3
7
  export declare const inject: string[];
4
8
  /** Register the sidebar browser and conversation hero picker. */
5
- export declare function apply(ctx: ClientContext): void;
9
+ export declare function apply(ctx: Context): void;
@@ -48,6 +48,7 @@ export declare const zh: {
48
48
  completed: string;
49
49
  collapse: string;
50
50
  expand: string;
51
+ resizeRecent: string;
51
52
  today: string;
52
53
  yesterday: string;
53
54
  date: string;
@@ -103,6 +104,7 @@ export declare const en: {
103
104
  completed: string;
104
105
  collapse: string;
105
106
  expand: string;
107
+ resizeRecent: string;
106
108
  today: string;
107
109
  yesterday: string;
108
110
  date: string;
@@ -1,5 +1,15 @@
1
1
  /** Pure sidebar projections shared by the browser and unit tests. */
2
- import type { SessionId, SessionListState, SessionSummary, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client';
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>;
3
13
  /** Navigation key for sessions not accounted to a real workspace. */
4
14
  export declare const UNGROUPED: "__ya_ungrouped__";
5
15
  /** One sidebar session row. */
@@ -8,37 +18,59 @@ export interface SessionRow {
8
18
  title: string;
9
19
  blank: boolean;
10
20
  running: boolean;
11
- pendingInteraction?: SessionSummary['pendingInteraction'];
21
+ pendingInteraction?: PendingInteractionKind;
12
22
  completed: boolean;
13
23
  updatedAt: number;
14
24
  workspaceKey: WorkspaceId | typeof UNGROUPED;
15
25
  workspaceTitle: string;
16
26
  }
17
- /** One date-bucketed group of session rows for the real-workspace level. */
18
- export interface SessionDateGroup {
19
- /** Local calendar date `YYYY-MM-DD`, stable key. */
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. */
20
30
  dateKey: string;
21
31
  /** Days between today's local date and this group's local date (0=today, 1=yesterday, …). */
22
32
  dayOffset: number;
23
- rows: SessionRow[];
33
+ rows: T[];
24
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>;
25
39
  /** One first-level workspace row. */
26
40
  export interface WorkspaceRow {
27
41
  key: WorkspaceId | typeof UNGROUPED;
28
42
  title: string;
29
43
  path?: string;
30
44
  createdAt?: string;
45
+ /** Newest visible session `updatedAt`; empty real workspaces fall back to `createdAt`. */
46
+ lastUsedAt?: number;
31
47
  count: number;
32
48
  real: boolean;
33
49
  }
34
50
  /** Resolve the first/second-level destination for one session. */
35
51
  export declare function workspaceKeyForSession(sessionId: SessionId | undefined, workspaces: readonly WorkspaceView[]): WorkspaceId | typeof UNGROUPED | null;
36
52
  /** Derive global recent sessions, newest first. */
37
- export declare function deriveRecent(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], limit?: number): SessionRow[];
38
- /** Derive first-level real workspaces plus the virtual Ungrouped row. */
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. */
39
71
  export declare function deriveWorkspaces(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[]): WorkspaceRow[];
40
72
  /** Derive the selected workspace's sessions in its canonical order. */
41
- export declare function deriveWorkspaceSessions(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[]): SessionRow[];
73
+ export declare function deriveWorkspaceSessions(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], pending: PendingInteractionMap): SessionRow[];
42
74
  /**
43
75
  * Derive the selected real workspace's sessions grouped by local calendar date.
44
76
  *
@@ -48,6 +80,8 @@ export declare function deriveWorkspaceSessions(key: WorkspaceId | typeof UNGROU
48
80
  * - Future timestamps clamp to today's bucket (`dayOffset` 0).
49
81
  * - `now` is the reference timestamp for "today"; pass `Date.now()` in production.
50
82
  */
51
- export declare function deriveWorkspaceSessionGroups(key: WorkspaceId | typeof UNGROUPED, list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], now: number): SessionDateGroup[];
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[];
52
86
  /** Case-insensitive local title/workspace matching used beside Host content search. */
53
87
  export declare function localMatches(rows: readonly SessionRow[], query: string): SessionRow[];
@@ -0,0 +1,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
+ /**
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
+ }
@@ -18,3 +18,20 @@ export declare function getActionMode(): SessionActionMode;
18
18
  export declare function setActionMode(mode: SessionActionMode): void;
19
19
  /** Subscribe to action mode changes; returns an unsubscribe disposer. */
20
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
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; padding-bottom:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.ya-recent-collapsed { padding-bottom:0; border-bottom-color:transparent; }\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 { display:flex; flex-direction:column; overflow:hidden; min-height:0; }\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; 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";
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
3
  /** Install the stylesheet and return its disposer. */
4
4
  export declare function installStyles(): () => void;
@@ -1,3 +1,3 @@
1
- import type { Context } from 'cordis';
1
+ import type { Context } from '@deepseek-ai/cordis';
2
2
  export declare const name = "ya-workspace-sidebar";
3
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.3.2",
3
+ "version": "0.5.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,10 +17,6 @@
17
17
  "types": "./lib/types/index.d.ts",
18
18
  "import": "./lib/index.js"
19
19
  },
20
- "./invariant": {
21
- "types": "./lib/types/invariant.d.ts",
22
- "import": "./lib/invariant.js"
23
- },
24
20
  "./client": {
25
21
  "types": "./lib/types/client/index.d.ts",
26
22
  "default": "./lib/client.js"
@@ -38,32 +34,51 @@
38
34
  },
39
35
  "client": {
40
36
  "inject": [
41
- "@deepseek-ai/dsh-client-runtime",
37
+ "@deepseek-ai/dsh-api-remotes",
38
+ "@deepseek-ai/dsh-api-session-controller",
39
+ "@deepseek-ai/dsh-api-workspace-controller",
42
40
  "@deepseek-ai/dsh-client-locale",
43
- "@deepseek-ai/dsh-client-ui-slots",
44
- "@deepseek-ai/dsh-client-ui-sidebar",
45
41
  "@deepseek-ai/dsh-client-ui-conversation",
46
- "@deepseek-ai/dsh-client-ui-primitives"
42
+ "@deepseek-ai/dsh-client-ui-primitives",
43
+ "@deepseek-ai/dsh-client-ui-renderer",
44
+ "@deepseek-ai/dsh-client-ui-session",
45
+ "@deepseek-ai/dsh-client-ui-sidebar",
46
+ "@deepseek-ai/dsh-client-ui-slots"
47
47
  ],
48
48
  "platform": "web"
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
53
- "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
54
- "@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
55
- "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
56
- "@deepseek-ai/dsh-client-ui-sidebar": "^0.0.1-rc.1",
57
- "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
58
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
59
- "cordis": "^4.0.0-rc.7",
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",
60
66
  "react": "^18.2.0"
61
67
  },
62
68
  "peerDependenciesMeta": {
63
- "@deepseek-ai/dsh-client-locale": {
69
+ "@deepseek-ai/cordis": {
64
70
  "optional": true
65
71
  },
66
- "@deepseek-ai/dsh-client-runtime": {
72
+ "@deepseek-ai/dsh-api-remotes": {
73
+ "optional": true
74
+ },
75
+ "@deepseek-ai/dsh-api-session-controller": {
76
+ "optional": true
77
+ },
78
+ "@deepseek-ai/dsh-api-workspace-controller": {
79
+ "optional": true
80
+ },
81
+ "@deepseek-ai/dsh-client-locale": {
67
82
  "optional": true
68
83
  },
69
84
  "@deepseek-ai/dsh-client-ui-conversation": {
@@ -72,16 +87,25 @@
72
87
  "@deepseek-ai/dsh-client-ui-primitives": {
73
88
  "optional": true
74
89
  },
90
+ "@deepseek-ai/dsh-client-ui-renderer": {
91
+ "optional": true
92
+ },
93
+ "@deepseek-ai/dsh-client-ui-session": {
94
+ "optional": true
95
+ },
75
96
  "@deepseek-ai/dsh-client-ui-sidebar": {
76
97
  "optional": true
77
98
  },
78
99
  "@deepseek-ai/dsh-client-ui-slots": {
79
100
  "optional": true
80
101
  },
81
- "@deepseek-ai/dsh-invariants": {
102
+ "@deepseek-ai/dsh-client-ui-workspace": {
103
+ "optional": true
104
+ },
105
+ "@deepseek-ai/dsh-session": {
82
106
  "optional": true
83
107
  },
84
- "cordis": {
108
+ "@deepseek-ai/dsh-typert-protocol": {
85
109
  "optional": true
86
110
  },
87
111
  "react": {
@@ -89,16 +113,22 @@
89
113
  }
90
114
  },
91
115
  "devDependencies": {
92
- "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
93
- "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
94
- "@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
95
- "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
96
- "@deepseek-ai/dsh-client-ui-sidebar": "^0.0.1-rc.1",
97
- "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
98
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
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",
99
130
  "@types/node": "^22.20.1",
100
131
  "@types/react": "~18.3.31",
101
- "cordis": "^4.0.0-rc.7",
102
132
  "lightningcss": "^1.33.0",
103
133
  "react": "^18.2.0",
104
134
  "tsdown": "^0.22.2",
package/lib/invariant.js DELETED
@@ -1,10 +0,0 @@
1
- //#region src/invariant.ts
2
- const PACKAGE_NAME = "@huanlin/dsh-plugin-ya-workspace-sidebar";
3
- const name = "ya-workspace-sidebar-invariant";
4
- const inject = ["invariants"];
5
- /** No runtime invariant: this package contributes client-only slot entries. */
6
- const install = () => {};
7
- /** Register package ownership with the invariant service. */
8
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
9
- //#endregion
10
- export { apply, inject, name };
@@ -1,12 +0,0 @@
1
- /** Package invariant companion for ya-workspace-sidebar. */
2
- import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants';
3
- export declare const name = "ya-workspace-sidebar-invariant";
4
- export declare const inject: string[];
5
- interface InvariantContext {
6
- invariants: {
7
- register: (name: string, installer: InvariantInstaller) => () => void;
8
- };
9
- }
10
- /** Register package ownership with the invariant service. */
11
- export declare const apply: (ctx: InvariantContext) => Promise<() => void>;
12
- export {};