dsh-yanfield 0.1.2 → 0.1.4
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.en.md +24 -23
- package/README.md +7 -4
- package/dist/client.js +280 -105
- package/dist/host.js +4084 -690
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +12 -6
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Manuscript, outline, world notes and an AI assistant on one desk.<br>
|
|
10
10
|
Your book stays local, the model is the DeepSeek you already configured, and every AI edit is reviewed by you.
|
|
11
11
|
|
|
12
|
-
[](#install)
|
|
13
13
|
[](https://nodejs.org)
|
|
14
14
|
[](https://github.com/ZzimaR/dsh-yanfield/releases/latest)
|
|
15
15
|
[](LICENSE)
|
|
@@ -19,26 +19,27 @@ Your book stays local, the model is the DeepSeek you already configured, and eve
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
> [!NOTE]
|
|
22
|
-
> Yanfield is still being polished; UI and behavior will keep changing. Bugs and ideas are welcome in [Issues](https://github.com/ZzimaR/dsh-yanfield/issues) — the Bug report / Feature request forms (with environment and steps) get fixed faster. Pull requests are welcome too.
|
|
22
|
+
> Yanfield is still being polished; UI and behavior will keep changing. Bugs and ideas are welcome in [Issues](https://github.com/ZzimaR/dsh-yanfield/issues/new/choose) — the Bug report / Feature request forms (with environment and steps) get fixed faster. Pull requests are welcome too.
|
|
23
23
|
|
|
24
|
-
[](docs/screenshots/en-editor.png)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
The three-pane writing desk in DeepSeek Harness — chapter tree, prose, and the AI assistant side by side. All UI labels in these screenshots are English; the manuscripts shown are the bundled Chinese demo books (create a new book to write in English).
|
|
27
27
|
|
|
28
28
|
<p align="center"><sub>Three-column writing desk · sample manuscript · click for full size</sub></p>
|
|
29
29
|
|
|
30
30
|
## What this plugin is
|
|
31
31
|
|
|
32
|
-
Yanfield is a **DeepSeek Harness plugin**, not a standalone app. After installation a
|
|
32
|
+
Yanfield is a **DeepSeek Harness plugin**, not a standalone app. After installation a **Yanfield** entry (「砚田」 when the interface is Chinese) appears in the Harness sidebar; opening it gives you a long-form writing desk rendered inside the panel.
|
|
33
33
|
|
|
34
34
|
- **Writing desk** — novels / volumes / chapters, three columns (outline · prose · AI), autosave, word counts, focus mode, adjustable typography, and two themes (rice-paper light, night-sail dark).
|
|
35
35
|
- **Notes at hand** — chapter blueprints, characters, world settings, foreshadowing and story archives live in the left rail, edited in place without leaving the page.
|
|
36
36
|
- **AI proposes, you decide** — the assistant reads your notes, works in several steps, and proposes prose and note changes; prose is reviewed paragraph by paragraph (green insertions, red deletions) and only what you keep is written into the manuscript.
|
|
37
|
-
- **Local first** — manuscript, notes and conversations live in a local SQLite file; the model comes from the DeepSeek service you already configured in Harness, so there is no second API key to manage.
|
|
37
|
+
- **Local first** — manuscript, notes and conversations live in a local SQLite file; the model comes from the DeepSeek service you already configured in Harness, so there is no second API key to manage. The bundled sample books are Chinese demo manuscripts, included to show the workflow; create a new book to write in English.
|
|
38
|
+
- **English and Chinese** — the interface follows the Harness language (`Settings → General → Language`): the sidebar entry and every screen switch between 砚田 and Yanfield. Manuscripts are never translated, and the AI replies in the language you write in.
|
|
38
39
|
|
|
39
40
|
## Install
|
|
40
41
|
|
|
41
|
-
Requires DeepSeek Harness `>=0.2.1-rc.5
|
|
42
|
+
Requires DeepSeek Harness `>=0.2.1-rc.5`. Choose the command for your profile to install the prebuilt package from [npm](https://www.npmjs.com/package/dsh-yanfield).
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
45
|
# Web
|
|
@@ -54,14 +55,14 @@ For offline installation, download `dsh-yanfield.tgz` from [GitHub Releases](htt
|
|
|
54
55
|
|
|
55
56
|
How to confirm it worked:
|
|
56
57
|
|
|
57
|
-
1. a
|
|
58
|
-
2. Check the version and build time in
|
|
58
|
+
1. a **Yanfield** entry appears in the left sidebar;
|
|
59
|
+
2. Check the version and build time in `Yanfield → Settings → About`. The build time comes from the bundle.
|
|
59
60
|
|
|
60
61
|
To update, run `dsh plugin --profile <profile> add dsh-yanfield@latest` in the same profile and restart Harness. To roll back, replace `@latest` with the desired version, such as `@0.1.1`. This also switches an existing GitHub install to npm.
|
|
61
62
|
|
|
62
63
|
## First run
|
|
63
64
|
|
|
64
|
-
1. Open
|
|
65
|
+
1. Open **Yanfield** from the sidebar and click **New book** on the shelf (title, genre, cover color, one-line pitch).
|
|
65
66
|
2. Open the novel and click **Write** to enter the three-column desk.
|
|
66
67
|
3. Type into the AI box on the right, e.g. "make the first paragraph more vivid, only the first paragraph", "draft a blueprint for the next chapter", "create a character card for Zhou Wan".
|
|
67
68
|
4. Prose edits open in a review view: keep or revert each paragraph, then press **Confirm review** — only kept paragraphs are written. Note changes are confirmed item by item in the task card.
|
|
@@ -78,7 +79,7 @@ Both real routes can be switched in Settings; an unavailable route explains why
|
|
|
78
79
|
|
|
79
80
|
## Features
|
|
80
81
|
|
|
81
|
-

|
|
82
|
+

|
|
82
83
|
|
|
83
84
|
**Writing**
|
|
84
85
|
|
|
@@ -104,35 +105,35 @@ Both real routes can be switched in Settings; an unavailable route explains why
|
|
|
104
105
|
- After writing, the assistant proposes note candidates backed by the text — it only fills blanks, never overwrites your facts
|
|
105
106
|
- Save frequently used instructions as prompt presets; the toolbar AI menu collects quick tasks
|
|
106
107
|
|
|
107
|
-

|
|
108
108
|
|
|
109
109
|
## AI and cost
|
|
110
110
|
|
|
111
111
|
- **Models** — by default the DeepSeek account already signed in to Harness; you can switch to an official API key. Both routes live in `Settings → Model services` with availability and reasons.
|
|
112
|
-
- **
|
|
113
|
-
- **Balance** — the
|
|
112
|
+
- **Catalog** — `deepseek-flash` (DeepSeek-V4.1-Flash, text and images) and `deepseek-v4-pro` (DeepSeek-V4-Pro, text only), roughly 1M tokens of context each; new models registered in Harness are synced automatically.
|
|
113
|
+
- **Balance** — the **Balance** button under the composer queries the signed-in DSH account, no key needed.
|
|
114
114
|
- **Cost** — the footer shows *today's* cumulative estimate, not a single task. Unit prices come from a built-in DeepSeek price table and switch between peak and off-peak by Beijing time (peak: weekdays 09:00–12:00 and 14:00–18:00; everything else, including weekends and public holidays, is off-peak at half price). **Estimates only — the DeepSeek bill is authoritative.**
|
|
115
|
-
- **Built-in thrift** — decision rounds skip deep thinking, short polishes drop a tier, small edits skip the note-
|
|
115
|
+
- **Built-in thrift** — decision rounds skip deep thinking, short polishes drop a tier, small edits skip the note-organizing pass, and oversized tool results are truncated with paging hints. A single-paragraph polish usually costs well under a cent; a blueprint task costs a few cents.
|
|
116
116
|
|
|
117
117
|
## Screenshots
|
|
118
118
|
|
|
119
|
-
|
|
|
119
|
+
| Bookshelf (English UI) | Writing desk (English UI) |
|
|
120
120
|
| --- | --- |
|
|
121
|
-
| [](docs/screenshots/en-library.png) | [](docs/screenshots/en-editor.png) |
|
|
122
122
|
|
|
123
|
-
More: [model services](docs/screenshots/settings
|
|
123
|
+
More: [model services](docs/screenshots/en-settings.png) · [Chinese screenshots](docs/screenshots/library.png) · [screenshot notes](docs/screenshots/README.md)
|
|
124
124
|
|
|
125
125
|
## Data and backup
|
|
126
126
|
|
|
127
127
|
- Manuscripts live in `$DSH_HOME/yanfield/yanfield.db` (plus `-wal` / `-shm`). `Settings → Data` shows the real path and can open the folder.
|
|
128
128
|
- Set `YANFIELD_DB_PATH` to select a database file. If the profile's `cordis.patch.yml` sets the plugin's `dataDir`, its `yanfield.db` takes precedence.
|
|
129
129
|
- Backup: quit Harness first, then copy the whole directory (copying SQLite while it runs can give an inconsistent snapshot).
|
|
130
|
+
- Before upgrading the database schema, Yanfield creates a full snapshot in the same folder. If the backup fails, the upgrade stops. After a successful upgrade, Yanfield keeps the three most recent automatic upgrade backups.
|
|
130
131
|
- Removing the plugin does not delete your manuscript; the database stays where it is.
|
|
131
132
|
|
|
132
133
|
## Troubleshooting
|
|
133
134
|
|
|
134
135
|
<details>
|
|
135
|
-
<summary>No
|
|
136
|
+
<summary>No **Yanfield** entry in the sidebar</summary>
|
|
136
137
|
|
|
137
138
|
Make sure you fully quit and restarted Harness (a page refresh is not enough), then check `Settings → Plugins` that `dsh-yanfield` is enabled and at the version you just installed.
|
|
138
139
|
</details>
|
|
@@ -140,19 +141,19 @@ Make sure you fully quit and restarted Harness (a page refresh is not enough), t
|
|
|
140
141
|
<details>
|
|
141
142
|
<summary>"no API key" / model unavailable</summary>
|
|
142
143
|
|
|
143
|
-
The active route is the official API key route but no key is stored. Switch the route back to "DeepSeek account" in
|
|
144
|
+
The active route is the official API key route but no key is stored. Switch the route back to "DeepSeek account" in `Yanfield → Settings → Model services`, or store `DEEPSEEK_API_KEY` on Harness' model page.
|
|
144
145
|
</details>
|
|
145
146
|
|
|
146
147
|
<details>
|
|
147
148
|
<summary>Balance shows a dash or says not signed in</summary>
|
|
148
149
|
|
|
149
|
-
Balance comes from the DeepSeek account signed in to Harness. Sign in there first, then press
|
|
150
|
+
Balance comes from the DeepSeek account signed in to Harness. Sign in there first, then press **Balance** again.
|
|
150
151
|
</details>
|
|
151
152
|
|
|
152
153
|
<details>
|
|
153
154
|
<summary>Cost always says unknown</summary>
|
|
154
155
|
|
|
155
|
-
That request returned no usage (for example it was interrupted), or the model is not in the built-in price table and no unit price is configured in `Settings → AI
|
|
156
|
+
That request returned no usage (for example it was interrupted), or the model is not in the built-in price table and no unit price is configured in `Settings → AI & context`. Fill in the three prices to get an estimate.
|
|
156
157
|
</details>
|
|
157
158
|
|
|
158
159
|
<details>
|
|
@@ -183,7 +184,7 @@ npm test # build dist/, check the manifest and run smoke tests
|
|
|
183
184
|
```bash
|
|
184
185
|
client/ plugin half: Shadow DOM mount, slot registration, style entry
|
|
185
186
|
src/host.ts host half: REST/SSE routes under /yanfield, model and account bridge
|
|
186
|
-
|
|
187
|
+
src/yanfield/ the desk itself (React components, domain logic, SQLite access)
|
|
187
188
|
scripts/ build, check, smoke, reinstall
|
|
188
189
|
docs/ features, AI and cost, architecture, development, FAQ
|
|
189
190
|
```
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
正文、大纲、设定与 AI 助手,在同一张书桌上。<br>
|
|
10
10
|
书稿留在本地,模型用你已配好的 DeepSeek,AI 的改动由你逐段审阅。
|
|
11
11
|
|
|
12
|
-
[](#安装)
|
|
13
13
|
[](https://nodejs.org)
|
|
14
14
|
[](https://github.com/ZzimaR/dsh-yanfield/releases/latest)
|
|
15
15
|
[](LICENSE)
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
> [!NOTE]
|
|
22
|
-
> 砚田还在打磨中,界面与行为会继续调整。遇到问题、有想法,欢迎在 [Issues](https://github.com/ZzimaR/dsh-yanfield/issues) 里说——用「Bug 报告 / 功能建议」模板带上环境与复现步骤会快很多;也欢迎直接提 PR
|
|
22
|
+
> 砚田还在打磨中,界面与行为会继续调整。遇到问题、有想法,欢迎在 [Issues](https://github.com/ZzimaR/dsh-yanfield/issues/new/choose) 里说——用「Bug 报告 / 功能建议」模板带上环境与复现步骤会快很多;也欢迎直接提 PR。目前项目由我一人维护,难免有疏漏,感谢你的理解与包涵~ 也欢迎随时反馈问题。
|
|
23
23
|
|
|
24
24
|
[](docs/screenshots/yanfield-in-dsh.gif)
|
|
25
25
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
砚田是一个 **DeepSeek Harness 插件**,不是独立应用:安装后 Harness 左侧导航会出现「砚田」,点开就是一个跑在面板里的长篇写作台。
|
|
33
33
|
|
|
34
|
+
界面跟随 DSH 的语言设置(设置 → 通用 → 语言):DSH 用英文时,侧栏显示 **Yanfield**,工作台、AI 面板与设置页也全部切换为英文;中文界面保持原样。书稿内容不会被翻译,AI 用你写作的语言回复。
|
|
35
|
+
|
|
34
36
|
- **写作台**:作品 / 卷 / 章三级结构,三栏布局(目录 · 正文 · AI),自动保存、字数统计、专注模式、排版可调、宣纸 / 夜航双主题。
|
|
35
37
|
- **资料随写随查**:章纲、设定、角色、伏笔、故事档案都在左栏,浮窗就地编辑,不离开正文。
|
|
36
38
|
- **AI 改稿,作者做主**:AI 读资料、多步执行,提出正文与资料改动;正文逐段对比(绿色新增、红色删除),你决定保留哪几段,确认后才写进书稿。
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
|
|
39
41
|
## 安装
|
|
40
42
|
|
|
41
|
-
需要 DeepSeek Harness `>=0.2.1-rc.5
|
|
43
|
+
需要 DeepSeek Harness `>=0.2.1-rc.5`。按你启动的 profile 选择下面一条命令,安装 [npm](https://www.npmjs.com/package/dsh-yanfield) 上的预构建包。
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
46
|
# Web 版
|
|
@@ -127,6 +129,7 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
127
129
|
- 书稿默认在 `$DSH_HOME/yanfield/yanfield.db`(含 `-wal` / `-shm` 附属文件)。`设置 → 数据` 会显示实际路径并能一键打开所在文件夹。
|
|
128
130
|
- 用环境变量 `YANFIELD_DB_PATH` 可指定数据库文件。若 profile 的 `cordis.patch.yml` 配置了插件的 `dataDir`,优先使用该目录里的 `yanfield.db`。
|
|
129
131
|
- 备份:先退出 Harness,再复制整个目录(运行中直接复制 SQLite 可能拿到不一致的快照)。
|
|
132
|
+
- 数据库结构升级前,砚田会在同一目录创建整库快照。备份失败时会停止升级。升级成功后保留最近三份自动升级备份。
|
|
130
133
|
- 卸载插件不会删除书稿;数据库仍在上面那个路径里。
|
|
131
134
|
|
|
132
135
|
## 排障
|
|
@@ -183,7 +186,7 @@ npm test # 构建 dist/,再运行清单检查与冒烟测试
|
|
|
183
186
|
```bash
|
|
184
187
|
client/ 插件半区:Shadow DOM 挂载、插槽注册、样式入口
|
|
185
188
|
src/host.ts 宿主半区:/yanfield 下的 REST/SSE 路由、模型与账号桥接
|
|
186
|
-
|
|
189
|
+
src/yanfield/ 写作台本体(React 组件、领域逻辑、SQLite 访问)
|
|
187
190
|
scripts/ 构建、自检、冒烟、重装
|
|
188
191
|
docs/ 功能、AI 与费用、架构、开发、常见问题
|
|
189
192
|
```
|