dsh-hanmo 0.0.0-stage → 1.7.7
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/CHANGELOG.md +53 -0
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/README.zh-CN.md +84 -0
- package/THIRD_PARTY_NOTICES.md +46 -0
- package/client.editor.js +56 -0
- package/client.js +6282 -0
- package/cordis.patch.yml +3 -0
- package/docs/theme-cards.png +0 -0
- package/icon.svg +1 -0
- package/index.js +152 -0
- package/locale/en.json +1 -0
- package/locale/zh.json +1 -0
- package/package.json +83 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.7.7
|
|
4
|
+
|
|
5
|
+
Published to npm as the unscoped package `dsh-hanmo`, so `npm i dsh-hanmo` works. The plugin id changes from `@xiaonerner0821/dsh-hanmo` to `dsh-hanmo`.
|
|
6
|
+
|
|
7
|
+
## 1.7.6
|
|
8
|
+
|
|
9
|
+
First version published to npm as `@xiaonerner0821/dsh-hanmo`, by the release
|
|
10
|
+
workflow on a version tag (GitHub Actions, provenance signed).
|
|
11
|
+
|
|
12
|
+
- The stats row under the composer takes one opaque tone from the theme, so Edge
|
|
13
|
+
and Firefox paint the same chip and text scrolling behind never shows through.
|
|
14
|
+
- The conversation header's halo no longer reaches the tool and reasoning rows in
|
|
15
|
+
the transcript.
|
|
16
|
+
- Selecting inline code that wraps no longer stacks a full-height highlight band
|
|
17
|
+
on every line.
|
|
18
|
+
- File preview: the address bar has extension badges, a raised active tab, and a
|
|
19
|
+
breadcrumb path that copies the whole path on click.
|
|
20
|
+
|
|
21
|
+
## 1.0.0
|
|
22
|
+
|
|
23
|
+
First public release. Earlier builds (1.9.x) were private and shipped as
|
|
24
|
+
`@local/magpie-sidebar`.
|
|
25
|
+
|
|
26
|
+
- Sidebar: outlined tiles with a cyan glow, a selection that slides between rows on a spring, a comet trace on New Session.
|
|
27
|
+
- Main panel: glass composer, a stats chip and a separate context-meter chip.
|
|
28
|
+
- Colour themes: Han (default), One Dark Pro, Dracula, Monokai, Night Owl, Solarized and GitHub. Each is also registered with DSH's theme service, so it appears in Settings > General.
|
|
29
|
+
- Appearance popover in the session header: theme, light/dark, UI and code fonts, font sizes, text colour (per theme) and panel opacity.
|
|
30
|
+
- File preview tab in the main panel with Shiki highlighting and a diff toolbar.
|
|
31
|
+
- File editor in the preview tab built on CodeMirror 6: syntax highlighting, search (Ctrl+F), undo history, Tab/Shift+Tab indent, Ctrl+S save. It loads on first edit from `client.editor.js` and falls back to a plain textarea if that file cannot load.
|
|
32
|
+
|
|
33
|
+
### Changes from the private builds
|
|
34
|
+
|
|
35
|
+
- Package renamed to `@xiaonerner0821/dsh-hanmo`; the DOM marker is now `data-hanmo`.
|
|
36
|
+
- localStorage keys moved from `creator-skin:*` / `magpie-sidebar:*` to `hanmo:*`. On first load, settings saved by a private build (theme, fonts, text colour, panel opacity, diff options) are copied to the new keys. The old keys are left untouched.
|
|
37
|
+
- Disable or remove `@local/magpie-sidebar` before enabling this package: both register the same theme ids and restyle the same sidebar.
|
|
38
|
+
|
|
39
|
+
## 1.0.2
|
|
40
|
+
|
|
41
|
+
- Preview mode: fenced code blocks inside rendered Markdown are now highlighted by the same CodeMirror 6 parser used in 源码 and 编辑 modes. Shiki stays as the fallback and keeps its banner and copy button; the CodeMirror layer replaces only the coloured `<pre>` and re-applies automatically as content streams in.
|
|
42
|
+
- Editor and preview syntax colours now follow the active theme via CSS variables (`--shiki-token-*`), with per-token fallbacks for Han and DSH's default palette.
|
|
43
|
+
- 源码 mode uses a read-only CodeMirror view (synchronous highlighting, theme-aware selection) instead of a Shiki CodeBlock.
|
|
44
|
+
- Text selection inside the file panel is correctly preserved; the conversation-column rounded-selection effect no longer bleeds into the file view.
|
|
45
|
+
- Editor source moved into `editor/` in this repository; `npm run build:editor` rebuilds `client.editor.js`.
|
|
46
|
+
- The sidebar build marker (`data-hanmo`) now reports 1.0.2.
|
|
47
|
+
|
|
48
|
+
## 1.0.1
|
|
49
|
+
|
|
50
|
+
- Appearance popover: added font-weight controls for body text and code (four steps: 300 · 400 · 500 · 600). The selection is persisted in `hanmo:look` and migrates forward with all other look settings.
|
|
51
|
+
- New **DeepSeek Harness** entry in the theme picker (also in Settings > General): one click returns DSH to its unthemed look. It lifts the sidebar and main-panel skins, Han's dark palette, the text-colour, opacity and weight layers, and resets the fonts and sizes to DSH's built-in stack; the sizes come back when you leave it. The appearance button, the Settings row and the file preview tab stay, so switching back is one click. The plugin's own controls hide while it is active.
|
|
52
|
+
- Fixed: the body-text weight now reaches assistant replies. DSH's Markdown wrapper and table cells set the `font` shorthand, which reset the inherited weight to 400, so only text outside Markdown changed. Table header cells keep their own heavier weight.
|
|
53
|
+
- The sidebar build marker (`data-hanmo`) now reports 1.0.1.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xiaonerner0821
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Hanmo 翰墨
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An appearance plugin for the [DeepSeek Harness](https://www.npmjs.com/package/@deepseek-ai/dsh) (DSH) Web UI.
|
|
4
|
+
|
|
5
|
+
[中文说明](./README.zh-CN.md)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
Full 33-second film: [hanmo-daynight.mp4](https://github.com/xiaonerner0821/dsh-hanmo/releases/download/v1.4.0/hanmo-daynight.mp4)
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Sidebar**: each nav row is an outlined tile with a soft cyan glow. One selection shape per list slides between rows on a spring. New Session carries a comet trace.
|
|
16
|
+
- **Main panel**: a glass composer, a stats chip and a separate context-meter chip.
|
|
17
|
+
- **Colour themes**: Han (the default look), **DeepSeek Harness**, One Dark Pro, Dracula, Monokai, Night Owl, Solarized, GitHub, **深海 (Deep Sea)** (looking down into the water: cyan to deep blue, sunlight breaking into shafts at the surface, bubbles rising from below), **沙滩 (Beach)** (clear sky, turquoise sea, a line of surf, warm sand — the foam is noise-built, so no two stretches match), **晚霞 (Afterglow)** (the sky after sundown: in light, deep blue down to mid-sky, then violet and dusty mauve into a coral horizon, with scattered cirrus wisps and light text; in dark, sampled from a photo, magenta-violet through hot rose into orange at the horizon, under a field of broken clouds lit from below), **朝阳 (Sunrise)** (the mirror of Sunset: the sun at the top, warm first light cooling down to clear morning blue; dark is the blue hour, its dawn glow reaching the farthest corner of the window) and **落日 (Sunset)**, whose sidebar is one continuous sunset sky from zenith to horizon (golden hour in light, dusk in dark). **天色 (Daylight)** follows the real sky: the city comes from the browser's time zone, the sun's altitude from the clock, and the tone of the gradient moves through dawn, day, dusk and night (no sun is drawn, only the tone changes), with the theme turning light at sunrise and dark at sunset. The **Time of day** switch under Gradient sky works for every sky: on by default for 天色, off for the others, where it keeps your light / dark choice and only lifts the sky by day, dims it at night and warms the horizon around sunrise and sunset; its card shows the current phase, today's sunrise and sunset, and a strip of today's sky. The **Gradient sky** switches in the appearance popover and Settings > General put a sky on the sidebar and / or the main panel for every theme; other themes paint theirs from their own palette, cool zenith through rose to a warm horizon. A **wallpaper** of your own can be set in the same places: main panel only, or across the whole window, with a veil slider that keeps text readable. Each theme recolours the UI, the sidebar, code highlighting and the comet. Themes are also registered with DSH's own theme service, so they appear in **Settings > General** as well.
|
|
18
|
+
**DeepSeek Harness** is the unthemed look: DSH exactly as it appears without this plugin. It lifts every skin and override (sidebar tiles, dark palette, fonts, sizes, weights, text colour, panel opacity) and leaves the appearance button, the Settings row and the file preview tab in place, so you can switch back.
|
|
19
|
+
- **Goal bar fold**: a fold button on the goal bar above the composer folds it to a small pill; the full goal stays in its tooltip, and the choice is remembered.
|
|
20
|
+
- **Queued message fold**: each message queued above the composer while a turn runs (scheduled reminders included) can fold to a single line, full text in its tooltip.
|
|
21
|
+
- **Appearance popover** in the session header: theme, light/dark/system, UI and code fonts, font sizes, body text weight and code weight, body text colour (remembered per theme) and panel opacity. **Reset** returns everything to Han.
|
|
22
|
+
- **File preview tab** next to Conversation / Trajectory, with Shiki highlighting, a sticky tab bar and a diff toolbar. Opening a diff opens the right panel without closing a sidebar that is already open.
|
|
23
|
+
- **HTML preview**: .html / .htm files render as a page in the file preview (with Source, Edit and Refresh). The page runs in an isolated sandbox: scripts run, but cannot reach DSH's session, storage or API. Stylesheets, scripts and images it references are loaded with it, and files it reads at run time by relative path (a Markdown article, images, audio) are fetched on its behalf, inside the working directory only and never dot files.
|
|
24
|
+
- **Web links over the main panel**: a web link from the conversation opens DSH's own browser tab laid over the main panel (from the conversation column to the window edge); switching to another sidebar tab or closing the browser restores the layout. Needs DSH's built-in Browser plugin enabled and Settings > General > link opening set to the in-app sidebar.
|
|
25
|
+
- **Offline**: no CDN requests. The Latin subsets of Inter and Geist Mono are embedded; Chinese text uses locally installed fonts.
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- DSH `0.2.1-rc.x` with the Web UI (`dsh web`). Tested on `0.2.1-rc.5`.
|
|
30
|
+
- A Chromium-based browser (Chrome, Edge). The styles use `color-mix()` and `backdrop-filter`.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
From npm, in DSH: open **Settings > Plugins** and install the package `dsh-hanmo`, or ask the agent to install that bundle. Refresh the page afterwards.
|
|
35
|
+
|
|
36
|
+
From a local checkout:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
git clone https://github.com/xiaonerner0821/dsh-hanmo.git
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then install the bundle from the local path (the installation spec is `link:<absolute path to the checkout>`). Edits to `client.js` take effect on the next page refresh; there is no build step.
|
|
43
|
+
|
|
44
|
+
To confirm it loaded, run this in the browser console. It prints the plugin version:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
document.querySelector('[data-hanmo]').dataset.hanmo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Optional fonts
|
|
51
|
+
|
|
52
|
+
Themes list their preferred fonts first and fall back to what is installed, so nothing breaks without them. For the intended look, install:
|
|
53
|
+
|
|
54
|
+
| Theme | Fonts |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| Han | HarmonyOS Sans SC |
|
|
57
|
+
| One Dark Pro, Dracula | Fira Code |
|
|
58
|
+
| Night Owl | Victor Mono (Operator Mono is also listed, if you own a licence) |
|
|
59
|
+
| Solarized | Source Code Pro |
|
|
60
|
+
| GitHub | Mona Sans, Monaspace Neon |
|
|
61
|
+
|
|
62
|
+
Restart the browser after installing a font so it is picked up.
|
|
63
|
+
|
|
64
|
+
## Known limits
|
|
65
|
+
|
|
66
|
+
- Hanmo styles DSH's Web UI from the outside. A few selectors match DSH's generated class names (for example `JObwrW_root` on the context meter), so a DSH update can break part of the look until the plugin is updated. File an issue with your DSH version if something looks wrong.
|
|
67
|
+
- DSH only persists its built-in light/dark/system preference. At page load it paints that scheme first, so a colour theme can flash for one frame before it is applied.
|
|
68
|
+
- While an Hanmo theme is active, DSH's own Light / Dark / System buttons in Settings show no selection. Use the plugin's popover or its row in Settings.
|
|
69
|
+
- The themes exist only while the plugin is enabled. Disabling it returns DSH to its built-in scheme.
|
|
70
|
+
- **DeepSeek Harness** restores DSH's look, not a pristine profile: the appearance button, the Settings row and the file preview tab stay visible. To remove those too, disable the plugin.
|
|
71
|
+
- **DeepSeek Harness** clears the font families and sizes it can reach. Setting files the font choice to `''` makes DSH use its own built-in stack; if you had set a custom family in DSH's Settings yourself, that value is overwritten.
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm run check # syntax check of client.js and index.js
|
|
77
|
+
npm run build:fonts # re-embed the Inter / Geist Mono subsets (downloads from unpkg)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`client.js` is a single plain-JavaScript module loaded by DSH's client module loader. It uses React through `React.createElement` and DSH's slot, theme and conversation services.
|
|
81
|
+
|
|
82
|
+
## Licence
|
|
83
|
+
|
|
84
|
+
MIT, see [LICENSE](./LICENSE). Credits for adapted code, colour themes and embedded fonts are in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# 翰墨 Hanmo
|
|
2
|
+
|
|
3
|
+
[DeepSeek Harness](https://www.npmjs.com/package/@deepseek-ai/dsh)(DSH)Web 界面的外观插件。
|
|
4
|
+
|
|
5
|
+
[English](./README.md)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
完整宣传片(33 秒):[hanmo-daynight.mp4](https://github.com/xiaonerner0821/dsh-hanmo/releases/download/v1.4.0/hanmo-daynight.mp4)
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## 功能
|
|
14
|
+
|
|
15
|
+
- **侧边栏**:每个导航行都是带青色微光的描边卡片;每个列表只有一个选中框,切换时随弹簧在行间滑动;「新会话」按钮带彗星光效。
|
|
16
|
+
- **主面板**:玻璃质感输入框、统计胶囊,以及单独的上下文用量胶囊。
|
|
17
|
+
- **配色主题**:Han(默认外观)、**DeepSeek Harness**、One Dark Pro、Dracula、Monokai、Night Owl、Solarized、GitHub,**深海**(从水面往下看:青色到深蓝的海水,阳光在水面散开成光柱,气泡从深处升起)、**沙滩**(晴空、碧海、一道浪花线、暖色沙滩,浪花由噪声生成,每段都不一样)、**晚霞**(日落后的余晖:浅色是刚入夜的天,深蓝一直延续到半空,再经蓝紫、灰紫过渡到地平线上的珊瑚粉橙,天上散着细碎的卷云,文字为浅色;深色按实拍照片取色,从洋红紫经玫红转到地平线上的橙色,配一片下沿被照亮的碎云)、以及 **朝阳**(与落日相对:太阳在顶部,天空从暖色晨光往下过渡到清晨的晴空蓝;深色为日出前的蓝调时刻,晨光从太阳一直铺到页面最远的角落)和 **落日**(侧边栏是一整片从天顶到地平线连续渐变的日落天空,浅色为黄金时刻、深色为暮色),还有 **天色**:按浏览器时区推算你所在的城市,用真实时间算出太阳高度,天空的色调从黎明、白天、黄昏到夜晚连续变化(不画太阳,只变色调),日出后自动用浅色、日落后自动用深色。「渐变天空」下方的 **随时间变化** 开关对每套天空都可用:天色默认打开,其他主题默认关闭,打开后保持你选的明暗,只让天空白天偏亮、夜晚偏暗、日出日落时地平线偏暖;开关卡片上会显示当前时段、今天的日出日落时间和一条今天的天色条。外观面板与「设置 > 通用」里的 **渐变天空** 可以把这片天空分别铺到侧边栏和主面板,所有主题都支持:其他主题会用自己的配色画一片从冷色天顶、经玫瑰色到暖色地平线的天空。外观面板和「设置 > 通用」里还可以选 **壁纸**:用你自己的图片做背景,可选只覆盖主面板或同时覆盖侧边栏和主面板,并可调遮罩浓度让文字保持清晰。主题会同时改变界面、侧边栏、代码高亮和彗星颜色,并注册进 DSH 自己的主题服务,所以在 **设置 > 通用** 里也能选。
|
|
18
|
+
**DeepSeek Harness** 就是未安装插件时的原版外观:撤掉本插件全部样式与覆盖(侧边栏卡片、深色配色、字体、字号、字重、正文颜色、面板不透明度),只留外观按钮、设置页那一行和文件预览标签页,方便随时切回来。
|
|
19
|
+
- **目标栏折叠**:输入框上方的目标栏右侧有一个折叠按钮,折叠后收成一个小胶囊,悬停仍能看到完整目标;折叠状态会被记住。
|
|
20
|
+
- **排队消息折叠**:回合进行中排在输入框上方的消息(包括定时提醒),每条都有折叠按钮,折叠后只显示一行,悬停看全文。
|
|
21
|
+
- **外观面板**(会话标题栏):主题、浅色/深色/跟随系统、界面与代码字体、字号、正文与代码字重、正文颜色(每个主题分别记住)、面板不透明度。「恢复默认」会一并回到 Han。
|
|
22
|
+
- **文件预览标签页**:位于「对话」「轨迹」旁边,Shiki 语法高亮、吸顶标签栏、diff 工具栏。点击 diff 会打开右侧面板,但不会关掉已经打开的侧边栏。
|
|
23
|
+
- **HTML 预览**:.html / .htm 文件在文件预览里默认渲染成网页,可切换「源码」「编辑」,并有「刷新」按钮。页面在隔离沙箱里运行,可以执行脚本,但读不到 DSH 的登录状态、存储和接口。同目录引用的样式、脚本、图片会一起载入;页面运行时用相对路径读取的文件(例如加载 Markdown 正文、图片、音频)也会代为读取,仅限当前工作目录内、不含以点开头的文件和目录。
|
|
24
|
+
- **网页链接在主面板打开**:对话里点开网页链接时,DSH 自带的浏览器标签会铺满主面板(对话区到窗口右边缘),切到别的侧边栏标签或关掉浏览器后恢复原样。需要启用 DSH 自带的「浏览器」插件,并在「设置 > 通用 > 网页链接默认打开方式」选「应用内侧边栏」。
|
|
25
|
+
- **离线可用**:不请求任何 CDN。内嵌 Inter 与 Geist Mono 的拉丁字符子集,中文使用本机已安装的字体。
|
|
26
|
+
|
|
27
|
+
## 环境要求
|
|
28
|
+
|
|
29
|
+
- 带 Web 界面(`dsh web`)的 DSH `0.2.1-rc.x`,已在 `0.2.1-rc.5` 上测试。
|
|
30
|
+
- Chromium 内核浏览器(Chrome、Edge)。样式用到了 `color-mix()` 和 `backdrop-filter`。
|
|
31
|
+
|
|
32
|
+
## 安装
|
|
33
|
+
|
|
34
|
+
从 npm 安装:在 DSH 里打开 **设置 > 插件**,安装 `dsh-hanmo`;也可以直接让智能体安装这个 bundle。装好后刷新页面。
|
|
35
|
+
|
|
36
|
+
从本地源码安装:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
git clone https://github.com/xiaonerner0821/dsh-hanmo.git
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
然后按本地路径安装 bundle(安装规格为 `link:<仓库的绝对路径>`)。修改 `client.js` 后刷新页面即生效,不需要构建。
|
|
43
|
+
|
|
44
|
+
确认是否加载成功:在浏览器控制台执行下面这行,会输出插件版本号。
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
document.querySelector('[data-hanmo]').dataset.hanmo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 可选字体
|
|
51
|
+
|
|
52
|
+
主题会把推荐字体放在字体栈最前面,没装就自动用下一个,不影响使用。想要完整效果可以安装:
|
|
53
|
+
|
|
54
|
+
| 主题 | 字体 |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| Han | HarmonyOS Sans SC |
|
|
57
|
+
| One Dark Pro、Dracula | Fira Code |
|
|
58
|
+
| Night Owl | Victor Mono(有授权的话也可装 Operator Mono,字体栈里已列出) |
|
|
59
|
+
| Solarized | Source Code Pro |
|
|
60
|
+
| GitHub | Mona Sans、Monaspace Neon |
|
|
61
|
+
|
|
62
|
+
装完字体后需要重启浏览器才能识别。
|
|
63
|
+
|
|
64
|
+
## 已知局限
|
|
65
|
+
|
|
66
|
+
- 翰墨是从外部给 DSH 界面改样式。少数选择器匹配的是 DSH 生成的类名(例如上下文用量胶囊上的 `JObwrW_root`),DSH 升级后可能有局部样式失效,需要插件跟进。遇到问题请提 issue 并注明 DSH 版本。
|
|
67
|
+
- DSH 只会持久保存它自带的浅色/深色/跟随系统设置。页面加载时会先画出这个配色,所以主题可能闪一帧再生效。
|
|
68
|
+
- 启用翰墨主题时,DSH 设置里自带的「浅色 / 深色 / 跟随系统」按钮不会显示选中状态。请用插件的外观面板,或设置页里插件那一行。
|
|
69
|
+
- 主题只在插件启用期间存在。停用插件后 DSH 回到自带配色。
|
|
70
|
+
- **DeepSeek Harness** 还原的是外观,不是全新的配置:外观按钮、设置页那一行、文件预览标签页仍然存在。连这些也要去掉,请停用插件。
|
|
71
|
+
- **DeepSeek Harness** 会清空它能触及的字体与字号设置:把字体写成空值,让 DSH 用它自带的字体栈;如果你曾在 DSH 设置里自己指定过字体,那个值会被覆盖。
|
|
72
|
+
|
|
73
|
+
## 开发
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm run check # 检查 client.js 与 index.js 语法
|
|
77
|
+
npm run build:fonts # 重新内嵌 Inter / Geist Mono 子集(会从 unpkg 下载)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`client.js` 是一个纯 JavaScript 模块,由 DSH 的客户端模块加载器载入,通过 `React.createElement` 使用 React,并调用 DSH 的插槽、主题与会话服务。
|
|
81
|
+
|
|
82
|
+
## 许可证
|
|
83
|
+
|
|
84
|
+
MIT,见 [LICENSE](./LICENSE)。借鉴的代码、配色主题和内嵌字体的出处与许可见 [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md)。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Hanmo is MIT-licensed (see `LICENSE`). It adapts ideas or code from the
|
|
4
|
+
projects below and embeds two font subsets. Each is listed with its licence
|
|
5
|
+
and copyright line as published upstream.
|
|
6
|
+
|
|
7
|
+
## Code and design
|
|
8
|
+
|
|
9
|
+
| Project | Used for | Licence |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| [yetone/magpie](https://github.com/yetone/magpie) | The spring-driven selection shape that slides between sidebar rows | MIT, Copyright (c) 2026 yetone |
|
|
12
|
+
| [liguobao/dsh-file-viewer](https://github.com/liguobao/dsh-file-viewer) | The pattern for registering a file preview as a `conversation.view` tab | MIT, Copyright (c) 2026 DSH File Viewer contributors |
|
|
13
|
+
| [FAVKTOXIC/dsh-theme-liquid-glass](https://github.com/FAVKTOXIC/dsh-theme-liquid-glass) | The glass composer and its SVG displacement filter | MIT, Copyright (c) 2025 dsh-theme-liquid-glass contributors |
|
|
14
|
+
| [CodeMirror 6](https://codemirror.net/) (`@codemirror/*`, `@lezer/*`, `style-mod`, `w3c-keyname`, `crelt`) | The file editor, bundled into `client.editor.js` | MIT, Copyright (C) 2018-2021 by Marijn Haverbeke and others |
|
|
15
|
+
|
|
16
|
+
## Colour themes
|
|
17
|
+
|
|
18
|
+
The hex values of the bundled themes come from each theme's published colour
|
|
19
|
+
definitions.
|
|
20
|
+
|
|
21
|
+
| Theme | Source | Licence |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| One Dark Pro | [Binaryify/OneDark-Pro](https://github.com/Binaryify/OneDark-Pro) | MIT, Copyright (c) 2013-2022 Binaryify |
|
|
24
|
+
| Dracula | [dracula/visual-studio-code](https://github.com/dracula/visual-studio-code) | MIT, Copyright (c) 2016 Dracula Theme |
|
|
25
|
+
| Monokai, Solarized | [microsoft/vscode](https://github.com/microsoft/vscode) built-in themes | MIT, Copyright (c) 2015 - present Microsoft Corporation |
|
|
26
|
+
| Night Owl | [sdras/night-owl-vscode-theme](https://github.com/sdras/night-owl-vscode-theme) | MIT, Copyright (c) 2018 Sarah Drasner |
|
|
27
|
+
| GitHub | [primer/github-vscode-theme](https://github.com/primer/github-vscode-theme) | MIT, Copyright (c) 2020 Primer |
|
|
28
|
+
|
|
29
|
+
## Embedded fonts
|
|
30
|
+
|
|
31
|
+
`client.js` embeds the Latin and Latin Extended subsets of two variable fonts
|
|
32
|
+
as data URLs (generated by `build-fonts.mjs` from the `@fontsource-variable`
|
|
33
|
+
packages). Both are licensed under the
|
|
34
|
+
[SIL Open Font License 1.1](https://openfontlicense.org/).
|
|
35
|
+
|
|
36
|
+
| Font | Source | Copyright |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| Inter | [rsms/inter](https://github.com/rsms/inter) | Copyright (c) 2016 The Inter Project Authors |
|
|
39
|
+
| Geist Mono | [vercel/geist-font](https://github.com/vercel/geist-font) | Copyright 2026 The Geist Project Authors |
|
|
40
|
+
|
|
41
|
+
## Fonts referenced but not shipped
|
|
42
|
+
|
|
43
|
+
Font stacks also name fonts such as HarmonyOS Sans SC, Fira Code, JetBrains
|
|
44
|
+
Mono, Cascadia Code, Victor Mono, Source Code Pro, Mona Sans and Monaspace Neon.
|
|
45
|
+
Hanmo does not include them; a font that is not installed is skipped and
|
|
46
|
+
the next one in the stack is used.
|