@deepseek-ai/dsh-client-ui-directory-picker-browse 0.0.1-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.i18n.yaml +6 -0
- package/README.md +24 -0
- package/README.zh.md +24 -0
- package/lib/client.js +1044 -0
- package/lib/index.js +12 -0
- package/lib/invariant.js +24 -0
- package/lib/types/client/DirectoryBrowser.d.ts +26 -0
- package/lib/types/client/flow.d.ts +24 -0
- package/lib/types/client/index.d.ts +20 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/invariant.d.ts +16 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, DeepSeek
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/client/ui-directory-picker-browse/README.md
|
|
5
|
+
README.md: 5e27ba081a921593b53d4d91805965c629139d37
|
|
6
|
+
README.zh.md: fff330cad78a4a36e1b965628750d6dfe009de84
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @deepseek-ai/dsh-client-ui-directory-picker-browse
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
In-app directory browsing surface: the browser half of the browse picking interaction. It fills ui-workspace's two directory-flow holes (`conversation.hero.workspace.directoryFlow` and `sidebar.workspaces.directoryFlow`) with the Select Workspace Directory dialog, driving the local Host's `host.listDirectory` and `host.createDirectory` primitives through `ctx.workspaces`. Its node counterpart is [`dsh-host-directory-picker-browse`](../../host/directory-picker-browse/README.md); mounting this package composes the surface with that backend from one cordis.yml row, so no client code branches on a capability kind. Unlike the [`-native`](../ui-directory-picker-native/README.md) surface, the dialog needs no local operating-system chooser, so it also serves in-process and remote-browser deployments.
|
|
6
|
+
|
|
7
|
+
The dialog is a 680×500 Miller-column view (clamped on short or narrow viewports): a header carrying the title, the selection-path breadcrumb, and a click-to-edit path zone, then one full-width level until a row is selected, after which the row splits evenly into level and children columns. Navigations land selection-anchored and quiet — the previous view keeps rendering while a crumb jump or a submitted path is scanned, and target and parent legs land as one frame — so stepping back keeps two panes away from the display root and no intermediate frame flashes. **New folder** opens a nested create dialog targeting the selected folder and selects what it creates; **Open** adopts the selected folder, falling back to the listed level. Host-flagged hidden entries stay hidden until the footer toggle reveals them, which is a client-side filter only.
|
|
8
|
+
|
|
9
|
+
Confirming a directory is the picked path and dismissing the dialog is the cancellation. Browse failures — an unreadable target, a create conflict — stay inside the dialog's own alert surfaces, so this occupant never drives the owner's `onError` arm; the owner keeps the workspace-creation error surface. Both registrations install through nested `slots.inject()` calls because either declaring entry may activate later or replace its declaration, and the dialog's copy is registered in this package's own locale namespace: the two dictionaries land as a unit, so a failed activation cannot squat one locale of the namespace.
|
|
10
|
+
|
|
11
|
+
The node half is an empty `apply`: it exists so the plugin appears in the host cordis.yml and Loader, while the browser half ships through `exports["./client"]` and is discovered through the `dsh.client` manifest declaration.
|
|
12
|
+
|
|
13
|
+
## Model Experience
|
|
14
|
+
|
|
15
|
+
None, as the directory browser is browser chrome; nothing here reaches a model request.
|
|
16
|
+
|
|
17
|
+
#### KV Cache effect
|
|
18
|
+
|
|
19
|
+
None; this package neither assembles nor sends a provider request.
|
|
20
|
+
|
|
21
|
+
## Known Limitations and Deferred Work
|
|
22
|
+
|
|
23
|
+
- **No search, no multi-select, and no rename or delete** — the dialog lists and creates directories; a target is reached by navigating, editing the path, or filtering the last pane by prefix.
|
|
24
|
+
- **Hidden-entry filtering is client-side** — the Host always lists hidden entries and flags them, so the toggle changes only what the dialog renders.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @deepseek-ai/dsh-client-ui-directory-picker-browse
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
应用内目录浏览界面:浏览式选取交互的浏览器半边。它通过 ui-workspace 的两个 directory-flow 洞(`conversation.hero.workspace.directoryFlow` 与 `sidebar.workspaces.directoryFlow`)装入「选择工作区目录」对话框,经 `ctx.workspaces` 驱动本地 Host 的 `host.listDirectory` 与 `host.createDirectory` 原语。它的 node 对侧是 [`dsh-host-directory-picker-browse`](../../host/directory-picker-browse/README.md);挂载本包即用一行 cordis.yml 把界面与该后端组合起来,因此没有任何客户端代码按能力种类分支。与 [`-native`](../ui-directory-picker-native/README.md) 界面不同,本对话框不需要本地操作系统选择框,因此也服务于进程内与远程浏览器部署。
|
|
6
|
+
|
|
7
|
+
对话框是 680×500 的 Miller 分栏视图(在较矮或较窄的视口中限制尺寸):头部承载标题、选中路径面包屑和可点击编辑的路径区;下方在未选中行时是一整栏层级,选中后该行均分为「层级 | 选中文件夹的子项」两栏。导航落地是选择锚定且安静的——面包屑跳转或提交路径被扫描期间仍渲染旧视图,目标目录与父目录两段导航在同一帧完成——因此回退时,只要尚未到达显示根目录,就会始终保持两栏,且不会闪过中间帧。**新建文件夹**打开一个嵌套创建对话框,目标为选中的文件夹,并选中它创建出来的那个;**打开**采纳选中的文件夹,没有选中时回落到当前层级。Host 标记的隐藏条目默认不显示,直到页脚开关将其揭开——那只是客户端过滤。
|
|
8
|
+
|
|
9
|
+
确认一个目录即为选中的路径,关闭对话框即为取消。浏览类失败——不可读的目标、创建冲突——都留在对话框自己的提示区内,因此本占位者从不驱动 owner 的 `onError` 分支;工作区创建的错误界面仍由 owner 持有。两处注册通过嵌套的 `slots.inject()` 安装,因为任一声明方条目都可能稍后激活或替换其声明;对话框文案注册在本包自己的 locale 命名空间下,两份字典作为一个单元落地,因此激活失败不会占住该命名空间的其中一种语言。
|
|
10
|
+
|
|
11
|
+
node 半边是一个空 `apply`:它的存在只为让插件出现在 host 的 cordis.yml 与 Loader 中,浏览器半边经 `exports["./client"]` 出货,并通过 `dsh.client` 清单声明被发现。
|
|
12
|
+
|
|
13
|
+
## 模型体验
|
|
14
|
+
|
|
15
|
+
无,因为目录浏览器属于浏览器界面;本包中的任何内容都不会进入模型请求。
|
|
16
|
+
|
|
17
|
+
#### KV Cache 影响
|
|
18
|
+
|
|
19
|
+
无;本包既不组装也不发送 provider 请求。
|
|
20
|
+
|
|
21
|
+
## 已知限制与暂缓事项
|
|
22
|
+
|
|
23
|
+
- **无搜索、无多选、无重命名或删除** —— 对话框只负责列出与创建目录;到达目标靠导航、编辑路径,或用前缀过滤最后一栏。
|
|
24
|
+
- **隐藏条目的过滤在客户端** —— Host 始终列出隐藏条目并加标记,因此开关只改变对话框渲染什么。
|