dsh-pdf-mineru 0.0.11 → 0.0.14
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 +66 -0
- package/README.md +29 -21
- package/lib/client.js +185 -29
- package/lib/client.js.map +1 -1
- package/lib/index.js +1881 -346
- package/lib/types/client/SettingsPage.d.ts +1 -1
- package/lib/types/client/helpers.d.ts +3 -1
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/config.d.ts +5 -0
- package/lib/types/domain/request.d.ts +4 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/loopback-rpc.d.ts +8 -0
- package/lib/types/rpc.d.ts +3 -11
- package/lib/types/service/document-index.d.ts +36 -0
- package/lib/types/service/mineru-service.d.ts +19 -0
- package/lib/types/service/page-renderer.d.ts +63 -0
- package/lib/types/service/read-cursor.d.ts +15 -3
- package/lib/types/service/read-delivery.d.ts +28 -0
- package/lib/types/service/result-presenter.d.ts +71 -6
- package/lib/types/tools.d.ts +5 -2
- package/package.json +31 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.14
|
|
4
|
+
|
|
5
|
+
This release includes the bounded-reader work recorded under 0.0.13; the previous published release is 0.0.12.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Kept the continuation cursor explicitly nullable in every read response, including completed selections.
|
|
10
|
+
- Cursor continuations now inherit the caller's image presentation intent; explicit `inline_images` overrides update the next cursor without bypassing current model capabilities or image budgets.
|
|
11
|
+
- Restored reference lists and other supported `list_items` content from cached MinerU results without reparsing, renumbering or fabricating text.
|
|
12
|
+
- Scoped block quality diagnostics to the actual delivered text, including TOC, table, search and continuation selections; document/selection notices are not replayed on every chunk.
|
|
13
|
+
- Recognized known header/footer/page-number/footnote and flat reference blocks instead of emitting misleading unknown-type warnings for them.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added stable structured `diagnostics`, advisory formula `verification_hints`, and `provenance` separating upstream parsing configuration from index/reader versions. Unknown upstream engine versions are explicitly null.
|
|
18
|
+
- Added bounded inline-gap diagnostics and dual-provider offline review-paper regressions; suspect formulas remain unchanged and are never silently repaired.
|
|
19
|
+
- Added explicit `metadata_shortened` markers when quality/provenance metadata cannot fit a small output budget.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Consolidated interim implementation reports into the maintained PDF reading guide and refreshed README/architecture documentation.
|
|
24
|
+
- Reader cursor v3 persists image intent and rejects v1/v2 tokens with a restart instruction. Index v2 reprojects existing immutable artifacts; it does not invalidate parse caches or automatically upload documents.
|
|
25
|
+
|
|
26
|
+
## 0.0.13
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Added stable result-bound block IDs, original figure/table labels, literal document search (`query`), and exact block reading (`block_id`).
|
|
31
|
+
- Added local original-page verification (`view: "page"`) using bounded Poppler processes, private streaming snapshots, source SHA-256 checks, cancellation, and cleanup, without Provider upload.
|
|
32
|
+
- Added nested MinerU span normalization preserving inline mathematics, value-free bounded fidelity diagnostics, and explicit per-chunk visual coverage.
|
|
33
|
+
- Added an opt-in offline built-plugin smoke test (`smoke:reader-local`) and model-workflow regression fixtures.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Default read response budget is now 12,000 UTF-16 units; body chunks are capped at 8,000 units, with an additional 48,000-byte JSON/prose ceiling. Explicit larger response configurations no longer expand individual body chunks.
|
|
38
|
+
- Default reading omits exported cache paths and duplicate TOC metadata. Use `focus: "artifacts"` for exports and `focus: "toc"` for a complete resumable outline.
|
|
39
|
+
- **Reading cursor v2:** projection changes invalidate v1 cursors explicitly; restart without a cursor. Continuations are cache-only and bind selected text plus manifest artifact identity; cache eviction never silently triggers a new upload. Parsed cache manifests and Provider cache semantics are unchanged.
|
|
40
|
+
- Distinguished authoritative page metadata from a content-list lower bound and rejected page filtering that would silently discard unlocated evidence.
|
|
41
|
+
- Clarified that text completion does not guarantee OCR fidelity or image attachment coverage.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Stopped renumbering original figure labels after page selection, and stopped replaying preceding indexed figures on text continuation.
|
|
46
|
+
- Kept complete outlines available instead of silently truncating Markdown fallback headings.
|
|
47
|
+
- Prevented the native renderer from preserving a misleading complete footer after emergency output truncation.
|
|
48
|
+
|
|
49
|
+
## 0.0.12
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- Pruned default configuration values on save via `pruneConfigToDiff` so that unchanged defaults are not written to `settings.yaml`, preventing user configuration bloat.
|
|
54
|
+
- Added automatic startup slimming via `detectBloatedSettingsOps` and `settings.mutate` to clean up legacy bloated default entries from existing `settings.yaml` files.
|
|
55
|
+
- Added page-level "Reset to Defaults" and section-level "Reset" controls in the Web settings UI to easily restore default values.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- Raised the minimum supported DSH version to `0.1.5-rc.2` and aligned DSH runtime peers, development dependencies, and the lockfile with that release. Node.js requirements, Provider configuration, cache formats, and tool arguments are unchanged.
|
|
60
|
+
- Use typed live Agent/session route access for image-capability detection, retaining request-header precedence, Agent-option fallback, and conservative handling of unavailable model metadata.
|
|
61
|
+
- Replace obsolete Host, Tool, and Connection ambient declarations with published types; align client RPC calls and tool schema inference with the rc.2 contracts.
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
- Explicitly inject both `connection` and `webServer` for RPC registration now that Connection no longer requires WebServer. Headless hosts retain both model tools without attempting HTTP route registration.
|
|
66
|
+
- Use a caller-local guarded route registrar to handle Cordis service-getter dependency scoping and enforce loopback-only RPC access independently of the unsupported `authority` argument, while retaining native Connection authentication and response handling.
|
|
67
|
+
- Include required empty `details` in RPC error envelopes so rc.2 clients retain actionable MinerU errors instead of rejecting the wire response.
|
|
68
|
+
|
|
3
69
|
## 0.0.11
|
|
4
70
|
|
|
5
71
|
### Added
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="Awesome DSH Plugin"></a>
|
|
13
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>
|
|
14
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.
|
|
15
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.1.5--rc.2%20(RC%20only)-111827?style=flat-square" alt="DSH >=0.1.5-rc.2 (RC only)">
|
|
16
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">
|
|
17
17
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="MIT License"></a>
|
|
18
18
|
</p>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## ✨ 核心亮点
|
|
27
27
|
|
|
28
|
-
- 📑
|
|
28
|
+
- 📑 **结构化提取与证据定位**:支持双栏正文、目录、LaTeX公式、表格、参考文献与插图;通过搜索、稳定块ID和原页核对检查解析证据,而非假设OCR无损。
|
|
29
29
|
- ☁️ **云端 / 本地自由切换**:支持开箱即用的 **MinerU 官方云 API**(无需本地显卡)与 **私有化自建服务**(数据不出内网),统一工具接口无缝切换。
|
|
30
30
|
- ⚡ **无感后台异步解析**:几十页至数百页的长篇论文或研报,Agent 会自动提交为 DSH 原生后台任务(Native Job),解析期间不阻塞聊天,解析完成后自动提醒。
|
|
31
31
|
- 💾 **智能内容寻址缓存**:基于文件指纹与解析配置自动去重,同一份文档无需重复解析,极大节省 Token、官方 API 额度与计算资源,二次调用秒级响应。
|
|
@@ -38,10 +38,12 @@
|
|
|
38
38
|
### 0. 环境要求与版本兼容说明
|
|
39
39
|
|
|
40
40
|
> ⚠️ **重要版本声明与环境要求**:
|
|
41
|
-
> - **最低支持的 DSH 版本**:`>= 0.1.
|
|
41
|
+
> - **最低支持的 DSH 版本**:`>= 0.1.5-rc.2`。
|
|
42
42
|
> - **仅支持 RC 版本**:本插件**只会对 DeepSeek Harness 的 RC(Release Candidate)版本及后续正式发布版本进行官方支持**。由于早期 `alpha` 测试版本包含较多实验性且剧烈变动的内部 API,本插件不再对 `alpha` 等非稳定测试版本提供兼容与维护支持。
|
|
43
43
|
> - **运行环境要求**:Node.js `^22.19.0 || >=24.0.0`,包管理器推荐 `pnpm@11+`。
|
|
44
44
|
|
|
45
|
+
本次适配从插件 `0.0.12` 起以 DSH `v0.1.5-rc.2` 为基线。升级前请先升级宿主;现有 Provider 配置、缓存格式与工具参数无需因本次 DSH 适配而迁移。Web 设置与维护 RPC 仅在 `connection` 和 `webServer` 同时可用时注册;无 WebServer 的宿主仍可使用两个模型工具,但不提供这些 HTTP RPC。
|
|
46
|
+
|
|
45
47
|
### 1. 安装插件
|
|
46
48
|
|
|
47
49
|
在 DeepSeek Harness 环境中一键安装:
|
|
@@ -104,24 +106,21 @@ Agent 会自动根据文档长度和指令意图,智能选择同步返回或
|
|
|
104
106
|
| `read_pdf` | 同步读取 / 按需切片 | 同步读取 PDF,支持指定页码(`pages`)与内容类型(`focus`)切片提取,返回 Markdown 文本与按自然顺序排列的内联多模态图表 |
|
|
105
107
|
| `async_parse_pdf` | 长篇文档 / 后台解析 | 注册为 DSH 原生后台任务(`mineru-N`),全量解析 PDF 至本地缓存,完成后交付文档结构化摘要与后续阅读指引,不阻塞当前对话 |
|
|
106
108
|
|
|
107
|
-
###
|
|
108
|
-
|
|
109
|
-
`read_pdf` 直接返回阅读结果。`async_parse_pdf` 立即返回原生 `job_id`,完成后通过 `job_output` 提供英文摘要文本,不返回相同的正文结构。阅读结果字段如下:
|
|
109
|
+
### 证据阅读:定位 → 精读 → 续读 → 原页核对
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- `not_requested`:只请求了产物列表等不包含正文的结果。
|
|
116
|
-
- `markdown_path` 是完整原始 Markdown 产物,`manifest_path` 是结果清单。筛选重建的文本不与原始文件行号对应,故不再返回误导性的 `read_offset_line`。
|
|
117
|
-
- `output.maxInlineChars`:单次阅读响应的字符预算(默认 200,000 个 UTF-16 code units),约束 JSON 和 Native 英文文本各自的大小,包括元信息、续读 token 与状态说明。
|
|
118
|
-
- `output.maxInlineImages`:单次 `read_pdf` 响应的内联图片数量预算(默认 6,可配置为 0–100;0 表示全局禁用);图片仍受单图与总字节安全上限约束。
|
|
111
|
+
1. 用 `focus: "toc"` 看目录,或用 `query: "图 7"` 字面检索。空格有意义,“图7”与“图 7”不同。
|
|
112
|
+
2. 用返回的 `block_id` 精读完整块,或用物理页码与focus选择内容。标题块不代表整节。
|
|
113
|
+
3. `content_status: "partial"` 时,以同一file_path和原样cursor继续,不重复pages/focus/block_id/query;结束时cursor为null。
|
|
114
|
+
4. 对关键公式、数值和图表,用 `view: "page"` 回看原页;可传source_sha256作为expected_sha256。
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
**complete只表示所选解析文本交付完成,不保证OCR正确或图像全部展示。** 检查当前块的diagnostics、公式verification_hints及visuals;metadata_shortened表示元数据因预算未完整列出。
|
|
121
117
|
|
|
122
|
-
|
|
118
|
+
- 默认响应预算12,000个UTF-16单元、正文每块最多8,000;JSON和Native文本各最多48,000字节。默认不重复返回缓存路径;导出用focus: artifacts。
|
|
119
|
+
- `inline_images` 首次省略默认true,续读省略继承,显式布尔值覆盖;模型能力和图像预算始终构成上限。
|
|
120
|
+
- **0.0.14使用v3游标,旧v1/v2游标需重新开始;解析缓存无需迁移。** 续读不会在缓存丢失时偷偷重新上传。
|
|
121
|
+
- 原页模式需要Poppler(pdfinfo/pdftoppm)、图像模型、附件服务及大于0的图像预算。它是本地有界执行,不是OS级隔离沙箱。
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
字段语义、完整示例、来源/索引版本、预算、安全边界、错误恢复和离线验收见 **[PDF阅读指南](docs/model-reading.md)**。更新插件后需要让宿主重新加载工具定义;只构建源码或刷新Web页面不等于后端已重载。
|
|
125
124
|
|
|
126
125
|
### 常用解析参数(均可通过自然语言告知 Agent)
|
|
127
126
|
|
|
@@ -130,8 +129,12 @@ Cursor 是无签名、无服务端状态的读取定位 token,不是授权凭
|
|
|
130
129
|
| `file_path` | `string` | 全部 | 待解析/读取的本地文件路径(必填) |
|
|
131
130
|
| `pages` | `number` / `string` / `number[]` | `read_pdf` | 1-based 页码选择,支持单页(如 `3`)、数组(如 `[1, 2, 5]`)或范围字符串(如 `"1-3, 5"`) |
|
|
132
131
|
| `focus` | `string` / `string[]` | `read_pdf` | `all`(默认)、`text`、`table`、`image`、`toc` 或 `artifacts` |
|
|
133
|
-
| `cursor` | `string` | `read_pdf` | 原样传回上一条部分阅读响应的 token;与 `pages`/`focus` 互斥,仍须传同一 `file_path` |
|
|
134
|
-
| `
|
|
132
|
+
| `cursor` | `string` | `read_pdf` | 原样传回上一条部分阅读响应的 token;与 `pages`/`focus`/`block_id`/`query` 互斥,仍须传同一 `file_path` |
|
|
133
|
+
| `block_id` | `string` | `read_pdf` | 原样使用此前返回的稳定块 ID;与 `query`、`cursor` 互斥 |
|
|
134
|
+
| `query` | `string` | `read_pdf` | 1–256 字符、不区分大小写的字面检索;返回上下文摘要与块 ID,再用 `block_id` 读全文 |
|
|
135
|
+
| `view` | `"content"` / `"page"` | `read_pdf` | 默认解析文本;page 模式只接受一页 `pages`,本地渲染原页,不调用 Provider |
|
|
136
|
+
| `expected_sha256` | `string` | `read_pdf` | 仅 page 模式;可选的源文件 SHA-256,通常来自此前结果的 `source_sha256` |
|
|
137
|
+
| `inline_images` | `boolean` | `read_pdf` | 首次省略默认true;续读省略继承,显式值覆盖,仍受模型能力和图像预算约束 |
|
|
135
138
|
| `poll_timeout_ms` | `number` | `read_pdf` | 最大同步等待超时毫秒数 |
|
|
136
139
|
|
|
137
140
|
---
|
|
@@ -226,7 +229,7 @@ storage:
|
|
|
226
229
|
storageRoot: /absolute/path/to/dsh/cache/pdf-mineru # 默认在 $DSH_HOME/cache/pdf-mineru
|
|
227
230
|
cacheEnabled: true
|
|
228
231
|
output:
|
|
229
|
-
maxInlineChars:
|
|
232
|
+
maxInlineChars: 12000 # 单次响应预算;正文每块另限 8000 UTF-16 单元
|
|
230
233
|
maxInlineImages: 6 # 单次 read_pdf 响应最多内联图片数(0–100)
|
|
231
234
|
limits:
|
|
232
235
|
maxFileBytes: 209715200 # 200 MB
|
|
@@ -302,10 +305,15 @@ pnpm run build
|
|
|
302
305
|
# 4. 在运行中的 DSH Web 中验证前端设置组件
|
|
303
306
|
pnpm run verify:gui
|
|
304
307
|
|
|
305
|
-
# 5.
|
|
308
|
+
# 5. (可选)本地原页验证,无上传,需要Poppler
|
|
309
|
+
pnpm run smoke:reader-local -- /path/to/sample.pdf 1
|
|
310
|
+
|
|
311
|
+
# 6. (显式选择)使用真实 Token 运行在线解析,会上传文档
|
|
306
312
|
MINERU_API_KEY=<token> pnpm run smoke:official-v4 -- /path/to/sample.pdf
|
|
307
313
|
```
|
|
308
314
|
|
|
315
|
+
> 文档入口:[PDF阅读指南](docs/model-reading.md) · [版本记录](CHANGELOG.md)。已完成的阶段性开发报告不作为当前使用契约维护,历史信息可从Git记录查阅。
|
|
316
|
+
|
|
309
317
|
> 想要深入了解插件的架构设计、数据模型、并发请求合并、安全解包与存储隔离机制?请查阅 **[ARCHITECTURE.md](./ARCHITECTURE.md)**。
|
|
310
318
|
|
|
311
319
|
---
|
package/lib/client.js
CHANGED
|
@@ -36,6 +36,34 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
allowInsecureHttp: true
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
const DEFAULT_PARSE_DEFAULTS = {
|
|
40
|
+
model: "pipeline",
|
|
41
|
+
ocr: false,
|
|
42
|
+
parseMethod: "auto",
|
|
43
|
+
language: "ch",
|
|
44
|
+
formula: true,
|
|
45
|
+
table: true
|
|
46
|
+
};
|
|
47
|
+
const DEFAULT_POLLING_CONFIG = {
|
|
48
|
+
pollIntervalMs: 2e3,
|
|
49
|
+
pollTimeoutMs: 6e5,
|
|
50
|
+
requestTimeoutMs: 6e4,
|
|
51
|
+
operationTimeoutMs: 36e5
|
|
52
|
+
};
|
|
53
|
+
const DEFAULT_RETRY_CONFIG = {
|
|
54
|
+
maxAttempts: 3,
|
|
55
|
+
baseDelayMs: 500,
|
|
56
|
+
maxDelayMs: 1e4
|
|
57
|
+
};
|
|
58
|
+
const DEFAULT_OUTPUT_CONFIG = {
|
|
59
|
+
maxInlineChars: 12e3,
|
|
60
|
+
maxInlineImages: 6
|
|
61
|
+
};
|
|
62
|
+
const DEFAULT_STORAGE_OPTIONS = {
|
|
63
|
+
cacheEnabled: true,
|
|
64
|
+
retainSources: false,
|
|
65
|
+
stagingTtlMs: 864e5
|
|
66
|
+
};
|
|
39
67
|
//#endregion
|
|
40
68
|
//#region src/client/helpers.ts
|
|
41
69
|
const PROVIDER_TYPES = ["self-hosted-v2", "official-v4"];
|
|
@@ -133,9 +161,75 @@ window.__ModuleLoader__.load({
|
|
|
133
161
|
const result = await credentials.unset(reference);
|
|
134
162
|
if (!result.ok) throw new Error(result.error.message);
|
|
135
163
|
}
|
|
164
|
+
function resetConfigSection(config, section) {
|
|
165
|
+
switch (section) {
|
|
166
|
+
case "defaults": {
|
|
167
|
+
const active = config.providers.find((p) => p.id === config.activeProvider) ?? config.providers[0];
|
|
168
|
+
const next = {
|
|
169
|
+
...config,
|
|
170
|
+
defaults: { ...DEFAULT_PARSE_DEFAULTS }
|
|
171
|
+
};
|
|
172
|
+
return active !== void 0 ? normalizeProviderDefaults(next, active) : next;
|
|
173
|
+
}
|
|
174
|
+
case "polling": return {
|
|
175
|
+
...config,
|
|
176
|
+
polling: { ...DEFAULT_POLLING_CONFIG }
|
|
177
|
+
};
|
|
178
|
+
case "retry": return {
|
|
179
|
+
...config,
|
|
180
|
+
retry: { ...DEFAULT_RETRY_CONFIG }
|
|
181
|
+
};
|
|
182
|
+
case "output": return {
|
|
183
|
+
...config,
|
|
184
|
+
output: { ...DEFAULT_OUTPUT_CONFIG }
|
|
185
|
+
};
|
|
186
|
+
case "storage": return {
|
|
187
|
+
...config,
|
|
188
|
+
storage: {
|
|
189
|
+
...config.storage,
|
|
190
|
+
cacheEnabled: DEFAULT_STORAGE_OPTIONS.cacheEnabled,
|
|
191
|
+
stagingTtlMs: DEFAULT_STORAGE_OPTIONS.stagingTtlMs,
|
|
192
|
+
retainSources: DEFAULT_STORAGE_OPTIONS.retainSources
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
case "providers": {
|
|
196
|
+
const providers = config.providers.map((p) => ({
|
|
197
|
+
...defaultProviderConfig(p.type),
|
|
198
|
+
id: p.id
|
|
199
|
+
}));
|
|
200
|
+
const active = providers.find((p) => p.id === config.activeProvider) ?? providers[0];
|
|
201
|
+
const next = {
|
|
202
|
+
...config,
|
|
203
|
+
providers
|
|
204
|
+
};
|
|
205
|
+
return active !== void 0 ? normalizeProviderDefaults(next, active) : next;
|
|
206
|
+
}
|
|
207
|
+
default: return config;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function resetToDefaultConfig(current) {
|
|
211
|
+
const selfHosted = defaultProviderConfig("self-hosted-v2");
|
|
212
|
+
const official = defaultProviderConfig("official-v4");
|
|
213
|
+
return {
|
|
214
|
+
schemaVersion: current.schemaVersion,
|
|
215
|
+
activeProvider: selfHosted.id,
|
|
216
|
+
providers: [selfHosted, official],
|
|
217
|
+
defaults: { ...DEFAULT_PARSE_DEFAULTS },
|
|
218
|
+
storage: {
|
|
219
|
+
...current.storage,
|
|
220
|
+
cacheEnabled: DEFAULT_STORAGE_OPTIONS.cacheEnabled,
|
|
221
|
+
stagingTtlMs: DEFAULT_STORAGE_OPTIONS.stagingTtlMs,
|
|
222
|
+
retainSources: DEFAULT_STORAGE_OPTIONS.retainSources
|
|
223
|
+
},
|
|
224
|
+
polling: { ...DEFAULT_POLLING_CONFIG },
|
|
225
|
+
retry: { ...DEFAULT_RETRY_CONFIG },
|
|
226
|
+
output: { ...DEFAULT_OUTPUT_CONFIG },
|
|
227
|
+
limits: current.limits
|
|
228
|
+
};
|
|
229
|
+
}
|
|
136
230
|
//#endregion
|
|
137
231
|
//#region \0dsh-css:/home/runner/work/dsh-pdf-mineru/dsh-pdf-mineru/src/client/SettingsPage.module.css.mjs
|
|
138
|
-
const css = ".dshm_Hp5wKG_section{max-width:800px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:16px;padding-bottom:32px;display:flex}.dshm_Hp5wKG_title{color:var(--dsw-alias-label-primary);margin:0;font-size:18px;font-weight:600;line-height:26px}.dshm_Hp5wKG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}.dshm_Hp5wKG_error{border:1px solid var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);border-radius:6px;justify-content:space-between;align-items:center;gap:8px;margin:0;padding:8px 12px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_errorDismiss{color:inherit;cursor:pointer;background:0 0;border:none;flex:none;padding:0 4px;font-size:16px;line-height:1}.dshm_Hp5wKG_loading{color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}.dshm_Hp5wKG_editorGroup{border:0;border-top:1px solid var(--dsw-alias-border-l2);background:0 0;flex-direction:column;gap:12px;padding:16px 0 0;display:flex}.dshm_Hp5wKG_groupTitle{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l3);margin:0 0 4px;padding-bottom:6px;font-size:14px;font-weight:600;line-height:20px}.dshm_Hp5wKG_row{flex-wrap:wrap;gap:12px;display:flex}.dshm_Hp5wKG_row>.dshm_Hp5wKG_field{flex:220px}.dshm_Hp5wKG_field{flex-direction:column;gap:4px;display:flex}.dshm_Hp5wKG_checkboxField{cursor:pointer;user-select:none;align-items:center;gap:8px;display:flex}.dshm_Hp5wKG_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.dshm_Hp5wKG_checkboxLabel{color:var(--dsw-alias-label-primary);font-size:13px;line-height:18px}.dshm_Hp5wKG_input,.dshm_Hp5wKG_select{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);height:32px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:6px;outline:none;padding:0 10px;font-size:13px;line-height:20px}.dshm_Hp5wKG_input:focus,.dshm_Hp5wKG_select:focus{border-color:var(--dsw-alias-brand-primary)}.dshm_Hp5wKG_input::placeholder{color:var(--dsw-alias-label-dimmed)}.dshm_Hp5wKG_input:disabled,.dshm_Hp5wKG_select:disabled{opacity:.6;cursor:default}.dshm_Hp5wKG_fieldHint{color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;line-height:16px}.dshm_Hp5wKG_credentialInputRow{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.dshm_Hp5wKG_credentialInputRow>.dshm_Hp5wKG_input{width:100%;min-width:0}@media (width<=520px){.dshm_Hp5wKG_credentialInputRow{grid-template-columns:minmax(0,1fr)}.dshm_Hp5wKG_credentialInputRow>.dshm_Hp5wKG_secondaryButton{justify-self:start}}.dshm_Hp5wKG_chipGroup{flex-wrap:wrap;gap:6px;margin-top:2px;display:flex}.dshm_Hp5wKG_chip{box-sizing:border-box;height:24px;font-size:11px;line-height:16px;font-family:var(--ds-font-family-code,monospace);border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);cursor:pointer;user-select:none;border-radius:4px;align-items:center;gap:4px;padding:0 8px;transition:background-color .15s,border-color .15s,color .15s;display:inline-flex}.dshm_Hp5wKG_chip:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3)}.dshm_Hp5wKG_chipActive{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:500}.dshm_Hp5wKG_chipBadge{opacity:.85;font-family:system-ui,-apple-system,sans-serif;font-size:10px}.dshm_Hp5wKG_checkboxGroup{flex-wrap:wrap;gap:12px;margin-top:4px;display:flex}.dshm_Hp5wKG_checkboxOption{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.dshm_Hp5wKG_checkboxField input[type=checkbox],.dshm_Hp5wKG_checkboxOption input[type=checkbox]{cursor:pointer;accent-color:var(--dsw-alias-state-business-primary)}.dshm_Hp5wKG_actionBar{justify-content:flex-start;align-items:center;gap:12px;padding-top:8px;display:flex}.dshm_Hp5wKG_primaryButton{box-sizing:border-box;background:var(--dsw-alias-button-primary-fill);height:34px;color:var(--dsw-alias-label-primary-foreground);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0 16px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.dshm_Hp5wKG_primaryButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_primaryButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshm_Hp5wKG_secondaryButton{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);height:34px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;padding:0 14px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.dshm_Hp5wKG_secondaryButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_secondaryButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshm_Hp5wKG_testResult{border-radius:6px;flex-direction:column;gap:4px;padding:10px 12px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_testResultHealthy{background:var(--dsw-alias-state-success-tertiary);border:1px solid var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.dshm_Hp5wKG_testResultError{background:var(--dsw-alias-interactive-bg-hover-danger);border:1px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.dshm_Hp5wKG_testResultTesting{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary)}.dshm_Hp5wKG_testHeader{font-weight:600}.dshm_Hp5wKG_testDetails{font-family:var(--ds-font-family-code,monospace);color:var(--dsw-alias-label-secondary);font-size:11px}.dshm_Hp5wKG_operationToolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.dshm_Hp5wKG_operationError{border-top:1px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;padding:8px 0;font-size:12px;line-height:18px}.dshm_Hp5wKG_operationResult{border-top:1px solid var(--dsw-alias-border-l3);flex-direction:column;gap:8px;min-width:0;padding-top:10px;display:flex}.dshm_Hp5wKG_resultTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.dshm_Hp5wKG_metricHeaders,.dshm_Hp5wKG_metric{grid-template-columns:minmax(120px,1fr) minmax(80px,auto) minmax(54px,auto);align-items:baseline;gap:10px;display:grid}.dshm_Hp5wKG_metricHeaders{color:var(--dsw-alias-label-tertiary);padding-bottom:4px;font-size:11px;line-height:16px}.dshm_Hp5wKG_metrics{gap:6px;margin:0;display:grid}.dshm_Hp5wKG_metric dt,.dshm_Hp5wKG_metric dd{min-width:0;margin:0;font-size:12px;line-height:18px}.dshm_Hp5wKG_metric dt{color:var(--dsw-alias-label-secondary)}.dshm_Hp5wKG_metric dd{color:var(--dsw-alias-label-primary);text-align:right;font-variant-numeric:tabular-nums}.dshm_Hp5wKG_summaryLine{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:6px 16px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_tableWrap{width:100%;max-width:100%;overflow-x:auto}.dshm_Hp5wKG_operationTable{border-collapse:collapse;table-layout:fixed;width:100%;min-width:520px;font-size:11px;line-height:16px}.dshm_Hp5wKG_operationTable th,.dshm_Hp5wKG_operationTable td{border-bottom:1px solid var(--dsw-alias-border-l3);text-align:left;color:var(--dsw-alias-label-secondary);padding:6px 8px}.dshm_Hp5wKG_operationTable th:first-child,.dshm_Hp5wKG_operationTable td:first-child{width:28px;padding-left:0}.dshm_Hp5wKG_operationTable th:nth-child(3),.dshm_Hp5wKG_operationTable td:nth-child(3){width:80px}.dshm_Hp5wKG_operationTable th:nth-child(4),.dshm_Hp5wKG_operationTable td:nth-child(4){width:150px}.dshm_Hp5wKG_operationTable code{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code,monospace);background:var(--dsw-alias-markdown-inline-code);border-radius:4px;padding:1px 4px;display:block;overflow:hidden}.dshm_Hp5wKG_dangerButton{box-sizing:border-box;border:1px solid var(--dsw-alias-state-error-primary);height:34px;color:var(--dsw-alias-state-error-primary);cursor:pointer;background:0 0;border-radius:6px;justify-content:center;align-items:center;padding:0 14px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.dshm_Hp5wKG_dangerButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_dangerButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-state-error-primary);outline:none}@media (width<=520px){.dshm_Hp5wKG_row{flex-flow:column;min-width:0}.dshm_Hp5wKG_row>.dshm_Hp5wKG_field{flex:none;width:100%;min-width:0}.dshm_Hp5wKG_actionBar{flex-wrap:wrap}.dshm_Hp5wKG_actionBar>button,.dshm_Hp5wKG_credentialInputRow>button,.dshm_Hp5wKG_operationToolbar>button{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%;height:auto;min-height:34px;padding-inline:8px}.dshm_Hp5wKG_chip{overflow-wrap:anywhere;flex-wrap:wrap;min-width:0;max-width:100%;height:auto;min-height:24px}.dshm_Hp5wKG_operationToolbar>button{flex:150px}.dshm_Hp5wKG_metricHeaders,.dshm_Hp5wKG_metric{grid-template-columns:minmax(0,1fr) auto auto}}";
|
|
232
|
+
const css = ".dshm_Hp5wKG_section{max-width:800px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:16px;padding-bottom:32px;display:flex}.dshm_Hp5wKG_title{color:var(--dsw-alias-label-primary);margin:0;font-size:18px;font-weight:600;line-height:26px}.dshm_Hp5wKG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}.dshm_Hp5wKG_error{border:1px solid var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);border-radius:6px;justify-content:space-between;align-items:center;gap:8px;margin:0;padding:8px 12px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_errorDismiss{color:inherit;cursor:pointer;background:0 0;border:none;flex:none;padding:0 4px;font-size:16px;line-height:1}.dshm_Hp5wKG_loading{color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}.dshm_Hp5wKG_editorGroup{border:0;border-top:1px solid var(--dsw-alias-border-l2);background:0 0;flex-direction:column;gap:12px;padding:16px 0 0;display:flex}.dshm_Hp5wKG_groupTitle{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l3);margin:0 0 4px;padding-bottom:6px;font-size:14px;font-weight:600;line-height:20px}.dshm_Hp5wKG_groupHeader{border-bottom:1px solid var(--dsw-alias-border-l3);justify-content:space-between;align-items:center;margin:0 0 4px;padding-bottom:6px;display:flex}.dshm_Hp5wKG_groupHeader>.dshm_Hp5wKG_groupTitle{border-bottom:none;margin:0;padding-bottom:0}.dshm_Hp5wKG_resetButton{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:4px;padding:2px 8px;font-size:11px;line-height:16px;transition:background-color .15s,color .15s,border-color .15s}.dshm_Hp5wKG_resetButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3)}.dshm_Hp5wKG_row{flex-wrap:wrap;gap:12px;display:flex}.dshm_Hp5wKG_row>.dshm_Hp5wKG_field{flex:220px}.dshm_Hp5wKG_field{flex-direction:column;gap:4px;display:flex}.dshm_Hp5wKG_checkboxField{cursor:pointer;user-select:none;align-items:center;gap:8px;display:flex}.dshm_Hp5wKG_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.dshm_Hp5wKG_checkboxLabel{color:var(--dsw-alias-label-primary);font-size:13px;line-height:18px}.dshm_Hp5wKG_input,.dshm_Hp5wKG_select{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);height:32px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:6px;outline:none;padding:0 10px;font-size:13px;line-height:20px}.dshm_Hp5wKG_input:focus,.dshm_Hp5wKG_select:focus{border-color:var(--dsw-alias-brand-primary)}.dshm_Hp5wKG_input::placeholder{color:var(--dsw-alias-label-dimmed)}.dshm_Hp5wKG_input:disabled,.dshm_Hp5wKG_select:disabled{opacity:.6;cursor:default}.dshm_Hp5wKG_fieldHint{color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;line-height:16px}.dshm_Hp5wKG_credentialInputRow{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.dshm_Hp5wKG_credentialInputRow>.dshm_Hp5wKG_input{width:100%;min-width:0}@media (width<=520px){.dshm_Hp5wKG_credentialInputRow{grid-template-columns:minmax(0,1fr)}.dshm_Hp5wKG_credentialInputRow>.dshm_Hp5wKG_secondaryButton{justify-self:start}}.dshm_Hp5wKG_chipGroup{flex-wrap:wrap;gap:6px;margin-top:2px;display:flex}.dshm_Hp5wKG_chip{box-sizing:border-box;height:24px;font-size:11px;line-height:16px;font-family:var(--ds-font-family-code,monospace);border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);cursor:pointer;user-select:none;border-radius:4px;align-items:center;gap:4px;padding:0 8px;transition:background-color .15s,border-color .15s,color .15s;display:inline-flex}.dshm_Hp5wKG_chip:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3)}.dshm_Hp5wKG_chipActive{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:500}.dshm_Hp5wKG_chipBadge{opacity:.85;font-family:system-ui,-apple-system,sans-serif;font-size:10px}.dshm_Hp5wKG_checkboxGroup{flex-wrap:wrap;gap:12px;margin-top:4px;display:flex}.dshm_Hp5wKG_checkboxOption{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.dshm_Hp5wKG_checkboxField input[type=checkbox],.dshm_Hp5wKG_checkboxOption input[type=checkbox]{cursor:pointer;accent-color:var(--dsw-alias-state-business-primary)}.dshm_Hp5wKG_actionBar{justify-content:flex-start;align-items:center;gap:12px;padding-top:8px;display:flex}.dshm_Hp5wKG_primaryButton{box-sizing:border-box;background:var(--dsw-alias-button-primary-fill);height:34px;color:var(--dsw-alias-label-primary-foreground);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0 16px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.dshm_Hp5wKG_primaryButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_primaryButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshm_Hp5wKG_secondaryButton{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);height:34px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;padding:0 14px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.dshm_Hp5wKG_secondaryButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_secondaryButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshm_Hp5wKG_testResult{border-radius:6px;flex-direction:column;gap:4px;padding:10px 12px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_testResultHealthy{background:var(--dsw-alias-state-success-tertiary);border:1px solid var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.dshm_Hp5wKG_testResultError{background:var(--dsw-alias-interactive-bg-hover-danger);border:1px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.dshm_Hp5wKG_testResultTesting{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary)}.dshm_Hp5wKG_testHeader{font-weight:600}.dshm_Hp5wKG_testDetails{font-family:var(--ds-font-family-code,monospace);color:var(--dsw-alias-label-secondary);font-size:11px}.dshm_Hp5wKG_operationToolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.dshm_Hp5wKG_operationError{border-top:1px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;padding:8px 0;font-size:12px;line-height:18px}.dshm_Hp5wKG_operationResult{border-top:1px solid var(--dsw-alias-border-l3);flex-direction:column;gap:8px;min-width:0;padding-top:10px;display:flex}.dshm_Hp5wKG_resultTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.dshm_Hp5wKG_metricHeaders,.dshm_Hp5wKG_metric{grid-template-columns:minmax(120px,1fr) minmax(80px,auto) minmax(54px,auto);align-items:baseline;gap:10px;display:grid}.dshm_Hp5wKG_metricHeaders{color:var(--dsw-alias-label-tertiary);padding-bottom:4px;font-size:11px;line-height:16px}.dshm_Hp5wKG_metrics{gap:6px;margin:0;display:grid}.dshm_Hp5wKG_metric dt,.dshm_Hp5wKG_metric dd{min-width:0;margin:0;font-size:12px;line-height:18px}.dshm_Hp5wKG_metric dt{color:var(--dsw-alias-label-secondary)}.dshm_Hp5wKG_metric dd{color:var(--dsw-alias-label-primary);text-align:right;font-variant-numeric:tabular-nums}.dshm_Hp5wKG_summaryLine{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:6px 16px;font-size:12px;line-height:18px;display:flex}.dshm_Hp5wKG_tableWrap{width:100%;max-width:100%;overflow-x:auto}.dshm_Hp5wKG_operationTable{border-collapse:collapse;table-layout:fixed;width:100%;min-width:520px;font-size:11px;line-height:16px}.dshm_Hp5wKG_operationTable th,.dshm_Hp5wKG_operationTable td{border-bottom:1px solid var(--dsw-alias-border-l3);text-align:left;color:var(--dsw-alias-label-secondary);padding:6px 8px}.dshm_Hp5wKG_operationTable th:first-child,.dshm_Hp5wKG_operationTable td:first-child{width:28px;padding-left:0}.dshm_Hp5wKG_operationTable th:nth-child(3),.dshm_Hp5wKG_operationTable td:nth-child(3){width:80px}.dshm_Hp5wKG_operationTable th:nth-child(4),.dshm_Hp5wKG_operationTable td:nth-child(4){width:150px}.dshm_Hp5wKG_operationTable code{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code,monospace);background:var(--dsw-alias-markdown-inline-code);border-radius:4px;padding:1px 4px;display:block;overflow:hidden}.dshm_Hp5wKG_dangerButton{box-sizing:border-box;border:1px solid var(--dsw-alias-state-error-primary);height:34px;color:var(--dsw-alias-state-error-primary);cursor:pointer;background:0 0;border-radius:6px;justify-content:center;align-items:center;padding:0 14px;font-size:13px;font-weight:500;transition:background-color .15s,opacity .15s;display:inline-flex}.dshm_Hp5wKG_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.dshm_Hp5wKG_dangerButton:disabled{opacity:.4;cursor:not-allowed}.dshm_Hp5wKG_dangerButton:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-state-error-primary);outline:none}@media (width<=520px){.dshm_Hp5wKG_row{flex-flow:column;min-width:0}.dshm_Hp5wKG_row>.dshm_Hp5wKG_field{flex:none;width:100%;min-width:0}.dshm_Hp5wKG_actionBar{flex-wrap:wrap}.dshm_Hp5wKG_actionBar>button,.dshm_Hp5wKG_credentialInputRow>button,.dshm_Hp5wKG_operationToolbar>button{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%;height:auto;min-height:34px;padding-inline:8px}.dshm_Hp5wKG_chip{overflow-wrap:anywhere;flex-wrap:wrap;min-width:0;max-width:100%;height:auto;min-height:24px}.dshm_Hp5wKG_operationToolbar>button{flex:150px}.dshm_Hp5wKG_metricHeaders,.dshm_Hp5wKG_metric{grid-template-columns:minmax(0,1fr) auto auto}}";
|
|
139
233
|
const classMap = {
|
|
140
234
|
"actionBar": "dshm_Hp5wKG_actionBar",
|
|
141
235
|
"checkboxField": "dshm_Hp5wKG_checkboxField",
|
|
@@ -154,6 +248,7 @@ window.__ModuleLoader__.load({
|
|
|
154
248
|
"field": "dshm_Hp5wKG_field",
|
|
155
249
|
"fieldHint": "dshm_Hp5wKG_fieldHint",
|
|
156
250
|
"fieldLabel": "dshm_Hp5wKG_fieldLabel",
|
|
251
|
+
"groupHeader": "dshm_Hp5wKG_groupHeader",
|
|
157
252
|
"groupTitle": "dshm_Hp5wKG_groupTitle",
|
|
158
253
|
"input": "dshm_Hp5wKG_input",
|
|
159
254
|
"intro": "dshm_Hp5wKG_intro",
|
|
@@ -166,6 +261,7 @@ window.__ModuleLoader__.load({
|
|
|
166
261
|
"operationTable": "dshm_Hp5wKG_operationTable",
|
|
167
262
|
"operationToolbar": "dshm_Hp5wKG_operationToolbar",
|
|
168
263
|
"primaryButton": "dshm_Hp5wKG_primaryButton",
|
|
264
|
+
"resetButton": "dshm_Hp5wKG_resetButton",
|
|
169
265
|
"resultTitle": "dshm_Hp5wKG_resultTitle",
|
|
170
266
|
"row": "dshm_Hp5wKG_row",
|
|
171
267
|
"secondaryButton": "dshm_Hp5wKG_secondaryButton",
|
|
@@ -460,9 +556,17 @@ window.__ModuleLoader__.load({
|
|
|
460
556
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
461
557
|
className: classMap.editorGroup,
|
|
462
558
|
children: [
|
|
463
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
464
|
-
className: classMap.
|
|
465
|
-
children:
|
|
559
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
560
|
+
className: classMap.groupHeader,
|
|
561
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
562
|
+
className: classMap.groupTitle,
|
|
563
|
+
children: t("section.defaults")
|
|
564
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
565
|
+
type: "button",
|
|
566
|
+
className: classMap.resetButton,
|
|
567
|
+
onClick: () => setDraft((prev) => prev === null ? prev : resetConfigSection(prev, "defaults")),
|
|
568
|
+
children: t("action.resetSection")
|
|
569
|
+
})]
|
|
466
570
|
}),
|
|
467
571
|
txtToAutoNotice && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
468
572
|
className: classMap.error,
|
|
@@ -637,9 +741,17 @@ window.__ModuleLoader__.load({
|
|
|
637
741
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
638
742
|
className: classMap.editorGroup,
|
|
639
743
|
children: [
|
|
640
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
641
|
-
className: classMap.
|
|
642
|
-
children:
|
|
744
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
745
|
+
className: classMap.groupHeader,
|
|
746
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
747
|
+
className: classMap.groupTitle,
|
|
748
|
+
children: t("section.storage")
|
|
749
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
750
|
+
type: "button",
|
|
751
|
+
className: classMap.resetButton,
|
|
752
|
+
onClick: () => setDraft((prev) => prev === null ? prev : resetConfigSection(prev, "storage")),
|
|
753
|
+
children: t("action.resetSection")
|
|
754
|
+
})]
|
|
643
755
|
}),
|
|
644
756
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
645
757
|
className: classMap.row,
|
|
@@ -687,9 +799,17 @@ window.__ModuleLoader__.load({
|
|
|
687
799
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
688
800
|
className: classMap.editorGroup,
|
|
689
801
|
children: [
|
|
690
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
691
|
-
className: classMap.
|
|
692
|
-
children:
|
|
802
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
803
|
+
className: classMap.groupHeader,
|
|
804
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
805
|
+
className: classMap.groupTitle,
|
|
806
|
+
children: t("section.polling")
|
|
807
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
808
|
+
type: "button",
|
|
809
|
+
className: classMap.resetButton,
|
|
810
|
+
onClick: () => setDraft((prev) => prev === null ? prev : resetConfigSection(prev, "polling")),
|
|
811
|
+
children: t("action.resetSection")
|
|
812
|
+
})]
|
|
693
813
|
}),
|
|
694
814
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
695
815
|
className: classMap.row,
|
|
@@ -747,9 +867,17 @@ window.__ModuleLoader__.load({
|
|
|
747
867
|
}),
|
|
748
868
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
749
869
|
className: classMap.editorGroup,
|
|
750
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
751
|
-
className: classMap.
|
|
752
|
-
children:
|
|
870
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
871
|
+
className: classMap.groupHeader,
|
|
872
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
873
|
+
className: classMap.groupTitle,
|
|
874
|
+
children: t("section.retry")
|
|
875
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
876
|
+
type: "button",
|
|
877
|
+
className: classMap.resetButton,
|
|
878
|
+
onClick: () => setDraft((prev) => prev === null ? prev : resetConfigSection(prev, "retry")),
|
|
879
|
+
children: t("action.resetSection")
|
|
880
|
+
})]
|
|
753
881
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
754
882
|
className: classMap.row,
|
|
755
883
|
children: [
|
|
@@ -797,9 +925,17 @@ window.__ModuleLoader__.load({
|
|
|
797
925
|
}),
|
|
798
926
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
799
927
|
className: classMap.editorGroup,
|
|
800
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
801
|
-
className: classMap.
|
|
802
|
-
children:
|
|
928
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
929
|
+
className: classMap.groupHeader,
|
|
930
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
931
|
+
className: classMap.groupTitle,
|
|
932
|
+
children: t("section.output")
|
|
933
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
934
|
+
type: "button",
|
|
935
|
+
className: classMap.resetButton,
|
|
936
|
+
onClick: () => setDraft((prev) => prev === null ? prev : resetConfigSection(prev, "output")),
|
|
937
|
+
children: t("action.resetSection")
|
|
938
|
+
})]
|
|
803
939
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
804
940
|
className: classMap.row,
|
|
805
941
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
@@ -1496,6 +1632,12 @@ window.__ModuleLoader__.load({
|
|
|
1496
1632
|
if (draft.defaults.parseMethod === "txt" && next.defaults.parseMethod === "auto") setTxtToAutoNotice(true);
|
|
1497
1633
|
setDraft(next);
|
|
1498
1634
|
}, [draft]);
|
|
1635
|
+
const handleResetDefaults = (0, react.useCallback)(() => {
|
|
1636
|
+
if (draft === null) return;
|
|
1637
|
+
const next = resetToDefaultConfig(draft);
|
|
1638
|
+
setDraft(next);
|
|
1639
|
+
setTxtToAutoNotice(false);
|
|
1640
|
+
}, [draft]);
|
|
1499
1641
|
if (loading || draft === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1500
1642
|
className: classMap.section,
|
|
1501
1643
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
@@ -1530,19 +1672,29 @@ window.__ModuleLoader__.load({
|
|
|
1530
1672
|
}),
|
|
1531
1673
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1532
1674
|
className: classMap.actionBar,
|
|
1533
|
-
children: [
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1675
|
+
children: [
|
|
1676
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1677
|
+
type: "button",
|
|
1678
|
+
className: classMap.primaryButton,
|
|
1679
|
+
disabled: saving || credentialBusy,
|
|
1680
|
+
onClick: () => void save(),
|
|
1681
|
+
children: saving ? "…" : saved ? t("action.saved") : t("action.save")
|
|
1682
|
+
}),
|
|
1683
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1684
|
+
type: "button",
|
|
1685
|
+
className: classMap.secondaryButton,
|
|
1686
|
+
disabled: testState.status === "testing",
|
|
1687
|
+
onClick: () => void testActiveProvider(),
|
|
1688
|
+
children: testState.status === "testing" ? t("action.testing") : t("action.test")
|
|
1689
|
+
}),
|
|
1690
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1691
|
+
type: "button",
|
|
1692
|
+
className: classMap.secondaryButton,
|
|
1693
|
+
disabled: saving || credentialBusy,
|
|
1694
|
+
onClick: handleResetDefaults,
|
|
1695
|
+
children: t("action.resetDefaults")
|
|
1696
|
+
})
|
|
1697
|
+
]
|
|
1546
1698
|
}),
|
|
1547
1699
|
testState.status !== "idle" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1548
1700
|
className: `${classMap.testResult} ${testState.status === "healthy" ? classMap.testResultHealthy : testState.status === "unhealthy" || testState.status === "error" ? classMap.testResultError : classMap.testResultTesting}`,
|
|
@@ -1687,6 +1839,8 @@ window.__ModuleLoader__.load({
|
|
|
1687
1839
|
"field.maxZipCompressionRatio": "Max ZIP Compression Ratio",
|
|
1688
1840
|
"action.save": "Save Configuration",
|
|
1689
1841
|
"action.saved": "Saved",
|
|
1842
|
+
"action.resetDefaults": "Reset to Defaults",
|
|
1843
|
+
"action.resetSection": "Reset",
|
|
1690
1844
|
"action.test": "Test Active Provider",
|
|
1691
1845
|
"action.testing": "Testing…",
|
|
1692
1846
|
"action.clearApiKey": "Clear API Key",
|
|
@@ -1807,6 +1961,8 @@ window.__ModuleLoader__.load({
|
|
|
1807
1961
|
"field.maxZipCompressionRatio": "ZIP 最大解压压缩比",
|
|
1808
1962
|
"action.save": "保存配置",
|
|
1809
1963
|
"action.saved": "已保存",
|
|
1964
|
+
"action.resetDefaults": "恢复默认配置",
|
|
1965
|
+
"action.resetSection": "重置",
|
|
1810
1966
|
"action.test": "测试当前 Provider 连接",
|
|
1811
1967
|
"action.testing": "测试中…",
|
|
1812
1968
|
"action.clearApiKey": "清除 API Key",
|