dsh-yanfield 0.1.8 → 0.1.10
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 +9 -6
- package/README.md +9 -6
- package/dist/client.js +94 -94
- package/dist/host.js +1190 -501
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -73,9 +73,10 @@ Where the model comes from (`Settings → Model services`):
|
|
|
73
73
|
| --- | --- | --- |
|
|
74
74
|
| DSH account sign-in | Signed in to DeepSeek inside Harness | Recommended, zero setup, balance readable |
|
|
75
75
|
| Official API key | `DEEPSEEK_API_KEY` | Pay per token; can also be stored on Harness' model page |
|
|
76
|
+
| Custom DSH model | Configure the API under Settings → Models in DSH | Connects to LM Studio, vLLM, or llama.cpp |
|
|
76
77
|
| Offline demo | Nothing | Template text only, for trying the UI; cannot really edit |
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
Pick a model in Yanfield's Model services or in the writing assistant. Models are grouped by DSH route.
|
|
79
80
|
|
|
80
81
|
## Features
|
|
81
82
|
|
|
@@ -108,7 +109,7 @@ Both real routes can be switched in Settings; an unavailable route explains why
|
|
|
108
109
|
|
|
109
110
|
## AI and cost
|
|
110
111
|
|
|
111
|
-
- **Models** —
|
|
112
|
+
- **Models** — models from all available DSH routes appear in both `Settings → Model services` and the writing assistant. See [AI and cost](docs/en/ai-and-cost.md) for LM Studio, vLLM, and llama.cpp setup.
|
|
112
113
|
- **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
114
|
- **Balance** — the **Balance** button under the composer queries the signed-in DSH account, no key needed.
|
|
114
115
|
- **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.**
|
|
@@ -126,7 +127,9 @@ More: [model services](docs/screenshots/en-settings.png) · [Chinese screenshots
|
|
|
126
127
|
|
|
127
128
|
- Manuscripts live in `$DSH_HOME/yanfield/yanfield.db` (plus `-wal` / `-shm`). `Settings → Data` shows the real path and can open the folder.
|
|
128
129
|
- 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
|
-
-
|
|
130
|
+
- In **Settings → Data → Export backup**, download a `.yanfield` file. Select books to back up their manuscripts, story notes, and AI history. A full backup also includes global settings, presets, model service configuration, and statistics.
|
|
131
|
+
- Use **Import backup** to preview the file and import copies. With a full backup, you can also **Restore full library**. Yanfield creates a `yanfield-before-restore-*.db` snapshot in the data folder first. To roll back, quit Harness, replace the current database with that snapshot, and move the current database’s matching `-wal` and `-shm` files out of the folder.
|
|
132
|
+
- Full exports omit model service API keys by default. Select **Encrypt the backup and include model service API keys** to transfer keys stored in Yanfield. Set up Harness-managed accounts and credentials separately on the destination.
|
|
130
133
|
- 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.
|
|
131
134
|
- Removing the plugin does not delete your manuscript; the database stays where it is.
|
|
132
135
|
|
|
@@ -141,7 +144,7 @@ Make sure you fully quit and restarted Harness (a page refresh is not enough), t
|
|
|
141
144
|
<details>
|
|
142
145
|
<summary>"no API key" / model unavailable</summary>
|
|
143
146
|
|
|
144
|
-
The
|
|
147
|
+
The selected model uses the official API key route, which needs a credential. Pick a model in the DeepSeek account group in Yanfield or enter the API key under Settings → Models in DSH.
|
|
145
148
|
</details>
|
|
146
149
|
|
|
147
150
|
<details>
|
|
@@ -159,7 +162,7 @@ That request returned no usage (for example it was interrupted), or the model is
|
|
|
159
162
|
<details>
|
|
160
163
|
<summary>Where is my manuscript / how do I move it</summary>
|
|
161
164
|
|
|
162
|
-
See
|
|
165
|
+
See “Data and backup” above. Export a full backup and restore it on the new machine.
|
|
163
166
|
</details>
|
|
164
167
|
|
|
165
168
|
<details>
|
|
@@ -201,7 +204,7 @@ See [development](docs/en/development.md) for the build chain and local testing,
|
|
|
201
204
|
|
|
202
205
|
## Credits
|
|
203
206
|
|
|
204
|
-
The interface and domain logic come from [Yanfield](https://github.com/ZzimaR/Yanfield). This
|
|
207
|
+
The interface and domain logic come from [Yanfield](https://github.com/ZzimaR/Yanfield). This DeepSeek Harness plugin edition uses the model services and light or dark theme configured in Harness.
|
|
205
208
|
|
|
206
209
|
## License
|
|
207
210
|
|
package/README.md
CHANGED
|
@@ -74,9 +74,10 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
74
74
|
| --- | --- | --- |
|
|
75
75
|
| DSH 账号登录 | 在 Harness 里登录 DeepSeek | 推荐,零配置;余额可直接查 |
|
|
76
76
|
| 官方 API Key | `DEEPSEEK_API_KEY` | 按量计费;也可在 DSH 的模型服务页填写 |
|
|
77
|
+
| DSH 自定义模型 | 在 DSH 的「设置 → 模型」中配置 API | 可接入 LM Studio、vLLM 或 llama.cpp |
|
|
77
78
|
| 离线演示 | 不需要 | 只有模板文本,用于试用界面,不能真正改稿 |
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
在砚田的「模型服务」或写作助手中直接选择模型。模型按 DSH 路由分组。
|
|
80
81
|
|
|
81
82
|
## 功能
|
|
82
83
|
|
|
@@ -110,7 +111,7 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
110
111
|
|
|
111
112
|
## AI 与费用
|
|
112
113
|
|
|
113
|
-
-
|
|
114
|
+
- **模型**:`设置 → 模型服务` 和写作助手的模型列表同时显示 DSH 各路由中的可用模型。LM Studio、vLLM 和 llama.cpp 的配置方式见 [AI 与费用](docs/ai-and-cost.md)。
|
|
114
115
|
- **模型目录**:`deepseek-flash`(DeepSeek-V4.1-Flash,支持文本与图像)与 `deepseek-v4-pro`(DeepSeek-V4-Pro,纯文本),上下文各约 100 万 token;Harness 新增模型时会自动同步进选择器。
|
|
115
116
|
- **余额**:输入框底部的「余额」直接查 DSH 已登录账号的余额,不需要填 Key。
|
|
116
117
|
- **费用**:底部「今日 N tok · 预估 ¥X」是**今日累计**的估算,不是单次任务;单价由插件内置的 DeepSeek 官方价目表提供,按北京时间自动区分高峰与空闲(高峰为工作日 9:00–12:00、14:00–18:00,其余时段与法定节假日按空闲计,空闲价是高峰价的一半)。**估算仅供参考,账单以 DeepSeek 官方为准。**
|
|
@@ -128,7 +129,9 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
128
129
|
|
|
129
130
|
- 书稿默认在 `$DSH_HOME/yanfield/yanfield.db`(含 `-wal` / `-shm` 附属文件)。`设置 → 数据` 会显示实际路径并能一键打开所在文件夹。
|
|
130
131
|
- 用环境变量 `YANFIELD_DB_PATH` 可指定数据库文件。若 profile 的 `cordis.patch.yml` 配置了插件的 `dataDir`,优先使用该目录里的 `yanfield.db`。
|
|
131
|
-
-
|
|
132
|
+
- 在 **设置 → 数据 → 导出备份** 下载 `.yanfield` 文件。可以选择作品,备份正文、设定、资料和 AI 历史,也可以整库备份,额外带走全局设置、预设、模型服务配置和统计。
|
|
133
|
+
- 在 **导入备份** 预览文件并导入作品副本。只有整库备份可用来 **恢复整库**,恢复前砚田会在数据目录保存一份 `yanfield-before-restore-*.db`。需要回退时,退出 Harness,再用该快照替换当前数据库文件,并移走当前库的同名 `-wal` 和 `-shm` 文件。
|
|
134
|
+
- 整库导出默认省略模型服务 API Key。请勾选 **加密备份并包含模型服务 API Key** 来迁移砚田保存的密钥。Harness 管理的账号与凭据需要在目标环境分别配置。
|
|
132
135
|
- 数据库结构升级前,砚田会在同一目录创建整库快照。备份失败时会停止升级。升级成功后保留最近三份自动升级备份。
|
|
133
136
|
- 卸载插件不会删除书稿;数据库仍在上面那个路径里。
|
|
134
137
|
|
|
@@ -143,7 +146,7 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
143
146
|
<details>
|
|
144
147
|
<summary>发消息报 no API key / 模型不可用</summary>
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
当前选的是「DeepSeek 官方 API Key」路由下的模型,但还没有填 Key。在砚田选择「DeepSeek 账号登录」分组下的模型,或在 DSH 的「设置 → 模型」填写 API Key。
|
|
147
150
|
</details>
|
|
148
151
|
|
|
149
152
|
<details>
|
|
@@ -161,7 +164,7 @@ dsh plugin --profile desktop add dsh-yanfield
|
|
|
161
164
|
<details>
|
|
162
165
|
<summary>书稿在哪 / 换电脑怎么迁</summary>
|
|
163
166
|
|
|
164
|
-
|
|
167
|
+
见上面「数据与备份」。换机器时导出整库备份,在目标环境导入并恢复。
|
|
165
168
|
</details>
|
|
166
169
|
|
|
167
170
|
<details>
|
|
@@ -203,7 +206,7 @@ English docs: [README.en.md](README.en.md) · [docs/en/](docs/en/features.md)
|
|
|
203
206
|
|
|
204
207
|
## 致谢
|
|
205
208
|
|
|
206
|
-
界面与领域逻辑来自 [砚田 Yanfield](https://github.com/ZzimaR/Yanfield)。本仓库是它的 DeepSeek Harness
|
|
209
|
+
界面与领域逻辑来自 [砚田 Yanfield](https://github.com/ZzimaR/Yanfield)。本仓库是它的 DeepSeek Harness 插件化版本,复用 Harness 的模型服务和明暗主题。
|
|
207
210
|
|
|
208
211
|
## 许可
|
|
209
212
|
|