@deepseek-ai/dsh-client-ui-sidebar-files 0.2.0-rc.1 → 0.2.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -15,8 +15,8 @@
15
15
  en: 9411fb4809692e09
16
16
  zh: dd13990d39c5be7f
17
17
  /deepseek-ai-dsh-client-ui-sidebar-files/what-it-registers:
18
- en: a13aadd9b0294870
19
- zh: d30dc67f177f6c2d
18
+ en: ed52405be7c3fa24
19
+ zh: d06dbd49c786c5f0
20
20
  /deepseek-ai-dsh-client-ui-sidebar-files/the-tree:
21
21
  en: a0ae0b1f223b3df1
22
22
  zh: 8ddc325519bd75b2
package/README.md CHANGED
@@ -27,7 +27,7 @@ Browse a Session's workspace tree and open files in Sidebar previews. The root a
27
27
  The `workspace.files` command opens or focuses the file page in the focused pane; from the conversation it uses the current Session's active dock pane. A guide gives way to the file page, and repeated opens retain one file page per pane. Desktop defaults to Mod+P. The guide entry displays the effective shortcut; Windows and macOS Web use the [shortcut service’s platform defaults](../shortcuts/README.md); Linux Web leaves this command unbound by default.
28
28
 
29
29
  - **The type** — `ctx.sidebarRightTabs.register(...)` with kind `files`, id `@deepseek-ai/dsh-client-ui-sidebar-files`, band `builtin`, no patterns, and one guide entry (order 10, its title and description from the `sidebarFiles` namespace, its glyph a yellow folder) that opens the type.
30
- - **The body** — the keyed `sidebar.right.pane.tab` seat under that id: a header row under the strip, then the tree. The shared [`PathLabel`](../ui-primitives/README.md#component-catalog) displays the root path with subdued directories and a primary final segment. A clipped path retains its trailing characters with a left-edge fade; hovering reveals the full path. The reload control stays at its right.
30
+ - **The body** — the keyed `sidebar.right.pane.tab` seat under that id: a header row under the strip, then the tree. The shared [`PathLabel`](../ui-primitives/README.md#component-catalog) displays the root path with subdued directories and a primary final segment. A clipped path retains its trailing characters with a left-edge fade; hovering reveals the full path. The reload control and the Session-scoped `sidebar.right.tab.files.actions` list stay at its right, with the displayed root passed as `absolutePath`; [`ui-open-in-app`](../ui-open-in-app/README.md) contributes the workspace directory opener.
31
31
  - **The chip title** — the keyed `sidebar.right.pane.tab.title` seat under that id: a shared `FileTypeIcon` folder glyph at 16px before the type's label. The tree's own rows never draw this sheet.
32
32
 
33
33
  Source files under `src/client/`: `definition.tsx` (the type), `store.ts` (what it keeps), `face.ts` (Remote reads and watches), `directory-node.ts` (open directories and their lifetimes), `FilesBody.tsx` (what it draws, with its ordering and failure-line helpers), `FilesTitle.tsx` (the chip title), `locales.ts` (what it says), and `index.ts` (the wiring).
package/README.zh.md CHANGED
@@ -27,7 +27,7 @@ kind: "package-reference"
27
27
  命令 `workspace.files` 在焦点分栏内打开或聚焦文件页;从聊天区触发时使用当前会话的活动停靠分栏。文件页替换开始页,同一分栏内重复打开仍保留一个文件页。桌面默认键为 Mod+P。开始页入口显示有效快捷键;Windows 和 macOS Web 使用[快捷键服务的平台默认值](../shortcuts/README.zh.md);Linux Web 默认不绑定此命令。
28
28
 
29
29
  - **类型**:`ctx.sidebarRightTabs.register(...)`,kind 为 `files`,id 为 `@deepseek-ai/dsh-client-ui-sidebar-files`,档位 `builtin`,没有 patterns,另有一个打开该类型的引导页入口(order 10,标题与描述取自 `sidebarFiles` 命名空间,图标为黄色文件夹)。
30
- - **正文**:以该 id 为键的 `sidebar.right.pane.tab` slot:strip 下的一行标题行,然后是树。共享的 [`PathLabel`](../ui-primitives/README.zh.md#component-catalog) 显示根路径,目录使用弱化颜色,最后一段使用主色。路径过长时保留尾部字符并在左侧渐隐;悬停显示完整路径。重新读取控件位于右端。
30
+ - **正文**:以该 id 为键的 `sidebar.right.pane.tab` slot:strip 下的一行标题行,然后是树。共享的 [`PathLabel`](../ui-primitives/README.zh.md#component-catalog) 显示根路径,目录使用弱化颜色,最后一段使用主色。路径过长时保留尾部字符并在左侧渐隐;悬停显示完整路径。重新读取控件和 Session 作用域的 `sidebar.right.tab.files.actions` 列表位于右端,并通过 `absolutePath` 传入当前显示的根目录;[`ui-open-in-app`](../ui-open-in-app/README.zh.md) 在此提供工作区目录打开按钮。
31
31
  - **标签页标题**:以该 id 为键的 `sidebar.right.pane.tab.title` slot:类型标签前的一枚 16px 共享 `FileTypeIcon` 文件夹图标。树本身的行不画这枚图标。
32
32
 
33
33
  `src/client/` 下的源文件:`definition.tsx`(类型是什么)、`store.ts`(它保存什么)、`face.ts`(Remote 读取与监听)、`directory-node.ts`(打开的目录及其生命周期)、`FilesBody.tsx`(它画什么,含排序与失败行两个辅助函数)、`FilesTitle.tsx`(标签页标题)、`locales.ts`(它说什么)、`index.ts`(接线)。
package/lib/client.js CHANGED
@@ -454,7 +454,7 @@ window.__ModuleLoader__.load({
454
454
  * draw for each absolute path and what a click means: a directory toggles, a
455
455
  * file opens through the owner's `tabActions` for a `file:` viewer to claim, and
456
456
  * anything else is shown but refuses to open. The header uses the shared
457
- * PathLabel for the root, followed by reload for the expanded directories.
457
+ * PathLabel for the root, followed by reload and workspace directory actions.
458
458
  */
459
459
  /** Natural, case-insensitive name order, so `file2` precedes `file10`. */
460
460
  const byName = new Intl.Collator(void 0, {
@@ -592,7 +592,7 @@ window.__ModuleLoader__.load({
592
592
  ] });
593
593
  }
594
594
  /** The file tree's body: the workspace root and whatever the reader has opened under it. */
595
- function FilesBody({ useTabInfo, sessionId, useSessions, useStore, actions, start, refresh, setAutoRefresh, toggle, t }) {
595
+ function FilesBody({ useTabInfo, sessionId, useSessions, useStore, actions, start, refresh, setAutoRefresh, toggle, t, renderSlot }) {
596
596
  const { tab } = useTabInfo();
597
597
  (0, react.useEffect)(() => tab.actions.bindCommands({ refresh: () => {
598
598
  refresh(tab.id);
@@ -695,7 +695,8 @@ window.__ModuleLoader__.load({
695
695
  onClick: reload,
696
696
  children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
697
697
  })
698
- })
698
+ }),
699
+ renderSlot("sidebar.right.tab.files.actions", { absolutePath: state.root })
699
700
  ]
700
701
  }), (0, react_jsx_runtime.jsx)("div", {
701
702
  ref: bodyRef,
@@ -1004,7 +1005,11 @@ window.__ModuleLoader__.load({
1004
1005
  key: FILES_ID,
1005
1006
  locale: NS,
1006
1007
  store,
1007
- inject
1008
+ inject,
1009
+ children: { "sidebar.right.tab.files.actions": {
1010
+ kind: "list",
1011
+ scope: "session"
1012
+ } }
1008
1013
  }, FilesBody)), "ui-sidebar-files: files tab body");
1009
1014
  ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab.title", () => ctx.slots.register({
1010
1015
  name: "sidebar.right.pane.tab.title",
@@ -1,11 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { RemoteFailure } from '@deepseek-ai/dsh-api-remotes/client';
3
- import type { PropsLocale, PropsRuntime, PropsStore, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { PropsLocale, PropsRenderSlots, PropsRuntime, PropsStore, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
4
4
  import type { WorkspaceDirectoryEntry } from '@deepseek-ai/dsh-api-workspace-files/types';
5
5
  import type { FilesInjected } from './face.ts';
6
6
  import type { createFilesStore } from './store.ts';
7
7
  /** The body's composed props: the tab it draws, its store, its face, and its copy. */
8
- export type FilesBodyProps = PropsRuntime<'sidebar.right.pane.tab'> & PropsStore<ReturnType<typeof createFilesStore>> & FilesInjected & PropsLocale<'sidebarFiles'>;
8
+ export type FilesBodyProps = PropsRuntime<'sidebar.right.pane.tab'> & PropsRenderSlots<'sidebar.right.tab.files.actions'> & PropsStore<ReturnType<typeof createFilesStore>> & FilesInjected & PropsLocale<'sidebarFiles'>;
9
9
  /**
10
10
  * Order one level's entries for display: directories first, then everything
11
11
  * else, each group by name. The endpoint's order is a listing fact; this is the
@@ -22,5 +22,5 @@ export declare function orderEntries(entries: readonly WorkspaceDirectoryEntry[]
22
22
  */
23
23
  export declare function failureLine(t: TranslateNS<'sidebarFiles'>, failure: RemoteFailure): string;
24
24
  /** The file tree's body: the workspace root and whatever the reader has opened under it. */
25
- export declare function FilesBody({ useTabInfo, sessionId, useSessions, useStore, actions, start, refresh, setAutoRefresh, toggle, t, }: FilesBodyProps): ReactNode;
25
+ export declare function FilesBody({ useTabInfo, sessionId, useSessions, useStore, actions, start, refresh, setAutoRefresh, toggle, t, renderSlot, }: FilesBodyProps): ReactNode;
26
26
  //# sourceMappingURL=FilesBody.d.ts.map
@@ -3,6 +3,19 @@ export type { SidebarFilesKey } from './locales.ts';
3
3
  export type { DirLevel, FilesState, FilesTabState, LevelState } from './store.ts';
4
4
  export type { FilesInjected, ListWorkspaceDirectory, WorkspaceFilesListRemote } from './face.ts';
5
5
  export type { FilesBodyProps } from './FilesBody.tsx';
6
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
7
+ interface SlotMap {
8
+ /** Workspace directory actions after the file tree's reload control. */
9
+ 'sidebar.right.tab.files.actions': {
10
+ kind: 'list';
11
+ scope: 'session';
12
+ owner: {
13
+ /** Absolute directory path displayed by the file tree. */
14
+ readonly absolutePath: string;
15
+ };
16
+ };
17
+ }
18
+ }
6
19
  /**
7
20
  * Required browser services: the tab registry, the keyed seat, the Remote
8
21
  * carrier and its namespace, and copy.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-sidebar-files",
3
3
  "description": "Workspace file tree tab type for the right Sidebar: lazy directory listing over the workspaceFiles Remote namespace, opening files into the Sidebar",
4
- "version": "0.2.0-rc.1",
4
+ "version": "0.2.0-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -48,22 +48,22 @@
48
48
  "react": "^18.2.0",
49
49
  "clsx": "^2.0.0",
50
50
  "react-dom": "^18.2.0",
51
- "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.1",
52
51
  "@deepseek-ai/cordis": "~4.0.4",
53
- "@deepseek-ai/dsh-api-workspace-files": "0.2.0-rc.1",
54
- "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1",
55
- "@deepseek-ai/dsh-client-store": "0.2.0-rc.1",
56
- "@deepseek-ai/dsh-client-test-runtime": "0.2.0-rc.1",
57
- "@deepseek-ai/dsh-client-ui-dockkit": "0.2.0-rc.1",
58
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1",
59
- "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.1",
60
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
61
- "@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.0-rc.1",
62
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
63
- "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
64
- "@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.1",
65
- "@deepseek-ai/dsh-client-shortcuts": "0.2.0-rc.1",
66
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1"
52
+ "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
53
+ "@deepseek-ai/dsh-api-workspace-files": "0.2.0-rc.2",
54
+ "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
55
+ "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
56
+ "@deepseek-ai/dsh-client-test-runtime": "0.2.0-rc.2",
57
+ "@deepseek-ai/dsh-client-ui-dockkit": "0.2.0-rc.2",
58
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
59
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
60
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
61
+ "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.2",
62
+ "@deepseek-ai/dsh-session": "0.2.0-rc.2",
63
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
64
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.2",
65
+ "@deepseek-ai/dsh-client-shortcuts": "0.2.0-rc.2",
66
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.0-rc.2"
67
67
  },
68
68
  "files": [
69
69
  "lib/index.js",