@bnviking/dsh-bnv-workspace 0.4.0 → 1.0.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.
- package/NOTICE +15 -0
- package/README.md +138 -86
- package/assets/compact-topbar.png +0 -0
- package/docs/DETAIL.md +179 -0
- package/package.json +12 -4
package/NOTICE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
BNV WorkSpace
|
|
2
|
+
Copyright (c) 2026 BNViking
|
|
3
|
+
|
|
4
|
+
This project is an independent plugin for DeepSeek Harness. It is not
|
|
5
|
+
affiliated with, endorsed by, or sponsored by DeepSeek. "DeepSeek Harness"
|
|
6
|
+
and related names and marks are the property of their respective owners.
|
|
7
|
+
|
|
8
|
+
No third-party source code is included in this repository. The plugin uses
|
|
9
|
+
the plugin APIs and internal service contracts of the installed DeepSeek
|
|
10
|
+
Harness version it targets; compatibility is limited to the versions listed
|
|
11
|
+
in the README.
|
|
12
|
+
|
|
13
|
+
The MIT license in LICENSE covers the source code in this repository only.
|
|
14
|
+
It does not grant rights to DeepSeek Harness itself or to third-party
|
|
15
|
+
packages that DeepSeek Harness may load.
|
package/README.md
CHANGED
|
@@ -1,86 +1,138 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- case
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(
|
|
86
|
-
|
|
1
|
+
# BNV WorkSpace
|
|
2
|
+
|
|
3
|
+
[](https://github.com/BNViking/dsh-bnv-workspace/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@bnviking/dsh-bnv-workspace)
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
English · [Русский ниже](#русский)
|
|
8
|
+
|
|
9
|
+
## What it gives you
|
|
10
|
+
|
|
11
|
+
BNV WorkSpace turns the DeepSeek Harness sidebar into a tidy workspace: readable chat and project names, a compact top bar, per-row icons and colors, and truly permanent deletion of chats and projects.
|
|
12
|
+
|
|
13
|
+
- **Styled names** — case, font family (any installed family), weight, color (including a custom one), size 60–130 %, and letter spacing, configured separately for all chats and all projects.
|
|
14
|
+
- **Compact top bar** — one right-aligned row with the logo, New session, the panel section icons (Plugins, Automation tasks, Context overview, …), and Settings. The shipped vertical panel list and the wide New session row are hidden; the collapsed rail keeps its icons.
|
|
15
|
+
- **Per-row identity** — the “…” menu of a chat or a project offers **Customize view…**: a built-in icon, your own image (downscaled to 64 px), and a text color that overrides the shared one for that row only.
|
|
16
|
+
- **Permanent deletion** — **Delete forever…** erases the chat log (and every subagent session) from disk, or a project with all chats inside. There is no trash and no undo; the project folder on disk is left untouched.
|
|
17
|
+
- **“Projects” naming** — the shipped “Workspaces” section title is displayed as “Projects”.
|
|
18
|
+
- **Russian and English UI** — Russian when DSH is Russian, English otherwise.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
Inside DeepSeek Harness open **Plugins → Add plugin** and paste:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
@bnviking/dsh-bnv-workspace
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The same operation from the plugin manager:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
plugin_manager action=install_bundle target="@bnviking/dsh-bnv-workspace"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Reload the page if the sidebar does not change immediately. Settings live under **Settings → BNV WorkSpace**; compact mode is the default.
|
|
35
|
+
|
|
36
|
+
## Screenshots
|
|
37
|
+
|
|
38
|
+
Compact top bar — New session, panel sections, and Settings, right-aligned before the sidebar toggle:
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
## Network and files
|
|
43
|
+
|
|
44
|
+
- **No network requests, no telemetry.** The plugin works entirely on the machine.
|
|
45
|
+
- Settings are stored in the browser profile’s `localStorage`: `dsh.bnv-workspace.styles.v2`, `dsh.bnv-workspace.icons.v1`, `dsh.bnv-workspace.item-colors.v1`, `dsh.bnv-workspace.general.v2`.
|
|
46
|
+
- Deletion removes session log directories under `~/.dsh/sessions/<project>/<session>/` and cleans the matching references in `~/.dsh/storages/workspace.json`.
|
|
47
|
+
- Deletion **does not** remove the project folder on disk, attachments, usage ledgers of other plugins, or search-index rows; those are listed under Limitations.
|
|
48
|
+
- Deleting runs as the built-in command `/bnv-delete` in the currently open chat, so that chat’s log keeps a command row.
|
|
49
|
+
|
|
50
|
+
## Compatibility
|
|
51
|
+
|
|
52
|
+
- DeepSeek Harness **0.2.2-rc.5** with the Web client, JSONL session persistence, the workspace registry, and the commands service. Tested on Windows; other desktop platforms are expected but not verified.
|
|
53
|
+
- Node.js **20 or newer** for the Host half (DSH ships its own runtime).
|
|
54
|
+
- Local Font Access API is optional: when the browser does not grant it, a common-font fallback list is used.
|
|
55
|
+
- The plugin depends on DSH internal slot names, `data-row-key` attributes, and a few CSS hooks; a DSH update can break the presentation until the selectors are adjusted.
|
|
56
|
+
|
|
57
|
+
## Limitations
|
|
58
|
+
|
|
59
|
+
- An open chat cannot be deleted (DSH keeps a writer); switch to another chat first.
|
|
60
|
+
- Deletion needs at least one open chat and leaves the `/bnv-delete …` command row in it.
|
|
61
|
+
- Attachments, third-party usage data, and the search index are not cleaned; the “forever” scope is the session logs and the workspace registry.
|
|
62
|
+
- Per-row customization covers icon and text color only; font, size, case, and weight are shared per area.
|
|
63
|
+
- No trash, no undo, no backups.
|
|
64
|
+
- UI localization is Russian/English only; other locales fall back to English.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT — see [LICENSE](LICENSE). Third-party notices are in [NOTICE](NOTICE).
|
|
69
|
+
|
|
70
|
+
## Catalog permission
|
|
71
|
+
|
|
72
|
+
This project authorizes [DSH Plugin](https://dsh-plugin.org/) to list this repository and display its plugin information.
|
|
73
|
+
本项目授权 [DSH Plugin](https://dsh-plugin.org/) 收录本仓库,并在该站展示插件信息。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Русский
|
|
78
|
+
|
|
79
|
+
## Что это даёт
|
|
80
|
+
|
|
81
|
+
BNV WorkSpace превращает боковую панель DeepSeek Harness в аккуратное рабочее место: читаемые имена чатов и проектов, компактная верхняя строка, иконки и цвета отдельных строк и безвозвратное удаление чатов и проектов.
|
|
82
|
+
|
|
83
|
+
- **Оформление имён** — регистр, шрифт (любое установленное семейство), толщина, цвет (включая свой), размер 60–130 % и межбуквенный интервал; настраивается отдельно для всех чатов и всех проектов.
|
|
84
|
+
- **Компактная верхняя строка** — одна строка, выровненная вправо: логотип, «Новая сессия», иконки разделов панели (Плагины, Задачи автоматизации, Обзор контекста, …) и «Настройки». Штатный вертикальный список разделов и широкая строка новой сессии скрыты; в свёрнутом рельсе иконки остаются.
|
|
85
|
+
- **Своя строка** — в меню «…» у чата или проекта есть **Настроить вид…**: встроенная иконка, своя картинка (уменьшается до 64 px) и цвет подписи, который перекрывает общий только для этой строки.
|
|
86
|
+
- **Удаление навсегда** — **Удалить навсегда…** стирает с диска журнал чата (вместе со всеми подсессиями) или проект со всеми чатами внутри. Корзины и отмены нет; папка проекта на диске остаётся.
|
|
87
|
+
- **«Проекты»** — штатный заголовок «Рабочие пространства» показывается как «Проекты».
|
|
88
|
+
- **Русский и английский интерфейс** — русский, когда DSH на русском, иначе английский.
|
|
89
|
+
|
|
90
|
+
## Установка
|
|
91
|
+
|
|
92
|
+
В DeepSeek Harness откройте **Plugins → Add plugin** и вставьте:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
@bnviking/dsh-bnv-workspace
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Та же операция через менеджер плагинов:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
plugin_manager action=install_bundle target="@bnviking/dsh-bnv-workspace"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Если панель не изменилась, обновите страницу. Настройки — в **Настройки → BNV WorkSpace**; компактный режим включён по умолчанию.
|
|
105
|
+
|
|
106
|
+
## Скриншоты
|
|
107
|
+
|
|
108
|
+
Компактная верхняя строка — «Новая сессия», разделы и «Настройки» справа, перед кнопкой сворачивания:
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
## Сеть и файлы
|
|
113
|
+
|
|
114
|
+
- **Сетевых запросов и телеметрии нет.** Плагин работает полностью на машине.
|
|
115
|
+
- Настройки хранятся в `localStorage` профиля браузера: `dsh.bnv-workspace.styles.v2`, `dsh.bnv-workspace.icons.v1`, `dsh.bnv-workspace.item-colors.v1`, `dsh.bnv-workspace.general.v2`.
|
|
116
|
+
- Удаление убирает каталоги журналов в `~/.dsh/sessions/<проект>/<сессия>/` и чистит ссылки в `~/.dsh/storages/workspace.json`.
|
|
117
|
+
- Удаление **не** трогает папку проекта на диске, вложения, usage-реестры других плагинов и строки поискового индекса; это перечислено в ограничениях.
|
|
118
|
+
- Удаление выполняется встроенной командой `/bnv-delete` в открытом чате, поэтому в его журнале остаётся строка команды.
|
|
119
|
+
|
|
120
|
+
## Совместимость
|
|
121
|
+
|
|
122
|
+
- DeepSeek Harness **0.2.2-rc.5** с Web-клиентом, JSONL-хранилищем сессий, реестром проектов и сервисом команд. Проверено на Windows; другие настольные платформы ожидаются, но не проверялись.
|
|
123
|
+
- Node.js **20 или новее** для Host-половины (DSH использует свой рантайм).
|
|
124
|
+
- Local Font Access API опционален: если браузер не даёт доступ, используется резервный список шрифтов.
|
|
125
|
+
- Плагин опирается на внутренние имена слотов DSH, атрибуты `data-row-key` и несколько CSS-хуков; обновление DSH может сломать оформление до правки селекторов.
|
|
126
|
+
|
|
127
|
+
## Ограничения
|
|
128
|
+
|
|
129
|
+
- Открытый чат удалить нельзя (DSH держит writer); переключитесь на другой чат.
|
|
130
|
+
- Для удаления нужен хотя бы один открытый чат; в нём остаётся строка команды `/bnv-delete …`.
|
|
131
|
+
- Вложения, данные сторонних плагинов и поисковый индекс не чистятся; «навсегда» — это журналы сессий и реестр проектов.
|
|
132
|
+
- Настройка отдельной строки — только иконка и цвет; шрифт, размер, регистр и толщина общие для области.
|
|
133
|
+
- Корзины, отмены и резервных копий нет.
|
|
134
|
+
- Локализация — русская и английская; остальные языки получают английский.
|
|
135
|
+
|
|
136
|
+
## Лицензия
|
|
137
|
+
|
|
138
|
+
MIT — см. [LICENSE](LICENSE). Оговорки и атрибуция — в [NOTICE](NOTICE).
|
|
Binary file
|
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# BNV WorkSpace — technical details
|
|
2
|
+
|
|
3
|
+
English · [Русский ниже](#русский)
|
|
4
|
+
|
|
5
|
+
## Shape
|
|
6
|
+
|
|
7
|
+
BNV WorkSpace is one DSH bundle with two halves:
|
|
8
|
+
|
|
9
|
+
| Half | Entry | Responsibilities |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Host | `index.js` (ESM) | registers the `/bnv-delete` command; reads `sessionPersistence`, `sessions`, `workspaceRegistry`; erases session log directories; emits `api-session/removed` |
|
|
12
|
+
| Client | `client.js` (browser artifact) | registers slots, renders UI, keeps settings in `localStorage`, calls the Host through `remote.commands` |
|
|
13
|
+
| Shared | `safety.js` (pure) | validates log paths and finds subagent descendants |
|
|
14
|
+
|
|
15
|
+
There is no build step: `client.js` is loaded as-is through `window.__ModuleLoader__`, and its module id must equal the package name.
|
|
16
|
+
|
|
17
|
+
## Client slots
|
|
18
|
+
|
|
19
|
+
| Slot | Id | Role |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `shell.overlay` | `bnv-overlay` | `<style>`, dialogs, toast |
|
|
22
|
+
| `settings.section` + `settings.section.icon` | `bnv-workspace-appearance` | settings page and its nav glyph |
|
|
23
|
+
| `sidebar.session.row.leading` | `bnv-chat-icon` | per-chat icon |
|
|
24
|
+
| `sidebar.session.action` (HOC) | `bnv-compact-topbar` | hides the shipped New session row in compact mode |
|
|
25
|
+
| `sidebar.workspaces.session.menu.item` | `bnv-appearance-session`, `bnv-delete-forever` | chat row menu items |
|
|
26
|
+
| `contextMenus` for `workspace`, `contextMenu.icon` | `bnv-workspace.row-actions`, `bnv-workspace.appearance`, `bnv-workspace.trash` | project header menu items and icons |
|
|
27
|
+
| `sidebar.brand.name` (dynamic) | no id, `priority: -1` | compact button row: New session, panel icons, Settings |
|
|
28
|
+
| `settings.launcher` (dynamic) | no id, `priority: -1` | captures `openSettings`; hides the shipped account launcher in compact mode |
|
|
29
|
+
|
|
30
|
+
The two dynamic registrations exist only while the compact top bar is selected; on “Default” they are disposed and the shipped wordmark/account row return.
|
|
31
|
+
|
|
32
|
+
## State
|
|
33
|
+
|
|
34
|
+
One module-level store drives the UI:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
{ styles, icons, itemColors, topbar, dialog, notice }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`useSnapshot()` subscribes components to `listeners`; every mutation goes through `update(patch)`. Persistence keys:
|
|
41
|
+
|
|
42
|
+
| Key | Schema |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `dsh.bnv-workspace.styles.v2` | `{ chat: Style, project: Style }`; `Style = { case, font, weight, color, colorCustom, size, tracking }` |
|
|
45
|
+
| `dsh.bnv-workspace.icons.v1` | `{ sessions: { id: 'builtin:star' \| 'data:…' }, projects: { … } }` |
|
|
46
|
+
| `dsh.bnv-workspace.item-colors.v1` | `{ sessions: { id: '#rrggbb' }, projects: { … } }` |
|
|
47
|
+
| `dsh.bnv-workspace.general.v2` | `{ topbar: 'compact' \| 'default' }` |
|
|
48
|
+
|
|
49
|
+
`font` is `none`, `mono`, `serif`, or `family:<installed family>`. Compact is the default when the key is absent.
|
|
50
|
+
|
|
51
|
+
## CSS pipeline
|
|
52
|
+
|
|
53
|
+
One `<style>` element contains the base CSS followed by generated rules:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
CSS + nameCss(styles) + projectIconCss(icons) + itemColorCss(itemColors)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Selectors target the stable row attributes:
|
|
60
|
+
|
|
61
|
+
- chat title: `[data-row-key="session:<id>"] > span:nth-child(2)`;
|
|
62
|
+
- project title: `[data-row-key="workspace:<id>"] > span:nth-child(3)`;
|
|
63
|
+
- per-row color rules are appended last, so they win over the shared color;
|
|
64
|
+
- project icons replace the folder cell through `mask` (built-in glyphs) or `background` (uploaded images).
|
|
65
|
+
|
|
66
|
+
## Deletion
|
|
67
|
+
|
|
68
|
+
`/bnv-delete session <id> [ru|en]`
|
|
69
|
+
`/bnv-delete project <id> [ru|en]`
|
|
70
|
+
|
|
71
|
+
Chat flow: list snapshots → collect the chat and every descendant by `header.parentSession` → refuse if any of them is live → unpin/unarchive/detach from projects → `rm` each log directory → emit `api-session/removed` per id.
|
|
72
|
+
|
|
73
|
+
Project flow: read the workspace → collect `sessionIds` plus descendants → refuse if any is live → unpin/unarchive → detach from every workspace → `rm` log directories → delete the workspace record → emit `api-session/removed` per id.
|
|
74
|
+
|
|
75
|
+
Path safety: `safeSessionArtifact` accepts only `<root>/<project>/session-…/session[.vN].jsonl[.zstd]`, normalizes with `path.resolve`, and rejects anything else.
|
|
76
|
+
|
|
77
|
+
What remains after deletion: the project folder on disk, attachments, other plugins’ usage data, and search-index rows until DSH reconciles them.
|
|
78
|
+
|
|
79
|
+
## Compact top bar
|
|
80
|
+
|
|
81
|
+
- The HOC returns a marker span; CSS hides the now-empty shipped New session row.
|
|
82
|
+
- Buttons are rendered inside `sidebar.brand.name`, which lives inside the brand button.
|
|
83
|
+
- Panel icons are read from live `sidebar.panellist` registrations (labels are thunks), rendered through the `sidebar.panel.icon` factory, and highlighted with `usePanelInfo`.
|
|
84
|
+
- Right alignment is measured at runtime: a `useLayoutEffect` shifts the button group with `translateX` to the brand button’s right edge (the shipped `brandIdentity` has a `transform`, which breaks absolute positioning).
|
|
85
|
+
- The shipped vertical panel list is hidden by a CSS rule scoped to `html[data-bnv-topbar="compact"]`; the collapsed rail keeps its icons.
|
|
86
|
+
|
|
87
|
+
## Lifecycle
|
|
88
|
+
|
|
89
|
+
All registrations, intervals, and subscriptions return disposers. The workspace title rename (“Workspaces” → “Projects”) is a 300 ms poll that replaces the matching localized text inside `[data-sidebar-workspace-header]` and restores it on dispose. Locale dictionaries are registered under the `bnv-workspace` namespace; if DSH is not Russian, the chain falls back to English. Host code changes require a DSH restart; client changes require a page reload.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Русский
|
|
94
|
+
|
|
95
|
+
## Форма
|
|
96
|
+
|
|
97
|
+
BNV WorkSpace — один DSH-bundle из двух половин:
|
|
98
|
+
|
|
99
|
+
| Половина | Точка входа | Ответственность |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| Host | `index.js` (ESM) | команда `/bnv-delete`; читает `sessionPersistence`, `sessions`, `workspaceRegistry`; стирает каталоги журналов; emits `api-session/removed` |
|
|
102
|
+
| Client | `client.js` (браузерный артефакт) | регистрирует слоты, рисует UI, хранит настройки в `localStorage`, вызывает Host через `remote.commands` |
|
|
103
|
+
| Общий | `safety.js` (чистые функции) | проверка путей журналов и поиск подсессий |
|
|
104
|
+
|
|
105
|
+
Шага сборки нет: `client.js` грузится как есть через `window.__ModuleLoader__`, а id модуля обязан совпадать с именем пакета.
|
|
106
|
+
|
|
107
|
+
## Слоты клиента
|
|
108
|
+
|
|
109
|
+
| Слот | id | Роль |
|
|
110
|
+
|---|---|---|
|
|
111
|
+
| `shell.overlay` | `bnv-overlay` | `<style>`, диалоги, тост |
|
|
112
|
+
| `settings.section` + `settings.section.icon` | `bnv-workspace-appearance` | страница настроек и её глиф в навигации |
|
|
113
|
+
| `sidebar.session.row.leading` | `bnv-chat-icon` | иконка чата |
|
|
114
|
+
| `sidebar.session.action` (HOC) | `bnv-compact-topbar` | в компакте скрывает штатную строку новой сессии |
|
|
115
|
+
| `sidebar.workspaces.session.menu.item` | `bnv-appearance-session`, `bnv-delete-forever` | пункты меню чата |
|
|
116
|
+
| `contextMenus` для `workspace`, `contextMenu.icon` | `bnv-workspace.row-actions`, `bnv-workspace.appearance`, `bnv-workspace.trash` | пункты меню проекта и их иконки |
|
|
117
|
+
| `sidebar.brand.name` (динамически) | без id, `priority: -1` | компактный ряд: новая сессия, иконки разделов, «Настройки» |
|
|
118
|
+
| `settings.launcher` (динамически) | без id, `priority: -1` | перехватывает `openSettings`; в компакте скрывает штатный аккаунт |
|
|
119
|
+
|
|
120
|
+
Обе динамические регистрации живут только при выбранной компактной шапке; при «Обычном» снимаются, и возвращаются вордмарк и аккаунт.
|
|
121
|
+
|
|
122
|
+
## Состояние
|
|
123
|
+
|
|
124
|
+
UI питается одним модульным store:
|
|
125
|
+
|
|
126
|
+
```js
|
|
127
|
+
{ styles, icons, itemColors, topbar, dialog, notice }
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`useSnapshot()` подписывает компоненты на `listeners`; любое изменение идёт через `update(patch)`. Ключи хранения:
|
|
131
|
+
|
|
132
|
+
| Ключ | Схема |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `dsh.bnv-workspace.styles.v2` | `{ chat: Style, project: Style }`; `Style = { case, font, weight, color, colorCustom, size, tracking }` |
|
|
135
|
+
| `dsh.bnv-workspace.icons.v1` | `{ sessions: { id: 'builtin:star' \| 'data:…' }, projects: { … } }` |
|
|
136
|
+
| `dsh.bnv-workspace.item-colors.v1` | `{ sessions: { id: '#rrggbb' }, projects: { … } }` |
|
|
137
|
+
| `dsh.bnv-workspace.general.v2` | `{ topbar: 'compact' \| 'default' }` |
|
|
138
|
+
|
|
139
|
+
`font` — `none`, `mono`, `serif` или `family:<установленное семейство>`. Если ключа нет, компакт включён по умолчанию.
|
|
140
|
+
|
|
141
|
+
## CSS-конвейер
|
|
142
|
+
|
|
143
|
+
Один `<style>` содержит базовый CSS и сгенерированные правила:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
CSS + nameCss(styles) + projectIconCss(icons) + itemColorCss(itemColors)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Селекторы опираются на стабильные атрибуты строк:
|
|
150
|
+
|
|
151
|
+
- подпись чата: `[data-row-key="session:<id>"] > span:nth-child(2)`;
|
|
152
|
+
- подпись проекта: `[data-row-key="workspace:<id>"] > span:nth-child(3)`;
|
|
153
|
+
- персональные цвета идут последними и перекрывают общий цвет;
|
|
154
|
+
- иконки проекта заменяют ячейку папки через `mask` (встроенные глифы) или `background` (загруженные картинки).
|
|
155
|
+
|
|
156
|
+
## Удаление
|
|
157
|
+
|
|
158
|
+
`/bnv-delete session <id> [ru|en]`
|
|
159
|
+
`/bnv-delete project <id> [ru|en]`
|
|
160
|
+
|
|
161
|
+
Чат: снимки списка → сам чат и все потомки по `header.parentSession` → отказ, если кто-то живой → снять закрепление/архив/привязку → `rm` каталогов → `api-session/removed` по каждому id.
|
|
162
|
+
|
|
163
|
+
Проект: запись workspace → `sessionIds` плюс потомки → отказ, если кто-то живой → снять закрепления/архивы → отвязать от всех проектов → `rm` каталогов → удалить запись проекта → `api-session/removed` по каждому id.
|
|
164
|
+
|
|
165
|
+
Безопасность пути: `safeSessionArtifact` принимает только `<root>/<project>/session-…/session[.vN].jsonl[.zstd]`, нормализует через `path.resolve` и всё остальное отвергает.
|
|
166
|
+
|
|
167
|
+
Что остаётся после удаления: папка проекта на диске, вложения, usage-данные других плагинов и строки поискового индекса до сверки DSH.
|
|
168
|
+
|
|
169
|
+
## Компактная шапка
|
|
170
|
+
|
|
171
|
+
- HOC возвращает маркер; CSS скрывает опустевшую штатную строку новой сессии.
|
|
172
|
+
- Кнопки рендерятся в `sidebar.brand.name`, внутри кнопки бренда.
|
|
173
|
+
- Иконки разделов читаются из живых регистраций `sidebar.panellist` (ярлыки — thunk), рисуются через фабрику `sidebar.panel.icon` и подсвечиваются `usePanelInfo`.
|
|
174
|
+
- Правое выравнивание измеряется на месте: `useLayoutEffect` сдвигает группу `translateX` к правому краю кнопки бренда (у штатного `brandIdentity` есть `transform`, из-за которого абсолютное позиционирование не работает).
|
|
175
|
+
- Штатный вертикальный список скрыт правилом под `html[data-bnv-topbar="compact"]`; в свёрнутом рельсе иконки остаются.
|
|
176
|
+
|
|
177
|
+
## Жизненный цикл
|
|
178
|
+
|
|
179
|
+
Все регистрации, интервалы и подписки возвращают disposer. Переименование «Рабочие пространства» → «Проекты» — опрос раз в 300 мс: подменяет совпадающий локализованный текст внутри `[data-sidebar-workspace-header]` и возвращает его при выгрузке. Словари локали регистрируются в неймспейсе `bnv-workspace`; если DSH не на русском, цепочка уходит в английский. Правки Host требуют перезапуска DSH, правки клиента — перезагрузки страницы.
|
package/package.json
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnviking/dsh-bnv-workspace",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Turns the DeepSeek Harness sidebar into a tidy workspace with styled names, per-row icons and colors, a compact top bar, and truly permanent chat and project deletion.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "BNViking",
|
|
7
|
-
"
|
|
7
|
+
"private": false,
|
|
8
|
+
"keywords": ["dsh-plugin", "deepseek-harness", "sidebar", "workspace", "chat-management", "customization", "icons", "productivity"],
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/BNViking/dsh-bnv-workspace.git"
|
|
11
12
|
},
|
|
12
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://www.npmjs.com/package/@bnviking/dsh-bnv-workspace",
|
|
13
14
|
"bugs": {
|
|
14
15
|
"url": "https://github.com/BNViking/dsh-bnv-workspace/issues"
|
|
15
16
|
},
|
|
16
17
|
"publishConfig": {
|
|
17
18
|
"access": "public"
|
|
18
19
|
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20"
|
|
22
|
+
},
|
|
19
23
|
"type": "module",
|
|
20
24
|
"exports": {
|
|
21
25
|
".": "./index.js",
|
|
@@ -29,6 +33,10 @@
|
|
|
29
33
|
"safety.js",
|
|
30
34
|
"cordis.patch.yml",
|
|
31
35
|
"locale/*.json",
|
|
36
|
+
"docs/",
|
|
37
|
+
"assets/",
|
|
38
|
+
"NOTICE",
|
|
39
|
+
"LICENSE",
|
|
32
40
|
"README.md",
|
|
33
41
|
"icon.svg"
|
|
34
42
|
],
|