@vtj/designer 0.16.2 → 0.16.3

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.
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./index-CylPCp09.js";
2
+ export {
3
+ f as default
4
+ };
@@ -19,10 +19,10 @@ import { editor as Bm } from "monaco-editor";
19
19
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
20
20
  * @name @vtj/designer
21
21
  * @author CHC chenhuachun1549@dingtalk.com
22
- * @version 0.16.2
22
+ * @version 0.16.3
23
23
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
24
24
  */
25
- const dr = "0.16.2", Um = {
25
+ const dr = "0.16.3", Um = {
26
26
  width: 390,
27
27
  height: 844
28
28
  }, zm = {
@@ -2523,7 +2523,7 @@ function pv(e) {
2523
2523
  },
2524
2524
  shouldNext: (b) => {
2525
2525
  const k = b.content || b.reasoning || "";
2526
- return k.includes("F:") || k.includes("R:") ? !1 : !!(b.toolCallId && (b.toolContent || b.message) || b.status === "Error" && b.message || b.status === "Failed" && b.message);
2526
+ return k.includes("F:") || k.includes("R:") ? !1 : b.toolCallId && (b.toolContent || b.message) ? !0 : b.status === "Error" || b.status === "Failed" ? b.message && !b.message.startsWith("4") && !b.message.startsWith("5") : !1;
2527
2527
  },
2528
2528
  createNextPrompt: (b) => b.toolCallId ? b.toolContent || b.message || "O: 动作执行成功" : b.status === "Error" || b.status === "Failed" ? b.toolContent || b.message || "O: 动作执行失败" : "执行计划",
2529
2529
  getCurrentVue: p,
@@ -8964,7 +8964,7 @@ const Mw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
8964
8964
  ]));
8965
8965
  }
8966
8966
  }), Ye = pp({
8967
- loader: () => import("./Editor-Dg-l8kts.js"),
8967
+ loader: () => import("./Editor-DMaEPM3O.js"),
8968
8968
  loadingComponent: H({
8969
8969
  render() {
8970
8970
  return eo("div", "正在拼命加载...");
@@ -29377,7 +29377,21 @@ ${m}${y}`;
29377
29377
  })
29378
29378
  }, PA = {
29379
29379
  name: "createPage",
29380
- description: "在当前项目新建页面, 有层级的页面,需先创建父级,如先创建目录或布局类型的页面",
29380
+ description: `在当前项目新建页面。有层级的页面,需先创建父级,例如如先创建目录或布局类型的页面。示例:
29381
+ \`\`\`json
29382
+ {
29383
+ "action": "createPage",
29384
+ "parameters": [
29385
+ {
29386
+ "name": "Dashboard",
29387
+ "title": "仪表盘",
29388
+ "icon": "DataAnalysis"
29389
+ },
29390
+ "2gqoc7vp"
29391
+ ]
29392
+ }
29393
+ \`\`\`
29394
+ `,
29381
29395
  parameters: [
29382
29396
  {
29383
29397
  name: "page",
@@ -29420,7 +29434,11 @@ ${m}${y}`;
29420
29434
  }
29421
29435
  ],
29422
29436
  createHandler: ({ project: e, config: t }) => async (n, o) => {
29423
- const s = await e.createPage(
29437
+ if (typeof n != "object")
29438
+ throw new Error(
29439
+ "调用 createPage 工具参数错误,第一个参数要求是 PageFile 对象"
29440
+ );
29441
+ const s = o || n.parentId, r = await e.createPage(
29424
29442
  Object.assign(
29425
29443
  {
29426
29444
  cache: !1,
@@ -29438,16 +29456,16 @@ ${m}${y}`;
29438
29456
  },
29439
29457
  n
29440
29458
  ),
29441
- o
29459
+ s
29442
29460
  );
29443
- s.dir || (e.active(s), await Ie(t.activeDelayMs));
29444
- const { name: r, title: a, layout: l, dir: c } = n;
29445
- return s ? {
29446
- name: r,
29447
- title: a,
29448
- layout: l,
29449
- dir: c,
29450
- id: s.id
29461
+ r.dir || (e.active(r), await Ie(t.activeDelayMs));
29462
+ const { name: a, title: l, layout: c, dir: d } = n;
29463
+ return r ? {
29464
+ name: a,
29465
+ title: l,
29466
+ layout: c,
29467
+ dir: d,
29468
+ id: r.id
29451
29469
  } : null;
29452
29470
  }
29453
29471
  }, MA = {
@@ -29484,6 +29502,10 @@ ${m}${y}`;
29484
29502
  }
29485
29503
  ],
29486
29504
  createHandler: ({ project: e, config: t }) => async (n) => {
29505
+ if (typeof n != "object")
29506
+ throw new Error(
29507
+ "调用 updatePage 工具参数错误,第一个参数要求是 PageFile 对象"
29508
+ );
29487
29509
  const o = e.updatePage(n);
29488
29510
  if (await Ie(t.activeDelayMs), o) {
29489
29511
  const { name: s, title: r, layout: a, dir: l, id: c } = o;
@@ -29557,6 +29579,10 @@ ${m}${y}`;
29557
29579
  }
29558
29580
  ],
29559
29581
  createHandler: ({ project: e, config: t }) => async (n) => {
29582
+ if (typeof n != "object")
29583
+ throw new Error(
29584
+ "调用 createBlock 工具参数错误,第一个参数要求是 BlockFile 对象"
29585
+ );
29560
29586
  const o = await e.createBlock(n);
29561
29587
  e.active(o), await Ie(t.activeDelayMs);
29562
29588
  const { name: s, title: r } = n;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, a as E, b as t, c as r, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as K, o as m, p as u, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ta, a4 as ra, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La } from "./index-Cg42XFn5.js";
1
+ import { A as e, a as E, b as t, c as r, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as K, o as m, p as u, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ta, a4 as ra, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La } from "./index-CylPCp09.js";
2
2
  export {
3
3
  e as API_METHOD_TYPES,
4
4
  E as ActionMenu,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/designer",
3
3
  "private": false,
4
- "version": "0.16.2",
4
+ "version": "0.16.3",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -29,12 +29,12 @@
29
29
  "marked": "~17.0.1",
30
30
  "mockjs": "~1.1.0",
31
31
  "monaco-editor": "~0.55.0",
32
- "@vtj/core": "~0.16.2",
33
- "@vtj/ui": "~0.16.2",
34
- "@vtj/renderer": "~0.16.2",
35
- "@vtj/uni": "~0.16.2",
36
- "@vtj/utils": "~0.16.2",
37
- "@vtj/icons": "~0.16.2"
32
+ "@vtj/core": "~0.16.3",
33
+ "@vtj/icons": "~0.16.3",
34
+ "@vtj/ui": "~0.16.3",
35
+ "@vtj/renderer": "~0.16.3",
36
+ "@vtj/utils": "~0.16.3",
37
+ "@vtj/uni": "~0.16.3"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/mockjs": "~1.0.10",
@@ -9,7 +9,7 @@ export declare function useAgent(config: AgentConfig): {
9
9
  parseOutput: (content: string, flag?: string) => ParseResult | null;
10
10
  callTool: (tool: ToolCall) => Promise<string>;
11
11
  processOutput: (chat: AIChat) => Promise<AIChat>;
12
- shouldNext: (chat: AIChat) => boolean;
12
+ shouldNext: (chat: AIChat) => boolean | "";
13
13
  createNextPrompt: (chat: AIChat) => string;
14
14
  getCurrentVue: () => Promise<string>;
15
15
  convertVueToDsl: (chat: AIChat) => Promise< BlockSchema | undefined>;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.16.1
5
+ * @version 0.16.2
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.16.1";
8
+ export declare const version = "0.16.2";
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-Cg42XFn5.js";
2
- export {
3
- f as default
4
- };