@openbkn/workshop 0.2.3 → 0.3.0-rc.2
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 +1 -1
- package/dist/{ActionConfirm-ITBip2Ic.js → ActionConfirm-G-F1ZPqU.js} +5 -5
- package/dist/{ActionFailure-CWifUJ2j.js → ActionFailure-PXLm8Yrm.js} +2 -2
- package/dist/{AgentChat-C1uyzwuA.js → AgentChat-D2h4hYuv.js} +406 -382
- package/dist/AppListPage-CjAyblsr.js +1549 -0
- package/dist/{AskDrawer-Bw1NM5v_.js → AskDrawer-BOZHK2uD.js} +4 -4
- package/dist/{ComputedView-_CaPjqhY.js → ComputedView-CFB6TLqD.js} +1028 -1009
- package/dist/{ConclusionApply-CG5wSeVp.js → ConclusionApply-QzEgCkEr.js} +4 -4
- package/dist/{CypherEditor-DbLHQoJJ.js → CypherEditor-ChbgNwGj.js} +47 -47
- package/dist/{LandingList-BMPCXj6K.js → LandingList-D4rN2C_h.js} +5 -5
- package/dist/{MenuUnfoldOutlined-BoARCVho.js → MenuUnfoldOutlined-9J7j6Kim.js} +3 -3
- package/dist/{ModelTrial-DZjC0E8E.js → ModelTrial-DWE5fBa4.js} +4 -4
- package/dist/{PageRenderer-Debi-U0v.js → PageRenderer-BYBHi5At.js} +21744 -20979
- package/dist/{ScenarioApply-BNFfjIwR.js → ScenarioApply-Ck68QOWM.js} +25 -25
- package/dist/{SimulateForm-CEqqMjks.js → SimulateForm-QwSu0BWO.js} +4 -4
- package/dist/{Subgraph-C0VjOnZf.js → Subgraph-CMIts4-k.js} +3 -3
- package/dist/WorkshopLabPage-N-CVblXc.js +12331 -0
- package/dist/{WorkshopRunPage-BlyM18id.js → WorkshopRunPage-LtG2nDNS.js} +25 -25
- package/dist/{abnfDiagram-WEYOIA3C-wqYhe75a.js → abnfDiagram-WEYOIA3C-CEkD2Kbr.js} +3 -3
- package/dist/{action-type-tool.service-CtCfESYq.js → action-type-tool.service-DfyMNDaF.js} +1 -1
- package/dist/{architectureDiagram-ZHVYKT53-BYJ2H7bS.js → architectureDiagram-ZHVYKT53-ypBqmKJn.js} +3 -3
- package/dist/{bkn-agent-execution.service-ogW6NIAz.js → bkn-agent-execution.service-DpOKT3iR.js} +1 -1
- package/dist/{blockDiagram-RJAE7QA3-DZfrfHRw.js → blockDiagram-RJAE7QA3-BQiz7ppY.js} +3 -3
- package/dist/{c4Diagram-XDPPPE54--S7sRxgd.js → c4Diagram-XDPPPE54-DoQEicnh.js} +2 -2
- package/dist/{channel-Ca2_7Xkz.js → channel-CLsZYFb3.js} +1 -1
- package/dist/{chunk-2E7WHVMD-BMnl6-jy.js → chunk-2E7WHVMD-C7KAk7Aw.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-BNVTYluA.js → chunk-2Q5K7J3B-DJjZ1fjz.js} +1 -1
- package/dist/{chunk-4EMNKR2T-CKorQf5z.js → chunk-4EMNKR2T-Da2DlW9r.js} +1 -1
- package/dist/{chunk-55XCU76K-C4xutPQ4.js → chunk-55XCU76K-Dke6HW5r.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BM5F2WnL.js → chunk-5VM5RSS4-CfxCWhgL.js} +1 -1
- package/dist/{chunk-JWPE2WC7-CSU5SIs8.js → chunk-JWPE2WC7-BvFVx2S8.js} +1 -1
- package/dist/{chunk-VQ5W62QI-Dtk59D_l.js → chunk-VQ5W62QI-BKtRw0gX.js} +1 -1
- package/dist/{chunk-XXDRQBXY-DzVLFl9c.js → chunk-XXDRQBXY-BFdjgXiI.js} +1 -1
- package/dist/{chunk-ZCHMQSOR-cdQdJeDJ.js → chunk-ZCHMQSOR-BV9eKUlK.js} +2 -2
- package/dist/{classDiagram-v2-4MYWR3UA-CABAzYlW.js → classDiagram-v2-4MYWR3UA-CrCmRIma.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-Ca8GJbqv.js → cose-bilkent-JH36ORCC-BLuhBHgL.js} +2 -2
- package/dist/customComponents-DasaZ6pq.js +1 -1
- package/dist/customComponents.en-US-CkabuCXg.js +1 -1
- package/dist/{customParseFormat-H00Ur3YB.js → customParseFormat-LvPG_yWc.js} +1 -1
- package/dist/{cynefinDiagram-WF24UDRP-iIy_O6OH.js → cynefinDiagram-WF24UDRP-Dkdu7UWf.js} +2 -2
- package/dist/{dagre-NK4GIZVX-lW5Hra0G.js → dagre-NK4GIZVX-wQ94w-j-.js} +2 -2
- package/dist/{dayjs.min-C8_4Wqpb.js → dayjs.min-C7Hp2iGA.js} +1 -1
- package/dist/{diagram-CBK3MWTC-l5LVSm6X.js → diagram-CBK3MWTC-DFfVlq-I.js} +3 -3
- package/dist/{diagram-I5XIIV2D-ChpwB8Wz.js → diagram-I5XIIV2D-kg2lU_ud.js} +2 -2
- package/dist/{diagram-ODIL2UCW-DBavGl7R.js → diagram-ODIL2UCW-Cq22spS8.js} +3 -3
- package/dist/{diagram-PFBEJUXE-B3fNIQm9.js → diagram-PFBEJUXE-6v743_6i.js} +2 -2
- package/dist/{diagram-RJA3I4VV-Dmj0Shdh.js → diagram-RJA3I4VV-CfpzBZG7.js} +2 -2
- package/dist/{diagram-TYUNFSNR-D98rsKpY.js → diagram-TYUNFSNR-DWcS3i5W.js} +6 -6
- package/dist/{ebnfDiagram-V4P3TTPT-Bxr2oP9U.js → ebnfDiagram-V4P3TTPT-CDdo-DHX.js} +3 -3
- package/dist/{elk-QONTBCTQ-CvFT6Pst.js → elk-QONTBCTQ-tURRkPjL.js} +5 -5
- package/dist/{erDiagram-KYQIGQAA-dgeEoLzk.js → erDiagram-KYQIGQAA-DOUye_XT.js} +4 -4
- package/dist/{flowDiagram-IUGLLWBU-ChsJgBPn.js → flowDiagram-IUGLLWBU-DSva8jfA.js} +7 -7
- package/dist/{ganttDiagram-R7GPNTJY-C9WcR8Tf.js → ganttDiagram-R7GPNTJY-yY38MCsA.js} +4 -4
- package/dist/generateCypher-Cv-1H1ju.js +1088 -0
- package/dist/{gitGraphDiagram-PDYL7XHY-CeZTDs7V.js → gitGraphDiagram-PDYL7XHY-Cib4RIM7.js} +3 -3
- package/dist/{infoDiagram-MVDRKAX5-CzfcVWVf.js → infoDiagram-MVDRKAX5-C95Rlu7T.js} +1 -1
- package/dist/{ishikawaDiagram-HPEHV2GE-BK4ExPHB.js → ishikawaDiagram-HPEHV2GE-BAJtxdug.js} +2 -2
- package/dist/{journeyDiagram-BOSHW7O7-DXJ-ihrY.js → journeyDiagram-BOSHW7O7-D0_UFC4-.js} +4 -4
- package/dist/{kanban-definition-FNSA4HC5-C9rAkIZN.js → kanban-definition-FNSA4HC5-DVGJd60c.js} +2 -2
- package/dist/{mermaid.core-uROF3Ult.js → mermaid.core-CaigvKK3.js} +5803 -5740
- package/dist/{mindmap-definition-6OY57UG3-DC9FfvxT.js → mindmap-definition-6OY57UG3-Cc9NVGcT.js} +3 -3
- package/dist/{models-D5Mffixi.js → models-9HukOADg.js} +1 -1
- package/dist/{object-metric-numeric-DIgqXqB5.js → object-metric-numeric-DpQoy02c.js} +1 -1
- package/dist/{object-metric.service-B3PtIPEA.js → object-metric.service-Bs69yRkm.js} +2 -2
- package/dist/{pegDiagram-ECIUJNBX-CUCvcOc0.js → pegDiagram-ECIUJNBX-DAnSZciK.js} +3 -3
- package/dist/{pieDiagram-GNMPY74T-DprBId-p.js → pieDiagram-GNMPY74T-CPRmYgcD.js} +2 -2
- package/dist/{prompt-D9VtVs5i.js → prompt-CdE-v-Ut.js} +131 -110
- package/dist/{quadrantDiagram-D57K4MC3-CcvW9eIV.js → quadrantDiagram-D57K4MC3--PBqyWig.js} +1 -1
- package/dist/{railroadDiagram-Y72NRBL7-DH43paGB.js → railroadDiagram-Y72NRBL7-v4wxw4pH.js} +3 -3
- package/dist/{requirementDiagram-EQYSW5RA-CBY8WT39.js → requirementDiagram-EQYSW5RA-CXUiIggI.js} +3 -3
- package/dist/{sankeyDiagram-SY24JHO5-DD80tYLM.js → sankeyDiagram-SY24JHO5-CXWMlyCF.js} +2 -2
- package/dist/{sequenceDiagram-BLEHNHQU-Bo9dDD6b.js → sequenceDiagram-BLEHNHQU-BBOTQGfc.js} +3 -3
- package/dist/{sizeCapture-INFHLROL-BQTwKEEH.js → sizeCapture-INFHLROL-CoWTXUCl.js} +1 -1
- package/dist/{stateDiagram-v2-A6IESKWZ-um_LWxkE.js → stateDiagram-v2-A6IESKWZ-f2F4pX57.js} +4 -4
- package/dist/{swimlanes-B3ENRKFQ-DyYkLRSQ.js → swimlanes-B3ENRKFQ-Cpfk8ZRY.js} +3 -3
- package/dist/{swimlanesDiagram-AYQRV4AK-DlAG_Vwl.js → swimlanesDiagram-AYQRV4AK-hM77bzoI.js} +3 -3
- package/dist/{text-BqSVQKS6.js → text-CzC6K33E.js} +7 -3
- package/dist/{text.en-US-BhAxy_LE.js → text.en-US-D8mxBP0p.js} +6 -2
- package/dist/{timeline-definition-JXYKGLGB-DVH8Jsv4.js → timeline-definition-JXYKGLGB-BR5tHWmO.js} +1 -1
- package/dist/toolMatchLines-CvXMA8LD.js +4675 -0
- package/dist/{useLabData-fKy_tVvS.js → useLabData-OIsblj-7.js} +8035 -7259
- package/dist/{usecaseDiagram-WPOLBNNX-DvsgvjCb.js → usecaseDiagram-WPOLBNNX-DKhBwmOs.js} +3 -3
- package/dist/{vennDiagram-Q3Y3IDCW-BQcWfjtm.js → vennDiagram-Q3Y3IDCW-BnwNAM2m.js} +2 -2
- package/dist/{wardleyDiagram-IVAIDKWA-M_Wv4tRx.js → wardleyDiagram-IVAIDKWA-BAl9UccR.js} +2 -2
- package/dist/{workshop-app-wZ37Phc-.js → workshop-app-7WTuNuCp.js} +9216 -8813
- package/dist/workshop-app.css +1 -1
- package/dist/workshop-app.js +2 -2
- package/dist/{xychartDiagram-4URNHDU4-DBviJ7Ux.js → xychartDiagram-4URNHDU4-DAUWzPOU.js} +1 -1
- package/dist-cli/workshop.js +221 -169
- package/package.json +1 -1
- package/skill/SKILL.en-US.md +5 -0
- package/skill/SKILL.md +3 -0
- package/dist/AppFormModal-ByNEloW-.js +0 -4282
- package/dist/AppListPage-D2NVBJs7.js +0 -1465
- package/dist/WorkshopLabPage-C7hssyUo.js +0 -11364
- package/dist/generateCypher-kvNYDLY4.js +0 -399
package/dist/{mindmap-definition-6OY57UG3-DC9FfvxT.js → mindmap-definition-6OY57UG3-Cc9NVGcT.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as ce } from "./chunk-XXDRQBXY-
|
|
2
|
-
import { s as le } from "./chunk-VQ5W62QI-
|
|
3
|
-
import { _ as h, l as I, r as he, t as de, O as ge, R as j, c as P, j as G, b1 as ue, a7 as pe, a8 as fe, a9 as me } from "./mermaid.core-
|
|
1
|
+
import { g as ce } from "./chunk-XXDRQBXY-BFdjgXiI.js";
|
|
2
|
+
import { s as le } from "./chunk-VQ5W62QI-BKtRw0gX.js";
|
|
3
|
+
import { _ as h, l as I, r as he, t as de, O as ge, R as j, c as P, j as G, b1 as ue, a7 as pe, a8 as fe, a9 as me } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
const _ = [];
|
|
5
5
|
for (let t = 0; t < 256; ++t)
|
|
6
6
|
_.push((t + 256).toString(16).slice(1));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as n, t as p, J as a } from "./workshop-app-
|
|
1
|
+
import { B as n, t as p, J as a } from "./workshop-app-7WTuNuCp.js";
|
|
2
2
|
const s = a(), m = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/, y = new n("-9223372036854775808"), d = new n("9223372036854775807"), g = /* @__PURE__ */ new Set(["int64", "decimal", "duration"]);
|
|
3
3
|
function c(t) {
|
|
4
4
|
const e = t.trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as s, q as a, v as b } from "./workshop-app-
|
|
2
|
-
import { serializeObjectMetricBody as c } from "./object-metric-numeric-
|
|
1
|
+
import { n as s, q as a, v as b } from "./workshop-app-7WTuNuCp.js";
|
|
2
|
+
import { serializeObjectMetricBody as c } from "./object-metric-numeric-DpQoy02c.js";
|
|
3
3
|
function d(e) {
|
|
4
4
|
if (e === "forward" || e === "outgoing") return "forward";
|
|
5
5
|
if (e === "backward" || e === "incoming") return "backward";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as l, r as m, d as a } from "./chunk-2E7WHVMD-
|
|
2
|
-
import { p } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as t, l as o } from "./mermaid.core-
|
|
1
|
+
import { g as l, r as m, d as a } from "./chunk-2E7WHVMD-C7KAk7Aw.js";
|
|
2
|
+
import { p } from "./chunk-JWPE2WC7-BvFVx2S8.js";
|
|
3
|
+
import { _ as t, l as o } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
import { M as u, d as c } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
|
|
5
5
|
var f = c().RailroadPeg.parser.LangiumParser, i = /* @__PURE__ */ t((e) => {
|
|
6
6
|
const r = e.alternatives.map(d);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as tt } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { g as et, s as at, a as rt, b as it, x as nt, v as ot, _ as l, l as E, c as st, Q as lt, T as ct, V as dt, W as I, d as gt, D as ht, X as pt, R as ft } from "./mermaid.core-
|
|
1
|
+
import { p as tt } from "./chunk-JWPE2WC7-BvFVx2S8.js";
|
|
2
|
+
import { g as et, s as at, a as rt, b as it, x as nt, v as ot, _ as l, l as E, c as st, Q as lt, T as ct, V as dt, W as I, d as gt, D as ht, X as pt, R as ft } from "./mermaid.core-CaigvKK3.js";
|
|
3
3
|
import { p as ut } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
|
|
4
4
|
import { o as mt } from "./d3-scale-DA8IHmf0.js";
|
|
5
5
|
var vt = ft.pie, R = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import { G as j, H as
|
|
3
|
-
import { x as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
import { h as P, l as F, A as w, g as N, f as x } from "./PageRenderer-BYBHi5At.js";
|
|
2
|
+
import { G as j, H as R, I as A, J as I, a as C, K as g, L as k, N as S, O as D, P as W, Q as v, U as Y, V as L, W as U, X as G } from "./useLabData-OIsblj-7.js";
|
|
3
|
+
import { x as H, y as J, L as q, C as z, P as E, D as Z, z as X, W as B, F as K, A as V } from "./workshop-app-7WTuNuCp.js";
|
|
4
|
+
const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
5
|
+
function ge(e) {
|
|
6
|
+
return b(e) && e.scheduleModel !== void 0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
8
|
+
function Q(e, t, i) {
|
|
9
|
+
const n = (e.actionTypes ?? []).filter((o) => !i || i.has(o.objectType)).map((o) => {
|
|
10
10
|
const l = (o.inputs ?? []).map((r) => r.label && r.label !== r.name ? `${r.name}(${r.label})` : r.name);
|
|
11
11
|
return `- ${o.id}:${o.name},对象类 ${o.objectType},${o.kind}${l.length > 0 ? `;输入:${l.join("、")}` : ""}`;
|
|
12
12
|
}), s = t.map(
|
|
@@ -19,7 +19,7 @@ function K(e, t, n) {
|
|
|
19
19
|
|
|
20
20
|
scheduleModel 的结构(只填知识网络里确有依据的项;没把握的项省略,由向导按知识网络建议):
|
|
21
21
|
- result:"self"(直接改任务本身的资源与时间,由任务的修改行动写回)或 "record"(写入计划记录,任务本身不改,由计划记录的新建、修改行动写回)。
|
|
22
|
-
- tasks:[{ objectType, assignField?, start?, end?, status?, doneWhen?: [{ field, op: "eq", value }], groupField?, target?: { path?, field }, ready?: { path, field }, predecessors?: { path: [关系] }, modify?: { action }, rules?: [{ name, tool: { box, tool }, severity?: "hard" | "soft" }] }]:被排的东西,1 到 ${
|
|
22
|
+
- tasks:[{ objectType, assignField?, start?, end?, status?, doneWhen?: [{ field, op: "eq", value }], groupField?, target?: { path?, field }, ready?: { path, field }, predecessors?: { path: [关系] }, modify?: { action }, rules?: [{ name, tool: { box, tool }, severity?: "hard" | "soft" }] }]:被排的东西,1 到 ${I} 类共用同一类资源。assignField 为取值是资源标识的字段;target 为何时要完成(任务自己的日期,或沿 path 到达的对象的日期,如工单的交期);ready 为开工前要就绪的对象及其就绪日;predecessors 为同类任务之间的前序关系(一条)。result 为 record 时只能 1 类任务,不写 assignField、start、end、modify,可写 groupField(成批的字段,如预测单号)。
|
|
23
23
|
- resource:{ objectType, titleField, parentField?, groupField?, capacityField? }:资源(产线、机台、班组),parentField 为上级资源标识(与 groupField 二选一),capacityField 为并行上限(数字)。
|
|
24
24
|
- calendars?:[{ objectType, resourceField, start, end }]:资源不可用的时段(停线、停机、请假),最多 3 个。
|
|
25
25
|
- record(result 为 record 时):{ objectType, match: [{ from: 计划记录的字段, to: 任务的字段 }], resourceField, start, end, status?, active?: [{ field, op: "ne", value }], create?: { action }, modify?: { action }, daysField? }。match 是计划认出“为哪条需求排的”的字段:只用单号、编码这类编号(如 单号 ↔ 单号、产品编码 ↔ 物料编码),合起来要能唯一确定一条需求(一张单有多个产品时,单号之外再加产品编码);不要用数量、日期、状态,它们碰巧相等不代表是同一条需求。
|
|
@@ -27,18 +27,18 @@ scheduleModel 的结构(只填知识网络里确有依据的项;没把握的
|
|
|
27
27
|
- action 只能用下面列出的、对应对象类上的行动类 id。create、modify 可写 params:{ 输入名: { from: "field", name: 属性名 } | { from: "const", value } }。行动的必填输入没有同名字段可取、而说明里写了通常取值(如「计划状态,新建通常为已排」)时,填 { from: "const", value: "已排" },不要留空。
|
|
28
28
|
|
|
29
29
|
行动类(id:名称,对象类,种类):
|
|
30
|
-
${
|
|
30
|
+
${n.length > 0 ? n.join(`
|
|
31
31
|
`) : "(无)"}
|
|
32
32
|
|
|
33
33
|
可用规则函数(只能从这里选,box、tool 原样照抄):
|
|
34
34
|
${s.length > 0 ? s.join(`
|
|
35
35
|
`) : "(知识网络没有挂载带规则函数的工具箱)"}
|
|
36
36
|
|
|
37
|
-
needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${
|
|
37
|
+
needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${A.join("、")} 之一。needs 的 text 是给业务人员看的:对象类、属性、行动一律写显示名(如“预测单号”),不要写 id 或属性名(如 billno)。不要编造 id,也不要用别的对象、属性凑;规则函数没有合适的就不写进 rules,在 needs 里写“建议新建:XX 检查(读哪些对象、判断什么)”。
|
|
38
38
|
当前 App Spec 已有 scheduleModel 时,输出修改后的完整 scheduleModel:用户没提到的答案原样保留。只改调度甘特的显示时,在 scheduleModel 里写 display:{ resource?: { title?, tick?, daysBefore?, daysAfter?, layers?: [{ color?, tone?, colorField?, popoverFields? }] }, demand?: 同 },layers 按甘特现有图层的顺序。
|
|
39
39
|
请求与调度无关(例如加一张指标卡)时,照常输出 patch 或 spec,不要写 scheduleModel。`;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ee(e) {
|
|
42
42
|
return e ? [
|
|
43
43
|
...Array.isArray(e.tasks) ? e.tasks.map((t) => t?.objectType) : [],
|
|
44
44
|
e.resource?.objectType,
|
|
@@ -46,11 +46,11 @@ function V(e) {
|
|
|
46
46
|
e.record?.objectType
|
|
47
47
|
].filter((t) => typeof t == "string") : [];
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
y && y !== r && !
|
|
53
|
-
}, o =
|
|
49
|
+
const te = /([`'"]?)\b([A-Za-z_][A-Za-z0-9_]*)\b\1/g;
|
|
50
|
+
function M(e, t, i) {
|
|
51
|
+
const n = /* @__PURE__ */ new Map(), s = (r, y) => {
|
|
52
|
+
y && y !== r && !n.has(r) && n.set(r, y);
|
|
53
|
+
}, o = ee(i), l = [
|
|
54
54
|
...o.map((r) => t.objectTypes[r]).filter(Boolean),
|
|
55
55
|
...Object.values(t.objectTypes).filter((r) => !o.includes(r.id))
|
|
56
56
|
];
|
|
@@ -58,53 +58,53 @@ function E(e, t, n) {
|
|
|
58
58
|
for (const r of t.actionTypes ?? []) s(r.id, r.name);
|
|
59
59
|
for (const r of t.relations) s(r.id, r.name);
|
|
60
60
|
for (const r of l) for (const y of r.properties) s(y.name, y.label);
|
|
61
|
-
return e.replace(
|
|
62
|
-
const $ =
|
|
61
|
+
return e.replace(te, (r, y, m) => {
|
|
62
|
+
const $ = n.get(m);
|
|
63
63
|
return $ ? y ? `「${$}」` : $ : r;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return Array.isArray(e) ? e.flatMap((
|
|
68
|
-
if (typeof
|
|
69
|
-
return
|
|
70
|
-
if (!
|
|
71
|
-
const s =
|
|
72
|
-
return [{ ...s ? { step: s } : {}, text:
|
|
66
|
+
function se(e, t, i) {
|
|
67
|
+
return Array.isArray(e) ? e.flatMap((n) => {
|
|
68
|
+
if (typeof n == "string")
|
|
69
|
+
return n.trim() ? [{ text: M(n.trim(), t, i) }] : [];
|
|
70
|
+
if (!b(n) || typeof n.text != "string" || !n.text.trim()) return [];
|
|
71
|
+
const s = A.includes(n.step) ? n.step : void 0;
|
|
72
|
+
return [{ ...s ? { step: s } : {}, text: M(n.text.trim(), t, i) }];
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
if (!
|
|
75
|
+
function Te(e, t, i, n) {
|
|
76
|
+
if (!b(e) || !b(e.scheduleModel))
|
|
77
77
|
return { ok: !1, errors: ["scheduleModel 必须是对象"] };
|
|
78
78
|
const s = e.scheduleModel, o = [];
|
|
79
79
|
if (j.includes(s.result) || o.push(`scheduleModel.result 只能是 ${j.join("、")}`), !Array.isArray(s.tasks) || s.tasks.length === 0)
|
|
80
80
|
return { ok: !1, errors: [...o, "scheduleModel.tasks 至少要有一类任务"] };
|
|
81
81
|
const l = {
|
|
82
82
|
...s,
|
|
83
|
-
tasks: s.tasks.map((y) =>
|
|
84
|
-
resource:
|
|
83
|
+
tasks: s.tasks.map((y) => b(y) ? { ...y } : y),
|
|
84
|
+
resource: b(s.resource) ? s.resource : { objectType: "?", titleField: "?" }
|
|
85
85
|
};
|
|
86
86
|
if (o.push(
|
|
87
|
-
...
|
|
87
|
+
...R(l).filter(
|
|
88
88
|
// Required where results go onto the tasks or into plan records: the wizard suggests them.
|
|
89
89
|
(y) => !/ 必填$| 写入计划记录时必填$/.test(y)
|
|
90
90
|
)
|
|
91
91
|
), o.length > 0) return { ok: !1, errors: o };
|
|
92
|
-
if (o.push(...
|
|
92
|
+
if (o.push(...oe(s, t, i, n)), o.length > 0) return { ok: !1, errors: o };
|
|
93
93
|
const r = s;
|
|
94
|
-
return { ok: !0, proposal: { model: r, needs:
|
|
94
|
+
return { ok: !0, proposal: { model: r, needs: se(e.needs, t, r) } };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function oe(e, t, i, n) {
|
|
97
97
|
const s = [], o = "不在知识网络里:不要编造,缺的写进 needs", l = (a, c) => a === void 0 ? !1 : t.objectTypes[a] ? !0 : (s.push(`${c} 的对象类 ${a} ${o}`), !1), r = (a, c, p) => {
|
|
98
98
|
c === void 0 || c === "" || t.objectTypes[a]?.properties.some((u) => u.name === c) || s.push(`${p} 的属性 ${c} 不是 ${a} 的属性:只用知识网络一节列出的属性名`);
|
|
99
99
|
}, y = (a, c, p) => {
|
|
100
100
|
if (!c?.length) return a;
|
|
101
|
-
const u =
|
|
101
|
+
const u = J(t, a, c);
|
|
102
102
|
if (!u || u.length === 0) {
|
|
103
103
|
s.push(`${p} 的关系 ${c.join(" > ")} 从 ${a} 走不通:${o}`);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
return u[u.length - 1].to;
|
|
107
|
-
},
|
|
107
|
+
}, m = (a, c, p) => {
|
|
108
108
|
if (!c) return;
|
|
109
109
|
const u = C(t, c);
|
|
110
110
|
u ? u.objectType !== a && s.push(`${p} 的行动 ${c} 作用于 ${u.objectType},不是 ${a}`) : s.push(`${p} 的行动 ${c} ${o}`);
|
|
@@ -124,10 +124,10 @@ function te(e, t, n, i) {
|
|
|
124
124
|
T && r(T, h.field, `${p}.${d}`);
|
|
125
125
|
}
|
|
126
126
|
for (const d of a.predecessors?.path ?? [])
|
|
127
|
-
t.relations.some((h) => h.id ===
|
|
128
|
-
|
|
127
|
+
t.relations.some((h) => h.id === H(d).id) || s.push(`${p}.predecessors 的关系 ${d} ${o}`);
|
|
128
|
+
m(u, a.modify?.action, `${p}.modify`);
|
|
129
129
|
for (const d of a.rules ?? [])
|
|
130
|
-
|
|
130
|
+
i.some((h) => h.box === d.tool.box && h.tool === d.tool.tool) || s.push(
|
|
131
131
|
`${p}.rules 的规则函数 ${d.tool.box}/${d.tool.tool} 不在可用规则函数里:只能照抄列出的,没有合适的写进 needs`
|
|
132
132
|
);
|
|
133
133
|
});
|
|
@@ -151,19 +151,19 @@ function te(e, t, n, i) {
|
|
|
151
151
|
t.objectTypes[f.objectType]?.properties.find((d) => d.name === c.from)?.type,
|
|
152
152
|
t.objectTypes[e.tasks[0]?.objectType ?? ""]?.properties.find((d) => d.name === c.to)?.type
|
|
153
153
|
];
|
|
154
|
-
!
|
|
154
|
+
!n?.record?.match?.some((d) => d.from === c.from && d.to === c.to) && p.some((d) => d === "number" || d === "date") && s.push(
|
|
155
155
|
`${a}.match 的 ${c.from} = ${c.to} 是数量或日期:计划与需求只按单号、编码这类编号字段对应(如预测单号 + 产品编码),不要用数量、日期、状态`
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
for (const c of f.active ?? []) r(f.objectType, c.field, `${a}.active`);
|
|
159
|
-
|
|
159
|
+
m(f.objectType, f.create?.action, `${a}.create`), m(f.objectType, f.modify?.action, `${a}.modify`);
|
|
160
160
|
}
|
|
161
161
|
return s;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const O = (e) => Object.entries(e).filter(([t]) => !B.has(t)).map(([t, [i, n]]) => `${t} ${i}×${n}`).join("、"), re = O(K), ie = O(V), ne = X.filter(
|
|
164
164
|
(e) => g[e].category === "scenario"
|
|
165
|
-
),
|
|
166
|
-
- 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`,
|
|
165
|
+
), ae = `
|
|
166
|
+
- 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`, ce = `## 页面写法
|
|
167
167
|
1. 一页一个任务:页面标题写谁要做什么(如“今日缺料”“待回复采购单”),不写功能名。
|
|
168
168
|
2. 首屏先说结论:页面开头放一个文字组件(text),一句话说清现在怎么样、先干什么,数字用 values 引用;下面最多 4 个关键数字,一个按紧急程度或日期排好的清单(告警、事件列表或表格),再加最多两张图。其余放到下一页或详情抽屉。
|
|
169
169
|
3. 数字带一句说明:指标卡每项写 description,说明它的含义或该干什么;表格、告警、事件列表、图表也写一句 description。
|
|
@@ -176,27 +176,27 @@ const se = Object.entries(B).filter(([e]) => !Z.has(e)).map(([e, [t, n]]) => `${
|
|
|
176
176
|
10. 空状态说清楚:没有数据时写明原因和下一步。
|
|
177
177
|
11. 页面不超过 7 页:按“每天看”“偶尔用”“设置”分组。
|
|
178
178
|
`;
|
|
179
|
-
function
|
|
180
|
-
newComponents:
|
|
179
|
+
function je(e, t, i = [], {
|
|
180
|
+
newComponents: n = !1,
|
|
181
181
|
...s
|
|
182
182
|
} = {}) {
|
|
183
183
|
return `你是 Workshop 应用构建助手,负责生成或修改业务应用的 App Spec(JSON)。页面只能用固定的布局类型和标准组件,业务差异全部写在数据源(含进度、计算列)、筛选(variables)和组件 config 里。
|
|
184
184
|
|
|
185
|
-
${
|
|
185
|
+
${de(e, t, i, s)}
|
|
186
186
|
|
|
187
187
|
## 输出
|
|
188
188
|
只输出一个 JSON 对象,不要解释、不要 Markdown:
|
|
189
189
|
- 小改动输出 {"patch": [...]},为 JSON Patch(op 为 add、remove、replace、move、test),路径相对 App Spec,例如 /pages/0/regions/grid/1/config/title;数组末尾追加用 "-"。改动或删除某个组件前,先用 test 核对下标指向的就是它,例如 {"op":"test","path":"/pages/0/regions/grid/1/id","value":"kpis"};删除同一数组里的几项时从后往前删。
|
|
190
|
-
- 新建应用或大改输出 {"spec": 完整 App Spec}。${
|
|
190
|
+
- 新建应用或大改输出 {"spec": 完整 App Spec}。${n ? ae : ""}
|
|
191
191
|
用户没有要求改的部分保持不变;只用上面列出的组件、配置项、对象类、属性和关系。`;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
scenarios:
|
|
193
|
+
function de(e, t, i = [], {
|
|
194
|
+
scenarios: n = !0,
|
|
195
195
|
ruleTools: s,
|
|
196
|
-
scheduling: o =
|
|
196
|
+
scheduling: o = i.some((l) => l.type === "scheduleGantt")
|
|
197
197
|
} = {}) {
|
|
198
|
-
const l = s && o ?
|
|
199
|
-
`), y =
|
|
198
|
+
const l = s && o ? Q(e, s, t) : "", r = Object.entries(q).map(([$, f]) => `- ${$}:区域 ${f.join("、")}`).join(`
|
|
199
|
+
`), y = k(n).map(($) => {
|
|
200
200
|
const f = g[$];
|
|
201
201
|
return `### ${$}(${f.label})
|
|
202
202
|
${f.description}
|
|
@@ -204,8 +204,8 @@ config:
|
|
|
204
204
|
${S(f.descriptors)}`;
|
|
205
205
|
}).join(`
|
|
206
206
|
|
|
207
|
-
`),
|
|
208
|
-
方案推演需要企业版,当前环境不提供:不要加方案类组件(${
|
|
207
|
+
`), m = n ? "" : `
|
|
208
|
+
方案推演需要企业版,当前环境不提供:不要加方案类组件(${ne.join("、")});用户要求方案推演时,只输出不含它们的 App Spec。`;
|
|
209
209
|
return `## App Spec 结构
|
|
210
210
|
{ apiVersion: "${D}", app: { id, name }, dependencies: { knowledgeNetwork: { id: "${e.id}", name: "${e.name}" } }, sources, variables, eventTypes?, scheduleModel?, pages: [ { id, title, layout, regions, detail? } ], theme }
|
|
211
211
|
- 数据源、筛选和主题属于整个应用,所有页面共用,筛选的值在页面之间保留。
|
|
@@ -219,21 +219,35 @@ ${r}
|
|
|
219
219
|
- workbench:side 为侧栏(宽 sideWidth 220–420,位置 sidePosition left/right),main 为主区,aside 为右栏(宽 asideWidth,0 表示隐藏,否则 240–420)。
|
|
220
220
|
- dashboard:header 为顶部整行;grid 为网格,列数 columns 2–4,组件用 span 指定跨列数。
|
|
221
221
|
- detail:header 顶部整行;main 主区;aside 右栏。
|
|
222
|
-
- free
|
|
222
|
+
- free:自由网格,区域只有 cells;每个组件必须带 frame { x, y, w, h }(列与行,从左上角数起);同一行的组件 y 相同,不要重叠。网格有两种,由 layout.grid 决定,frame 与 pinRows 都按本页网格计数:
|
|
223
|
+
- grid: "fine"(细网格):24 列,每行连同间距约 27 像素;frame { x: 0–23, y: 0–800, w: 1–24, h: 2–80 },且 x + w ≤ 24;w、h 不得小于组件的最小尺寸(列×行):${re}。新建的自由网格页面一律写 grid: "fine"。
|
|
224
|
+
- 不写 grid 或 grid: "standard"(标准网格):12 列,行高 40 像素;frame { x: 0–11, y: 0–400, w: 1–12, h: 2–40 },且 x + w ≤ 12;最小尺寸:${ie}。
|
|
225
|
+
- 修改已有页面时不要改它的 grid,frame 按它原来的网格写。
|
|
226
|
+
- pinRows(可选,标准网格 0–12、细网格 0–24)为页面滚动时固定在顶部的行数:完全落在前 pinRows 行里的组件(如基准日期、筛选)一直显示在顶部;有组件从这几行开始、又延伸到下面时整页不固定,所以固定的组件要整个放在这几行里。
|
|
223
227
|
- gap 为 compact、normal、relaxed。
|
|
224
228
|
|
|
225
229
|
## 数据源(sources)
|
|
226
230
|
每项 { id, label, objectType, key, progress?, computed? }:objectType 为对象类 id;key 为标识对象的属性。
|
|
227
231
|
子集 { id, label, objectType, key, from: { source, where?, filters? } }:另一个数据源的子集,组件的 source 可以选它。from.source 为来源数据源 id(不能再是子集,也不能是带参数的 Cypher 数据源);where 为对象须全部满足的条件,可读来源的属性、进度列和计算列,写法同计算列的条件;filters 为它跟随的筛选,写法同组件的 filters。objectType、key 必须与来源一致;progress、computed 沿用来源,不能自己写。同一个子集(如“执行中的订单”)要给多个组件用,或要按条件统计时,定义成子集。
|
|
228
232
|
字段格式 formats(可选):{ 字段名: { unit?, decimals?, colors? } },所有组件显示这个字段时都沿用。unit 为数字的单位(如 件、万元),decimals 为小数位(0–6),colors 为着色规则列表 [{ when: 条件列表, tone }]:行满足条件时该字段显示为这个颜色(tone 同计算列的色调:neutral/info/success/warning/danger),条件可读本行任何字段,第一条成立的生效。子集沿用来源的格式。
|
|
229
|
-
${
|
|
230
|
-
${
|
|
233
|
+
${W}
|
|
234
|
+
${z}
|
|
235
|
+
|
|
236
|
+
## 自动联动(页面的 linking)
|
|
237
|
+
页面 linking 为 auto 时自动联动(新建的页面都写 linking: "auto"):点击任一组件(表格的行、指标卡、分段与下拉筛选、透视表的行、趋势图、地图、告警、搜索框、日期区间)就是整页共享的一个条件,其他组件自动跟随——同类对象按同一字段或同一批对象筛,另一类对象沿知识网络里两类对象之间最短的关系连接筛(3 跳以内;一样短的有几条时沿任一条关联到即保留);详情抽屉、关系子图、Agent 自动读取最近点中的对象。所以这样的页面不要写 variables 里的取值、日期区间、搜索、选中对象、对象集合筛选,也不要写组件的 writes、selection、filters;基准日期 asOf 照旧是 variables 里的一项。
|
|
238
|
+
只在需要判断时写这几项:
|
|
239
|
+
- 组件的 follow: false(写在组件这一层,与 id、type 并列):总量参照、目标值、对比基准这类不该随点击变的组件。
|
|
240
|
+
- 组件的 click(同一层):select 只选中对象、不筛选页面,用于只看详情的明细表;none 点击不产生条件。不写为筛选页面。
|
|
241
|
+
- 表格的表头搜索 search、勾选 picks、快捷筛选 quickFilter 默认不开,要开时写 true。
|
|
242
|
+
- 应用的 linkPaths:[{ between: [对象类, 对象类], path: [关系 id…] }],只在自动选的最短连接含义不对时写(按关系的名称与说明判断,例如只想按“供应商可供的物料”联动):指定一条路径(最多 4 跳,两个方向都生效),path 为空表示不联动。没有把握时不写。
|
|
243
|
+
- 自动规则覆盖不了的联动(两组互不影响的联动、同时选中两个对象对比、带参数的 Cypher 数据源)仍按下一节写显式筛选;组件写入显式筛选时点击只写它,不再产生页面条件。
|
|
244
|
+
linking 不写或为 manual 时按下一节手动联动。修改已有页面时不要擅自改它的 linking。
|
|
231
245
|
|
|
232
246
|
## 筛选(variables)与联动
|
|
233
|
-
|
|
247
|
+
手动联动的页面两头都是显式的:组件点击时把值写入一个筛选(组件 config 里的 writes 等配置项);其他组件在自己的 filters 里列出跟随哪些筛选、按自己的哪个字段比对。没列在 filters 里的筛选不影响它;filters 为空就不受任何筛选影响。筛选本身不绑数据源和字段,所以不同数据源的组件可以跟随同一个筛选(比如两类对象都有客户字段时,各按自己的客户字段跟随同一个“客户”筛选)。
|
|
234
248
|
每项 { name, label, kind, default? }:
|
|
235
249
|
- asOf:基准日期,全页一个。不是筛选,不用写进 filters:有进度或计算列读了基准日期的数据源自动按它计算。
|
|
236
|
-
- value:一个或几个取值,比如某个分类字段的值;组件写入时可以是几个值的列表,比如一张“未完成”指标卡写入 ["${
|
|
250
|
+
- value:一个或几个取值,比如某个分类字段的值;组件写入时可以是几个值的列表,比如一张“未完成”指标卡写入 ["${E.active.value}","${E.overdue.value}"](进度状态的代码)。跟随写 { variable, field }。
|
|
237
251
|
- dateRange:一段日期,值为 { from?, to? };日期区间组件写入它,趋势图点某个月也写入这个月的区间。跟随写 { variable, field }(field 为日期字段)。
|
|
238
252
|
- search:一段文字。跟随写 { variable, fields }(在这些文本字段里查找)。
|
|
239
253
|
- selection { source }:选中的一个对象,详情抽屉、关系子图和 Agent 读它(config 里的 selection),不写进 filters。
|
|
@@ -256,104 +270,111 @@ ${q}
|
|
|
256
270
|
用户只要求“提醒、告警、看哪些超期”时用 alertList 即可;要求“记录下来、要有人处理、要核实或关闭”时,才在 eventTypes 里处理知识网络的事件类型。
|
|
257
271
|
|
|
258
272
|
## 组件
|
|
259
|
-
regions 中每项 { id, type, span?, frame?, surface?, config };id 在页面内唯一,字母开头;span 只用于 dashboard,frame 只用于 free;surface(可选)为 card 或 plain,只给要和主题不同的组件写,如不带框的页面里给一张很密的表格加底色。${
|
|
273
|
+
regions 中每项 { id, type, span?, frame?, surface?, config };id 在页面内唯一,字母开头;span 只用于 dashboard,frame 只用于 free;surface(可选)为 card 或 plain,只给要和主题不同的组件写,如不带框的页面里给一张很密的表格加底色。${m}
|
|
260
274
|
${y}
|
|
261
275
|
|
|
262
|
-
### 详情抽屉 detail(type 固定为 ${
|
|
276
|
+
### 详情抽屉 detail(type 固定为 ${Z},不放在 regions 里)
|
|
263
277
|
${v.description}
|
|
264
278
|
config:
|
|
265
279
|
${S(v.descriptors)}
|
|
266
|
-
${
|
|
267
|
-
${
|
|
280
|
+
${le(i, l !== "")}${l}
|
|
281
|
+
${ce}
|
|
268
282
|
## 主题(theme)
|
|
269
283
|
surface(可选)为组件外观:card 每个组件带底色和边框,plain 组件直接放在页面上、靠间距分开,不写为 card。新建应用写 plain;改已有应用时,用户没要求就保留原值。
|
|
270
|
-
颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${
|
|
284
|
+
颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${Y},colorTextMuted 与 colorSurface 不低于 ${L};mode 为 light 或 dark;fontSize 12–16;radius 0–16;shadow 为 none、subtle、strong;density 为 compact、comfortable。
|
|
271
285
|
用户说的“强调色、主色”指 colorPrimary(chartPalette 第一个颜色通常与它一致);点名的颜色要在所选模板基础上改进去。主题模板:
|
|
272
|
-
${Object.values(
|
|
286
|
+
${Object.values(x).map(($) => `- ${$.name}:${JSON.stringify($)}`).join(`
|
|
273
287
|
`)}
|
|
274
288
|
|
|
275
|
-
${
|
|
289
|
+
${ye(e, t)}${ue(e, t)}${fe(e, t)}`;
|
|
276
290
|
}
|
|
277
|
-
function
|
|
291
|
+
function le(e, t = !1) {
|
|
278
292
|
return e.length === 0 ? "" : `
|
|
279
293
|
## 组件说明
|
|
280
294
|
以下组件附有说明,配置它们时以说明为准:先按“本体契约”把业务对象对应到组件的角色,再按“扩展点”接知识网络上的规则工具、逻辑属性或指标。说明中要求的对象类、属性、关系或工具在上面的知识网络里找不到时,不要用别的对象或计算列凑,也不要在配置里写业务规则,相应的可选项留空。${t ? "调度甘特按“调度模型”一节输出答案:规则函数只从那里列出的选,要补的内容写进 needs。其他组件里要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。" : "本提示不含执行工厂的工具清单:说明里提到的规则工具(如“齐套检查”)以及任何要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。说明里“问用户”“列出要补的内容”在这里不适用:只输出 App Spec。"}
|
|
281
295
|
|
|
282
|
-
${e.map((
|
|
283
|
-
${
|
|
296
|
+
${e.map((n) => `<guide type="${n.type}">
|
|
297
|
+
${n.text.trim()}
|
|
284
298
|
</guide>`).join(`
|
|
285
299
|
|
|
286
300
|
`)}
|
|
287
301
|
`;
|
|
288
302
|
}
|
|
289
|
-
function
|
|
290
|
-
const
|
|
291
|
-
return
|
|
292
|
-
const s = g[
|
|
293
|
-
return
|
|
303
|
+
function pe(e, t) {
|
|
304
|
+
const i = JSON.stringify(e ?? "");
|
|
305
|
+
return w.filter((n) => {
|
|
306
|
+
const s = g[n]?.label;
|
|
307
|
+
return i.includes(`"type":"${n}"`) || t.includes(n) || s !== void 0 && t.includes(s) || N(n).some((o) => t.toLowerCase().includes(o.toLowerCase()));
|
|
294
308
|
});
|
|
295
309
|
}
|
|
296
|
-
async function
|
|
297
|
-
const
|
|
298
|
-
|
|
310
|
+
async function Se(e, t, i = []) {
|
|
311
|
+
const n = [.../* @__PURE__ */ new Set([...pe(e, t), ...i])].filter(
|
|
312
|
+
P
|
|
299
313
|
);
|
|
300
314
|
return (await Promise.all(
|
|
301
|
-
|
|
315
|
+
n.map(async (o) => {
|
|
302
316
|
try {
|
|
303
|
-
return { type: o, text: await
|
|
317
|
+
return { type: o, text: await F(o) };
|
|
304
318
|
} catch {
|
|
305
319
|
return null;
|
|
306
320
|
}
|
|
307
321
|
})
|
|
308
322
|
)).filter((o) => o !== null);
|
|
309
323
|
}
|
|
310
|
-
function
|
|
311
|
-
const
|
|
312
|
-
return
|
|
324
|
+
function ue(e, t) {
|
|
325
|
+
const i = U(e, t);
|
|
326
|
+
return i ? `
|
|
313
327
|
|
|
314
328
|
## 对象指标
|
|
315
|
-
${
|
|
329
|
+
${i}` : "";
|
|
316
330
|
}
|
|
317
|
-
function
|
|
331
|
+
function fe(e, t) {
|
|
332
|
+
const i = G(e, t);
|
|
333
|
+
return i ? `
|
|
334
|
+
|
|
335
|
+
## 行动
|
|
336
|
+
${i}` : "";
|
|
337
|
+
}
|
|
338
|
+
function ve(e, t, i) {
|
|
318
339
|
return e ? `当前 App Spec:
|
|
319
340
|
${JSON.stringify(e)}
|
|
320
341
|
|
|
321
|
-
${
|
|
342
|
+
${i ? `${i}
|
|
322
343
|
|
|
323
344
|
` : ""}用户要求:${t}` : `当前还没有应用内容,请新建一个完整的 App Spec(输出 {"spec": ...})。
|
|
324
345
|
|
|
325
346
|
用户要求:${t}`;
|
|
326
347
|
}
|
|
327
|
-
const
|
|
328
|
-
function
|
|
329
|
-
const
|
|
348
|
+
const _ = 30;
|
|
349
|
+
function Ee(e, t, i) {
|
|
350
|
+
const n = /* @__PURE__ */ new Set(), s = JSON.stringify(t ?? "");
|
|
330
351
|
for (const o of Object.values(e.objectTypes))
|
|
331
|
-
(s.includes(`"${o.id}"`) ||
|
|
332
|
-
if (
|
|
352
|
+
(s.includes(`"${o.id}"`) || i.includes(o.name) || i.includes(o.id)) && n.add(o.id);
|
|
353
|
+
if (n.size === 0) {
|
|
333
354
|
const o = /* @__PURE__ */ new Map();
|
|
334
355
|
for (const l of e.relations)
|
|
335
356
|
for (const r of [l.source, l.target])
|
|
336
357
|
o.set(r, (o.get(r) ?? 0) + 1);
|
|
337
|
-
[...o].sort((l, r) => r[1] - l[1]).slice(0, 10).forEach(([l]) =>
|
|
358
|
+
[...o].sort((l, r) => r[1] - l[1]).slice(0, 10).forEach(([l]) => n.add(l));
|
|
338
359
|
}
|
|
339
|
-
return
|
|
360
|
+
return n;
|
|
340
361
|
}
|
|
341
|
-
function
|
|
342
|
-
const
|
|
362
|
+
function ye(e, t) {
|
|
363
|
+
const i = Object.values(e.objectTypes), n = (s) => !t || i.length <= _ || t.has(s);
|
|
343
364
|
return `## 知识网络 ${e.name}(${e.id})
|
|
344
|
-
对象类(id:名称;业务说明;属性 名称:类型(显示名))${
|
|
345
|
-
${
|
|
346
|
-
(s) => `- ${s.id}:${s.name}${s.comment ? `;${s.comment}` : ""}${
|
|
365
|
+
对象类(id:名称;业务说明;属性 名称:类型(显示名))${i.length > _ && t ? ";网络较大,只列出与本次要求相关的对象类的属性,其余只列名称,需要时请用户点名" : ""}:
|
|
366
|
+
${i.map(
|
|
367
|
+
(s) => `- ${s.id}:${s.name}${s.comment ? `;${s.comment}` : ""}${n(s.id) ? `;${s.properties.map((o) => `${o.name}:${o.type}(${o.label})`).join(",")}` : ""}`
|
|
347
368
|
).join(`
|
|
348
369
|
`)}
|
|
349
370
|
关系(id:名称,起点 → 终点;路径可以反向经过关系):
|
|
350
371
|
${e.relations.map((s) => `- ${s.id}:${s.name},${s.source} → ${s.target}`).join(`
|
|
351
|
-
`)}${
|
|
372
|
+
`)}${$e(e)}`;
|
|
352
373
|
}
|
|
353
|
-
function
|
|
374
|
+
function $e(e) {
|
|
354
375
|
if (!e.eventTypes) return "";
|
|
355
376
|
const t = e.eventTypes.map(
|
|
356
|
-
(
|
|
377
|
+
(i) => `- ${i.code}:${i.name},${i.source === "rule" ? "规则命中" : "用户登记"}${i.subject ? `,关于 ${i.subject}` : ""}`
|
|
357
378
|
);
|
|
358
379
|
return `
|
|
359
380
|
事件类型(编码:名称,来源,关于的对象类):
|
|
@@ -361,13 +382,13 @@ ${t.length > 0 ? t.join(`
|
|
|
361
382
|
`) : "(暂无)"}`;
|
|
362
383
|
}
|
|
363
384
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
385
|
+
ne as S,
|
|
386
|
+
pe as a,
|
|
387
|
+
ye as d,
|
|
388
|
+
Ee as f,
|
|
389
|
+
Se as g,
|
|
390
|
+
ge as i,
|
|
391
|
+
Te as p,
|
|
392
|
+
je as s,
|
|
393
|
+
ve as u
|
|
373
394
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as Ae, g as ke, x as ae, v as Fe, a as Pe, b as ve, _ as o, c as zt, l as bt, k as Lt, d as Ce, D as Le, R as z, j as Ee, Y as De } from "./mermaid.core-
|
|
1
|
+
import { s as Ae, g as ke, x as ae, v as Fe, a as Pe, b as ve, _ as o, c as zt, l as bt, k as Lt, d as Ce, D as Le, R as z, j as Ee, Y as De } from "./mermaid.core-CaigvKK3.js";
|
|
2
2
|
import { l as ie } from "./d3-scale-DA8IHmf0.js";
|
|
3
3
|
var Et = (function() {
|
|
4
4
|
var t = /* @__PURE__ */ o(function(Y, r, l, x) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as o, r as l, d as t } from "./chunk-2E7WHVMD-
|
|
2
|
-
import { p as m } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as n, l as s } from "./mermaid.core-
|
|
1
|
+
import { g as o, r as l, d as t } from "./chunk-2E7WHVMD-C7KAk7Aw.js";
|
|
2
|
+
import { p as m } from "./chunk-JWPE2WC7-BvFVx2S8.js";
|
|
3
|
+
import { _ as n, l as s } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
import { M as p, c as u } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
|
|
5
5
|
var d = u().Railroad.parser.LangiumParser, a = /* @__PURE__ */ n((e) => {
|
|
6
6
|
switch (e.$type) {
|
package/dist/{requirementDiagram-EQYSW5RA-CBY8WT39.js → requirementDiagram-EQYSW5RA-CXUiIggI.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as ze } from "./chunk-XXDRQBXY-
|
|
2
|
-
import { s as Xe } from "./chunk-VQ5W62QI-
|
|
3
|
-
import { _ as m, O as Be, b as Je, a as Ze, s as et, g as tt, v as st, x as it, c as Ne, l as qe, D as rt, F as nt, G as at, H as lt, M as ct, N as ot, r as ht, t as ut, u as ft } from "./mermaid.core-
|
|
1
|
+
import { g as ze } from "./chunk-XXDRQBXY-BFdjgXiI.js";
|
|
2
|
+
import { s as Xe } from "./chunk-VQ5W62QI-BKtRw0gX.js";
|
|
3
|
+
import { _ as m, O as Be, b as Je, a as Ze, s as et, g as tt, v as st, x as it, c as Ne, l as qe, D as rt, F as nt, G as at, H as lt, M as ct, N as ot, r as ht, t as ut, u as ft } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
var Ce = (function() {
|
|
5
5
|
var e = /* @__PURE__ */ m(function($, i, n, o) {
|
|
6
6
|
for (n = n || {}, o = $.length; o--; n[$[o]] = i) ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as Ae, x as Se, s as Le, g as Ee, b as $e, a as Te, _ as u, c as le, E as Me, k as K, aa as Ne, D as Ce, m as Pe } from "./mermaid.core-
|
|
2
|
-
import "./dayjs.min-
|
|
1
|
+
import { v as Ae, x as Se, s as Le, g as Ee, b as $e, a as Te, _ as u, c as le, E as Me, k as K, aa as Ne, D as Ce, m as Pe } from "./mermaid.core-CaigvKK3.js";
|
|
2
|
+
import "./dayjs.min-C7Hp2iGA.js";
|
|
3
3
|
import { w as ue, x as W, y as Ie, z as Oe, o as De } from "./d3-scale-DA8IHmf0.js";
|
|
4
4
|
function k(e) {
|
|
5
5
|
for (var a = e.length / 6 | 0, d = new Array(a), r = 0; r < a; ) d[r] = "#" + e.slice(r * 6, ++r * 6);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as pr } from "./chunk-2Q5K7J3B-
|
|
2
|
-
import { _ as f, q as Er, c as j, k as Ht, l as nt, p as Ue, d as ur, e as fr, m as N, b as He, s as _r, v as gr, a as xr, g as yr, x as Ir, y as Rr, J as Or, D as Lr, j as Ft, u as Q, a0 as tt, a1 as vt, V as Ge, a2 as br, O as zt, a3 as mr, a4 as Xe } from "./mermaid.core-
|
|
3
|
-
import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-
|
|
1
|
+
import { I as pr } from "./chunk-2Q5K7J3B-DJjZ1fjz.js";
|
|
2
|
+
import { _ as f, q as Er, c as j, k as Ht, l as nt, p as Ue, d as ur, e as fr, m as N, b as He, s as _r, v as gr, a as xr, g as yr, x as Ir, y as Rr, J as Or, D as Lr, j as Ft, u as Q, a0 as tt, a1 as vt, V as Ge, a2 as br, O as zt, a3 as mr, a4 as Xe } from "./mermaid.core-CaigvKK3.js";
|
|
3
|
+
import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-Dke6HW5r.js";
|
|
4
4
|
var ne = (function() {
|
|
5
5
|
var e = /* @__PURE__ */ f(function(_t, w, C, D) {
|
|
6
6
|
for (C = C || {}, D = _t.length; D--; C[_t[D]] = w) ;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as ie } from "./chunk-XXDRQBXY-
|
|
2
|
-
import { s as re } from "./chunk-VQ5W62QI-
|
|
3
|
-
import { _ as p, l as b, c as $, r as ae, t as ne, u as oe, a as le, b as ce, g as he, s as de, v as ue, x as fe, a6 as pe, m as U, D as Se, k as vt, B as ge, F as ye, G as me, H as Te, M as Ee } from "./mermaid.core-
|
|
4
|
-
import { c as _e } from "./chunk-55XCU76K-
|
|
1
|
+
import { g as ie } from "./chunk-XXDRQBXY-BFdjgXiI.js";
|
|
2
|
+
import { s as re } from "./chunk-VQ5W62QI-BKtRw0gX.js";
|
|
3
|
+
import { _ as p, l as b, c as $, r as ae, t as ne, u as oe, a as le, b as ce, g as he, s as de, v as ue, x as fe, a6 as pe, m as U, D as Se, k as vt, B as ge, F as ye, G as me, H as Te, M as Ee } from "./mermaid.core-CaigvKK3.js";
|
|
4
|
+
import { c as _e } from "./chunk-55XCU76K-Dke6HW5r.js";
|
|
5
5
|
var At = (function() {
|
|
6
6
|
var t = /* @__PURE__ */ p(function(V, o, f, n) {
|
|
7
7
|
for (f = f || {}, n = V.length; n--; f[V[n]] = o) ;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as rr } from "./chunk-4EMNKR2T-
|
|
2
|
-
import { c as ir } from "./chunk-ZCHMQSOR-
|
|
3
|
-
import { _ as l, l as yn } from "./mermaid.core-
|
|
1
|
+
import { a as rr } from "./chunk-4EMNKR2T-Da2DlW9r.js";
|
|
2
|
+
import { c as ir } from "./chunk-ZCHMQSOR-BV9eKUlK.js";
|
|
3
|
+
import { _ as l, l as yn } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
function To(t, { measure: e }) {
|
|
5
5
|
const n = t.config?.swimlane?.lineHops;
|
|
6
6
|
if (n === !1)
|
package/dist/{swimlanesDiagram-AYQRV4AK-DlAG_Vwl.js → swimlanesDiagram-AYQRV4AK-hM77bzoI.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as e, s as r } from "./flowDiagram-IUGLLWBU-
|
|
2
|
-
import { _ as a } from "./mermaid.core-
|
|
3
|
-
import "./dayjs.min-
|
|
1
|
+
import { c as e, s as r } from "./flowDiagram-IUGLLWBU-DSva8jfA.js";
|
|
2
|
+
import { _ as a } from "./mermaid.core-CaigvKK3.js";
|
|
3
|
+
import "./dayjs.min-C7Hp2iGA.js";
|
|
4
4
|
var s = /* @__PURE__ */ a((t) => `${r(t)}
|
|
5
5
|
.swimlane.cluster:not([data-color-id]) rect {
|
|
6
6
|
stroke: ${t.clusterBorder} !important;
|