dsh-form-fill-agent 0.1.0-alpha.9 → 0.2.0
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.md +2 -2
- package/lib/brand.css +7 -0
- package/lib/ui.html +4 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ dsh plugin --profile web add dsh-form-fill-agent@latest
|
|
|
43
43
|
|
|
44
44
|
## 使用边界与数据保存
|
|
45
45
|
|
|
46
|
-
补充要求为模型可读文本;字段或工作表范围请通过向导/工作台修改,不能仅改文字后假定执行范围已同步。任务 schema 5 可读取 schema 1–5;回退旧版本请使用升级前目录副本或独立任务目录。共享内核、Provider 和主包为
|
|
46
|
+
补充要求为模型可读文本;字段或工作表范围请通过向导/工作台修改,不能仅改文字后假定执行范围已同步。任务 schema 5 可读取 schema 1–5;回退旧版本请使用升级前目录副本或独立任务目录。共享内核、Provider 和主包为 0.2.0。
|
|
47
47
|
|
|
48
48
|
支持企业完整登记名称或 18 位信用代码;简称、主体不一致或多候选不会自动猜选。仅有信用代码的表格也可作为查询锚点。连接候选检索工具时可检索简称,仍需人工确认;缺少工具时降级人工输入。字段映射采用确定性规则及人工确认,不让模型编造事实。支持普通内部公式、固定区域下拉、基础条件格式和普通表格对象;复杂 Excel 结构和 Word 暂不支持,保真边界见下方安全说明。
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ dsh plugin --profile web add dsh-form-fill-agent@latest
|
|
|
51
51
|
|
|
52
52
|
显式设置 DSH_HOME 时,任务保存至其 form-fill-tasks 目录,默认 24 小时过期;未设置时使用内存。任务保存输入表格和归一化预览,不持久化原始 MCP 响应,可主动删除任务。模型及 MCP 凭据由宿主管理。
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
0.2.0 保存任务 schema 5,兼容读取旧 schema 1–4;回退旧版本须使用升级前任务目录副本或新目录,防止丢失已确认的字段/主体设置。
|
|
55
55
|
|
|
56
56
|
## 文档与反馈
|
|
57
57
|
|
package/lib/brand.css
CHANGED
|
@@ -13,3 +13,10 @@
|
|
|
13
13
|
.ff-ui .scroll{overflow:auto;max-height:520px;border:1px solid var(--line);border-radius:6px}.ff-ui .grid-changed{background:var(--soft);color:var(--action);font-weight:600}.ff-ui table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}.ff-ui th,.ff-ui td{padding:12px;white-space:nowrap;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);border-right:1px solid var(--line);min-width:100px}.ff-ui th{position:sticky;top:0;background:var(--head);font-weight:500;z-index:1}.ff-ui tr:hover td{background:var(--head)}.ff-ui td:last-child,.ff-ui th:last-child{border-right:0}.ff-ui #downloads{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.ff-ui fieldset{border:1px solid var(--line);border-radius:8px;padding:14px;margin:12px 0;min-width:0}.ff-ui legend{font-weight:600}.ff-ui label{overflow-wrap:anywhere}.ff-ui .history-item{padding:12px 0;border-bottom:1px solid var(--line)}.ff-ui .ff-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:var(--page);padding:12px;border-radius:6px}.ff-ui .ff-field-grid label{display:flex;align-items:center;gap:8px;min-height:36px}.ff-ui .ff-wizard-step{display:none}.ff-ui .ff-wizard-step[aria-current=true]{display:block}
|
|
14
14
|
.ff-ui dialog,.ff-ui.ff-confirm-dialog{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:12px;padding:0;width:min(860px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-shadow:0 16px 60px #10243d24}.ff-ui dialog::backdrop,.ff-ui.ff-confirm-dialog::backdrop{background:#14253870}.ff-ui dialog[open]{display:flex;flex-direction:column}.ff-ui .dialog-head{padding:18px 20px;border-bottom:1px solid var(--line);flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px}.ff-ui .dialog-body{padding:20px;overflow:auto;min-height:0;flex:1}.ff-ui .dialog-footer{padding:14px 20px;border-top:1px solid var(--line);flex-shrink:0;display:flex;gap:10px;align-items:center;justify-content:flex-end}.ff-ui .dialog-body textarea{width:100%}.ff-ui .ff-tech{overflow-wrap:anywhere;white-space:pre-wrap;font-size:12px}.ff-ui .ff-summary{padding:12px;background:var(--page);white-space:pre-line}.ff-ui .danger{color:var(--error)}
|
|
15
15
|
@media(max-width:640px){.ff-ui.ff-workbench{padding:14px}.ff-ui input:not([type=checkbox]),.ff-ui select,.ff-ui textarea{font-size:16px}.ff-ui button{min-height:44px}.ff-ui.ff-hero h1{font-size:22px}.ff-ui.ff-hero .ff-mark{width:40px;height:40px}.ff-ui .ff-shortcuts{gap:2px}.ff-ui .ff-shortcuts button{min-width:0;flex:1;padding:8px 2px;font-size:11px}.ff-ui .ff-field-grid{grid-template-columns:1fr}.ff-ui .dialog-body{padding:14px}.ff-ui .dialog-footer{padding:12px;flex-wrap:wrap}.ff-ui .ff-panel-head{padding:10px}.ff-ui .ff-panel-head h2{font-size:14px}}
|
|
16
|
+
.ff-ui .ff-stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));min-width:0;width:100%;padding:0;border-bottom:1px solid var(--line);background:var(--surface)}
|
|
17
|
+
.ff-ui .ff-stages button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:78px;padding:9px 5px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted)}
|
|
18
|
+
.ff-ui .ff-stages button:last-child{border-right:0}.ff-ui .ff-stages button:hover{background:var(--page);color:var(--text)}
|
|
19
|
+
.ff-ui .ff-stages button[aria-current=true]{background:var(--soft);color:var(--action);font-weight:600}.ff-ui .ff-stages button[aria-current=true]:after{content:'';position:absolute;left:8px;right:8px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--action)}
|
|
20
|
+
.ff-ui .ff-stage-icon{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.ff-ui .ff-stage-icon .ff-icon{width:17px;height:17px}
|
|
21
|
+
.ff-ui .ff-stage-label{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.35}.ff-ui .ff-stages button:focus-visible{outline-offset:-3px}
|
|
22
|
+
@media(max-width:420px){.ff-ui .ff-stages button{min-height:70px;padding:8px 2px;gap:5px}.ff-ui .ff-stage-icon{width:26px;height:26px}.ff-ui .ff-stage-icon .ff-icon{width:16px;height:16px}.ff-ui .ff-stage-label{font-size:11px}}
|
package/lib/ui.html
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<p id="status" role="status" aria-live="polite"></p>
|
|
8
8
|
<section id="history" hidden><h2>本浏览器的任务</h2><p class="muted">只显示持有相同访问凭据的本地任务。过期任务自动清理。</p><div id="history-list"></div></section>
|
|
9
9
|
<main id="current">
|
|
10
|
-
<nav class="
|
|
10
|
+
<nav class="ff-stages" aria-label="工作流程"><button data-step="import"><span class="ff-stage-icon" data-icon="upload"></span><span class="ff-stage-label">导入表格</span></button><button data-step="rules"><span class="ff-stage-icon" data-icon="settings"></span><span class="ff-stage-label">字段设置</span></button><button data-step="identity"><span class="ff-stage-icon" data-icon="identity"></span><span class="ff-stage-label">主体核验</span></button><button data-step="preview"><span class="ff-stage-icon" data-icon="table"></span><span class="ff-stage-label">填写预览</span></button><button data-step="download"><span class="ff-stage-icon" data-icon="download"></span><span class="ff-stage-label">确认下载</span></button></nav>
|
|
11
11
|
<p id="task-meta" class="badge"></p>
|
|
12
12
|
<div class="toolbar"><span id="execution-progress" role="status"></span><button id="cancel-run" disabled>取消查询</button><button id="retry-run" disabled>仅重试失败 / 未完成查询</button></div>
|
|
13
13
|
<details id="grid" hidden><summary>查看完整原表 / 结果表格</summary><p class="muted">全量行列按页查看,隐藏行列只读标注。结果视图展示当前已选填写;下载不受分页或搜索影响。</p><div class="toolbar"><label>工作表 <select id="grid-sheet"></select></label><label>视图 <select id="grid-view"><option value="original">原表</option><option value="result">结果预览</option></select></label><label>搜索全部行 <input id="grid-query" type="search" maxlength="200"></label><button id="grid-search">搜索</button></div><p id="grid-status" role="status"></p><div class="scroll"><table><thead id="grid-head"></thead><tbody id="grid-body"></tbody></table></div><div class="toolbar"><button id="grid-prev">上一页</button><button id="grid-next">下一页</button><button id="grid-left">前 16 列</button><button id="grid-right">后 16 列</button></div></details>
|
|
14
|
-
<div class="card" data-pane="import"><h2>导入表格</h2><p class="muted"
|
|
14
|
+
<div class="card" data-pane="import"><h2>导入表格</h2><p class="muted">支持 XLSX,最大 8 MiB。支持普通内部公式、固定文本或区域下拉、基础条件格式及普通表格对象;宏、图片、图表及复杂扩展结构暂不支持。上传仅做本地分析,不查询企查查。</p>
|
|
15
15
|
<div class="controls"><input type="file" id="file" accept=".xlsx" aria-label="选择 XLSX 文件"><button id="upload">分析表格</button></div>
|
|
16
16
|
<details><summary>体验合成模板</summary><p>下面模板只使用合成数据,不查询真实企业。</p><div class="controls" id="samples"><button class="secondary" data-name="客户台账">客户台账</button><button class="secondary" data-name="供应商准入表">供应商准入表</button><button class="secondary" data-name="合同主体信息表">合同主体信息表</button></div></details></div>
|
|
17
17
|
<section id="preview" hidden>
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
<script>
|
|
37
37
|
const basePath=location.pathname.startsWith('/form-fill')?'/form-fill':'';
|
|
38
38
|
document.getElementById('ff-style').href=basePath+'/brand.css';
|
|
39
|
-
|
|
39
|
+
const stageIcons={table:'M3 4h18v16H3zM3 9h18M9 9v11',upload:'M12 16V3m-4 4 4-4 4 4M4 14v6h16v-6',settings:'M4 6h16M4 12h16M4 18h16M8 3v6M16 9v6M10 15v6',identity:'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8m7 1 2 2 4-4',download:'M12 3v13m-4-4 4 4 4-4M4 17v4h16v-4'};
|
|
40
|
+
document.querySelectorAll('[data-icon]').forEach(node=>{const d=stageIcons[node.dataset.icon];if(!d)return;const svg=document.createElementNS('http://www.w3.org/2000/svg','svg');svg.setAttribute('viewBox','0 0 24 24');svg.setAttribute('class','ff-icon');svg.setAttribute('aria-hidden','true');const path=document.createElementNS(svg.namespaceURI,'path');path.setAttribute('d',d);svg.append(path);node.append(svg)});
|
|
40
41
|
const $=id=>document.getElementById(id);
|
|
41
42
|
let owner=localStorage.getItem('ff-owner');
|
|
42
43
|
if(!/^[a-f0-9]{64}$/.test(owner||'')){owner=[...crypto.getRandomValues(new Uint8Array(32))].map(n=>n.toString(16).padStart(2,'0')).join('');localStorage.setItem('ff-owner',owner)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-form-fill-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI填表智能体:XLSX blank-cell preview, QCC enrichment and persistent tasks for DSH.",
|
|
6
6
|
"repository": { "type": "git", "url": "git+https://github.com/duhu2000/dsh-form-fill-agent.git", "directory": "packages/dsh-form-fill-agent" },
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"form-fill-core": "0.
|
|
28
|
-
"qcc-form-fill-provider": "0.
|
|
27
|
+
"form-fill-core": "0.2.0",
|
|
28
|
+
"qcc-form-fill-provider": "0.2.0"
|
|
29
29
|
},
|
|
30
30
|
"dsh": {
|
|
31
31
|
"client": { "inject": ["@deepseek-ai/dsh-client-ui-layout", "@deepseek-ai/dsh-client-ui-conversation"], "platform": "web" },
|