HEL-892: show source-bound Chinese H3 parameter definitions
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -152,6 +152,48 @@ export interface WorkflowNode {
|
||||
|
||||
/** Persisted library document; list responses omit doc_json, detail GET includes it. */
|
||||
export interface WorkflowDocument {
|
||||
fixed_version?: {
|
||||
matched: boolean;
|
||||
notice: string;
|
||||
source_path?: string;
|
||||
source_sha1?: string;
|
||||
source_sha256?: string;
|
||||
versions?: string[];
|
||||
counts?: {
|
||||
saved_fields: number;
|
||||
final_scalars: number;
|
||||
linked_saved_fields: number;
|
||||
frontend_only: number;
|
||||
physical_edges: number;
|
||||
};
|
||||
fields?: {
|
||||
node_id: string;
|
||||
class_type: string;
|
||||
field: string;
|
||||
label: string;
|
||||
type: string;
|
||||
value: unknown;
|
||||
json_type: string;
|
||||
pointer: string;
|
||||
named_pointer: string;
|
||||
unit: string | null;
|
||||
limits: string;
|
||||
effect: string;
|
||||
role: "scalar" | "linked" | "frontend";
|
||||
evidence: number[];
|
||||
}[];
|
||||
sources?: {
|
||||
id: string;
|
||||
commit: string;
|
||||
file: string;
|
||||
sha256: string;
|
||||
lines: number[];
|
||||
claim: string;
|
||||
}[];
|
||||
flow?: string[];
|
||||
flow_evidence?: number[];
|
||||
steps?: string[];
|
||||
};
|
||||
title?: string;
|
||||
purpose?: string;
|
||||
source_path?: string;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
);
|
||||
const wf = $derived($detail.data);
|
||||
const doc = $derived(wf?.doc_json);
|
||||
const fixed = $derived(doc?.fixed_version);
|
||||
const review = $derived(doc?.source_review);
|
||||
const deps = $derived(doc?.dependencies);
|
||||
const categories: Record<string, string> = {
|
||||
@@ -115,6 +116,72 @@
|
||||
</details>
|
||||
{/if}
|
||||
</Card>
|
||||
{#if fixed}
|
||||
<Card title="固定版本参数说明">
|
||||
<p>{fixed.notice}</p>
|
||||
{#if fixed.matched}
|
||||
<p>
|
||||
保存字段 {fixed.counts?.saved_fields} 项;最终标量 {fixed.counts
|
||||
?.final_scalars} 项;被连线覆盖 {fixed.counts
|
||||
?.linked_saved_fields} 项;仅前端控制 {fixed.counts
|
||||
?.frontend_only} 项。
|
||||
</p>
|
||||
{#each fixed.flow ?? [] as line}<p>{line}</p>{/each}
|
||||
<details>
|
||||
<summary>版本、源图与连线依据</summary>
|
||||
{#each fixed.versions ?? [] as version}<p>{version}</p>{/each}
|
||||
<p>源图 SHA256:{fixed.source_sha256}</p>
|
||||
{#each fixed.flow_evidence ?? [] as index}
|
||||
{@const evidence = fixed.sources?.[index]}
|
||||
{#if evidence}
|
||||
<p>
|
||||
{evidence.claim}:{evidence.file},第 {evidence.lines.join(
|
||||
"~",
|
||||
)} 行;提交 {evidence.commit};原文件 SHA256:{evidence.sha256}
|
||||
</p>
|
||||
{/if}
|
||||
{/each}
|
||||
</details>
|
||||
{#each fixed.fields ?? [] as field}
|
||||
<details>
|
||||
<summary
|
||||
>节点 {field.node_id} · {field.label}({field.field})</summary
|
||||
>
|
||||
<p>{field.effect}</p>
|
||||
<p>定义类型:{field.type};源 JSON 类型:{field.json_type}</p>
|
||||
<p>源现值(非定义默认值):</p>
|
||||
<pre>{value(field.value)}</pre>
|
||||
<p>单位:{field.unit ?? "待确认"}</p>
|
||||
<p>范围与限定:{field.limits}</p>
|
||||
<p>
|
||||
执行取值:{field.role === "frontend"
|
||||
? "仅保存,不进入执行输入"
|
||||
: field.role === "linked"
|
||||
? "保存值被物理连线覆盖(169槽0 → 170.prompt)"
|
||||
: "最终标量;实际运行未验证"}
|
||||
</p>
|
||||
<details>
|
||||
<summary>来源依据</summary>
|
||||
<p>源节点类型:{field.class_type}</p>
|
||||
<p>
|
||||
源取值指针:{field.pointer};具名保存互证:{field.named_pointer}
|
||||
</p>
|
||||
{#each field.evidence as index}
|
||||
{@const evidence = fixed.sources?.[index]}
|
||||
{#if evidence}
|
||||
<p>
|
||||
{evidence.claim}:{evidence.file},第 {evidence.lines.join(
|
||||
"~",
|
||||
)} 行;提交 {evidence.commit};原文件 SHA256:{evidence.sha256}
|
||||
</p>
|
||||
{/if}
|
||||
{/each}
|
||||
</details>
|
||||
</details>
|
||||
{/each}
|
||||
{/if}
|
||||
</Card>
|
||||
{/if}
|
||||
<Card title="参数与源现值">
|
||||
<p>
|
||||
源现值不代表推荐值。下列审校分类与单位、范围、调整效果的确认分别记录。
|
||||
@@ -148,7 +215,11 @@
|
||||
{#if param.options}<p>可选值:{value(param.options)}</p>{/if}
|
||||
<p>调整效果:{param.effect || "待确认"}</p>
|
||||
</details>
|
||||
{:else}<p>暂无具名参数说明;位置控件不能按顺序猜测。</p>{/each}
|
||||
{:else}<p>
|
||||
{fixed?.matched
|
||||
? "源文件参数审校区未记录具名项;固定版本定义另见上方说明。"
|
||||
: "暂无具名参数说明;位置控件不能按顺序猜测。"}
|
||||
</p>{/each}
|
||||
</Card>
|
||||
<Card title="模型与节点引用">
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user