dsh-pdf-mineru 0.0.6 → 0.0.8
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 +41 -0
- package/README.md +44 -37
- package/lib/client.js +4 -62
- package/lib/client.js.map +1 -1
- package/lib/index.js +1886 -10328
- package/lib/types/client/index.d.ts +1 -3
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/config.d.ts +1 -1
- package/lib/types/domain/request.d.ts +10 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/providers/http-client.d.ts +63 -0
- package/lib/types/providers/official-v4.d.ts +1 -0
- package/lib/types/providers/retry.d.ts +1 -2
- package/lib/types/providers/self-hosted-v2.d.ts +1 -0
- package/lib/types/service/mineru-service.d.ts +6 -42
- package/lib/types/service/request-normalizer.d.ts +1 -2
- package/lib/types/service/result-presenter.d.ts +122 -0
- package/lib/types/storage/maintenance-service.d.ts +8 -16
- package/lib/types/storage/process-lock.d.ts +6 -5
- package/lib/types/storage/result-repository.d.ts +3 -1
- package/lib/types/tools.d.ts +12 -3
- package/lib/types/utils/crypto.d.ts +5 -0
- package/package.json +28 -27
- package/lib/types/service/batch-coordinator.d.ts +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Refactored model tool surface to decoupled, specialized single-document tools: `read_pdf` (synchronous reading with page slicing via `pages`, content focus filtering via `focus`, and reading-order multimodal figure inlining) and `async_parse_pdf` (native background parsing with document structure summary).
|
|
8
|
+
- Enforced single `file_path` across tools, pipeline, Zod schema, and SettingsPage, removing multi-file parameters (`file_paths`) and `maxFilesPerRequest` limit while preserving underlying provider batch primitives.
|
|
9
|
+
- Completely decoupled proprietary MinerU parameters (`model`, `ocr`, `formula`, `table`, `language`, `artifacts`, `max_inline_images`) from tool arguments; always request all artifacts from providers for permanent local caching.
|
|
10
|
+
- Replaced markdown preview fields with full `markdown_content` and authoritative `content_status` (`complete`, `partial`, `not_requested`), featuring fair character budget allocation, clean paragraph-boundary truncation, and resume line offsets for partial deliveries.
|
|
11
|
+
- Enhanced `pages` parsing to flexibly accept single numbers, number arrays, and range strings (e.g. `"1-3, 5"`); added `focus` filtering based on cached `content_list.json` with graceful fallback to Markdown.
|
|
12
|
+
- Strictly ordered inline images by natural document reading order, linked to page selection, bound markdown captions, and eliminated rigid image quotas.
|
|
13
|
+
- Re-architected model output and tool descriptions to strict Plain Text English with zero emoji, eliminating hallucinated guidance references to deprecated fields.
|
|
14
|
+
- Decoupled document presentation, outline (TOC) extraction, character budget allocation, and prose formatting from `MinerUService` into dedicated `src/service/result-presenter.ts`.
|
|
15
|
+
- Consolidated shared HTTP request pipelines, timeout management, error body diagnostics, and retry policies into `src/providers/http-client.ts`, eliminating duplicate logic across official and self-hosted providers.
|
|
16
|
+
- Upgraded `self-hosted-v2` multipart streaming to Node 22 native `FormData` and `openAsBlob`, removing third-party `form-data` package dependency.
|
|
17
|
+
- Replaced hand-rolled streaming JSON parser in `safe-zip` with standard V8 `JSON.parse`, and standardized delay timers across all modules using `node:timers/promises`.
|
|
18
|
+
- Adopted scoped locking (`withLock`) across mutating storage operations (`clearCache`, `commitTransaction`, `quarantine`) with contention backoff, eliminating startup lifetime lock holding to allow concurrent multi-process initialization.
|
|
19
|
+
- Eliminated self-inflicted read-only (`0o400`/`0o500`) permission cycles in `result-repository`, streamlining cache cleanup and quarantine deletions.
|
|
20
|
+
- Modernized single-process storage lock (`ProcessLock`) to use atomic file creation (`flag: 'wx'`) with cross-platform dead PID reclamation, retiring abstract Unix sockets and Windows named pipes.
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
- Removed `mineru_health` from the model-facing tool surface, keeping it strictly as an internal loopback RPC probe for the Web GUI.
|
|
25
|
+
- Removed obsolete batch coordination (`batch-coordinator.ts`, `batchViewSchema`) in favor of unified `ResultView`.
|
|
26
|
+
|
|
27
|
+
## 0.0.7
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Set the minimum supported DeepSeek Harness baseline to `>=0.1.2-rc.1` and adopted an RC-only support policy, declaring compatibility exclusively for Release Candidate and stable releases of DSH while dropping legacy alpha testbed branches.
|
|
32
|
+
- Unified all `@deepseek-ai/dsh-*` devDependencies and peerDependencies to `^0.1.2-rc.1`, aligned Cordis packages (`@deepseek-ai/cordis@^4.0.2`, `cordis-plugin-include@^1.0.7`, `cordis-plugin-loader@^1.0.3`, `schemastery@^3.18.2`), and declared `engines.dsh: ">=0.1.2-rc.1"`.
|
|
33
|
+
- Removed the misleading `settings.plugin.item` branch in the browser client and standardized on a dedicated top-level `settings.section` for comprehensive Provider configuration, credential management, and storage maintenance.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Added `isConcurrencySafe: () => true` to all model-facing tools (`mineru_health`, `mineru_parse_document`, and `mineru_submit_parse_job`) so parallel tool calls and multi-document parsing within a single turn can execute concurrently in the DSH agent loop without serial blocking.
|
|
38
|
+
- Added structured `output.presentationMeta` to `mineru_health`, `mineru_parse_document`, and `mineru_submit_parse_job` for clean session event metadata persistence and decoupled tool-card presentation.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Enhanced existing-shell GUI verification script (`verify-current-gui.mjs`) with resilience against unhandled core shell errors during web test harness runs.
|
|
43
|
+
|
|
3
44
|
## 0.0.6
|
|
4
45
|
|
|
5
46
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="./docs/assets/deepseek-mineru-banner.
|
|
3
|
+
<img src="./docs/assets/deepseek-mineru-banner.webp" width="100%" alt="DeepSeek 娘与 MinerU 文档解析插件横幅">
|
|
4
4
|
|
|
5
5
|
# dsh-pdf-mineru
|
|
6
6
|
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
支持 **MinerU 官方云 (v4)** 与 **私有化自建服务 (v2)**,为 AI Agent 提供高精度的文档版面分析、公式与表格提取、图文解析,原生支持后台异步任务与智能缓存。
|
|
10
10
|
|
|
11
11
|
<p>
|
|
12
|
+
<a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="Awesome DSH Plugin"></a>
|
|
12
13
|
<a href="https://www.npmjs.com/package/dsh-pdf-mineru"><img src="https://img.shields.io/npm/v/dsh-pdf-mineru?style=flat-square&label=npm&color=CB3837" alt="npm version"></a>
|
|
13
|
-
<a href="./package.json"><img src="https://img.shields.io/badge/Node.js-%3E%
|
|
14
|
-
<img src="https://img.shields.io/badge/DSH
|
|
14
|
+
<a href="./package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22.19.0-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js 22.19.0 or newer"></a>
|
|
15
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.1.2--rc.1%20(RC%20only)-111827?style=flat-square" alt="DSH >=0.1.2-rc.1 (RC only)">
|
|
15
16
|
<img src="https://img.shields.io/badge/MinerU-Official%20v4%20%7C%20Self--hosted%20v2-2563EB?style=flat-square" alt="MinerU v2 and v4">
|
|
16
17
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="MIT License"></a>
|
|
17
18
|
</p>
|
|
@@ -34,6 +35,13 @@
|
|
|
34
35
|
|
|
35
36
|
## 🚀 快速开始
|
|
36
37
|
|
|
38
|
+
### 0. 环境要求与版本兼容说明
|
|
39
|
+
|
|
40
|
+
> ⚠️ **重要版本声明与环境要求**:
|
|
41
|
+
> - **最低支持的 DSH 版本**:`>= 0.1.2-rc.1`。
|
|
42
|
+
> - **仅支持 RC 版本**:本插件**只会对 DeepSeek Harness 的 RC(Release Candidate)版本及后续正式发布版本进行官方支持**。由于早期 `alpha` 测试版本包含较多实验性且剧烈变动的内部 API,本插件不再对 `alpha` 等非稳定测试版本提供兼容与维护支持。
|
|
43
|
+
> - **运行环境要求**:Node.js `^22.19.0 || >=24.0.0`,包管理器推荐 `pnpm@11+`。
|
|
44
|
+
|
|
37
45
|
### 1. 安装插件
|
|
38
46
|
|
|
39
47
|
在 DeepSeek Harness 环境中一键安装:
|
|
@@ -49,7 +57,7 @@ dsh plugin --profile web add dsh-pdf-mineru
|
|
|
49
57
|
打开 DSH 界面中的 **Settings → Plugins → MinerU**,根据您的使用场景选择 Provider:
|
|
50
58
|
|
|
51
59
|
<p align="center">
|
|
52
|
-
<img src="./docs/assets/mineru-settings-preview.
|
|
60
|
+
<img src="./docs/assets/mineru-settings-preview.webp" width="780" alt="dsh-pdf-mineru 在 DSH Settings 中的设置界面">
|
|
53
61
|
</p>
|
|
54
62
|
|
|
55
63
|
#### 方案 A:使用 MinerU 官方云(推荐,免部署)
|
|
@@ -77,44 +85,45 @@ Agent 会自动根据文档长度和指令意图,智能选择同步返回或
|
|
|
77
85
|
|
|
78
86
|
### 场景 1:常规论文 / 报告解析
|
|
79
87
|
> **你**:“帮我解析 `/workspace/paper.pdf`,提取正文、数学公式和表格,整理成 Markdown 格式。”
|
|
80
|
-
> **Agent**:调用 `
|
|
88
|
+
> **Agent**:调用 `read_pdf`,直接返回排版好的 Markdown 文本与关键内联图表。
|
|
81
89
|
|
|
82
|
-
### 场景 2
|
|
90
|
+
### 场景 2:超长文档后台全量解析(推荐)
|
|
83
91
|
> **你**:“请在后台解析这本 120 页的技术研报 `/data/annual-report.pdf`,解析完成后告诉我。”
|
|
84
|
-
> **Agent**:提交 `
|
|
85
|
-
|
|
86
|
-
### 场景 3:指定页码与扫描件 OCR
|
|
87
|
-
> **你**:“解析 `/data/scanned_doc.pdf` 的第 1 到 5 页,这个是扫描件,请开启强制 OCR 模式。”
|
|
88
|
-
> **Agent**:传入 `pages: "1-5"` 与 `ocr: true` 进行精准定向识别。
|
|
89
|
-
|
|
90
|
-
### 场景 4:检查服务状态
|
|
91
|
-
> **你**:“检查一下当前 MinerU 服务的连接状态和剩余队列。”
|
|
92
|
-
> **Agent**:调用 `mineru_health`,回报服务连通性、鉴权状态与排队情况。
|
|
92
|
+
> **Agent**:提交 `async_parse_pdf` 并返回任务 ID(如 `mineru-1`),全量解析到本地缓存,完成后返回文档结构化摘要(页数、大纲、表格数、图片数等),并提示使用 `read_pdf` 按需读取。
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
### 场景 3:按需切片读取(指定页码与关注内容)
|
|
95
|
+
> **你**:“读取 `/data/report.pdf` 的第 1 到 5 页中的表格。”
|
|
96
|
+
> **Agent**:调用 `read_pdf` 并传入 `pages: "1-5"` 与 `focus: "table"` 进行精准定向提取。
|
|
95
97
|
|
|
96
98
|
## ⚙️ 模型工具与参数参考
|
|
97
99
|
|
|
98
|
-
插件为 Agent
|
|
100
|
+
插件为 Agent 注册了两项核心文档解析工具:
|
|
99
101
|
|
|
100
102
|
| 工具名称 | 适用场景 | 说明 |
|
|
101
103
|
| --- | --- | --- |
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
|
|
104
|
+
| `read_pdf` | 同步读取 / 按需切片 | 同步读取 PDF,支持指定页码(`pages`)与内容类型(`focus`)切片提取,返回 Markdown 文本与按自然顺序排列的内联多模态图表 |
|
|
105
|
+
| `async_parse_pdf` | 长篇文档 / 后台解析 | 注册为 DSH 原生后台任务(`mineru-N`),全量解析 PDF 至本地缓存,完成后交付文档结构化摘要与后续阅读指引,不阻塞当前对话 |
|
|
106
|
+
|
|
107
|
+
### 核心交付字段与正文状态说明
|
|
108
|
+
|
|
109
|
+
调用 `read_pdf` 或后台任务 `async_parse_pdf` 完成后,交付结果包含可靠的正文与完整性判定:
|
|
110
|
+
|
|
111
|
+
- `markdown_content`:提取的正文 Markdown 文本。
|
|
112
|
+
- `content_status`:正文交付状态:
|
|
113
|
+
- `complete`:本次请求所选页面的提取 Markdown 已完整提供,可直接用于回答,无需重复读取正文文件。
|
|
114
|
+
- `partial`:提取正文存在但因输出预算截断,提供可读取的完整正文文件路径 (`markdown_path`) 及续读起始行号 (`read_offset_line`),明确区分正文文件与结果清单 (`manifest_path`)。
|
|
115
|
+
- `not_requested`:本次请求未包含 `markdown` 产物。
|
|
116
|
+
- `output.maxInlineChars`:单次响应的整次字符预算(默认 200,000 字符),优先保障元信息与正文展示。
|
|
105
117
|
|
|
106
118
|
### 常用解析参数(均可通过自然语言告知 Agent)
|
|
107
119
|
|
|
108
|
-
| 参数 | 类型 |
|
|
120
|
+
| 参数 | 类型 | 适用工具 | 作用说明 |
|
|
109
121
|
| --- | --- | --- | --- |
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `pages` | `string` | 全部 | 1-based 页码范围,例如 `"1-10,15"` |
|
|
116
|
-
| `language` | `string` | `"ch"` | 语言提示代码(如 `ch` 中文、`en` 英文等) |
|
|
117
|
-
| `artifacts` | `string[]` | `["markdown"]` | 需要提取保留的产物类型:`markdown`、`images`、`layout`、`content-list` |
|
|
122
|
+
| `file_path` | `string` | 全部 | 待解析/读取的本地文件路径(必填) |
|
|
123
|
+
| `pages` | `number` / `string` / `number[]` | `read_pdf` | 1-based 页码选择,支持单页(如 `3`)、数组(如 `[1, 2, 5]`)或范围字符串(如 `"1-3, 5"`) |
|
|
124
|
+
| `focus` | `string` / `string[]` | `read_pdf` | 关注内容类型:`all`(默认全部)、`text`(正文代码公式)、`table`(表格与表题)、`image`(图表与图题) |
|
|
125
|
+
| `inline_images` | `boolean` | `read_pdf` | 是否直接内联多模态图表(模型路由支持图片时默认开启) |
|
|
126
|
+
| `poll_timeout_ms` | `number` | `read_pdf` | 最大同步等待超时毫秒数 |
|
|
118
127
|
|
|
119
128
|
---
|
|
120
129
|
|
|
@@ -122,14 +131,12 @@ Agent 会自动根据文档长度和指令意图,智能选择同步返回或
|
|
|
122
131
|
|
|
123
132
|
```mermaid
|
|
124
133
|
flowchart LR
|
|
125
|
-
Agent[DSH Agent] -->
|
|
126
|
-
Agent -->
|
|
127
|
-
Agent --> Async[mineru_submit_parse_job]
|
|
134
|
+
Agent[DSH Agent] --> Sync[read_pdf]
|
|
135
|
+
Agent --> Async[async_parse_pdf]
|
|
128
136
|
|
|
129
137
|
Async --> Jobs[DSH JobRegistry]
|
|
130
138
|
Jobs --> Service[MinerUService]
|
|
131
139
|
Sync --> Service
|
|
132
|
-
Health --> Providers[ProviderRegistry]
|
|
133
140
|
|
|
134
141
|
Service --> Cache{Result cache}
|
|
135
142
|
Cache -->|hit| Result[Immutable result]
|
|
@@ -143,7 +150,7 @@ flowchart LR
|
|
|
143
150
|
Publish --> Result
|
|
144
151
|
```
|
|
145
152
|
|
|
146
|
-
- **统一工具分发**:Agent 发起的同步请求(`
|
|
153
|
+
- **统一工具分发**:Agent 发起的同步请求(`read_pdf`)直接返回结果,异步长任务(`async_parse_pdf`)交由 DSH 原生 JobRegistry 调度。
|
|
147
154
|
- **智能缓存命中**:每次解析计算文件 SHA-256 与参数指纹,若命中缓存则秒级返回不可变产物。
|
|
148
155
|
- **并发请求合并**:同进程内的并发重复请求由 `SharedOperationRegistry` 合并,避免重复向上游提交。
|
|
149
156
|
- **双 Provider 适配**:上游适配自建 FastAPI v2 或官方云 v4,解析产物经校验后原子发布。
|
|
@@ -183,7 +190,6 @@ defaults:
|
|
|
183
190
|
ocr: false
|
|
184
191
|
formula: true
|
|
185
192
|
table: true
|
|
186
|
-
artifacts: [markdown]
|
|
187
193
|
```
|
|
188
194
|
|
|
189
195
|
### 2. 本地私有化 (Self-hosted v2) 推荐配置
|
|
@@ -203,7 +209,6 @@ defaults:
|
|
|
203
209
|
ocr: false
|
|
204
210
|
formula: true
|
|
205
211
|
table: true
|
|
206
|
-
artifacts: [markdown]
|
|
207
212
|
```
|
|
208
213
|
|
|
209
214
|
### 3. 存储与限制自定义(可选)
|
|
@@ -211,8 +216,9 @@ defaults:
|
|
|
211
216
|
storage:
|
|
212
217
|
storageRoot: /absolute/path/to/dsh/cache/pdf-mineru # 默认在 $DSH_HOME/cache/pdf-mineru
|
|
213
218
|
cacheEnabled: true
|
|
219
|
+
output:
|
|
220
|
+
maxInlineChars: 200000 # 单次响应最大内联字符预算(UTF-16 字符)
|
|
214
221
|
limits:
|
|
215
|
-
maxFilesPerRequest: 1
|
|
216
222
|
maxFileBytes: 209715200 # 200 MB
|
|
217
223
|
```
|
|
218
224
|
|
|
@@ -292,4 +298,5 @@ MINERU_API_KEY=<token> pnpm run smoke:official-v4 -- /path/to/sample.pdf
|
|
|
292
298
|
- 感谢 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供的卓越插件体系。
|
|
293
299
|
- 感谢 [OpenDataLab MinerU](https://github.com/opendatalab/MinerU) 提供的文档解析能力。
|
|
294
300
|
- 感谢 [Huanlin/dsh-plugin-mineru](https://github.com/HuanLinOTO/dsh-plugin-mineru) 带来的早期设计灵感。
|
|
301
|
+
- 本插件已被 [Awesome DeepSeek Harness Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 社区精选列表收录([收录详情页](https://awesome-dsh-plugin.com/p/Yurzi/dsh-pdf-mineru))。
|
|
295
302
|
- Banner 图像中的 DeepSeek 鲸鱼娘形象由上善无形原创角色与 ZipZipPipe 二创设计衍生,遵循 [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans) 许可。
|
package/lib/client.js
CHANGED
|
@@ -486,13 +486,6 @@ window.__ModuleLoader__.load({
|
|
|
486
486
|
}
|
|
487
487
|
//#endregion
|
|
488
488
|
//#region src/client/SettingsPage.tsx
|
|
489
|
-
const ALL_ARTIFACT_KINDS = [
|
|
490
|
-
"markdown",
|
|
491
|
-
"layout",
|
|
492
|
-
"model-output",
|
|
493
|
-
"content-list",
|
|
494
|
-
"images"
|
|
495
|
-
];
|
|
496
489
|
const PROVIDER_TYPES = ["self-hosted-v2", "official-v4"];
|
|
497
490
|
function ensureProviderProfiles(config) {
|
|
498
491
|
const providers = [...config.providers];
|
|
@@ -735,15 +728,6 @@ window.__ModuleLoader__.load({
|
|
|
735
728
|
const credentialLocked = credentialView?.writable === false;
|
|
736
729
|
const credentialInputDisabled = saving || credentialBusy || activeCredentialRef === void 0 || !credentialStateReady || credentialLocked;
|
|
737
730
|
const credentialPlaceholder = credentialView?.configured === true ? t("credential.placeholderStored") : t("credential.placeholderEmpty");
|
|
738
|
-
const toggleArtifact = (kind) => {
|
|
739
|
-
const current = draft.defaults.artifacts;
|
|
740
|
-
let next;
|
|
741
|
-
if (current.includes(kind)) {
|
|
742
|
-
if (kind === "markdown") return;
|
|
743
|
-
next = current.filter((k) => k !== kind);
|
|
744
|
-
} else next = [...current, kind];
|
|
745
|
-
setDraft((prev) => prev === null ? prev : updateConfigSection(prev, "defaults", { artifacts: next }));
|
|
746
|
-
};
|
|
747
731
|
const toggleOfficialModel = (model) => {
|
|
748
732
|
if (activeProvider.type !== "official-v4") return;
|
|
749
733
|
const current = activeProvider.models;
|
|
@@ -1162,24 +1146,6 @@ window.__ModuleLoader__.load({
|
|
|
1162
1146
|
children: t("field.defaultTable")
|
|
1163
1147
|
})]
|
|
1164
1148
|
})]
|
|
1165
|
-
}),
|
|
1166
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1167
|
-
className: classMap.field,
|
|
1168
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1169
|
-
className: classMap.fieldLabel,
|
|
1170
|
-
children: t("field.defaultArtifacts")
|
|
1171
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1172
|
-
className: classMap.checkboxGroup,
|
|
1173
|
-
children: ALL_ARTIFACT_KINDS.map((kind) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1174
|
-
className: classMap.checkboxOption,
|
|
1175
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1176
|
-
type: "checkbox",
|
|
1177
|
-
checked: draft.defaults.artifacts.includes(kind),
|
|
1178
|
-
disabled: kind === "markdown",
|
|
1179
|
-
onChange: () => toggleArtifact(kind)
|
|
1180
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`artifact.${kind}`) })]
|
|
1181
|
-
}, kind))
|
|
1182
|
-
})]
|
|
1183
1149
|
})
|
|
1184
1150
|
]
|
|
1185
1151
|
}),
|
|
@@ -1379,20 +1345,9 @@ window.__ModuleLoader__.load({
|
|
|
1379
1345
|
className: classMap.groupTitle,
|
|
1380
1346
|
children: t("section.limits")
|
|
1381
1347
|
}),
|
|
1382
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1348
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1383
1349
|
className: classMap.row,
|
|
1384
|
-
children:
|
|
1385
|
-
className: classMap.field,
|
|
1386
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1387
|
-
className: classMap.fieldLabel,
|
|
1388
|
-
children: t("field.maxFilesPerRequest")
|
|
1389
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1390
|
-
className: classMap.input,
|
|
1391
|
-
type: "number",
|
|
1392
|
-
value: draft.limits.maxFilesPerRequest,
|
|
1393
|
-
onChange: (e) => setDraft((prev) => prev === null ? prev : updateConfigSection(prev, "limits", { maxFilesPerRequest: Number(e.target.value) }))
|
|
1394
|
-
})]
|
|
1395
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1350
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1396
1351
|
className: classMap.field,
|
|
1397
1352
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1398
1353
|
className: classMap.fieldLabel,
|
|
@@ -1403,7 +1358,7 @@ window.__ModuleLoader__.load({
|
|
|
1403
1358
|
value: draft.limits.maxFileBytes,
|
|
1404
1359
|
onChange: (e) => setDraft((prev) => prev === null ? prev : updateConfigSection(prev, "limits", { maxFileBytes: Number(e.target.value) }))
|
|
1405
1360
|
})]
|
|
1406
|
-
})
|
|
1361
|
+
})
|
|
1407
1362
|
}),
|
|
1408
1363
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1409
1364
|
className: classMap.row,
|
|
@@ -1530,7 +1485,6 @@ window.__ModuleLoader__.load({
|
|
|
1530
1485
|
"field.defaultLang": "Default Language",
|
|
1531
1486
|
"field.defaultFormula": "Enable Formula Extraction",
|
|
1532
1487
|
"field.defaultTable": "Enable Table Extraction",
|
|
1533
|
-
"field.defaultArtifacts": "Default Required Artifacts",
|
|
1534
1488
|
"field.storageRoot": "Storage Root Directory",
|
|
1535
1489
|
"field.cacheEnabled": "Enable Global Cache",
|
|
1536
1490
|
"field.stagingTtlMs": "Staging Cleanup TTL (ms)",
|
|
@@ -1542,7 +1496,6 @@ window.__ModuleLoader__.load({
|
|
|
1542
1496
|
"field.retryBaseDelayMs": "Base Retry Delay (ms)",
|
|
1543
1497
|
"field.retryMaxDelayMs": "Maximum Retry Delay (ms)",
|
|
1544
1498
|
"field.maxInlineChars": "Max Inline Markdown Chars",
|
|
1545
|
-
"field.maxFilesPerRequest": "Max Files Per Request",
|
|
1546
1499
|
"field.maxFileBytes": "Max File Bytes",
|
|
1547
1500
|
"field.maxApiResponseBytes": "Max API Response Bytes",
|
|
1548
1501
|
"field.maxZipDownloadBytes": "Max ZIP Download Bytes",
|
|
@@ -1648,7 +1601,6 @@ window.__ModuleLoader__.load({
|
|
|
1648
1601
|
"field.defaultLang": "默认语言",
|
|
1649
1602
|
"field.defaultFormula": "开启公式解析",
|
|
1650
1603
|
"field.defaultTable": "开启表格解析",
|
|
1651
|
-
"field.defaultArtifacts": "默认必要产物",
|
|
1652
1604
|
"field.storageRoot": "持久存储根目录",
|
|
1653
1605
|
"field.cacheEnabled": "启用全局内容寻址缓存",
|
|
1654
1606
|
"field.stagingTtlMs": "Staging 暂存清理 TTL (ms)",
|
|
@@ -1659,8 +1611,7 @@ window.__ModuleLoader__.load({
|
|
|
1659
1611
|
"field.retryMaxAttempts": "最大尝试次数",
|
|
1660
1612
|
"field.retryBaseDelayMs": "基础重试延迟 (ms)",
|
|
1661
1613
|
"field.retryMaxDelayMs": "最大重试延迟 (ms)",
|
|
1662
|
-
"field.maxInlineChars": "Markdown
|
|
1663
|
-
"field.maxFilesPerRequest": "单次请求最大文件数",
|
|
1614
|
+
"field.maxInlineChars": "Markdown 内联字符上限",
|
|
1664
1615
|
"field.maxFileBytes": "单个源文件大小上限 (bytes)",
|
|
1665
1616
|
"field.maxApiResponseBytes": "API 响应体大小上限 (bytes)",
|
|
1666
1617
|
"field.maxZipDownloadBytes": "ZIP 下载包大小上限 (bytes)",
|
|
@@ -1748,15 +1699,6 @@ window.__ModuleLoader__.load({
|
|
|
1748
1699
|
rpc: connection.rpc,
|
|
1749
1700
|
credentials: ctx.remote.credentials
|
|
1750
1701
|
});
|
|
1751
|
-
if (ctx.slots.spec?.("settings.plugin.item") !== void 0) {
|
|
1752
|
-
ctx.slots.inject("settings.plugin.item", () => ctx.slots.register({
|
|
1753
|
-
name: "settings.plugin.item",
|
|
1754
|
-
key: NS,
|
|
1755
|
-
locale: NS,
|
|
1756
|
-
inject: injected
|
|
1757
|
-
}, SettingsPage));
|
|
1758
|
-
return;
|
|
1759
|
-
}
|
|
1760
1702
|
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
1761
1703
|
name: "settings.section",
|
|
1762
1704
|
id: NS,
|