@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,20 +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
+ /** 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,26 +1,26 @@
1
- /** Existing-workspace menu plus composed directory-adoption flow. */
2
- import type { ReactNode, RefObject } from 'react';
3
- import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
4
- import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
5
- import type { DirectoryFlowOwnerProps, PickerProps } from './contract.ts';
6
- interface FlowProps {
7
- t: PickerProps['t'];
8
- open: boolean;
9
- anchorRef?: RefObject<HTMLElement | null>;
10
- useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
11
- createWorkspace: (input: {
12
- path: string;
13
- }) => Promise<WorkspaceView>;
14
- useDirectoryFlow: SnapshotSelectorHook<boolean>;
15
- renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode;
16
- onPick: (workspaceId: WorkspaceId) => void;
17
- onClose: () => void;
18
- addOnly?: boolean;
19
- side?: 'bottom' | 'top' | 'right';
20
- selectedId?: WorkspaceId;
21
- }
22
- /** Render the workspace target menu and directory picking conversation. */
23
- export declare function WorkspacePickFlow({ t, open, anchorRef, useWorkspaces, createWorkspace, useDirectoryFlow, renderDirectoryFlow, onPick, onClose, addOnly, side, selectedId, }: FlowProps): import("react").JSX.Element;
24
- /** Fill the conversation hero's workspace picker seat. */
25
- export declare function WorkspacePicker({ open, anchorRef, useWorkspaces, selectedId, onPick, onClose, createWorkspace, useDirectoryFlow, renderSlot, t, }: PickerProps): import("react").JSX.Element;
26
- export {};
1
+ /** Existing-workspace menu plus composed directory-adoption flow. */
2
+ import type { ReactNode, RefObject } from 'react';
3
+ import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
4
+ import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
5
+ import type { DirectoryFlowOwnerProps, PickerProps } from './contract.ts';
6
+ interface FlowProps {
7
+ t: PickerProps['t'];
8
+ open: boolean;
9
+ anchorRef?: RefObject<HTMLElement | null>;
10
+ useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>;
11
+ createWorkspace: (input: {
12
+ path: string;
13
+ }) => Promise<WorkspaceView>;
14
+ useDirectoryFlow: SnapshotSelectorHook<boolean>;
15
+ renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode;
16
+ onPick: (workspaceId: WorkspaceId) => void;
17
+ onClose: () => void;
18
+ addOnly?: boolean;
19
+ side?: 'bottom' | 'top' | 'right';
20
+ selectedId?: WorkspaceId;
21
+ }
22
+ /** Render the workspace target menu and directory picking conversation. */
23
+ export declare function WorkspacePickFlow({ t, open, anchorRef, useWorkspaces, createWorkspace, useDirectoryFlow, renderDirectoryFlow, onPick, onClose, addOnly, side, selectedId, }: FlowProps): import("react").JSX.Element;
24
+ /** Fill the conversation hero's workspace picker seat. */
25
+ export declare function WorkspacePicker({ open, anchorRef, useWorkspaces, selectedId, onPick, onClose, createWorkspace, useDirectoryFlow, renderSlot, t, }: PickerProps): import("react").JSX.Element;
26
+ export {};
@@ -1,76 +1,76 @@
1
- /** Slot contracts and injected Host actions for ya-workspace-sidebar. */
2
- import type { HostObservable, PropsLocale, PropsRenderSlots, PropsRuntime, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
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';
6
- import type { YaWorkspaceKey } from './locales.ts';
7
- /** Directory-picker conversation owned by each trigger surface. */
8
- export interface DirectoryFlowOwnerProps {
9
- open: boolean;
10
- busy: boolean;
11
- onPicked: (path: string) => void;
12
- onCancel: () => void;
13
- onError: (message: string) => void;
14
- }
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
- }
22
- interface SlotMap {
23
- 'sidebar.workspaces.directoryFlow': {
24
- kind: 'single';
25
- scope: 'root';
26
- owner: DirectoryFlowOwnerProps;
27
- };
28
- 'conversation.hero.workspace.directoryFlow': {
29
- kind: 'single';
30
- scope: 'root';
31
- owner: DirectoryFlowOwnerProps;
32
- };
33
- }
34
- interface LocaleNamespaceMap {
35
- 'ya-workspace-sidebar': YaWorkspaceKey;
36
- }
37
- }
38
- /** Shared directory-flow occupancy source. */
39
- export interface DirectoryInjected {
40
- hooks: {
41
- directoryFlow: HostObservable<boolean>;
42
- };
43
- }
44
- /** Browser-private Host operations. */
45
- export type SidebarInjected = DirectoryInjected & {
46
- startSession: (workspaceId?: WorkspaceId) => void;
47
- open: (sessionId: SessionId) => void;
48
- searchSessions: (query: string, signal: AbortSignal) => Promise<{
49
- items: readonly SessionSearchResultItem[];
50
- hasMore: boolean;
51
- }>;
52
- searchResultLimit: number;
53
- renameSession: (sessionId: SessionId, title: string) => Promise<void>;
54
- forkSession: (sessionId: SessionId) => void;
55
- renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise<void>;
56
- deleteWorkspace: (workspaceId: WorkspaceId) => Promise<void>;
57
- archiveSession: (sessionId: SessionId) => Promise<void>;
58
- insertSessionBefore: (workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId) => Promise<void>;
59
- createWorkspace: (input: {
60
- path: string;
61
- }) => Promise<WorkspaceView>;
62
- };
63
- /** Full sidebar component props. */
64
- export type SidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsRenderSlots<'sidebar.workspaces.directoryFlow'> & Omit<SidebarInjected, 'hooks'> & {
65
- useDirectoryFlow: SnapshotSelectorHook<boolean>;
66
- } & PropsLocale<'ya-workspace-sidebar'>;
67
- /** Conversation hero picker operations. */
68
- export type PickerInjected = DirectoryInjected & {
69
- createWorkspace: (input: {
70
- path: string;
71
- }) => Promise<WorkspaceView>;
72
- };
73
- /** Full conversation hero picker props. */
74
- export type PickerProps = PropsRuntime<'conversation.hero.workspace'> & PropsRenderSlots<'conversation.hero.workspace.directoryFlow'> & Omit<PickerInjected, 'hooks'> & {
75
- useDirectoryFlow: SnapshotSelectorHook<boolean>;
76
- } & PropsLocale<'ya-workspace-sidebar'>;
1
+ /** Slot contracts and injected Host actions for ya-workspace-sidebar. */
2
+ import type { HostObservable, PropsLocale, PropsRenderSlots, PropsRuntime, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
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';
6
+ import type { YaWorkspaceKey } from './locales.ts';
7
+ /** Directory-picker conversation owned by each trigger surface. */
8
+ export interface DirectoryFlowOwnerProps {
9
+ open: boolean;
10
+ busy: boolean;
11
+ onPicked: (path: string) => void;
12
+ onCancel: () => void;
13
+ onError: (message: string) => void;
14
+ }
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
+ }
22
+ interface SlotMap {
23
+ 'sidebar.workspaces.directoryFlow': {
24
+ kind: 'single';
25
+ scope: 'root';
26
+ owner: DirectoryFlowOwnerProps;
27
+ };
28
+ 'conversation.hero.workspace.directoryFlow': {
29
+ kind: 'single';
30
+ scope: 'root';
31
+ owner: DirectoryFlowOwnerProps;
32
+ };
33
+ }
34
+ interface LocaleNamespaceMap {
35
+ 'ya-workspace-sidebar': YaWorkspaceKey;
36
+ }
37
+ }
38
+ /** Shared directory-flow occupancy source. */
39
+ export interface DirectoryInjected {
40
+ hooks: {
41
+ directoryFlow: HostObservable<boolean>;
42
+ };
43
+ }
44
+ /** Browser-private Host operations. */
45
+ export type SidebarInjected = DirectoryInjected & {
46
+ startSession: (workspaceId?: WorkspaceId) => void;
47
+ open: (sessionId: SessionId) => void;
48
+ searchSessions: (query: string, signal: AbortSignal) => Promise<{
49
+ items: readonly SessionSearchResultItem[];
50
+ hasMore: boolean;
51
+ }>;
52
+ searchResultLimit: number;
53
+ renameSession: (sessionId: SessionId, title: string) => Promise<void>;
54
+ forkSession: (sessionId: SessionId) => void;
55
+ renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise<void>;
56
+ deleteWorkspace: (workspaceId: WorkspaceId) => Promise<void>;
57
+ archiveSession: (sessionId: SessionId) => Promise<void>;
58
+ insertSessionBefore: (workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId) => Promise<void>;
59
+ createWorkspace: (input: {
60
+ path: string;
61
+ }) => Promise<WorkspaceView>;
62
+ };
63
+ /** Full sidebar component props. */
64
+ export type SidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsRenderSlots<'sidebar.workspaces.directoryFlow'> & Omit<SidebarInjected, 'hooks'> & {
65
+ useDirectoryFlow: SnapshotSelectorHook<boolean>;
66
+ } & PropsLocale<'ya-workspace-sidebar'>;
67
+ /** Conversation hero picker operations. */
68
+ export type PickerInjected = DirectoryInjected & {
69
+ createWorkspace: (input: {
70
+ path: string;
71
+ }) => Promise<WorkspaceView>;
72
+ };
73
+ /** Full conversation hero picker props. */
74
+ export type PickerProps = PropsRuntime<'conversation.hero.workspace'> & PropsRenderSlots<'conversation.hero.workspace.directoryFlow'> & Omit<PickerInjected, 'hooks'> & {
75
+ useDirectoryFlow: SnapshotSelectorHook<boolean>;
76
+ } & PropsLocale<'ya-workspace-sidebar'>;
@@ -1,9 +1,9 @@
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
- */
7
- export declare const inject: string[];
8
- /** Register the sidebar browser and conversation hero picker. */
9
- export declare function apply(ctx: Context): void;
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
+ */
7
+ export declare const inject: string[];
8
+ /** Register the sidebar browser and conversation hero picker. */
9
+ export declare function apply(ctx: Context): void;
@@ -1,113 +1,113 @@
1
- /** Product copy for the replacement workspace browser. */
2
- export declare const zh: {
3
- workspaces: string;
4
- sessions: string;
5
- recent: string;
6
- ungrouped: string;
7
- newSession: string;
8
- addWorkspace: string;
9
- addWorkspaceMenu: string;
10
- search: string;
11
- searchPlaceholder: string;
12
- clearSearch: string;
13
- searching: string;
14
- searchUnavailable: string;
15
- noMatches: string;
16
- noSessions: string;
17
- noWorkspaces: string;
18
- loading: string;
19
- rename: string;
20
- renameWorkspace: string;
21
- renameSession: string;
22
- deleteWorkspace: string;
23
- deleteDescription: string;
24
- fork: string;
25
- archive: string;
26
- archiveMode: string;
27
- deleteMode: string;
28
- deleteSession: string;
29
- deleteSessionTitle: string;
30
- deleteSessionConfirm: string;
31
- toggleActionMode: string;
32
- actionModeLabel: string;
33
- cancel: string;
34
- confirm: string;
35
- retry: string;
36
- folderError: string;
37
- workspaceName: string;
38
- sessionName: string;
39
- count: string;
40
- now: string;
41
- minutes: string;
42
- hours: string;
43
- days: string;
44
- months: string;
45
- years: string;
46
- running: string;
47
- waiting: string;
48
- completed: string;
49
- collapse: string;
50
- expand: string;
51
- resizeRecent: string;
52
- today: string;
53
- yesterday: string;
54
- date: string;
55
- dateYear: string;
56
- };
57
- export type YaWorkspaceKey = keyof typeof zh;
58
- export declare const en: {
59
- workspaces: string;
60
- sessions: string;
61
- recent: string;
62
- ungrouped: string;
63
- newSession: string;
64
- addWorkspace: string;
65
- addWorkspaceMenu: string;
66
- search: string;
67
- searchPlaceholder: string;
68
- clearSearch: string;
69
- searching: string;
70
- searchUnavailable: string;
71
- noMatches: string;
72
- noSessions: string;
73
- noWorkspaces: string;
74
- loading: string;
75
- rename: string;
76
- renameWorkspace: string;
77
- renameSession: string;
78
- deleteWorkspace: string;
79
- deleteDescription: string;
80
- fork: string;
81
- archive: string;
82
- archiveMode: string;
83
- deleteMode: string;
84
- deleteSession: string;
85
- deleteSessionTitle: string;
86
- deleteSessionConfirm: string;
87
- toggleActionMode: string;
88
- actionModeLabel: string;
89
- cancel: string;
90
- confirm: string;
91
- retry: string;
92
- folderError: string;
93
- workspaceName: string;
94
- sessionName: string;
95
- count: string;
96
- now: string;
97
- minutes: string;
98
- hours: string;
99
- days: string;
100
- months: string;
101
- years: string;
102
- running: string;
103
- waiting: string;
104
- completed: string;
105
- collapse: string;
106
- expand: string;
107
- resizeRecent: string;
108
- today: string;
109
- yesterday: string;
110
- date: string;
111
- dateYear: string;
112
- };
113
- export declare const NS = "ya-workspace-sidebar";
1
+ /** Product copy for the replacement workspace browser. */
2
+ export declare const zh: {
3
+ workspaces: string;
4
+ sessions: string;
5
+ recent: string;
6
+ ungrouped: string;
7
+ newSession: string;
8
+ addWorkspace: string;
9
+ addWorkspaceMenu: string;
10
+ search: string;
11
+ searchPlaceholder: string;
12
+ clearSearch: string;
13
+ searching: string;
14
+ searchUnavailable: string;
15
+ noMatches: string;
16
+ noSessions: string;
17
+ noWorkspaces: string;
18
+ loading: string;
19
+ rename: string;
20
+ renameWorkspace: string;
21
+ renameSession: string;
22
+ deleteWorkspace: string;
23
+ deleteDescription: string;
24
+ fork: string;
25
+ archive: string;
26
+ archiveMode: string;
27
+ deleteMode: string;
28
+ deleteSession: string;
29
+ deleteSessionTitle: string;
30
+ deleteSessionConfirm: string;
31
+ toggleActionMode: string;
32
+ actionModeLabel: string;
33
+ cancel: string;
34
+ confirm: string;
35
+ retry: string;
36
+ folderError: string;
37
+ workspaceName: string;
38
+ sessionName: string;
39
+ count: string;
40
+ now: string;
41
+ minutes: string;
42
+ hours: string;
43
+ days: string;
44
+ months: string;
45
+ years: string;
46
+ running: string;
47
+ waiting: string;
48
+ completed: string;
49
+ collapse: string;
50
+ expand: string;
51
+ resizeRecent: string;
52
+ today: string;
53
+ yesterday: string;
54
+ date: string;
55
+ dateYear: string;
56
+ };
57
+ export type YaWorkspaceKey = keyof typeof zh;
58
+ export declare const en: {
59
+ workspaces: string;
60
+ sessions: string;
61
+ recent: string;
62
+ ungrouped: string;
63
+ newSession: string;
64
+ addWorkspace: string;
65
+ addWorkspaceMenu: string;
66
+ search: string;
67
+ searchPlaceholder: string;
68
+ clearSearch: string;
69
+ searching: string;
70
+ searchUnavailable: string;
71
+ noMatches: string;
72
+ noSessions: string;
73
+ noWorkspaces: string;
74
+ loading: string;
75
+ rename: string;
76
+ renameWorkspace: string;
77
+ renameSession: string;
78
+ deleteWorkspace: string;
79
+ deleteDescription: string;
80
+ fork: string;
81
+ archive: string;
82
+ archiveMode: string;
83
+ deleteMode: string;
84
+ deleteSession: string;
85
+ deleteSessionTitle: string;
86
+ deleteSessionConfirm: string;
87
+ toggleActionMode: string;
88
+ actionModeLabel: string;
89
+ cancel: string;
90
+ confirm: string;
91
+ retry: string;
92
+ folderError: string;
93
+ workspaceName: string;
94
+ sessionName: string;
95
+ count: string;
96
+ now: string;
97
+ minutes: string;
98
+ hours: string;
99
+ days: string;
100
+ months: string;
101
+ years: string;
102
+ running: string;
103
+ waiting: string;
104
+ completed: string;
105
+ collapse: string;
106
+ expand: string;
107
+ resizeRecent: string;
108
+ today: string;
109
+ yesterday: string;
110
+ date: string;
111
+ dateYear: string;
112
+ };
113
+ export declare const NS = "ya-workspace-sidebar";