dsh-better-left-sidebar 0.0.0-stage → 0.1.1
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 +202 -0
- package/README.en.md +136 -0
- package/README.md +135 -2
- package/cordis.patch.yml +11 -0
- package/icon.svg +24 -0
- package/lib/client.js +3330 -0
- package/lib/index.js +51 -0
- package/lib/slots.d.ts +18 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +124 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<!-- Writing guide: playbooks/reference/readme.md. Keep the same sections as README.md. -->
|
|
2
|
+
|
|
3
|
+
# Better Left Sidebar
|
|
4
|
+
|
|
5
|
+
[简体中文](README.md) | English
|
|
6
|
+
|
|
7
|
+
[](https://github.com/exoticknight/dsh-better-left-sidebar/actions/workflows/ci.yml) [](LICENSE)  [](https://github.com/exoticknight/red)
|
|
8
|
+
|
|
9
|
+
<!-- Listing badges: add a row here only after each listing is confirmed. See playbooks/reference/badges.md. -->
|
|
10
|
+
|
|
11
|
+
You need a cleaner DeepSeek Harness sidebar: keep workspaces and conversations in place, and expand full navigation only when you need it.
|
|
12
|
+
|
|
13
|
+
<!-- client:start -->
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
<img src="https://raw.githubusercontent.com/exoticknight/dsh-better-left-sidebar/main/docs/images/sidebar-en.png" alt="Default layout: a narrow icon rail beside the open workspace and conversation list" width="49%" />
|
|
17
|
+
<img src="https://raw.githubusercontent.com/exoticknight/dsh-better-left-sidebar/main/docs/images/sidebar-hover-en.png" alt="Expanded navigation: full labels overlay the sidebar without moving the conversation pane" width="49%" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<p align="center"><sub>Screenshots captured on DSH 0.2.1-rc.3.</sub></p>
|
|
21
|
+
|
|
22
|
+
<!-- client:end -->
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
> `0.1.1` adds compact rail widgets, a configurable clock, grouped settings, and short-window navigation improvements.
|
|
27
|
+
|
|
28
|
+
- **Keep conversations in the foreground**: workspaces and conversations stay in a dedicated wide pane; expanded navigation overlays it instead of squeezing the conversation area.
|
|
29
|
+
- **Tuck global entry points out of the way**: place the brand, panels, and tools along a narrow left rail to leave more room for browsing sessions.
|
|
30
|
+
- **Choose the interaction that fits**: hover or keyboard focus expands the rail by default; click mode pins it open and closes on another click, Escape, or an outside click.
|
|
31
|
+
- **Shape the sidebar around your workflow**: reposition the brand, global navigation, and tools, then review the layout preview before applying it.
|
|
32
|
+
- **Keep DSH's native actions**: New Session, panels, workspaces, settings, and footer tools keep their DSH entry points and behavior.
|
|
33
|
+
- **See widgets in the compact rail**: the clock and widgets you choose sit at the bottom of the rail. In settings you can enable, disable, and reorder them, and change the clock's hour cycle, month/day, weekday, and time color.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
The current source was verified on DSH `0.2.1-rc.3` in the `web` profile. See the [compatibility record](docs/compatibility.md) for the supported range.
|
|
38
|
+
|
|
39
|
+
### Everyday users: npm release
|
|
40
|
+
|
|
41
|
+
Install the exact version:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add dsh-better-left-sidebar@0.1.1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Restart DSH after installing.
|
|
48
|
+
|
|
49
|
+
### Install from GitHub
|
|
50
|
+
|
|
51
|
+
You can also install the matching GitHub Release:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.1
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Restart DSH after installing.
|
|
58
|
+
|
|
59
|
+
### Developers: local preview
|
|
60
|
+
|
|
61
|
+
Run these commands from the repository. Development uses the isolated `.dsh-cli/` and `.dsh-dev/` directories; it does not modify your everyday DSH profile.
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
pnpm install
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
pnpm dev:cli 0.2.1-rc.3
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
pnpm dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
1. When enabled, the workspace and conversation list stay open; the far-left rail holds the DSH brand, global panels, and tools.
|
|
78
|
+
2. In the default mode, hover over the rail or keyboard-focus a navigation item to reveal the full navigation. It closes after you leave it. Choose click mode in the plugin settings to pin or close the rail with the toggle button.
|
|
79
|
+
3. Open **Plugins** in the sidebar, then **Better Left Sidebar** to configure expansion, animation, and region placement. Review the preview and select **Save settings** to apply changes. Copy follows DSH's active language; switch between Chinese and English in **Settings → General**.
|
|
80
|
+
4. Use **[Compact widgets](docs/compact-widgets.md)** on the same settings page to manage the clock and compatible widgets. Expand **Display settings** under the clock to change its hour cycle, date, weekday, and time color. Date and Weekday can both be checked, and the **Effect preview** uses the same width as the rail. A widget that does not fit is marked **Hidden: not enough space**. New registrations are enabled by default, and their order and enablement are saved in the current profile.
|
|
81
|
+
|
|
82
|
+
### Adapt your plugin to the compact rail
|
|
83
|
+
|
|
84
|
+
Plugin authors can register display-only widgets by following the [compact widget guide](docs/compact-widgets.md). Saved preferences remain available while a plugin is unloaded.
|
|
85
|
+
|
|
86
|
+
## Configuration
|
|
87
|
+
|
|
88
|
+
After you select **Save settings**, layout preferences are stored in the current DSH profile's plugin configuration.
|
|
89
|
+
|
|
90
|
+
| Option | Default | Meaning |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| Expansion | `hover` | Expand on hover or keyboard focus; `click` pins the rail open with a toggle. |
|
|
93
|
+
| Animation | `standard` | Choose soft, fast, or no animation. |
|
|
94
|
+
| Brand | `navigation-top` | Place the brand at the top of the rail, at the top of the conversation pane, or hide it. |
|
|
95
|
+
| Global navigation | `rail` | Keep global navigation in the rail or move it above conversations. |
|
|
96
|
+
| Tools and status | `rail-bottom` | Keep tools at the bottom of the rail or move them below conversations. |
|
|
97
|
+
| [Compact widgets](docs/compact-widgets.md) | Clock and new registrations enabled | Enable, disable, and reorder widgets in plugin settings; preferences are saved in the current DSH profile. |
|
|
98
|
+
| Clock | 24-hour, month/day, primary color | 12-hour mode adds P or A after the time. Date and Weekday can both be checked. Choose Follow theme or Custom color; custom colors stay fixed across themes. The preview follows the draft, and the rail updates when you save. |
|
|
99
|
+
|
|
100
|
+
## Update, roll back, remove
|
|
101
|
+
|
|
102
|
+
To update to or reinstall `0.1.1`, remove the plugin and install the exact version:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
dsh plugin --profile web remove dsh-better-left-sidebar
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
dsh plugin --profile web add dsh-better-left-sidebar@0.1.1
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
To roll back, replace the version in the install command with `0.1.0`. [View GitHub Releases](https://github.com/exoticknight/dsh-better-left-sidebar/releases).
|
|
113
|
+
|
|
114
|
+
Removing the plugin uninstalls its package; conversations and other plugins in the DSH profile remain.
|
|
115
|
+
|
|
116
|
+
Developers can remove the plugin from the isolated preview profile:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
pnpm dev:dsh --profile web plugin remove dsh-better-left-sidebar
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Privacy and data
|
|
123
|
+
|
|
124
|
+
The plugin rearranges DSH's existing sidebar and uses DSH's built-in configuration service to save the layout, widget order and enablement, and clock display preferences you explicitly submit. It makes no direct network requests, reads no conversation content, writes no workspace files, stores no credentials, and collects no telemetry. DSH manages the profile's configuration storage and sync.
|
|
125
|
+
|
|
126
|
+
## Compatibility
|
|
127
|
+
|
|
128
|
+
Supports the `web` profile on DSH `>=0.2.0-rc.2 <0.2.2-0`. With Global navigation set to Above conversations, the global-navigation list scrolls independently to leave room for conversation content and footer tools; it shrinks first in short windows and can reach `0` at extreme heights. DSH's native “Standard mode” label can still truncate at a `567×626` viewport and the default `280px` or minimum `264px` sidebar width; widen the DSH sidebar if the full label matters. See the [compatibility record](docs/compatibility.md).
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
See [docs/development.md](docs/development.md), [CONTRIBUTING.md](CONTRIBUTING.md), and [AGENTS.md](AGENTS.md).
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
[Apache License 2.0](LICENSE)
|
package/README.md
CHANGED
|
@@ -1,3 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- 写作规范见 playbooks/reference/readme.md;与 README.en.md 保持相同章节。 -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# 更顺手的左侧栏
|
|
4
|
+
|
|
5
|
+
简体中文 | [English](README.en.md)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/exoticknight/dsh-better-left-sidebar/actions/workflows/ci.yml) [](LICENSE)  [](https://github.com/exoticknight/red)
|
|
8
|
+
|
|
9
|
+
<!-- Listing badges: add a row here only after each listing is confirmed. See playbooks/reference/badges.md. -->
|
|
10
|
+
|
|
11
|
+
你需要更清爽的左侧栏:让工作区与会话列表留在原位,完整导航只在需要时展开。
|
|
12
|
+
|
|
13
|
+
<!-- client:start -->
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
<img src="https://raw.githubusercontent.com/exoticknight/dsh-better-left-sidebar/main/docs/images/sidebar.png" alt="默认布局:左侧窄图标栏与展开的工作区、会话列表并排" width="49%" />
|
|
17
|
+
<img src="https://raw.githubusercontent.com/exoticknight/dsh-better-left-sidebar/main/docs/images/sidebar-hover.png" alt="展开导航:完整入口覆盖在侧栏上,不会挤动对话区" width="49%" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<p align="center"><sub>界面截图基于 DSH 0.2.1-rc.3。</sub></p>
|
|
21
|
+
|
|
22
|
+
<!-- client:end -->
|
|
23
|
+
|
|
24
|
+
## 功能
|
|
25
|
+
|
|
26
|
+
> `0.1.1` 加入收起栏小组件、可配置时钟和分组设置,并包含小窗口导航改进。
|
|
27
|
+
|
|
28
|
+
- **让会话始终留在主位**:工作区和会话列表保留在独立宽栏;展开导航时覆盖在其上,不会挤窄对话区。
|
|
29
|
+
- **把全局入口收纳起来**:品牌、面板和工具可分布在左侧窄栏,空出更完整的会话浏览区域。
|
|
30
|
+
- **鼠标、键盘、点击都能顺手操作**:默认悬停或聚焦时展开;也可切换为点击固定展开,并用再次点击、Esc 或外部点击收起。
|
|
31
|
+
- **按自己的习惯安排侧栏**:调整品牌、全局导航和工具区的位置;保存前可查看布局效果预览。
|
|
32
|
+
- **保留 DSH 原生操作**:新建会话、面板、工作区、设置和页脚工具仍使用 DSH 自己的入口与处理逻辑。
|
|
33
|
+
- **在收起栏查看小组件**:时钟和你选择的插件小组件显示在导航栏底部。设置里可以启用、停用、排序,并调整时钟的小时制、月/日、星期和时间颜色。
|
|
34
|
+
|
|
35
|
+
## 安装
|
|
36
|
+
|
|
37
|
+
当前源码已在 DSH `0.2.1-rc.3` 的 `web` profile 验证;支持范围见[兼容性记录](docs/compatibility.md)。
|
|
38
|
+
|
|
39
|
+
### 普通用户:npm 发布版
|
|
40
|
+
|
|
41
|
+
安装精确版本:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add dsh-better-left-sidebar@0.1.1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
安装后重启 DSH。
|
|
48
|
+
|
|
49
|
+
### 从 GitHub 安装
|
|
50
|
+
|
|
51
|
+
也可以安装对应版本的 GitHub Release:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.1
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
安装后重启 DSH。
|
|
58
|
+
|
|
59
|
+
### 开发者:本地预览
|
|
60
|
+
|
|
61
|
+
在仓库目录运行以下命令。开发版使用独立的 `.dsh-cli/` 与 `.dsh-dev/`,不会改动日常使用的 DSH profile。
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
pnpm install
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
pnpm dev:cli 0.2.1-rc.3
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
pnpm dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 使用
|
|
76
|
+
|
|
77
|
+
1. 插件启用后,工作区与会话列表保持展开;最左侧窄栏放置 DSH 品牌、全局面板和工具入口。
|
|
78
|
+
2. 默认将鼠标移入导航栏,或用键盘聚焦导航项,即可展开完整导航;离开导航区域且不再聚焦时自动收起。也可在插件设置中选择“点击展开”,通过点击固定或收起导航。
|
|
79
|
+
3. 打开侧栏的“插件”页,进入“更顺手的左侧栏”配置展开方式、动画和区域位置;修改布局后先看预览,再点“保存设置”。文案跟随 DSH 当前语言;在“设置 → 通用设置”切换简体中文或 English。
|
|
80
|
+
4. 在同一设置页的“[收起栏小组件](docs/compact-widgets.md)”管理时钟和适配插件的小组件。展开时钟的“显示设置”,可改小时制、日期、星期和时间颜色;日期与星期可同时勾选,旁边的“效果预览”与收起栏同宽。空间不足时,组件行会显示“空间不足,暂未显示”。首次注册默认启用,顺序与启用状态保存在当前 profile。
|
|
81
|
+
|
|
82
|
+
### 让你的插件适配收起栏
|
|
83
|
+
|
|
84
|
+
开发者可按[收起栏小组件指南](docs/compact-widgets.md)注册只展示信息的小组件。卸载或暂时未加载的插件仍会保留已保存的设置。
|
|
85
|
+
|
|
86
|
+
## 配置
|
|
87
|
+
|
|
88
|
+
布局偏好在点击“保存设置”后写入当前 DSH profile 的插件配置。
|
|
89
|
+
|
|
90
|
+
| 选项 | 默认值 | 说明 |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| 展开方式 | `hover` | 悬停或键盘聚焦时展开;也可选 `click`,由按钮固定展开。 |
|
|
93
|
+
| 动画 | `standard` | 选择柔和、快速或关闭动画。 |
|
|
94
|
+
| 品牌区 | `navigation-top` | 可放在导航栏顶部、对话面板顶部,或隐藏。 |
|
|
95
|
+
| 全局导航 | `rail` | 可放在左侧导航栏,或移到对话列表上方。 |
|
|
96
|
+
| 工具与状态 | `rail-bottom` | 可放在导航栏底部,或移到对话列表下方。 |
|
|
97
|
+
| [收起栏小组件](docs/compact-widgets.md) | 时钟与已注册项目默认启用 | 在插件设置中启用、停用和排序;偏好保存在当前 DSH profile。 |
|
|
98
|
+
| 时钟 | 24 小时,月/日,主色 | 小时制可选 12 小时,时间后加 P 或 A。日期和星期可以同时勾选。时间颜色可选“跟随主题”或“自定义颜色”,自定义颜色不随主题变化。预览跟随草稿,保存后收起栏才变。 |
|
|
99
|
+
|
|
100
|
+
## 更新、回滚与卸载
|
|
101
|
+
|
|
102
|
+
更新到 `0.1.1` 或重新安装时,先移除插件,再安装精确版本:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
dsh plugin --profile web remove dsh-better-left-sidebar
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
dsh plugin --profile web add dsh-better-left-sidebar@0.1.1
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
需要回滚时,将安装命令中的版本改为 `0.1.0`。[查看 GitHub Releases](https://github.com/exoticknight/dsh-better-left-sidebar/releases)。
|
|
113
|
+
|
|
114
|
+
移除插件只会卸载插件包;当前 DSH profile 中的会话和其他插件会保留。
|
|
115
|
+
|
|
116
|
+
开发者可从隔离的预览 profile 移除插件:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
pnpm dev:dsh --profile web plugin remove dsh-better-left-sidebar
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 隐私与数据
|
|
123
|
+
|
|
124
|
+
插件只调整 DSH 现有侧栏,并通过 DSH 内置配置服务保存你明确提交的布局、组件排序与启用状态、时钟显示偏好。插件不直接发起网络请求、不读取对话内容、不写入工作区文件、不保存凭据,也不采集遥测;配置的存储与同步由 DSH profile 管理。
|
|
125
|
+
|
|
126
|
+
## 兼容性
|
|
127
|
+
|
|
128
|
+
支持 DSH `>=0.2.0-rc.2 <0.2.2-0` 的 `web` profile。将“全局导航”设为“对话列表上方”时,导航列表独立滚动,为会话内容和底部工具留出空间;窗口变矮时导航区优先收缩,极端高度下可缩至 `0`。DSH 自带的“Standard mode”标签在 `567×626` 窗口和默认 `280px` 或最小 `264px` 侧栏宽度下仍可能被截断,可调宽 DSH 侧栏。详见[兼容性记录](docs/compatibility.md)。
|
|
129
|
+
|
|
130
|
+
## 开发
|
|
131
|
+
|
|
132
|
+
见 [docs/development.md](docs/development.md)、[CONTRIBUTING.md](CONTRIBUTING.md) 与 [AGENTS.md](AGENTS.md)。
|
|
133
|
+
|
|
134
|
+
## 许可证
|
|
135
|
+
|
|
136
|
+
[Apache License 2.0](LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Host activation for the DSH bundle. Add default config under `config:`;
|
|
2
|
+
# users override it in their DSH settings.
|
|
3
|
+
- insert:
|
|
4
|
+
- id: dsh-better-left-sidebar
|
|
5
|
+
name: dsh-better-left-sidebar
|
|
6
|
+
config:
|
|
7
|
+
animation: standard
|
|
8
|
+
expansion: hover
|
|
9
|
+
brandPosition: navigation-top
|
|
10
|
+
globalNavigationPosition: rail
|
|
11
|
+
toolsPosition: rail-bottom
|
package/icon.svg
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="background" x1="14" y1="12" x2="114" y2="118" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#2469F5"/>
|
|
5
|
+
<stop offset=".52" stop-color="#1D4FBA"/>
|
|
6
|
+
<stop offset="1" stop-color="#112448"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect x="4" y="4" width="120" height="120" rx="30" fill="url(#background)"/>
|
|
10
|
+
|
|
11
|
+
<rect x="69" y="28" width="36" height="70" rx="11" fill="#7899CA" opacity=".72"/>
|
|
12
|
+
<path d="M75 42h20M75 53h23M75 64h18M75 75h22" fill="none" stroke="#DCE8FA" stroke-linecap="round" stroke-width="3" opacity=".92"/>
|
|
13
|
+
|
|
14
|
+
<rect x="21" y="27" width="57" height="71" rx="12" fill="#F8FAFF"/>
|
|
15
|
+
<path d="M39.5 34v57" stroke="#DCE4F0" stroke-linecap="round" stroke-width="1.5"/>
|
|
16
|
+
|
|
17
|
+
<circle cx="30" cy="43" r="3.8" fill="#2563EB"/>
|
|
18
|
+
<circle cx="30" cy="61" r="3.7" fill="#9AA9BE"/>
|
|
19
|
+
<circle cx="30" cy="78" r="3.7" fill="#9AA9BE"/>
|
|
20
|
+
|
|
21
|
+
<rect x="44" y="36" width="29" height="13" rx="5.5" fill="#2563EB"/>
|
|
22
|
+
<path d="M48 42.5h20" fill="none" stroke="#BBD3FA" stroke-linecap="round" stroke-width="2.5"/>
|
|
23
|
+
<path d="M46 61h21M46 78h18" fill="none" stroke="#8998AF" stroke-linecap="round" stroke-width="3"/>
|
|
24
|
+
</svg>
|