gz-research-assistant 1.0.10 → 1.0.12

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/dist/index.js CHANGED
@@ -896,13 +896,20 @@ function ut(e) {
896
896
  }, [e]);
897
897
  }
898
898
  var Z = {
899
- card: "_card_137oe_1 _card_13kbl_633",
900
- hint: "_hint_137oe_4 _hint_13kbl_515",
901
- buttonRow: "_buttonRow_137oe_7 _buttonRow_13kbl_627",
902
- stack: "_stack_137oe_10",
903
- list: "_list_137oe_11",
904
- entryLink: "_entryLink_137oe_26",
905
- resourceList: "_resourceList_137oe_33"
899
+ card: "_card_1xwqo_1 _card_13kbl_633",
900
+ hint: "_hint_1xwqo_4 _hint_13kbl_515",
901
+ buttonRow: "_buttonRow_1xwqo_7 _buttonRow_13kbl_627",
902
+ stack: "_stack_1xwqo_10",
903
+ list: "_list_1xwqo_11",
904
+ entryLink: "_entryLink_1xwqo_26",
905
+ resourceList: "_resourceList_1xwqo_33",
906
+ header: "_header_1xwqo_54",
907
+ headerAction: "_headerAction_1xwqo_71",
908
+ tabAction: "_tabAction_1xwqo_75",
909
+ fitButton: "_fitButton_1xwqo_78",
910
+ resourceName: "_resourceName_1xwqo_88",
911
+ breadcrumbs: "_breadcrumbs_1xwqo_95",
912
+ breadcrumbName: "_breadcrumbName_1xwqo_103"
906
913
  }, dt = {
907
914
  running: "执行中",
908
915
  stopping: "停止中",
@@ -1150,44 +1157,105 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1150
1157
  gap: 16
1151
1158
  } },
1152
1159
  children: [
1153
- /* @__PURE__ */ G("nav", {
1154
- ref: ee,
1155
- "aria-label": "当前位置",
1156
- className: Z.buttonRow,
1157
- children: [
1158
- /* @__PURE__ */ W(C, {
1159
- type: "link",
1160
- size: "small",
1161
- className: Z.entryLink,
1162
- disabled: b || s,
1163
- onClick: () => {
1164
- j() && Re() && ze() && n();
1165
- },
1166
- children: "测试库"
1167
- }),
1168
- /* @__PURE__ */ W("span", {
1169
- "aria-hidden": "true",
1170
- children: "/"
1171
- }),
1172
- Be || k || ue || he ? /* @__PURE__ */ G(U, { children: [
1160
+ /* @__PURE__ */ G("header", {
1161
+ className: Z.header,
1162
+ children: [/* @__PURE__ */ G("nav", {
1163
+ ref: ee,
1164
+ "aria-label": "当前位置",
1165
+ className: Z.breadcrumbs,
1166
+ children: [
1173
1167
  /* @__PURE__ */ W(C, {
1174
1168
  type: "link",
1175
1169
  size: "small",
1176
1170
  className: Z.entryLink,
1177
1171
  disabled: b || s,
1178
- onClick: Ve,
1179
- children: t
1172
+ onClick: () => {
1173
+ j() && Re() && ze() && n();
1174
+ },
1175
+ children: "测试库"
1180
1176
  }),
1181
1177
  /* @__PURE__ */ W("span", {
1182
1178
  "aria-hidden": "true",
1183
1179
  children: "/"
1184
1180
  }),
1185
- /* @__PURE__ */ W("span", {
1186
- "aria-current": "page",
1187
- children: Be ?? (k ? "新建用例" : ue ? "新建套件" : "新建计划")
1181
+ Be || k || ue || he ? /* @__PURE__ */ G(U, { children: [
1182
+ /* @__PURE__ */ W(C, {
1183
+ type: "link",
1184
+ size: "small",
1185
+ className: Z.breadcrumbName,
1186
+ title: t,
1187
+ disabled: b || s,
1188
+ onClick: Ve,
1189
+ children: /* @__PURE__ */ W("span", {
1190
+ className: Z.resourceName,
1191
+ children: t
1192
+ })
1193
+ }),
1194
+ /* @__PURE__ */ W("span", {
1195
+ "aria-hidden": "true",
1196
+ children: "/"
1197
+ }),
1198
+ /* @__PURE__ */ W("span", {
1199
+ "aria-current": "page",
1200
+ className: Z.resourceName,
1201
+ title: Be,
1202
+ children: Be ?? (k ? "新建用例" : ue ? "新建套件" : "新建计划")
1203
+ })
1204
+ ] }) : /* @__PURE__ */ W("h3", {
1205
+ className: Z.resourceName,
1206
+ title: t,
1207
+ children: t
1188
1208
  })
1189
- ] }) : /* @__PURE__ */ W("h3", { children: t })
1190
- ]
1209
+ ]
1210
+ }), d && !Be && !k && !ue && !he && /* @__PURE__ */ G("div", {
1211
+ className: Z.headerAction,
1212
+ children: [/* @__PURE__ */ W(et, {
1213
+ label: "测试库更多操作",
1214
+ items: [
1215
+ {
1216
+ key: "rename",
1217
+ label: "重命名",
1218
+ disabled: !z,
1219
+ onClick: r
1220
+ },
1221
+ {
1222
+ key: "refresh",
1223
+ label: "刷新测试库",
1224
+ disabled: b,
1225
+ onClick: R
1226
+ },
1227
+ {
1228
+ key: "import",
1229
+ label: "导入测试库",
1230
+ disabled: !z,
1231
+ onClick: () => ye.current?.click()
1232
+ },
1233
+ {
1234
+ key: "export",
1235
+ label: "导出测试库",
1236
+ title: "导出包含用例入口的查询参数和片段,分享前请移除敏感值。",
1237
+ disabled: b,
1238
+ onClick: () => Ae(d, "研发小蜜测试库.json")
1239
+ }
1240
+ ]
1241
+ }), /* @__PURE__ */ W("input", {
1242
+ hidden: !0,
1243
+ type: "file",
1244
+ ref: ye,
1245
+ accept: ".json,application/json",
1246
+ onChange: (e) => {
1247
+ let t = e.target.files?.[0];
1248
+ e.target.value = "", t && z && window.confirm("导入会替换当前测试库中的用例、套件和计划。继续?") && L(async () => {
1249
+ if (t.size > 2097152) throw Error("测试库文件不能超过 2 MB");
1250
+ let e = JSON.parse(await t.text());
1251
+ await ke({
1252
+ ...e,
1253
+ revision: d.revision
1254
+ }), Ve(), Ce(void 0), _("cases");
1255
+ });
1256
+ }
1257
+ })]
1258
+ })]
1191
1259
  }),
1192
1260
  ie && /* @__PURE__ */ W(S, {
1193
1261
  type: "error",
@@ -1200,57 +1268,50 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1200
1268
  children: "刷新测试库"
1201
1269
  })
1202
1270
  }),
1203
- d ? /* @__PURE__ */ G(U, { children: [!k && !ue && !he && !(g === "cases" && B) && !(g === "suites" && V) && !(g === "plans" && H) && /* @__PURE__ */ G("div", {
1204
- className: Z.buttonRow,
1205
- children: [/* @__PURE__ */ W(et, {
1206
- label: "测试库更多操作",
1207
- items: [
1208
- {
1209
- key: "rename",
1210
- label: "重命名",
1271
+ d ? /* @__PURE__ */ W(U, { children: /* @__PURE__ */ W(pe, {
1272
+ activeKey: g,
1273
+ onChange: ve,
1274
+ tabBarExtraContent: { right: /* @__PURE__ */ G("div", {
1275
+ className: Z.tabAction,
1276
+ children: [
1277
+ g === "cases" && !k && !B && /* @__PURE__ */ W(C, {
1278
+ type: "primary",
1279
+ size: "small",
1211
1280
  disabled: !z,
1212
- onClick: r
1213
- },
1214
- {
1215
- key: "refresh",
1216
- label: "刷新测试库",
1217
- disabled: b,
1218
- onClick: R
1219
- },
1220
- {
1221
- key: "import",
1222
- label: "导入测试库",
1281
+ onClick: () => {
1282
+ _e(p());
1283
+ },
1284
+ children: "新建用例"
1285
+ }),
1286
+ g === "suites" && !ue && !V && /* @__PURE__ */ W(C, {
1287
+ type: "primary",
1288
+ size: "small",
1223
1289
  disabled: !z,
1224
- onClick: () => ye.current?.click()
1225
- },
1226
- {
1227
- key: "export",
1228
- label: "导出测试库",
1229
- title: "导出包含用例入口的查询参数和片段,分享前请移除敏感值。",
1230
- disabled: b,
1231
- onClick: () => Ae(d, "研发小蜜测试库.json")
1232
- }
1290
+ onClick: () => {
1291
+ N({
1292
+ id: "",
1293
+ name: "",
1294
+ caseIds: []
1295
+ }), me(!0);
1296
+ },
1297
+ children: "新建套件"
1298
+ }),
1299
+ g === "plans" && !he && !H && /* @__PURE__ */ W(C, {
1300
+ type: "primary",
1301
+ size: "small",
1302
+ disabled: !z,
1303
+ onClick: () => {
1304
+ F({
1305
+ id: "",
1306
+ name: "",
1307
+ suiteIds: [],
1308
+ repeat: 1
1309
+ }), O(!0);
1310
+ },
1311
+ children: "新建计划"
1312
+ })
1233
1313
  ]
1234
- }), /* @__PURE__ */ W("input", {
1235
- hidden: !0,
1236
- type: "file",
1237
- ref: ye,
1238
- accept: ".json,application/json",
1239
- onChange: (e) => {
1240
- let t = e.target.files?.[0];
1241
- e.target.value = "", t && z && window.confirm("导入会替换当前测试库中的用例、套件和计划。继续?") && L(async () => {
1242
- if (t.size > 2097152) throw Error("测试库文件不能超过 2 MB");
1243
- let e = JSON.parse(await t.text());
1244
- await ke({
1245
- ...e,
1246
- revision: d.revision
1247
- }), Ve(), Ce(void 0), _("cases");
1248
- });
1249
- }
1250
- })]
1251
- }), /* @__PURE__ */ W(pe, {
1252
- activeKey: g,
1253
- onChange: ve,
1314
+ }) },
1254
1315
  items: [
1255
1316
  {
1256
1317
  key: "cases",
@@ -1400,33 +1461,28 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1400
1461
  ]
1401
1462
  }) : /* @__PURE__ */ G("div", {
1402
1463
  className: Z.stack,
1403
- children: [
1404
- /* @__PURE__ */ W(C, {
1405
- type: "primary",
1406
- disabled: !z,
1407
- onClick: () => _e(p()),
1408
- children: "新建用例"
1409
- }),
1410
- !d.cases.length && /* @__PURE__ */ W(de, { description: "暂无用例" }),
1411
- /* @__PURE__ */ W("ul", {
1412
- className: Z.resourceList,
1413
- children: d.cases.map(({ id: e, testCase: t, url: n }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G("div", { children: [
1414
- /* @__PURE__ */ W(C, {
1415
- type: "link",
1416
- size: "small",
1417
- className: Z.entryLink,
1418
- onClick: () => {
1419
- le(void 0), w(e), xe(void 0);
1420
- },
1464
+ children: [!d.cases.length && /* @__PURE__ */ W(de, { description: "暂无用例" }), /* @__PURE__ */ W("ul", {
1465
+ className: Z.resourceList,
1466
+ children: d.cases.map(({ id: e, testCase: t, url: n }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G("div", { children: [
1467
+ /* @__PURE__ */ W(C, {
1468
+ type: "link",
1469
+ size: "small",
1470
+ className: Z.entryLink,
1471
+ onClick: () => {
1472
+ le(void 0), w(e), xe(void 0);
1473
+ },
1474
+ children: /* @__PURE__ */ W("span", {
1475
+ className: Z.resourceName,
1476
+ title: t.name,
1421
1477
  children: t.name
1422
- }),
1423
- " ",
1424
- /* @__PURE__ */ G(D, { children: [t.steps.length, " 步"] }),
1425
- /* @__PURE__ */ W("br", {}),
1426
- /* @__PURE__ */ W("code", { children: n ?? t.path })
1427
- ] }) }, e))
1428
- })
1429
- ]
1478
+ })
1479
+ }),
1480
+ " ",
1481
+ /* @__PURE__ */ G(D, { children: [t.steps.length, " 步"] }),
1482
+ /* @__PURE__ */ W("br", {}),
1483
+ /* @__PURE__ */ W("code", { children: n ?? t.path })
1484
+ ] }) }, e))
1485
+ })]
1430
1486
  })
1431
1487
  },
1432
1488
  {
@@ -1567,33 +1623,22 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1567
1623
  ]
1568
1624
  }) : /* @__PURE__ */ G("div", {
1569
1625
  className: Z.stack,
1570
- children: [
1571
- /* @__PURE__ */ W(C, {
1572
- type: "primary",
1573
- disabled: !z,
1626
+ children: [!d.suites.length && /* @__PURE__ */ W(de, { description: "暂无套件" }), /* @__PURE__ */ W("ul", {
1627
+ className: Z.resourceList,
1628
+ children: d.suites.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1629
+ type: "link",
1630
+ size: "small",
1631
+ className: Z.entryLink,
1574
1632
  onClick: () => {
1575
- N({
1576
- id: "",
1577
- name: "",
1578
- caseIds: []
1579
- }), me(!0);
1633
+ N(e);
1580
1634
  },
1581
- children: "新建套件"
1582
- }),
1583
- !d.suites.length && /* @__PURE__ */ W(de, { description: "暂无套件" }),
1584
- /* @__PURE__ */ W("ul", {
1585
- className: Z.resourceList,
1586
- children: d.suites.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1587
- type: "link",
1588
- size: "small",
1589
- className: Z.entryLink,
1590
- onClick: () => {
1591
- N(e);
1592
- },
1635
+ children: /* @__PURE__ */ W("span", {
1636
+ className: Z.resourceName,
1637
+ title: e.name,
1593
1638
  children: e.name
1594
- }), /* @__PURE__ */ G("span", { children: [e.caseIds.length, " 个用例"] })] }, e.id))
1595
- })
1596
- ]
1639
+ })
1640
+ }), /* @__PURE__ */ G("span", { children: [e.caseIds.length, " 个用例"] })] }, e.id))
1641
+ })]
1597
1642
  })
1598
1643
  },
1599
1644
  {
@@ -1746,37 +1791,25 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1746
1791
  ]
1747
1792
  }) : /* @__PURE__ */ G("div", {
1748
1793
  className: Z.stack,
1749
- children: [
1750
- /* @__PURE__ */ W(C, {
1751
- type: "primary",
1752
- disabled: !z,
1753
- onClick: () => {
1754
- F({
1755
- id: "",
1756
- name: "",
1757
- suiteIds: [],
1758
- repeat: 1
1759
- }), O(!0);
1760
- },
1761
- children: "新建计划"
1762
- }),
1763
- !d.plans.length && /* @__PURE__ */ W(de, { description: "暂无计划" }),
1764
- /* @__PURE__ */ W("ul", {
1765
- className: Z.resourceList,
1766
- children: d.plans.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1767
- type: "link",
1768
- size: "small",
1769
- className: Z.entryLink,
1770
- onClick: () => F(e),
1794
+ children: [!d.plans.length && /* @__PURE__ */ W(de, { description: "暂无计划" }), /* @__PURE__ */ W("ul", {
1795
+ className: Z.resourceList,
1796
+ children: d.plans.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1797
+ type: "link",
1798
+ size: "small",
1799
+ className: Z.entryLink,
1800
+ onClick: () => F(e),
1801
+ children: /* @__PURE__ */ W("span", {
1802
+ className: Z.resourceName,
1803
+ title: e.name,
1771
1804
  children: e.name
1772
- }), /* @__PURE__ */ G("span", { children: [
1773
- e.suiteIds.length,
1774
- " 个套件 · 重复 ",
1775
- e.repeat,
1776
- " 轮"
1777
- ] })] }, e.id))
1778
- })
1779
- ]
1805
+ })
1806
+ }), /* @__PURE__ */ G("span", { children: [
1807
+ e.suiteIds.length,
1808
+ " 个套件 · 重复 ",
1809
+ e.repeat,
1810
+ " 轮"
1811
+ ] })] }, e.id))
1812
+ })]
1780
1813
  })
1781
1814
  },
1782
1815
  {
@@ -1824,7 +1857,8 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1824
1857
  })
1825
1858
  }
1826
1859
  ]
1827
- })] }) : /* @__PURE__ */ W(C, {
1860
+ }) }) : /* @__PURE__ */ W(C, {
1861
+ className: Z.fitButton,
1828
1862
  loading: b,
1829
1863
  onClick: R,
1830
1864
  children: b ? "正在读取测试库" : "重试读取测试库"
@@ -1834,30 +1868,24 @@ function mt({ base: e, name: t, onBack: n, onRename: r, draft: i, disabled: a, o
1834
1868
  }
1835
1869
  // src/pages/assistant/components/TestLibraryPanel/index.tsx
1836
1870
  function ht({ bridgeUrl: e, exploration: t, ...n }) {
1837
- let r = `${e.replace(/\/$/, "")}/library`, i = ut(r), [a, o] = x(), [s, c] = x(), [l, u] = x(), [d, f] = x("libraries"), [p, m] = x(!1), [h, g] = x(""), _ = async (e) => {
1871
+ let r = `${e.replace(/\/$/, "")}/library`, i = ut(r), [a, o] = x(), [s, c] = x(), [l, u] = x(), [d, f] = x(!1), [p, m] = x(""), h = async (e) => {
1838
1872
  let t = await i("/collections", "GET", void 0, e);
1839
1873
  e?.aborted || o(t.collections);
1840
- }, v = async (e, t) => {
1841
- g(""), m(!0);
1874
+ }, g = async (e, t) => {
1875
+ m(""), f(!0);
1842
1876
  try {
1843
1877
  await e();
1844
1878
  } catch (e) {
1845
- t?.aborted || g(e instanceof Error ? e.message : "读取测试库失败");
1879
+ t?.aborted || m(e instanceof Error ? e.message : "读取测试库失败");
1846
1880
  } finally {
1847
- t?.aborted || m(!1);
1881
+ t?.aborted || f(!1);
1848
1882
  }
1849
1883
  };
1850
1884
  y(() => {
1851
1885
  let e = new AbortController();
1852
- return v(() => _(e.signal), e.signal), () => e.abort();
1853
- }, [i]), y(() => {
1854
- n.incomingDraft && f("libraries");
1855
- }, [n.incomingDraft]);
1856
- let b = (e) => {
1857
- if (p) return;
1858
- let t = a?.find(({ id: e }) => e === l?.id);
1859
- (!l || l.name === (t?.name ?? "") || window.confirm("测试库名称尚未保存,确定放弃?")) && (u(void 0), f(e));
1860
- }, te = /* @__PURE__ */ G(se, {
1886
+ return g(() => h(e.signal), e.signal), () => e.abort();
1887
+ }, [i]);
1888
+ let _ = /* @__PURE__ */ G(se, {
1861
1889
  className: Z.card,
1862
1890
  "aria-label": "测试库列表",
1863
1891
  styles: { body: {
@@ -1867,10 +1895,18 @@ function ht({ bridgeUrl: e, exploration: t, ...n }) {
1867
1895
  gap: 16
1868
1896
  } },
1869
1897
  children: [
1870
- /* @__PURE__ */ W("h3", { children: "测试库" }),
1871
- h && /* @__PURE__ */ W(S, {
1898
+ /* @__PURE__ */ G("header", {
1899
+ className: Z.header,
1900
+ children: [/* @__PURE__ */ W("h3", { children: "测试库" }), a && !l && /* @__PURE__ */ W(C, {
1901
+ type: "primary",
1902
+ disabled: d || n.disabled,
1903
+ onClick: () => u({ name: "" }),
1904
+ children: "新建测试库"
1905
+ })]
1906
+ }),
1907
+ p && /* @__PURE__ */ W(S, {
1872
1908
  type: "error",
1873
- title: h
1909
+ title: p
1874
1910
  }),
1875
1911
  n.incomingDraft && /* @__PURE__ */ W(S, {
1876
1912
  type: "info",
@@ -1879,7 +1915,7 @@ function ht({ bridgeUrl: e, exploration: t, ...n }) {
1879
1915
  a ? l ? /* @__PURE__ */ G("form", {
1880
1916
  className: Z.stack,
1881
1917
  onSubmit: (e) => {
1882
- e.preventDefault(), l.name.trim() && !p && v(async () => {
1918
+ e.preventDefault(), l.name.trim() && !d && g(async () => {
1883
1919
  let e = await i(l.id ? "/collections/" + encodeURIComponent(l.id) : "/collections", l.id ? "PATCH" : "POST", { name: l.name.trim() });
1884
1920
  o((t) => l.id ? t?.map((t) => t.id === e.id ? e : t) : [...t ?? [], e]), u(void 0), c(e);
1885
1921
  });
@@ -1896,7 +1932,7 @@ function ht({ bridgeUrl: e, exploration: t, ...n }) {
1896
1932
  "aria-describedby": l.name.trim() ? void 0 : "assistant-library-name-error",
1897
1933
  maxLength: 100,
1898
1934
  value: l.name,
1899
- disabled: p,
1935
+ disabled: d,
1900
1936
  onChange: (e) => u({
1901
1937
  ...l,
1902
1938
  name: e.target.value
@@ -1912,84 +1948,74 @@ function ht({ bridgeUrl: e, exploration: t, ...n }) {
1912
1948
  children: [/* @__PURE__ */ W(C, {
1913
1949
  htmlType: "submit",
1914
1950
  type: "primary",
1915
- loading: p,
1951
+ loading: d,
1916
1952
  disabled: !l.name.trim(),
1917
1953
  children: l.id ? "保存" : "创建"
1918
1954
  }), /* @__PURE__ */ W(C, {
1919
- disabled: p,
1955
+ disabled: d,
1920
1956
  onClick: () => u(void 0),
1921
1957
  children: "取消"
1922
1958
  })]
1923
1959
  })
1924
1960
  ]
1925
- }) : /* @__PURE__ */ G(U, { children: [
1926
- /* @__PURE__ */ W(C, {
1927
- type: "primary",
1928
- disabled: p || n.disabled,
1929
- onClick: () => u({ name: "" }),
1930
- children: "新建测试库"
1931
- }),
1932
- !a.length && /* @__PURE__ */ W(de, { description: "暂无测试库" }),
1933
- /* @__PURE__ */ W("ul", {
1934
- className: Z.resourceList,
1935
- children: a.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1936
- type: "link",
1937
- size: "small",
1938
- className: Z.entryLink,
1939
- disabled: p || n.recording,
1940
- onClick: () => c(e),
1961
+ }) : /* @__PURE__ */ G(U, { children: [!a.length && /* @__PURE__ */ W(de, { description: "暂无测试库" }), /* @__PURE__ */ W("ul", {
1962
+ className: Z.resourceList,
1963
+ children: a.map((e) => /* @__PURE__ */ G("li", { children: [/* @__PURE__ */ W(C, {
1964
+ type: "link",
1965
+ size: "small",
1966
+ className: Z.entryLink,
1967
+ title: e.name,
1968
+ disabled: d || n.recording,
1969
+ onClick: () => c(e),
1970
+ children: /* @__PURE__ */ W("span", {
1971
+ className: Z.resourceName,
1941
1972
  children: e.name
1942
- }), /* @__PURE__ */ G("span", { children: [
1943
- e.caseCount,
1944
- " 个用例 · ",
1945
- e.suiteCount,
1946
- " 个套件 ·",
1947
- " ",
1948
- e.planCount,
1949
- " 个计划"
1950
- ] })] }, e.id))
1951
- })
1952
- ] }) : /* @__PURE__ */ W(C, {
1953
- loading: p,
1954
- onClick: () => void v(_),
1955
- children: p ? "正在读取测试库列表" : "重试读取测试库列表"
1973
+ })
1974
+ }), /* @__PURE__ */ G("span", { children: [
1975
+ e.caseCount,
1976
+ " 个用例 · ",
1977
+ e.suiteCount,
1978
+ " 个套件 ·",
1979
+ " ",
1980
+ e.planCount,
1981
+ " 个计划"
1982
+ ] })] }, e.id))
1983
+ })] }) : /* @__PURE__ */ W(C, {
1984
+ className: Z.fitButton,
1985
+ loading: d,
1986
+ onClick: () => void g(h),
1987
+ children: d ? "正在读取测试库列表" : "重试读取测试库列表"
1956
1988
  })
1957
1989
  ]
1958
1990
  });
1959
- return /* @__PURE__ */ G(U, { children: [s && /* @__PURE__ */ W("div", {
1960
- hidden: !!l,
1961
- children: /* @__PURE__ */ ee(mt, {
1962
- ...n,
1963
- key: s.id,
1964
- base: `${r}/collections/${encodeURIComponent(s.id)}`,
1965
- name: s.name,
1966
- onBack: () => {
1967
- c(void 0), v(_);
1968
- },
1969
- onRename: () => {
1970
- u({
1971
- id: s.id,
1972
- name: s.name
1973
- });
1974
- }
1975
- })
1976
- }), /* @__PURE__ */ W("div", {
1977
- hidden: !!s && !l,
1978
- children: /* @__PURE__ */ W(pe, {
1979
- activeKey: d,
1980
- onChange: b,
1981
- items: [{
1982
- key: "libraries",
1983
- label: "测试库",
1984
- children: te
1985
- }, {
1986
- key: "explore",
1987
- label: "自主探索",
1988
- children: t,
1989
- disabled: !!s
1990
- }]
1991
+ return /* @__PURE__ */ G(U, { children: [
1992
+ s && /* @__PURE__ */ W("div", {
1993
+ hidden: !!l,
1994
+ children: /* @__PURE__ */ ee(mt, {
1995
+ ...n,
1996
+ key: s.id,
1997
+ base: `${r}/collections/${encodeURIComponent(s.id)}`,
1998
+ name: s.name,
1999
+ onBack: () => {
2000
+ c(void 0), g(h);
2001
+ },
2002
+ onRename: () => {
2003
+ u({
2004
+ id: s.id,
2005
+ name: s.name
2006
+ });
2007
+ }
2008
+ })
2009
+ }),
2010
+ /* @__PURE__ */ W("div", {
2011
+ hidden: !!s && !l,
2012
+ children: _
2013
+ }),
2014
+ /* @__PURE__ */ W("div", {
2015
+ hidden: !!s || !!l,
2016
+ children: t
1991
2017
  })
1992
- })] });
2018
+ ] });
1993
2019
  }
1994
2020
  // src/pages/assistant/components/AutomationPanel/index.tsx
1995
2021
  function gt({ close: e, bridgeUrl: t, incomingDraft: n, onConsumeDraft: r }) {