turbollm 1.13.4 → 1.13.5

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.
Files changed (117) hide show
  1. package/dist/cli.js +48 -10
  2. package/dist/webdist/assets/{AgentEditPage-B_Oyad8i.js → AgentEditPage-DQSQhhdM.js} +1 -1
  3. package/dist/webdist/assets/{ChatScreen-rdVNApWK.js → ChatScreen-CtFHffeH.js} +1 -1
  4. package/dist/webdist/assets/{CodeComposer-CbHakcaM.js → CodeComposer-v8HSPbTb.js} +1 -1
  5. package/dist/webdist/assets/{CodeHomeScreen-Cq8dvLJw.js → CodeHomeScreen-BRjo9YC3.js} +1 -1
  6. package/dist/webdist/assets/{CodeSessionScreen-BMWUwoOk.js → CodeSessionScreen-nXHx5Rkf.js} +1 -1
  7. package/dist/webdist/assets/{CustomizeScreen-tG_5_KBB.js → CustomizeScreen-bSsL1Dj0.js} +1 -1
  8. package/dist/webdist/assets/{EnginesScreen-CR_UoUaB.js → EnginesScreen-DKIeTAXe.js} +10 -10
  9. package/dist/webdist/assets/{HardwareSection-CpQNd_Xs.js → HardwareSection-a31KOorO.js} +1 -1
  10. package/dist/webdist/assets/{ModelDetailDialog-CEnsN-3_.js → ModelDetailDialog-k3r2SJWx.js} +1 -1
  11. package/dist/webdist/assets/{ModelLoadMenu-CZahEXnE.js → ModelLoadMenu-DgXJo77N.js} +1 -1
  12. package/dist/webdist/assets/{ModelsScreen-Bt3A9dPj.js → ModelsScreen-DUTDnwez.js} +1 -1
  13. package/dist/webdist/assets/{OnboardingScreen-C-8oeohL.js → OnboardingScreen-Hgz6i2ot.js} +1 -1
  14. package/dist/webdist/assets/{RoutineEditPage-BFdPO8HK.js → RoutineEditPage-ItERtPTI.js} +1 -1
  15. package/dist/webdist/assets/{RoutinesPanel-CczgDeDo.js → RoutinesPanel-BjclCgWV.js} +1 -1
  16. package/dist/webdist/assets/{SettingsScreen-Cfir9Qv2.js → SettingsScreen-BtlVJafk.js} +1 -1
  17. package/dist/webdist/assets/{SidebarResizeHandle-C3yIrqyN.js → SidebarResizeHandle-DBtMs1un.js} +1 -1
  18. package/dist/webdist/assets/{SkillEditPage-BjQ1GW3m.js → SkillEditPage-BJHoMA87.js} +1 -1
  19. package/dist/webdist/assets/{ToolApprovalBar-Ct_AQhnn.js → ToolApprovalBar-pMCAf9oT.js} +3 -3
  20. package/dist/webdist/assets/WorkspaceScreen-GL1Nw-SI.js +1 -0
  21. package/dist/webdist/assets/{abnfDiagram-N423BO3Z-8mheSXfK.js → abnfDiagram-N423BO3Z-C_g2c5t9.js} +1 -1
  22. package/dist/webdist/assets/{agent-api-BM-J1Wrf.js → agent-api-DZpsdnDb.js} +1 -1
  23. package/dist/webdist/assets/{alert-dialog-MwW9OeMc.js → alert-dialog-Be0J8mqx.js} +1 -1
  24. package/dist/webdist/assets/{arc-D8wGLUJm.js → arc-YFjxy_2h.js} +1 -1
  25. package/dist/webdist/assets/{architectureDiagram-T3A2C74G-DnXEnFCT.js → architectureDiagram-T3A2C74G-1eWQR9Yo.js} +1 -1
  26. package/dist/webdist/assets/{blockDiagram-VBNYF7ZC-CjrNObWJ.js → blockDiagram-VBNYF7ZC-DCkxfK2C.js} +1 -1
  27. package/dist/webdist/assets/{c4Diagram-5PPSVZJV-rOplY4oF.js → c4Diagram-5PPSVZJV-CvkqNRPH.js} +1 -1
  28. package/dist/webdist/assets/channel-BLq3w_Ai.js +1 -0
  29. package/dist/webdist/assets/{chat-api-M-jb3zIo.js → chat-api-C84sO1C9.js} +1 -1
  30. package/dist/webdist/assets/{chat-queries-gefwNcXI.js → chat-queries--trWZzdu.js} +1 -1
  31. package/dist/webdist/assets/{chevron-down-CMga8iLs.js → chevron-down-BvP7K1yU.js} +1 -1
  32. package/dist/webdist/assets/{chevron-left-DoI4O7KB.js → chevron-left-wCh6MmEl.js} +1 -1
  33. package/dist/webdist/assets/{chevron-right-3lWKkk-t.js → chevron-right-BC1tvE2N.js} +1 -1
  34. package/dist/webdist/assets/{chunk-2GRJ4B5K-C4WOz2xX.js → chunk-2GRJ4B5K-MwqLqeQo.js} +1 -1
  35. package/dist/webdist/assets/{chunk-2Q5K7J3B-mSa_Img1.js → chunk-2Q5K7J3B-B1JqT0Ms.js} +1 -1
  36. package/dist/webdist/assets/{chunk-5RXB4S5H-C7jRw5h5.js → chunk-5RXB4S5H-BT__I3gy.js} +1 -1
  37. package/dist/webdist/assets/{chunk-5VM5RSS4-DKWm-OU6.js → chunk-5VM5RSS4-CCCHTmAY.js} +1 -1
  38. package/dist/webdist/assets/{chunk-6Q2QTUOP-CMa2t8k1.js → chunk-6Q2QTUOP-DpdhRs5e.js} +1 -1
  39. package/dist/webdist/assets/{chunk-GF5L2VYU-BC13P15T.js → chunk-GF5L2VYU-CqvwSdm0.js} +1 -1
  40. package/dist/webdist/assets/{chunk-JWPE2WC7-KFnKvup9.js → chunk-JWPE2WC7-XlQN0MBh.js} +1 -1
  41. package/dist/webdist/assets/{chunk-KBJHAD2P-i5P3oFwD.js → chunk-KBJHAD2P-BtIxJswZ.js} +1 -1
  42. package/dist/webdist/assets/{chunk-RYQCIY6F-DDA4G6lG.js → chunk-RYQCIY6F-deUgJS0Q.js} +1 -1
  43. package/dist/webdist/assets/{chunk-XXDRQBXY-DJp5qHVT.js → chunk-XXDRQBXY-38CMPJj8.js} +1 -1
  44. package/dist/webdist/assets/{circle-check-Be8IcbM3.js → circle-check-BIhBTR1T.js} +1 -1
  45. package/dist/webdist/assets/{circle-x-RTp0NMzc.js → circle-x-DM6fYSRv.js} +1 -1
  46. package/dist/webdist/assets/classDiagram-JCYQIIEL-Bsb3bMvc.js +1 -0
  47. package/dist/webdist/assets/classDiagram-v2-OCEON4UE-Bsb3bMvc.js +1 -0
  48. package/dist/webdist/assets/{collapsible-Ufi2wYVR.js → collapsible-Dej2BQVn.js} +1 -1
  49. package/dist/webdist/assets/{cose-bilkent-JH36ORCC-BwIdg8OQ.js → cose-bilkent-JH36ORCC-B_BQCrmS.js} +1 -1
  50. package/dist/webdist/assets/{cynefin-VYW2F7L2-DPPOp6Z0.js → cynefin-VYW2F7L2-lGt_QLfe.js} +1 -1
  51. package/dist/webdist/assets/{cynefinDiagram-MW4NZA55-CJztcIBi.js → cynefinDiagram-MW4NZA55-B172ktgP.js} +1 -1
  52. package/dist/webdist/assets/{dagre-VZM6K2ZE-CyMugmI-.js → dagre-VZM6K2ZE-De4fl1iF.js} +1 -1
  53. package/dist/webdist/assets/{diagram-7IWD3JNH-BRDFU1Ve.js → diagram-7IWD3JNH-DtUW-Boo.js} +1 -1
  54. package/dist/webdist/assets/{diagram-B4RE2ZJO-CNNoJqRt.js → diagram-B4RE2ZJO-B6_p4VKc.js} +1 -1
  55. package/dist/webdist/assets/{diagram-LBJQPF4R-CdKfkenV.js → diagram-LBJQPF4R-DC_wtD7r.js} +1 -1
  56. package/dist/webdist/assets/{diagram-Q27KOJAE-B-PXWstV.js → diagram-Q27KOJAE-6oF2_OjQ.js} +1 -1
  57. package/dist/webdist/assets/{diagram-UB23O5K3-BP86wZxq.js → diagram-UB23O5K3-BLh1k_fo.js} +1 -1
  58. package/dist/webdist/assets/{dropdown-menu-CpDtWx6l.js → dropdown-menu-Bhu8YtbI.js} +1 -1
  59. package/dist/webdist/assets/{ebnfDiagram-BXEA7PRR-D5Eh3L4_.js → ebnfDiagram-BXEA7PRR-ehMxmR4l.js} +1 -1
  60. package/dist/webdist/assets/{erDiagram-JOGREHBK-gz0ckR6a.js → erDiagram-JOGREHBK-96Mu4CA5.js} +1 -1
  61. package/dist/webdist/assets/{file-text-LLb7mRJz.js → file-text-Dn3ZCp31.js} +1 -1
  62. package/dist/webdist/assets/{flowDiagram-UKHOOZJN-BoO4mRIW.js → flowDiagram-UKHOOZJN-CRRZZa0_.js} +1 -1
  63. package/dist/webdist/assets/{folder-input-K6hmSR6r.js → folder-input-DF1gn4vH.js} +1 -1
  64. package/dist/webdist/assets/{folder-plus-aD2Jwv9p.js → folder-plus-C3110N2s.js} +1 -1
  65. package/dist/webdist/assets/{ganttDiagram-PKOTCBZU-BMsGQluI.js → ganttDiagram-PKOTCBZU-CTAHvUdG.js} +1 -1
  66. package/dist/webdist/assets/{git-branch-Sc-xALja.js → git-branch-ClzWfV5B.js} +1 -1
  67. package/dist/webdist/assets/{gitGraphDiagram-DS77QQ5N-BVhg-gBA.js → gitGraphDiagram-DS77QQ5N-BwUcUxwZ.js} +1 -1
  68. package/dist/webdist/assets/{globe-MUKwb-dG.js → globe-UxyIyIxr.js} +1 -1
  69. package/dist/webdist/assets/{index-Ds6wWiqZ.js → index-D5gUIqLa.js} +8 -8
  70. package/dist/webdist/assets/{infoDiagram-6WML65LV-CfU2f-Uu.js → infoDiagram-6WML65LV-KXXRYeq1.js} +1 -1
  71. package/dist/webdist/assets/{ishikawaDiagram-WSZJBQD7-DBINljMd.js → ishikawaDiagram-WSZJBQD7-F9eL-DH9.js} +1 -1
  72. package/dist/webdist/assets/{journeyDiagram-NVQOT4AX-CPv0nvnF.js → journeyDiagram-NVQOT4AX-Br82xXB7.js} +1 -1
  73. package/dist/webdist/assets/{kanban-definition-27J2QSJJ-Bs8oqG4V.js → kanban-definition-27J2QSJJ-TxuwPPK2.js} +1 -1
  74. package/dist/webdist/assets/{linear-fvd8Xavw.js → linear-Dnua3zVN.js} +1 -1
  75. package/dist/webdist/assets/{lock-CBkKIocw.js → lock-CIkAh19m.js} +1 -1
  76. package/dist/webdist/assets/{mermaid.core-gqQ7djSV.js → mermaid.core-3DYUUSdD.js} +4 -4
  77. package/dist/webdist/assets/{mindmap-definition-FAOFIHXS-Uo84SPEc.js → mindmap-definition-FAOFIHXS-C2Je1XD3.js} +1 -1
  78. package/dist/webdist/assets/{monitor--8CDFQE2.js → monitor-Dao9gtZQ.js} +1 -1
  79. package/dist/webdist/assets/{pegDiagram-VL7TDLO6-jriZE8ux.js → pegDiagram-VL7TDLO6-Imiwx_Mi.js} +1 -1
  80. package/dist/webdist/assets/{pencil-CAi7QQGw.js → pencil-DLPQKbE9.js} +1 -1
  81. package/dist/webdist/assets/{personas-FTKXYi_z.js → personas-CFMpT4jP.js} +1 -1
  82. package/dist/webdist/assets/{pieDiagram-7S7Q4E2Y-BiG1Sd1C.js → pieDiagram-7S7Q4E2Y-DaWNxcI-.js} +1 -1
  83. package/dist/webdist/assets/{quadrantDiagram-CIZ2JOQS-CONf7VBs.js → quadrantDiagram-CIZ2JOQS-DeQ1njXO.js} +1 -1
  84. package/dist/webdist/assets/{railroadDiagram-AXF67PYL-DnSHrg9g.js → railroadDiagram-AXF67PYL-BvJgh6Z_.js} +1 -1
  85. package/dist/webdist/assets/{refresh-cw-C8ASJbnJ.js → refresh-cw-BE_VKWCq.js} +1 -1
  86. package/dist/webdist/assets/{remote-failure-Ded7cLzQ.js → remote-failure-z1LSyZOB.js} +1 -1
  87. package/dist/webdist/assets/{requirementDiagram-LRYGKXZP-Bfofmv9M.js → requirementDiagram-LRYGKXZP-BiZx2AHw.js} +1 -1
  88. package/dist/webdist/assets/{rocket-Dtd3N1ug.js → rocket-CxCRl5WL.js} +1 -1
  89. package/dist/webdist/assets/{rotate-ccw-CDwuwLJa.js → rotate-ccw-CUHjjSni.js} +1 -1
  90. package/dist/webdist/assets/{sankeyDiagram-W5VNT64P-oPlm8mDh.js → sankeyDiagram-W5VNT64P-DbDt5_xz.js} +1 -1
  91. package/dist/webdist/assets/{sequenceDiagram-SI44F4Z6-BtT__Yqq.js → sequenceDiagram-SI44F4Z6-Ya9d9pJx.js} +1 -1
  92. package/dist/webdist/assets/{sheet-DjzHbzW-.js → sheet-uLkeKdTj.js} +1 -1
  93. package/dist/webdist/assets/{sizeCapture-X5ZJPWSS-BFILTo7Y.js → sizeCapture-X5ZJPWSS-CKcIKwbb.js} +1 -1
  94. package/dist/webdist/assets/{skeleton-BLTjOhUM.js → skeleton-C4DVQSnO.js} +1 -1
  95. package/dist/webdist/assets/{sliders-horizontal-Drc70pwd.js → sliders-horizontal-DVdVp0P2.js} +1 -1
  96. package/dist/webdist/assets/{sparkles-DOWtXMA_.js → sparkles-daM-8UXC.js} +1 -1
  97. package/dist/webdist/assets/{star-BK1xduRz.js → star-CpCXu8tE.js} +1 -1
  98. package/dist/webdist/assets/{stateDiagram-OKZ733FA-i7_MQ41r.js → stateDiagram-OKZ733FA-CqU-1wd8.js} +1 -1
  99. package/dist/webdist/assets/stateDiagram-v2-UEYNNEHI-Erur5nvV.js +1 -0
  100. package/dist/webdist/assets/{swimlanes-SLNWSIFB-C-5GR5Xz.js → swimlanes-SLNWSIFB-nzSF-_JW.js} +2 -2
  101. package/dist/webdist/assets/swimlanesDiagram-ULZ7WXOC-Ds2N1ZDj.js +8 -0
  102. package/dist/webdist/assets/{switch-A6PlBbDB.js → switch-BmXyQvbr.js} +1 -1
  103. package/dist/webdist/assets/{terminal-DbMd2MTp.js → terminal-BFz2js-b.js} +1 -1
  104. package/dist/webdist/assets/{timeline-definition-Z64GVDOM-JBq4cqJK.js → timeline-definition-Z64GVDOM-BFB3jSJV.js} +1 -1
  105. package/dist/webdist/assets/{trash-2-Dlh7WyjL.js → trash-2-DmBQACGe.js} +1 -1
  106. package/dist/webdist/assets/{vennDiagram-T6HMQDX7-B7KEc4eo.js → vennDiagram-T6HMQDX7-cdR5hz8k.js} +1 -1
  107. package/dist/webdist/assets/{wardleyDiagram-T6FBY63Y-CnFAa_TS.js → wardleyDiagram-T6FBY63Y-1Z-jUDaw.js} +1 -1
  108. package/dist/webdist/assets/{wrench-D2_hKxSu.js → wrench-BV5hCWSo.js} +1 -1
  109. package/dist/webdist/assets/{xychartDiagram-ELKLHX3M-CVx7qiTK.js → xychartDiagram-ELKLHX3M-DfGwd0jU.js} +1 -1
  110. package/dist/webdist/index.html +1 -1
  111. package/package.json +1 -1
  112. package/dist/webdist/assets/WorkspaceScreen-CX0-T_Ow.js +0 -1
  113. package/dist/webdist/assets/channel-DQ5IQYoe.js +0 -1
  114. package/dist/webdist/assets/classDiagram-JCYQIIEL-DLmqdq0b.js +0 -1
  115. package/dist/webdist/assets/classDiagram-v2-OCEON4UE-DLmqdq0b.js +0 -1
  116. package/dist/webdist/assets/stateDiagram-v2-UEYNNEHI-C2DpmYiV.js +0 -1
  117. package/dist/webdist/assets/swimlanesDiagram-ULZ7WXOC-qpyaWHDD.js +0 -8
package/dist/cli.js CHANGED
@@ -1238,13 +1238,28 @@ async function ensureVllmEnv(root, onProgress, upgrade = false) {
1238
1238
  const version2 = await probeVllm(py);
1239
1239
  return { python: py, version: version2 };
1240
1240
  }
1241
+ function platformDisplay(platform) {
1242
+ return platform === "win32" ? "Windows" : platform === "darwin" ? "macOS" : platform;
1243
+ }
1244
+ function classifyVllmBlocker(platform, error) {
1245
+ const plat = platformDisplay(platform);
1246
+ if (platform === "win32" || platform === "darwin") {
1247
+ return `vLLM cannot run on ${plat}: its OpenAI server requires uvloop (and other Linux-only components such as NCCL/Triton), which have no ${plat} build. Use the llama.cpp / TurboQuant engine for GGUF models here, or run vLLM under WSL2 / Linux.`;
1248
+ }
1249
+ const err9 = error;
1250
+ if (err9?.code === "ENOENT") {
1251
+ return `vLLM's environment looks missing or broken (interpreter not found). Reinstall the vLLM engine from the Engines page.`;
1252
+ }
1253
+ const raw = err9?.stderr ? String(err9.stderr) : err9?.message ?? "unknown error";
1254
+ const detail = raw.trim().split("\n").filter(Boolean).slice(-1)[0] ?? raw.trim();
1255
+ return `vLLM's environment looks broken or incomplete (uvloop failed to import: ${detail}). ${plat} is a supported platform for vLLM \u2014 reinstall the vLLM engine from the Engines page rather than switching engines.`;
1256
+ }
1241
1257
  async function vllmServeBlocker(python) {
1242
1258
  try {
1243
1259
  await execFileP4(python, ["-c", "import uvloop"], { timeout: 2e4 });
1244
1260
  return null;
1245
- } catch {
1246
- const plat = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : process.platform;
1247
- return `vLLM cannot run on ${plat}: its OpenAI server requires uvloop (and other Linux-only components such as NCCL/Triton), which have no ${plat} build. Use the llama.cpp / TurboQuant engine for GGUF models here, or run vLLM under WSL2 / Linux.`;
1261
+ } catch (error) {
1262
+ return classifyVllmBlocker(process.platform, error);
1248
1263
  }
1249
1264
  }
1250
1265
  async function probeVllm(python) {
@@ -1300,13 +1315,28 @@ async function ensureSglangEnv(root, onProgress, upgrade = false) {
1300
1315
  const version2 = await probeSglang(py);
1301
1316
  return { python: py, version: version2 };
1302
1317
  }
1318
+ function platformDisplay2(platform) {
1319
+ return platform === "win32" ? "Windows" : platform === "darwin" ? "macOS" : platform;
1320
+ }
1321
+ function classifySglangBlocker(platform, error) {
1322
+ const plat = platformDisplay2(platform);
1323
+ if (platform === "win32" || platform === "darwin") {
1324
+ return `SGLang cannot run on ${plat}: its server requires uvloop (and other Linux-only components), which have no ${plat} build. Use the llama.cpp / TurboQuant engine for GGUF models here, or run SGLang under WSL2 / Linux.`;
1325
+ }
1326
+ const err9 = error;
1327
+ if (err9?.code === "ENOENT") {
1328
+ return `SGLang's environment looks missing or broken (interpreter not found). Reinstall the SGLang engine from the Engines page.`;
1329
+ }
1330
+ const raw = err9?.stderr ? String(err9.stderr) : err9?.message ?? "unknown error";
1331
+ const detail = raw.trim().split("\n").filter(Boolean).slice(-1)[0] ?? raw.trim();
1332
+ return `SGLang's environment looks broken or incomplete (uvloop failed to import: ${detail}). ${plat} is a supported platform for SGLang \u2014 reinstall the SGLang engine from the Engines page rather than switching engines.`;
1333
+ }
1303
1334
  async function sgLangServeBlocker(python) {
1304
1335
  try {
1305
1336
  await execFileP5(python, ["-c", "import uvloop"], { timeout: 2e4 });
1306
1337
  return null;
1307
- } catch {
1308
- const plat = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : process.platform;
1309
- return `SGLang cannot run on ${plat}: its server requires uvloop (and other Linux-only components), which have no ${plat} build. Use the llama.cpp / TurboQuant engine for GGUF models here, or run SGLang under WSL2 / Linux.`;
1338
+ } catch (error) {
1339
+ return classifySglangBlocker(process.platform, error);
1310
1340
  }
1311
1341
  }
1312
1342
  async function probeSglang(python) {
@@ -2765,6 +2795,11 @@ async function findLibcudaDir(signal) {
2765
2795
  function chooseEngineName(name, priorName) {
2766
2796
  return name ?? priorName ?? "";
2767
2797
  }
2798
+ function findPriorEngine(engines, build2) {
2799
+ return engines.find((e) => e.binPath === build2.binPath) ?? engines.find(
2800
+ (e) => sameRepo(e.sourceRepo, build2.sourceRepo) && (e.sourceBranch ?? "") === (build2.sourceBranch ?? "") && (e.sourceCommit ?? "") === (build2.sourceCommit ?? "")
2801
+ );
2802
+ }
2768
2803
  function buildDirName(repoUrl, branch, commit) {
2769
2804
  const repo = normRepoUrl(repoUrl) || "engine";
2770
2805
  const b = (branch ?? "").trim();
@@ -4171,6 +4206,7 @@ function resolveUpdateSource(engine) {
4171
4206
  if (engine.kind === "rapid-mlx") return { source: "pip", ref: "rapid-mlx", installed: versionFromPipString(engine.version) };
4172
4207
  if (engine.kind === "mlx-vlm") return { source: "pip", ref: "mlx-vlm", installed: versionFromPipString(engine.version) };
4173
4208
  if (engine.kind === "vllm") return { source: "pip", ref: "vllm", installed: versionFromPipString(engine.version) };
4209
+ if (engine.kind === "sglang") return { source: "pip", ref: "sglang", installed: versionFromPipString(engine.version) };
4174
4210
  if (engine.kind === "koboldcpp") return { source: "github-release", ref: KOBOLDCPP_REPO2, installed: engine.version };
4175
4211
  if (engine.kind === "llamafile") return { source: "github-release", ref: LLAMAFILE_REPO2, installed: engine.version };
4176
4212
  if (engine.kind === "llama-server") {
@@ -23914,10 +23950,12 @@ function registerApi(app2, d) {
23914
23950
  }
23915
23951
  return;
23916
23952
  }
23917
- const engines = d.registry.list().engines;
23918
- const prior = engines.find((e) => e.binPath === out.binPath) ?? engines.find(
23919
- (e) => e.sourceRepo === repoUrl && (e.sourceBranch ?? "") === (branch ?? "") && (e.sourceCommit ?? "") === (commit ?? "")
23920
- );
23953
+ const prior = findPriorEngine(d.registry.list().engines, {
23954
+ binPath: out.binPath,
23955
+ sourceRepo: repoUrl,
23956
+ sourceBranch: branch,
23957
+ sourceCommit: commit
23958
+ });
23921
23959
  if (prior) {
23922
23960
  if (d.registry.active()?.id === prior.id) await d.manager.stopAndWait();
23923
23961
  try {
@@ -1 +1 @@
1
- import{j as e}from"./radix-B7FN0WwE.js";import{b as W,u as $,r as b}from"./vendor-C1I6euDx.js";import{u as G,d as H,e as Y,f as J,g as U,a as z,B as C,t as j,c as q,b as h,A as _}from"./index-Ds6wWiqZ.js";import{f as V}from"./chat-api-M-jb3zIo.js";import{f as X,a as Z}from"./agent-api-BM-J1Wrf.js";import{P as B}from"./personas-FTKXYi_z.js";import{C as ee}from"./chevron-left-DoI4O7KB.js";import{R as te}from"./rotate-ccw-CDwuwLJa.js";import{T as se}from"./trash-2-Dlh7WyjL.js";import{C as ne}from"./chevron-right-3lWKkk-t.js";import"./dropdown-menu-CpDtWx6l.js";const ae=()=>({name:"",description:"",systemPrompt:"",skillIds:[],tools:[]});function oe(s){const d=[],x=new Map;for(const n of s){const a=/^mcp__([^_]+(?:_[^_]+)*)__/.exec(n.name);if(!a){d.push(n);continue}const i=a[1],p=/^\[([^\]]+)\]/.exec(n.description),c=p?p[1]:i.replace(/_/g," ");x.has(i)||x.set(i,{key:i,label:c,tools:[]}),x.get(i).tools.push(n)}return{builtin:d,groups:[...x.values()].sort((n,a)=>n.label.localeCompare(a.label))}}function le(s){return s.replace(/^mcp__[^_]+(?:_[^_]+)*__/,"")}function re(s){return s.replace(/^\[[^\]]+\]\s*/,"")}function D({tool:s,checked:d,onToggle:x}){return e.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-[12px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:d,onChange:x}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"font-mono text-ink",children:le(s.name)}),s.description&&e.jsx("span",{className:"text-faint",children:re(s.description)})]})]})}function ie({group:s,selected:d,onToggleAll:x,onToggleOne:n}){const[a,i]=b.useState(!1),p=s.tools.map(l=>l.name),c=p.filter(l=>d.has(l)).length,o=c===p.length,g=c>0&&!o,u=b.useRef(null);return b.useEffect(()=>{u.current&&(u.current.indeterminate=g)},[g]),e.jsxs("div",{className:"rounded-md border border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-2",children:[e.jsx("input",{ref:u,type:"checkbox",checked:o,onChange:()=>x(p,!o)}),e.jsxs("button",{type:"button",onClick:()=>{j("agents","toggle_agent_tool_group"),i(l=>!l)},className:"flex flex-1 items-center gap-1.5 text-left text-[13px] text-ink",children:[e.jsx(ne,{size:12,className:q("shrink-0 text-faint transition-transform",a&&"rotate-90")}),s.label,e.jsxs("span",{className:"text-[11px] text-faint",children:["(",c,"/",p.length,")"]})]})]}),a&&e.jsx("div",{className:"flex flex-col gap-1.5 border-t border-border px-3 py-2 pl-9",children:s.tools.map(l=>e.jsx(D,{tool:l,checked:d.has(l.name),onToggle:()=>n(l.name)},l.name))})]})}function ce({tools:s,selected:d,onChange:x}){const n=new Set(d),{builtin:a,groups:i}=oe(s),p=o=>x(n.has(o)?d.filter(g=>g!==o):[...d,o]),c=(o,g)=>{const u=d.filter(l=>!o.includes(l));x(g?[...u,...o]:u)};return s.length===0?e.jsx("p",{className:"text-[12px] text-faint",children:"No tools available yet."}):e.jsxs("div",{className:"flex flex-col gap-2",children:[a.length>0&&e.jsx("div",{className:"flex flex-col gap-2 rounded-md border border-border bg-panel-2 p-3",children:a.map(o=>e.jsx(D,{tool:o,checked:n.has(o.name),onToggle:()=>p(o.name)},o.name))}),i.map(o=>e.jsx(ie,{group:o,selected:n,onToggleAll:c,onToggleOne:p},o.key))]})}function je(){const{agentId:s="new"}=W(),d=$(),x=G(),n=s==="new",a=!n&&B.some(t=>t.id===s),i=a?B.find(t=>t.id===s):void 0,p=H(),c=!n&&!a?(p.data??[]).find(t=>t.id===s):void 0,o=Y(),g=J(),u=U(),l=a?g.data?.[s]:void 0,I=z({queryKey:Z.list(),queryFn:X,staleTime:0}),k=I.data??[],w=z({queryKey:["available-tools"],queryFn:V}),N=w.data??[],[m,f]=b.useState(ae()),[S,T]=b.useState(!1),[A,P]=b.useState(!1),[L,R]=b.useState(!1),[E,Q]=b.useState("skills");n&&!S&&(k.length||N.length)&&(f(t=>({...t,skillIds:k.map(r=>r.id),tools:N.map(r=>r.name)})),T(!0)),!n&&!a&&!S&&c&&(f({name:c.name,description:c.description,systemPrompt:c.systemPrompt,skillIds:c.skillIds,tools:c.tools}),T(!0)),a&&!S&&i&&g.isSuccess&&(k.length||N.length)&&(f({name:l?.name??i.name,description:l?.description??i.description,systemPrompt:l?.systemPrompt??i.systemPrompt,skillIds:l?.skillIds??k.map(t=>t.id),tools:l?.tools??N.map(t=>t.name)}),T(!0));const y=()=>{j("agents","back_to_agents"),d("/customize")},O=t=>f(r=>({...r,skillIds:r.skillIds.includes(t)?r.skillIds.filter(v=>v!==t):[...r.skillIds,t]})),F=()=>{if(!m.name.trim()){h.error("Name is required.");return}P(!0);const t={name:m.name.trim(),description:m.description.trim(),systemPrompt:m.systemPrompt,skillIds:m.skillIds,tools:m.tools};if(a){u.save.mutate({id:s,override:t},{onSuccess:()=>{h.success("Agent saved."),y()},onError:v=>{h.error(v instanceof _?v.message:"Could not save agent."),P(!1)}});return}const r={onSuccess:()=>{x.invalidateQueries({queryKey:["chat-agents"]}),h.success(n?"Agent created.":"Agent saved."),y()},onError:v=>{h.error(v instanceof _?v.message:"Could not save agent."),P(!1)}};n?o.add.mutate(t,r):o.update.mutate({id:s,patch:t},r)},K=()=>{u.reset.mutate(s,{onSuccess:()=>{h.success("Reset to default."),i&&f({name:i.name,description:i.description,systemPrompt:i.systemPrompt,skillIds:k.map(t=>t.id),tools:N.map(t=>t.name)})},onError:t=>h.error(t instanceof _?t.message:"Could not reset agent.")})},M=()=>{o.remove.mutate(s,{onSuccess:()=>{h.success("Agent deleted."),y()},onError:t=>h.error(t instanceof _?t.message:"Could not delete agent.")})};return!n&&!a&&p.isSuccess&&!c?e.jsxs("div",{className:"flex w-full flex-col items-center gap-3 px-8 py-16",children:[e.jsx("p",{className:"text-[14px] text-muted",children:"That agent no longer exists."}),e.jsx(C,{size:"sm",variant:"outline",onClick:y,children:"Back to agents"})]}):e.jsxs("div",{className:"flex w-full max-w-4xl flex-col gap-5 px-4 py-6 md:px-8",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:y,className:"text-faint hover:text-ink",title:"Back to agents",children:e.jsx(ee,{size:18})}),e.jsx("span",{className:"text-[15px] font-medium text-ink",children:n?"New agent":a?l?"Edit agent (modified built-in)":"Edit agent (built-in)":"Edit agent"}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a&&e.jsxs(C,{size:"sm",variant:"outline",onClick:()=>{j("agents","reset_agent_to_default"),K()},disabled:u.reset.isPending,children:[e.jsx(te,{size:13})," Reset to default"]}),e.jsx(C,{size:"sm",variant:"outline",onClick:y,children:"Cancel"}),e.jsx(C,{size:"sm",onClick:()=>{j("agents","save_agent"),F()},disabled:A||!m.name.trim(),children:A?"Saving…":"Save"})]})]}),a&&e.jsx("p",{className:"rounded-md border border-border bg-panel px-3 py-2 text-[12px] text-muted",children:"Built-in agents can be edited in place — Reset to default discards your changes and restores TurboLLM's original prompt and access."}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"Name"}),e.jsx("input",{className:"rounded-md border border-border bg-bg px-3 py-1.5 text-[13px] text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"Release Notes Writer",value:m.name,onChange:t=>f(r=>({...r,name:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"Description"}),e.jsx("input",{className:"rounded-md border border-border bg-bg px-3 py-1.5 text-[13px] text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"What this agent is for, in one line",value:m.description,onChange:t=>f(r=>({...r,description:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"System prompt"}),e.jsx("textarea",{className:"min-h-[160px] resize-y rounded-md border border-border bg-bg px-3 py-2 font-mono text-[12px] leading-relaxed text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"You are…",value:m.systemPrompt,onChange:t=>f(r=>({...r,systemPrompt:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx("div",{className:"inline-flex w-fit rounded-md border border-border p-0.5",children:["skills","tools"].map(t=>e.jsx("button",{type:"button",onClick:()=>{j("agents","switch_agent_form_tab"),Q(t)},className:q("rounded px-3 py-1.5 text-[13px] font-medium transition-colors",E===t?"bg-accent/12 text-accent":"text-muted hover:text-ink"),children:t==="skills"?`Skills (${m.skillIds.length})`:`Tools (${m.tools.length})`},t))}),E==="skills"?I.isLoading?e.jsx("p",{className:"text-[12px] text-faint",children:"Loading…"}):k.length===0?e.jsx("p",{className:"text-[12px] text-faint",children:"No skills yet — create one under Customize → Skills."}):e.jsx("div",{className:"flex flex-col gap-2 rounded-md border border-border bg-panel-2 p-3",children:k.map(t=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:m.skillIds.includes(t.id),onChange:()=>O(t.id)}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-ink",children:t.name}),t.description&&e.jsx("span",{className:"text-[12px] text-muted",children:t.description})]})]},t.id))}):w.isLoading?e.jsx("p",{className:"text-[12px] text-faint",children:"Loading…"}):e.jsx(ce,{tools:N,selected:m.tools,onChange:t=>f(r=>({...r,tools:t}))})]}),!n&&!a&&(L?e.jsxs("div",{className:"flex items-center gap-2 self-start rounded-md border border-border bg-panel p-2 text-[12px]",children:[e.jsx("span",{className:"flex-1 text-muted",children:"Delete this agent?"}),e.jsx("button",{type:"button",onClick:()=>{j("agents","delete_agent"),M()},className:"rounded px-2 py-1 text-[color:var(--err)] hover:bg-[color:color-mix(in_srgb,var(--err)_12%,transparent)]",children:"Delete"}),e.jsx("button",{type:"button",onClick:()=>{j("agents","cancel_delete_agent"),R(!1)},className:"rounded px-2 py-1 text-faint hover:text-ink",children:"Cancel"})]}):e.jsxs("button",{type:"button",onClick:()=>R(!0),className:"flex items-center gap-1.5 self-start text-[12px] text-faint hover:text-[color:var(--err)]",children:[e.jsx(se,{size:13})," Delete agent"]}))]})}export{je as AgentEditPage};
1
+ import{j as e}from"./radix-B7FN0WwE.js";import{b as W,u as $,r as b}from"./vendor-C1I6euDx.js";import{u as G,d as H,e as Y,f as J,g as U,a as z,B as C,t as j,c as q,b as h,A as _}from"./index-D5gUIqLa.js";import{f as V}from"./chat-api-C84sO1C9.js";import{f as X,a as Z}from"./agent-api-DZpsdnDb.js";import{P as B}from"./personas-CFMpT4jP.js";import{C as ee}from"./chevron-left-wCh6MmEl.js";import{R as te}from"./rotate-ccw-CUHjjSni.js";import{T as se}from"./trash-2-DmBQACGe.js";import{C as ne}from"./chevron-right-BC1tvE2N.js";import"./dropdown-menu-Bhu8YtbI.js";const ae=()=>({name:"",description:"",systemPrompt:"",skillIds:[],tools:[]});function oe(s){const d=[],x=new Map;for(const n of s){const a=/^mcp__([^_]+(?:_[^_]+)*)__/.exec(n.name);if(!a){d.push(n);continue}const i=a[1],p=/^\[([^\]]+)\]/.exec(n.description),c=p?p[1]:i.replace(/_/g," ");x.has(i)||x.set(i,{key:i,label:c,tools:[]}),x.get(i).tools.push(n)}return{builtin:d,groups:[...x.values()].sort((n,a)=>n.label.localeCompare(a.label))}}function le(s){return s.replace(/^mcp__[^_]+(?:_[^_]+)*__/,"")}function re(s){return s.replace(/^\[[^\]]+\]\s*/,"")}function D({tool:s,checked:d,onToggle:x}){return e.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-[12px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:d,onChange:x}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"font-mono text-ink",children:le(s.name)}),s.description&&e.jsx("span",{className:"text-faint",children:re(s.description)})]})]})}function ie({group:s,selected:d,onToggleAll:x,onToggleOne:n}){const[a,i]=b.useState(!1),p=s.tools.map(l=>l.name),c=p.filter(l=>d.has(l)).length,o=c===p.length,g=c>0&&!o,u=b.useRef(null);return b.useEffect(()=>{u.current&&(u.current.indeterminate=g)},[g]),e.jsxs("div",{className:"rounded-md border border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-2",children:[e.jsx("input",{ref:u,type:"checkbox",checked:o,onChange:()=>x(p,!o)}),e.jsxs("button",{type:"button",onClick:()=>{j("agents","toggle_agent_tool_group"),i(l=>!l)},className:"flex flex-1 items-center gap-1.5 text-left text-[13px] text-ink",children:[e.jsx(ne,{size:12,className:q("shrink-0 text-faint transition-transform",a&&"rotate-90")}),s.label,e.jsxs("span",{className:"text-[11px] text-faint",children:["(",c,"/",p.length,")"]})]})]}),a&&e.jsx("div",{className:"flex flex-col gap-1.5 border-t border-border px-3 py-2 pl-9",children:s.tools.map(l=>e.jsx(D,{tool:l,checked:d.has(l.name),onToggle:()=>n(l.name)},l.name))})]})}function ce({tools:s,selected:d,onChange:x}){const n=new Set(d),{builtin:a,groups:i}=oe(s),p=o=>x(n.has(o)?d.filter(g=>g!==o):[...d,o]),c=(o,g)=>{const u=d.filter(l=>!o.includes(l));x(g?[...u,...o]:u)};return s.length===0?e.jsx("p",{className:"text-[12px] text-faint",children:"No tools available yet."}):e.jsxs("div",{className:"flex flex-col gap-2",children:[a.length>0&&e.jsx("div",{className:"flex flex-col gap-2 rounded-md border border-border bg-panel-2 p-3",children:a.map(o=>e.jsx(D,{tool:o,checked:n.has(o.name),onToggle:()=>p(o.name)},o.name))}),i.map(o=>e.jsx(ie,{group:o,selected:n,onToggleAll:c,onToggleOne:p},o.key))]})}function je(){const{agentId:s="new"}=W(),d=$(),x=G(),n=s==="new",a=!n&&B.some(t=>t.id===s),i=a?B.find(t=>t.id===s):void 0,p=H(),c=!n&&!a?(p.data??[]).find(t=>t.id===s):void 0,o=Y(),g=J(),u=U(),l=a?g.data?.[s]:void 0,I=z({queryKey:Z.list(),queryFn:X,staleTime:0}),k=I.data??[],w=z({queryKey:["available-tools"],queryFn:V}),N=w.data??[],[m,f]=b.useState(ae()),[S,T]=b.useState(!1),[A,P]=b.useState(!1),[L,R]=b.useState(!1),[E,Q]=b.useState("skills");n&&!S&&(k.length||N.length)&&(f(t=>({...t,skillIds:k.map(r=>r.id),tools:N.map(r=>r.name)})),T(!0)),!n&&!a&&!S&&c&&(f({name:c.name,description:c.description,systemPrompt:c.systemPrompt,skillIds:c.skillIds,tools:c.tools}),T(!0)),a&&!S&&i&&g.isSuccess&&(k.length||N.length)&&(f({name:l?.name??i.name,description:l?.description??i.description,systemPrompt:l?.systemPrompt??i.systemPrompt,skillIds:l?.skillIds??k.map(t=>t.id),tools:l?.tools??N.map(t=>t.name)}),T(!0));const y=()=>{j("agents","back_to_agents"),d("/customize")},O=t=>f(r=>({...r,skillIds:r.skillIds.includes(t)?r.skillIds.filter(v=>v!==t):[...r.skillIds,t]})),F=()=>{if(!m.name.trim()){h.error("Name is required.");return}P(!0);const t={name:m.name.trim(),description:m.description.trim(),systemPrompt:m.systemPrompt,skillIds:m.skillIds,tools:m.tools};if(a){u.save.mutate({id:s,override:t},{onSuccess:()=>{h.success("Agent saved."),y()},onError:v=>{h.error(v instanceof _?v.message:"Could not save agent."),P(!1)}});return}const r={onSuccess:()=>{x.invalidateQueries({queryKey:["chat-agents"]}),h.success(n?"Agent created.":"Agent saved."),y()},onError:v=>{h.error(v instanceof _?v.message:"Could not save agent."),P(!1)}};n?o.add.mutate(t,r):o.update.mutate({id:s,patch:t},r)},K=()=>{u.reset.mutate(s,{onSuccess:()=>{h.success("Reset to default."),i&&f({name:i.name,description:i.description,systemPrompt:i.systemPrompt,skillIds:k.map(t=>t.id),tools:N.map(t=>t.name)})},onError:t=>h.error(t instanceof _?t.message:"Could not reset agent.")})},M=()=>{o.remove.mutate(s,{onSuccess:()=>{h.success("Agent deleted."),y()},onError:t=>h.error(t instanceof _?t.message:"Could not delete agent.")})};return!n&&!a&&p.isSuccess&&!c?e.jsxs("div",{className:"flex w-full flex-col items-center gap-3 px-8 py-16",children:[e.jsx("p",{className:"text-[14px] text-muted",children:"That agent no longer exists."}),e.jsx(C,{size:"sm",variant:"outline",onClick:y,children:"Back to agents"})]}):e.jsxs("div",{className:"flex w-full max-w-4xl flex-col gap-5 px-4 py-6 md:px-8",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:y,className:"text-faint hover:text-ink",title:"Back to agents",children:e.jsx(ee,{size:18})}),e.jsx("span",{className:"text-[15px] font-medium text-ink",children:n?"New agent":a?l?"Edit agent (modified built-in)":"Edit agent (built-in)":"Edit agent"}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a&&e.jsxs(C,{size:"sm",variant:"outline",onClick:()=>{j("agents","reset_agent_to_default"),K()},disabled:u.reset.isPending,children:[e.jsx(te,{size:13})," Reset to default"]}),e.jsx(C,{size:"sm",variant:"outline",onClick:y,children:"Cancel"}),e.jsx(C,{size:"sm",onClick:()=>{j("agents","save_agent"),F()},disabled:A||!m.name.trim(),children:A?"Saving…":"Save"})]})]}),a&&e.jsx("p",{className:"rounded-md border border-border bg-panel px-3 py-2 text-[12px] text-muted",children:"Built-in agents can be edited in place — Reset to default discards your changes and restores TurboLLM's original prompt and access."}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"Name"}),e.jsx("input",{className:"rounded-md border border-border bg-bg px-3 py-1.5 text-[13px] text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"Release Notes Writer",value:m.name,onChange:t=>f(r=>({...r,name:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"Description"}),e.jsx("input",{className:"rounded-md border border-border bg-bg px-3 py-1.5 text-[13px] text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"What this agent is for, in one line",value:m.description,onChange:t=>f(r=>({...r,description:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-[12px] font-medium text-muted",children:"System prompt"}),e.jsx("textarea",{className:"min-h-[160px] resize-y rounded-md border border-border bg-bg px-3 py-2 font-mono text-[12px] leading-relaxed text-ink outline-none focus:border-accent placeholder:text-faint",placeholder:"You are…",value:m.systemPrompt,onChange:t=>f(r=>({...r,systemPrompt:t.target.value}))})]}),e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx("div",{className:"inline-flex w-fit rounded-md border border-border p-0.5",children:["skills","tools"].map(t=>e.jsx("button",{type:"button",onClick:()=>{j("agents","switch_agent_form_tab"),Q(t)},className:q("rounded px-3 py-1.5 text-[13px] font-medium transition-colors",E===t?"bg-accent/12 text-accent":"text-muted hover:text-ink"),children:t==="skills"?`Skills (${m.skillIds.length})`:`Tools (${m.tools.length})`},t))}),E==="skills"?I.isLoading?e.jsx("p",{className:"text-[12px] text-faint",children:"Loading…"}):k.length===0?e.jsx("p",{className:"text-[12px] text-faint",children:"No skills yet — create one under Customize → Skills."}):e.jsx("div",{className:"flex flex-col gap-2 rounded-md border border-border bg-panel-2 p-3",children:k.map(t=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:m.skillIds.includes(t.id),onChange:()=>O(t.id)}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-ink",children:t.name}),t.description&&e.jsx("span",{className:"text-[12px] text-muted",children:t.description})]})]},t.id))}):w.isLoading?e.jsx("p",{className:"text-[12px] text-faint",children:"Loading…"}):e.jsx(ce,{tools:N,selected:m.tools,onChange:t=>f(r=>({...r,tools:t}))})]}),!n&&!a&&(L?e.jsxs("div",{className:"flex items-center gap-2 self-start rounded-md border border-border bg-panel p-2 text-[12px]",children:[e.jsx("span",{className:"flex-1 text-muted",children:"Delete this agent?"}),e.jsx("button",{type:"button",onClick:()=>{j("agents","delete_agent"),M()},className:"rounded px-2 py-1 text-[color:var(--err)] hover:bg-[color:color-mix(in_srgb,var(--err)_12%,transparent)]",children:"Delete"}),e.jsx("button",{type:"button",onClick:()=>{j("agents","cancel_delete_agent"),R(!1)},className:"rounded px-2 py-1 text-faint hover:text-ink",children:"Cancel"})]}):e.jsxs("button",{type:"button",onClick:()=>R(!0),className:"flex items-center gap-1.5 self-start text-[12px] text-faint hover:text-[color:var(--err)]",children:[e.jsx(se,{size:13})," Delete agent"]}))]})}export{je as AgentEditPage};