@kvman/kvcoder 0.1.10 → 0.1.11

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 (171) hide show
  1. package/dist/api.d.ts +3 -2
  2. package/dist/api.d.ts.map +1 -1
  3. package/dist/calls/call-name.d.ts +8 -0
  4. package/dist/calls/call-name.d.ts.map +1 -0
  5. package/dist/calls/call-name.js +38 -0
  6. package/dist/calls/call-name.js.map +1 -0
  7. package/dist/calls/line-run.d.ts +1 -4
  8. package/dist/calls/line-run.d.ts.map +1 -1
  9. package/dist/calls/line-run.js +2 -2
  10. package/dist/calls/line-run.js.map +1 -1
  11. package/dist/calls/run-tool.d.ts +1 -6
  12. package/dist/calls/run-tool.d.ts.map +1 -1
  13. package/dist/calls/run-tool.js +3 -6
  14. package/dist/calls/run-tool.js.map +1 -1
  15. package/dist/connector-call.d.ts +1 -1
  16. package/dist/connector-call.d.ts.map +1 -1
  17. package/dist/connectors/artifact.d.ts +1 -1
  18. package/dist/connectors/artifact.d.ts.map +1 -1
  19. package/dist/connectors/artifact.js +1 -1
  20. package/dist/connectors/artifact.js.map +1 -1
  21. package/dist/connectors/background.d.ts.map +1 -1
  22. package/dist/connectors/background.js +9 -3
  23. package/dist/connectors/background.js.map +1 -1
  24. package/dist/connectors/binary.js +2 -2
  25. package/dist/connectors/binary.js.map +1 -1
  26. package/dist/connectors/builtin-connectors.d.ts +24 -2
  27. package/dist/connectors/builtin-connectors.d.ts.map +1 -1
  28. package/dist/connectors/connector-command.d.ts +0 -1
  29. package/dist/connectors/connector-command.d.ts.map +1 -1
  30. package/dist/connectors/connector-command.js +1 -1
  31. package/dist/connectors/connector-command.js.map +1 -1
  32. package/dist/connectors/delegate.d.ts +17 -0
  33. package/dist/connectors/delegate.d.ts.map +1 -1
  34. package/dist/connectors/delegate.js +28 -6
  35. package/dist/connectors/delegate.js.map +1 -1
  36. package/dist/connectors/execution-map.d.ts +14 -3
  37. package/dist/connectors/execution-map.d.ts.map +1 -1
  38. package/dist/connectors/execution-map.js +43 -12
  39. package/dist/connectors/execution-map.js.map +1 -1
  40. package/dist/connectors/shell.js +1 -1
  41. package/dist/connectors/shell.js.map +1 -1
  42. package/dist/delegate/approved-run.js +2 -2
  43. package/dist/delegate/approved-run.js.map +1 -1
  44. package/dist/delegate/continue-helper.d.ts +18 -0
  45. package/dist/delegate/continue-helper.d.ts.map +1 -0
  46. package/dist/delegate/continue-helper.js +64 -0
  47. package/dist/delegate/continue-helper.js.map +1 -0
  48. package/dist/delegate/permission.d.ts +5 -5
  49. package/dist/delegate/runs.d.ts +9 -11
  50. package/dist/delegate/runs.d.ts.map +1 -1
  51. package/dist/delegate/runs.js +13 -9
  52. package/dist/delegate/runs.js.map +1 -1
  53. package/dist/delegate/workers.d.ts +6 -0
  54. package/dist/delegate/workers.d.ts.map +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +2 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/jobs/helper-progress.d.ts +11 -0
  59. package/dist/jobs/helper-progress.d.ts.map +1 -0
  60. package/dist/jobs/helper-progress.js +38 -0
  61. package/dist/jobs/helper-progress.js.map +1 -0
  62. package/dist/jobs/job-rows.d.ts +3 -1
  63. package/dist/jobs/job-rows.d.ts.map +1 -1
  64. package/dist/jobs/job-rows.js +46 -22
  65. package/dist/jobs/job-rows.js.map +1 -1
  66. package/dist/jobs/process-report.d.ts +1 -1
  67. package/dist/jobs/process-report.d.ts.map +1 -1
  68. package/dist/jobs/process-report.js +11 -6
  69. package/dist/jobs/process-report.js.map +1 -1
  70. package/dist/jobs/process-run.d.ts +2 -5
  71. package/dist/jobs/process-run.d.ts.map +1 -1
  72. package/dist/jobs/process-run.js +6 -5
  73. package/dist/jobs/process-run.js.map +1 -1
  74. package/dist/jobs/register-jobs.js +3 -3
  75. package/dist/jobs/register-jobs.js.map +1 -1
  76. package/dist/maps/map-rules.d.ts +4 -2
  77. package/dist/maps/map-rules.d.ts.map +1 -1
  78. package/dist/maps/map-rules.js +7 -4
  79. package/dist/maps/map-rules.js.map +1 -1
  80. package/dist/maps/map-schema.d.ts +4 -4
  81. package/dist/maps/map-schema.d.ts.map +1 -1
  82. package/dist/maps/map-schema.js +10 -3
  83. package/dist/maps/map-schema.js.map +1 -1
  84. package/dist/prompt/build-prompt.js +2 -2
  85. package/dist/prompt/build-prompt.js.map +1 -1
  86. package/dist/prompt/session-grants.d.ts +3 -3
  87. package/dist/prompt/working-method.js +12 -12
  88. package/dist/prompt/working-method.js.map +1 -1
  89. package/dist/register-settings.d.ts +4 -0
  90. package/dist/register-settings.d.ts.map +1 -1
  91. package/dist/schemas/records.d.ts +10 -6
  92. package/dist/schemas/records.d.ts.map +1 -1
  93. package/dist/schemas/records.js +7 -4
  94. package/dist/schemas/records.js.map +1 -1
  95. package/dist/sessions/new-session.d.ts.map +1 -1
  96. package/dist/sessions/new-session.js +4 -2
  97. package/dist/sessions/new-session.js.map +1 -1
  98. package/dist/sessions/register-sessions.d.ts.map +1 -1
  99. package/dist/sessions/register-sessions.js +5 -2
  100. package/dist/sessions/register-sessions.js.map +1 -1
  101. package/dist/sessions/session-view.d.ts +2 -0
  102. package/dist/sessions/session-view.d.ts.map +1 -1
  103. package/dist/store/collections.d.ts +8 -8
  104. package/dist/thinking-levels.d.ts +6 -0
  105. package/dist/thinking-levels.d.ts.map +1 -0
  106. package/dist/thinking-levels.js +13 -0
  107. package/dist/thinking-levels.js.map +1 -0
  108. package/dist/turns/cache-retention.d.ts +6 -0
  109. package/dist/turns/cache-retention.d.ts.map +1 -0
  110. package/dist/turns/cache-retention.js +7 -0
  111. package/dist/turns/cache-retention.js.map +1 -0
  112. package/dist/turns/call-results.d.ts +6 -0
  113. package/dist/turns/call-results.d.ts.map +1 -0
  114. package/dist/turns/call-results.js +21 -0
  115. package/dist/turns/call-results.js.map +1 -0
  116. package/dist/turns/child-result.d.ts.map +1 -1
  117. package/dist/turns/child-result.js +4 -2
  118. package/dist/turns/child-result.js.map +1 -1
  119. package/dist/turns/compaction.d.ts.map +1 -1
  120. package/dist/turns/compaction.js +2 -1
  121. package/dist/turns/compaction.js.map +1 -1
  122. package/dist/turns/end-turn-state.d.ts.map +1 -1
  123. package/dist/turns/end-turn-state.js +2 -0
  124. package/dist/turns/end-turn-state.js.map +1 -1
  125. package/dist/turns/ended-calls.d.ts +6 -0
  126. package/dist/turns/ended-calls.d.ts.map +1 -0
  127. package/dist/turns/ended-calls.js +43 -0
  128. package/dist/turns/ended-calls.js.map +1 -0
  129. package/dist/turns/model-context.d.ts.map +1 -1
  130. package/dist/turns/model-context.js +16 -1
  131. package/dist/turns/model-context.js.map +1 -1
  132. package/dist/turns/model-info.d.ts +4 -0
  133. package/dist/turns/model-info.d.ts.map +1 -1
  134. package/dist/turns/model-info.js +7 -1
  135. package/dist/turns/model-info.js.map +1 -1
  136. package/dist/turns/model-retry.d.ts.map +1 -1
  137. package/dist/turns/model-retry.js +5 -4
  138. package/dist/turns/model-retry.js.map +1 -1
  139. package/dist/turns/run-calls.d.ts.map +1 -1
  140. package/dist/turns/run-calls.js +21 -5
  141. package/dist/turns/run-calls.js.map +1 -1
  142. package/dist/turns/run-command.d.ts.map +1 -1
  143. package/dist/turns/run-command.js +4 -6
  144. package/dist/turns/run-command.js.map +1 -1
  145. package/dist/turns/sent-size.d.ts +6 -2
  146. package/dist/turns/sent-size.d.ts.map +1 -1
  147. package/dist/turns/sent-size.js +8 -4
  148. package/dist/turns/sent-size.js.map +1 -1
  149. package/dist/turns/settle-calls.d.ts +1 -7
  150. package/dist/turns/settle-calls.d.ts.map +1 -1
  151. package/dist/turns/settle-calls.js +2 -19
  152. package/dist/turns/settle-calls.js.map +1 -1
  153. package/dist/turns/step.d.ts.map +1 -1
  154. package/dist/turns/step.js +29 -6
  155. package/dist/turns/step.js.map +1 -1
  156. package/dist/web/components/approval.css +1 -1
  157. package/dist/web/components/call.css +1 -1
  158. package/dist/web/components/call.js +210 -183
  159. package/dist/web/components/connectors.css +1 -1
  160. package/dist/web/components/connectors.js +431 -412
  161. package/dist/web/components/conversation.css +1 -1
  162. package/dist/web/components/conversation.js +1000 -893
  163. package/dist/web/components/mcp-sign-in.css +1 -1
  164. package/dist/web/components/model.css +1 -1
  165. package/dist/web/components/model.js +2 -1
  166. package/dist/web/components/question.css +1 -1
  167. package/dist/web/components/sessions.css +1 -1
  168. package/docs/connectors.md +4 -5
  169. package/locales/ar.json +15 -4
  170. package/locales/en.json +15 -4
  171. package/package.json +137 -5
@@ -250,6 +250,22 @@ function he(e) {
250
250
  };
251
251
  }
252
252
  //#endregion
253
+ //#region web/src/mcp-steps.ts
254
+ function R(e) {
255
+ let t = e.steps;
256
+ return Array.isArray(t) ? t.map((e, t) => {
257
+ let { tool: n, arguments: r } = j(e), i = `${t + 1}.`;
258
+ return typeof n != "string" || n.trim() === "" ? {
259
+ label: i,
260
+ arguments: j(r)
261
+ } : {
262
+ label: `${i} ${n}`,
263
+ tool: n,
264
+ arguments: j(r)
265
+ };
266
+ }) : [];
267
+ }
268
+ //#endregion
253
269
  //#region web/src/call-summary.ts
254
270
  function ge(e) {
255
271
  if (e !== void 0 && /^\s*[[{]/.test(e)) try {
@@ -259,12 +275,12 @@ function ge(e) {
259
275
  throw e;
260
276
  }
261
277
  }
262
- var R = 1024;
263
- function z(e, t) {
264
- return t < R ? e("kvcoder.ui.call.bytes", { count: t }) : t < R * R ? e("kvcoder.ui.call.kilobytes", { count: (t / R).toFixed(1) }) : e("kvcoder.ui.call.megabytes", { count: (t / (R * R)).toFixed(1) });
278
+ var z = 1024;
279
+ function B(e, t) {
280
+ return t < z ? e("kvcoder.ui.call.bytes", { count: t }) : t < z * z ? e("kvcoder.ui.call.kilobytes", { count: (t / z).toFixed(1) }) : e("kvcoder.ui.call.megabytes", { count: (t / (z * z)).toFixed(1) });
265
281
  }
266
- var B = (e) => typeof e == "string" && e !== "" ? e : void 0;
267
- function V(e) {
282
+ var V = (e) => typeof e == "string" && e !== "" ? e : void 0;
283
+ function _e(e) {
268
284
  let t = e.edits;
269
285
  return Array.isArray(t) ? t.flatMap((e) => {
270
286
  let { oldText: t, newText: n } = j(e);
@@ -274,14 +290,14 @@ function V(e) {
274
290
  }] : [];
275
291
  }) : [];
276
292
  }
277
- function _e(e) {
278
- let t = V(e).map((e) => he(L(e.oldText, e.newText)));
293
+ function ve(e) {
294
+ let t = _e(e).map((e) => he(L(e.oldText, e.newText)));
279
295
  return `+${t.reduce((e, t) => e + t.added, 0)} −${t.reduce((e, t) => e + t.removed, 0)}`;
280
296
  }
281
- function ve(e, t) {
282
- if (typeof t.bytes == "number" && typeof t.created == "boolean") return e(t.created ? "kvcoder.ui.call.created" : "kvcoder.ui.call.replaced", { size: z(e, t.bytes) });
283
- }
284
297
  function ye(e, t) {
298
+ if (typeof t.bytes == "number" && typeof t.created == "boolean") return e(t.created ? "kvcoder.ui.call.created" : "kvcoder.ui.call.replaced", { size: B(e, t.bytes) });
299
+ }
300
+ function be(e, t) {
285
301
  let { fromLine: n, totalLines: r, content: i } = t;
286
302
  if (typeof n != "number" || typeof r != "number" || typeof i != "string") return;
287
303
  let a = F(i).length;
@@ -291,11 +307,11 @@ function ye(e, t) {
291
307
  total: r
292
308
  });
293
309
  }
294
- function be(e, t) {
310
+ function xe(e, t) {
295
311
  let n = t.entries;
296
312
  if (Array.isArray(n)) return e(t.truncated === !0 ? "kvcoder.ui.call.entriesFirst" : "kvcoder.ui.call.entries", { count: n.length });
297
313
  }
298
- function xe(e, t) {
314
+ function Se(e, t) {
299
315
  let n = t.files;
300
316
  if (!Array.isArray(n)) return;
301
317
  let r = n.reduce((e, t) => {
@@ -307,7 +323,7 @@ function xe(e, t) {
307
323
  files: n.length
308
324
  });
309
325
  }
310
- var Se = (e, t, n) => Array.isArray(n) ? e(t, { count: n.length }) : void 0;
326
+ var Ce = (e, t, n) => Array.isArray(n) ? e(t, { count: n.length }) : void 0;
311
327
  function H(e, t, n) {
312
328
  return {
313
329
  ...e === void 0 ? {} : { words: e },
@@ -315,63 +331,62 @@ function H(e, t, n) {
315
331
  ...n === void 0 ? {} : { outcome: n }
316
332
  };
317
333
  }
318
- function Ce(e, t, n, r) {
319
- let i = r === void 0 ? void 0 : j(r), a = B(n.path);
320
- if (t === "edit") return H(e("kvcoder.ui.call.edit"), a, i === void 0 ? void 0 : _e(n));
321
- if (t === "write") return H(e("kvcoder.ui.call.write"), a, i === void 0 ? void 0 : ve(e, i));
322
- if (t === "read") return H(e("kvcoder.ui.call.read"), a, i === void 0 ? void 0 : ye(e, i));
323
- if (t === "list") return H(e("kvcoder.ui.call.list"), a ?? ".", i === void 0 ? void 0 : be(e, i));
324
- if (t === "search") return H(e("kvcoder.ui.call.search"), B(n.pattern), i === void 0 ? void 0 : xe(e, i));
325
- }
326
334
  function we(e, t, n, r) {
327
- let i = B(n.server), a = [i, B(n.tool)].filter((e) => e !== void 0).join(" · ");
328
- if (t === "call") return H(void 0, a === "" ? void 0 : a);
329
- if (t === "run") {
330
- let e = n.steps;
331
- return H(void 0, [i, (Array.isArray(e) ? e.flatMap((e) => B(j(e).tool) === void 0 ? [] : [String(j(e).tool)]) : []).join(", ")].filter((e) => e !== void 0 && e !== "").join(" · "));
332
- }
333
- if (t === "tools") return H(e("kvcoder.ui.call.tools"), a === "" ? void 0 : a, Se(e, "kvcoder.ui.call.toolCount", j(r).tools));
335
+ let i = r === void 0 ? void 0 : j(r), a = V(n.path);
336
+ if (t === "edit") return H(e("kvcoder.ui.call.edit"), a, i === void 0 ? void 0 : ve(n));
337
+ if (t === "write") return H(e("kvcoder.ui.call.write"), a, i === void 0 ? void 0 : ye(e, i));
338
+ if (t === "read") return H(e("kvcoder.ui.call.read"), a, i === void 0 ? void 0 : be(e, i));
339
+ if (t === "list") return H(e("kvcoder.ui.call.list"), a ?? ".", i === void 0 ? void 0 : xe(e, i));
340
+ if (t === "search") return H(e("kvcoder.ui.call.search"), V(n.pattern), i === void 0 ? void 0 : Se(e, i));
334
341
  }
335
342
  function Te(e, t, n, r) {
336
- if (t === "list") return H(e("kvcoder.ui.call.backgroundRuns"), void 0, Se(e, "kvcoder.ui.call.runCount", r));
343
+ let i = V(n.server), a = [i, V(n.tool)].filter((e) => e !== void 0).join(" · ");
344
+ if (t === "call") return H(void 0, a === "" ? void 0 : a);
345
+ if (t === "run") return H(void 0, [i, R(n).flatMap((e) => e.tool === void 0 ? [] : [e.tool]).join(", ")].filter((e) => e !== void 0 && e !== "").join(" · "));
346
+ if (t === "tools") return H(e("kvcoder.ui.call.tools"), a === "" ? void 0 : a, Ce(e, "kvcoder.ui.call.toolCount", j(r).tools));
347
+ }
348
+ function Ee(e, t, n, r) {
349
+ if (t === "list") return H(e("kvcoder.ui.call.backgroundRuns"), void 0, Ce(e, "kvcoder.ui.call.runCount", r));
337
350
  if (t === "output" || t === "wait") {
338
351
  let i = N(r);
339
- return H(e(`kvcoder.ui.call.${t}`), B(n.id), i === void 0 ? void 0 : M(e, i.status));
352
+ return H(e(`kvcoder.ui.call.${t}`), V(n.id), i === void 0 ? void 0 : M(e, i.status));
340
353
  }
341
- if (t === "stop") return H(e("kvcoder.ui.call.stop"), B(n.id));
354
+ if (t === "stop") return H(e("kvcoder.ui.call.stop"), V(n.id));
342
355
  }
343
- function Ee(e, t, n, r) {
344
- let i = B(j(r).progress), a = n.steps, o = Array.isArray(a) ? a.flatMap((e) => B(j(e).id) === void 0 ? [] : [String(j(e).id)]).join(", ") : void 0;
345
- return t === "set" ? H(e("kvcoder.ui.call.mapSet"), B(n.goal), i) : t === "update" ? H(e("kvcoder.ui.call.mapUpdate"), o === "" ? void 0 : o, i) : t === "note" ? H(e("kvcoder.ui.call.mapNote"), B(n.text)) : t === "get" ? H(e("kvcoder.ui.call.mapGet"), void 0, i) : void 0;
356
+ function De(e, t, n, r) {
357
+ let i = V(j(r).progress), a = n.steps, o = Array.isArray(a) ? a.flatMap((e) => V(j(e).id) === void 0 ? [] : [String(j(e).id)]).join(", ") : void 0;
358
+ return t === "set" ? H(e("kvcoder.ui.call.mapSet"), V(n.goal), i) : t === "detail" ? H(e("kvcoder.ui.call.mapDetail"), V(n.id), i) : t === "update" ? H(e("kvcoder.ui.call.mapUpdate"), o === "" ? void 0 : o, i) : t === "note" ? H(e("kvcoder.ui.call.mapNote"), V(n.text)) : t === "get" ? H(e("kvcoder.ui.call.mapGet"), void 0, i) : void 0;
346
359
  }
347
- function De(e, t, n) {
360
+ function Oe(e, t, n) {
348
361
  let { connector: r, command: i } = t, a = t.fields ?? {};
349
362
  if (r !== void 0 && i !== void 0) {
350
363
  if (t.line !== void 0) return { subject: `$ ${t.line}` };
351
- if (r === "fs") return Ce(e, i, a, n);
352
- if (r === "mcp") return we(e, i, a, n);
353
- if (r === "background") return Te(e, i, a, n);
354
- if (r === "execution-map") return Ee(e, i, a, n);
355
- if (r === "delegate" && i === "run") return H(e("kvcoder.ui.call.delegate"), [B(a.worker), B(a.title)].filter((e) => e !== void 0).join(" · "));
356
- if (r === "artifact" && i === "get") return H(e("kvcoder.ui.call.readArtifact"), B(a.id));
364
+ if (i === "help") return H(e("kvcoder.ui.call.help"), [r, V(a.command)].filter((e) => e !== void 0).join(" "));
365
+ if (r === "fs") return we(e, i, a, n);
366
+ if (r === "mcp") return Te(e, i, a, n);
367
+ if (r === "background") return Ee(e, i, a, n);
368
+ if (r === "execution-map") return De(e, i, a, n);
369
+ if (r === "delegate" && i === "run") return H(e("kvcoder.ui.call.delegate"), [V(a.worker), V(a.title)].filter((e) => e !== void 0).join(" · "));
370
+ if (r === "artifact" && i === "get") return H(e("kvcoder.ui.call.readArtifact"), V(a.id));
371
+ if (r === "artifact" && (i === "write" || i === "edit")) return H(e(`kvcoder.ui.call.${i}Artifact`), V(a.id));
357
372
  }
358
373
  }
359
374
  //#endregion
360
375
  //#region web/src/call-view.ts
361
- var Oe = 200, ke = [
376
+ var ke = 200, Ae = [
362
377
  "text",
363
378
  "choice",
364
379
  "confirm"
365
380
  ];
366
- function Ae(e) {
381
+ function je(e) {
367
382
  return typeof e == "object" && e && !Array.isArray(e) ? Object.fromEntries(Object.entries(e)) : void 0;
368
383
  }
369
384
  var U = (e) => typeof e == "string" && e.trim() !== "" ? e : void 0;
370
- function je(e, t) {
385
+ function Me(e, t) {
371
386
  let n = U(t.args);
372
387
  return U(t.line) ?? (n === void 0 ? e : `${e} ${n}`);
373
388
  }
374
- function Me(e) {
389
+ function Ne(e) {
375
390
  let t = U(e.title) ?? U(e.description), n = U(e.command);
376
391
  return {
377
392
  ...t === void 0 ? {} : { description: t },
@@ -379,10 +394,10 @@ function Me(e) {
379
394
  ...e.mode === "async" ? { background: !0 } : {}
380
395
  };
381
396
  }
382
- function Ne(e) {
397
+ function Pe(e) {
383
398
  let t = U(e.connector), n = U(e.command);
384
- if (t === void 0) return Me(e);
385
- let r = U(e.description), i = Ae(typeof e.payload == "string" ? void 0 : e.payload) ?? {}, a = t === "ask" ? ke.find((e) => e === n) : void 0;
399
+ if (t === void 0) return Ne(e);
400
+ let r = U(e.description), i = je(typeof e.payload == "string" ? void 0 : e.payload) ?? {}, a = t === "ask" ? Ae.find((e) => e === n) : void 0;
386
401
  return {
387
402
  ...r === void 0 ? {} : { description: r },
388
403
  connector: t,
@@ -390,7 +405,7 @@ function Ne(e) {
390
405
  command: n,
391
406
  label: `${t} · ${n}`
392
407
  },
393
- ...n === "exec" ? { line: je(t, i) } : {},
408
+ ...n === "exec" ? { line: Me(t, i) } : {},
394
409
  fields: i,
395
410
  ...i.risky === !0 ? { risky: !0 } : {},
396
411
  ...i.background === !0 ? { background: !0 } : {},
@@ -400,7 +415,7 @@ function Ne(e) {
400
415
  } }
401
416
  };
402
417
  }
403
- var Pe = [
418
+ var Fe = [
404
419
  "edit",
405
420
  "write",
406
421
  "read",
@@ -408,44 +423,44 @@ var Pe = [
408
423
  "search"
409
424
  ];
410
425
  function W(e) {
411
- return e.line === void 0 ? e.connector === "fs" ? Pe.find((t) => t === e.command) ?? "fields" : e.connector === "mcp" && e.command === "call" ? "mcp-call" : e.connector === "background" && (e.command === "output" || e.command === "wait") ? "run-output" : e.connector === "delegate" && e.command === "run" ? "delegate" : "fields" : "line";
426
+ return e.line === void 0 ? e.connector === "fs" ? Fe.find((t) => t === e.command) ?? "fields" : e.connector === "mcp" && e.command === "call" ? "mcp-call" : e.connector === "mcp" && e.command === "run" ? "mcp-run" : e.connector === "background" && (e.command === "output" || e.command === "wait") ? "run-output" : e.connector === "delegate" && e.command === "run" ? "delegate" : "fields" : "line";
412
427
  }
413
- function G(e) {
428
+ function Ie(e) {
414
429
  let t = e.replace(/\s+/g, " ");
415
- return t.length > Oe ? `${t.slice(0, Oe)}…` : t;
430
+ return t.length > ke ? `${t.slice(0, ke)}…` : t;
416
431
  }
417
432
  //#endregion
418
433
  //#region web/src/field-rows.ts
419
- var Fe = "—", Ie = (e) => e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean", Le = (e) => e === null ? Fe : String(e);
420
- function Re(e) {
434
+ var Le = "—", Re = (e) => e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean", G = (e) => e === null ? Le : String(e);
435
+ function ze(e) {
421
436
  return typeof e == "object" && e && !Array.isArray(e) ? Object.fromEntries(Object.entries(e)) : void 0;
422
437
  }
423
- function ze(e) {
424
- let t = Re(e);
438
+ function Be(e) {
439
+ let t = ze(e);
425
440
  if (t === void 0) return;
426
441
  let n = {};
427
442
  for (let [e, r] of Object.entries(t)) {
428
- if (!Ie(r)) return;
443
+ if (!Re(r)) return;
429
444
  n[e] = r;
430
445
  }
431
446
  return n;
432
447
  }
433
- function Be(e) {
448
+ function Ve(e) {
434
449
  let t = [...new Set(e.flatMap((e) => Object.keys(e)))];
435
450
  return {
436
451
  kind: "table",
437
452
  columns: t,
438
- rows: e.map((e) => t.map((t) => t in e ? Le(e[t] ?? null) : ""))
453
+ rows: e.map((e) => t.map((t) => t in e ? G(e[t] ?? null) : ""))
439
454
  };
440
455
  }
441
- function Ve(e) {
456
+ function He(e) {
442
457
  if (e.length === 0) return { kind: "empty" };
443
- if (e.every(Ie)) return {
458
+ if (e.every(Re)) return {
444
459
  kind: "items",
445
- items: e.map(Le)
460
+ items: e.map(G)
446
461
  };
447
- let t = e.map(ze).filter((e) => e !== void 0);
448
- return t.length === e.length ? Be(t) : {
462
+ let t = e.map(Be).filter((e) => e !== void 0);
463
+ return t.length === e.length ? Ve(t) : {
449
464
  kind: "rows",
450
465
  rows: e.map((e, t) => ({
451
466
  name: String(t + 1),
@@ -465,14 +480,14 @@ function K(e) {
465
480
  kind: "text",
466
481
  text: String(e)
467
482
  };
468
- if (Array.isArray(e)) return Ve(e);
469
- let t = Re(e);
483
+ if (Array.isArray(e)) return He(e);
484
+ let t = ze(e);
470
485
  return t === void 0 || Object.keys(t).length === 0 ? { kind: "empty" } : {
471
486
  kind: "rows",
472
- rows: He(t)
487
+ rows: Ue(t)
473
488
  };
474
489
  }
475
- function He(e) {
490
+ function Ue(e) {
476
491
  return Object.entries(e).map(([e, t]) => ({
477
492
  name: e,
478
493
  value: K(t)
@@ -481,11 +496,11 @@ function He(e) {
481
496
  function q(e, t) {
482
497
  return t || e.length <= 12 ? e : e.slice(0, 12);
483
498
  }
484
- var Ue = (e) => F(e).map((e) => ({ text: e })), We = (e, t) => F(e).map((e, n) => ({
499
+ var We = (e) => F(e).map((e) => ({ text: e })), Ge = (e, t) => F(e).map((e, n) => ({
485
500
  text: e,
486
501
  number: t + n
487
502
  }));
488
- function Ge(e, t) {
503
+ function Ke(e, t) {
489
504
  return t || e.length <= 17 ? e : [
490
505
  ...e.slice(0, 12),
491
506
  "⋯",
@@ -494,7 +509,7 @@ function Ge(e, t) {
494
509
  }
495
510
  //#endregion
496
511
  //#region web/src/FoldButton.vue?vue&type=script&setup=true&lang.ts
497
- var Ke = ["aria-expanded"], J = /* @__PURE__ */ c({
512
+ var qe = ["aria-expanded"], J = /* @__PURE__ */ c({
498
513
  __name: "FoldButton",
499
514
  props: {
500
515
  count: {},
@@ -511,13 +526,13 @@ var Ke = ["aria-expanded"], J = /* @__PURE__ */ c({
511
526
  "aria-expanded": n.open,
512
527
  "data-test": "show-all",
513
528
  onClick: t[0] ||= (e) => a("toggle")
514
- }, _(n.open ? v(o).t("kvcoder.ui.call.showFewer") : v(o).t("kvcoder.ui.call.showAll", { count: n.count })), 9, Ke)) : r("v-if", !0);
529
+ }, _(n.open ? v(o).t("kvcoder.ui.call.showFewer") : v(o).t("kvcoder.ui.call.showAll", { count: n.count })), 9, qe)) : r("v-if", !0);
515
530
  }
516
- }), qe = /http:\/\/(?:127\.0\.0\.1|localhost):\d+[^\s"'`<>()[\]{}]*/g, Je = /[.,;:!?]+$/;
517
- function Ye(e) {
531
+ }), Je = /http:\/\/(?:127\.0\.0\.1|localhost):\d+[^\s"'`<>()[\]{}]*/g, Ye = /[.,;:!?]+$/;
532
+ function Xe(e) {
518
533
  let t = [], n = 0;
519
- for (let r of e.matchAll(qe)) {
520
- let i = r[0].replace(Je, "");
534
+ for (let r of e.matchAll(Je)) {
535
+ let i = r[0].replace(Ye, "");
521
536
  r.index > n && t.push({
522
537
  kind: "text",
523
538
  text: e.slice(n, r.index)
@@ -533,28 +548,28 @@ function Ye(e) {
533
548
  }
534
549
  //#endregion
535
550
  //#region web/src/LinkedText.vue?vue&type=script&setup=true&lang.ts
536
- var Xe = ["href"], Y = /* @__PURE__ */ c({
551
+ var Ze = ["href"], Y = /* @__PURE__ */ c({
537
552
  __name: "LinkedText",
538
553
  props: { text: {} },
539
554
  setup(n) {
540
- let r = n, a = t(() => Ye(r.text));
555
+ let r = n, a = t(() => Xe(r.text));
541
556
  return (t, n) => (f(!0), i(e, null, m(a.value, (t, n) => (f(), i(e, { key: n }, [t.kind === "link" ? (f(), i("a", {
542
557
  key: 0,
543
558
  href: t.href,
544
559
  target: "_blank",
545
560
  rel: "noopener noreferrer",
546
561
  class: "kvc-link"
547
- }, _(t.href), 9, Xe)) : (f(), i(e, { key: 1 }, [o(_(t.text), 1)], 64))], 64))), 128));
562
+ }, _(t.href), 9, Ze)) : (f(), i(e, { key: 1 }, [o(_(t.text), 1)], 64))], 64))), 128));
548
563
  }
549
- }), Ze = { class: "kvc-code-lines" }, Qe = ["dir", "data-kind"], $e = {
564
+ }), Qe = { class: "kvc-code-lines" }, $e = ["dir", "data-kind"], et = {
550
565
  key: 0,
551
566
  class: "kvc-line-number",
552
567
  "data-test": "call-line-number"
553
- }, et = {
568
+ }, tt = {
554
569
  key: 1,
555
570
  class: "kvc-line-mark",
556
571
  "aria-hidden": "true"
557
- }, tt = {
572
+ }, nt = {
558
573
  class: "kvc-line-text",
559
574
  dir: "auto",
560
575
  "data-test": "call-line-text"
@@ -567,57 +582,57 @@ var Xe = ["href"], Y = /* @__PURE__ */ c({
567
582
  removed: "−",
568
583
  added: "+"
569
584
  };
570
- return (t, n) => (f(), i("div", Ze, [(f(!0), i(e, null, m(l.value, (e, t) => (f(), i("div", {
585
+ return (t, n) => (f(), i("div", Qe, [(f(!0), i(e, null, m(l.value, (e, t) => (f(), i("div", {
571
586
  key: t,
572
587
  class: "kvc-code-line",
573
588
  dir: u.value || d.value ? "ltr" : void 0,
574
589
  "data-kind": e.kind,
575
590
  "data-test": "call-line-row"
576
591
  }, [
577
- u.value ? (f(), i("span", $e, _(e.number), 1)) : r("v-if", !0),
578
- d.value ? (f(), i("span", et, _(h[e.kind ?? "context"]), 1)) : r("v-if", !0),
579
- a("span", tt, [s(Y, { text: e.text }, null, 8, ["text"])])
580
- ], 8, Qe))), 128)), s(J, {
592
+ u.value ? (f(), i("span", et, _(e.number), 1)) : r("v-if", !0),
593
+ d.value ? (f(), i("span", tt, _(h[e.kind ?? "context"]), 1)) : r("v-if", !0),
594
+ a("span", nt, [s(Y, { text: e.text }, null, 8, ["text"])])
595
+ ], 8, $e))), 128)), s(J, {
581
596
  count: o.lines.length,
582
597
  open: c.value,
583
598
  onToggle: n[0] ||= (e) => c.value = !c.value
584
599
  }, null, 8, ["count", "open"])]));
585
600
  }
586
- }), nt = {
601
+ }), rt = {
587
602
  key: 0,
588
603
  dir: "auto",
589
604
  "data-test": "field-text"
590
- }, rt = {
605
+ }, it = {
591
606
  key: 1,
592
607
  class: "kvc-muted",
593
608
  "data-test": "field-empty"
594
- }, it = {
609
+ }, at = {
595
610
  key: 3,
596
611
  class: "kvc-field-table"
597
- }, at = { "data-test": "field-table" }, ot = {
612
+ }, ot = { "data-test": "field-table" }, st = {
598
613
  key: 4,
599
614
  class: "kvc-field-items",
600
615
  "data-test": "field-items"
601
- }, st = {
616
+ }, ct = {
602
617
  key: 5,
603
618
  class: "kvc-fields",
604
619
  "data-test": "call-fields"
605
- }, ct = ["data-name"], lt = {
620
+ }, lt = ["data-name"], ut = {
606
621
  class: "kvc-muted",
607
622
  dir: "ltr"
608
- }, ut = { "data-test": "field-value" }, Z = /* @__PURE__ */ c({
623
+ }, dt = { "data-test": "field-value" }, Z = /* @__PURE__ */ c({
609
624
  __name: "FieldsView",
610
625
  props: { value: {} },
611
626
  setup(r) {
612
627
  let o = r, c = p(!1), l = t(() => o.value.kind === "table" ? q(o.value.rows, c.value) : []), u = t(() => o.value.kind === "items" ? q(o.value.items, c.value) : []);
613
628
  return (t, r) => {
614
629
  let d = h("FieldsView", !0);
615
- return o.value.kind === "text" ? (f(), i("span", nt, [s(Y, { text: o.value.text }, null, 8, ["text"])])) : o.value.kind === "empty" ? (f(), i("span", rt, "—")) : o.value.kind === "block" ? (f(), n(X, {
630
+ return o.value.kind === "text" ? (f(), i("span", rt, [s(Y, { text: o.value.text }, null, 8, ["text"])])) : o.value.kind === "empty" ? (f(), i("span", it, "—")) : o.value.kind === "block" ? (f(), n(X, {
616
631
  key: 2,
617
632
  class: "kvc-field-block",
618
- lines: v(Ue)(o.value.text),
633
+ lines: v(We)(o.value.text),
619
634
  "data-test": "field-block"
620
- }, null, 8, ["lines"])) : o.value.kind === "table" ? (f(), i("div", it, [a("table", at, [a("thead", null, [a("tr", null, [(f(!0), i(e, null, m(o.value.columns, (e) => (f(), i("th", {
635
+ }, null, 8, ["lines"])) : o.value.kind === "table" ? (f(), i("div", at, [a("table", ot, [a("thead", null, [a("tr", null, [(f(!0), i(e, null, m(o.value.columns, (e) => (f(), i("th", {
621
636
  key: e,
622
637
  scope: "col",
623
638
  dir: "ltr"
@@ -628,66 +643,78 @@ var Xe = ["href"], Y = /* @__PURE__ */ c({
628
643
  count: o.value.rows.length,
629
644
  open: c.value,
630
645
  onToggle: r[0] ||= (e) => c.value = !c.value
631
- }, null, 8, ["count", "open"])])) : o.value.kind === "items" ? (f(), i("div", ot, [(f(!0), i(e, null, m(u.value, (e, t) => (f(), i("div", {
646
+ }, null, 8, ["count", "open"])])) : o.value.kind === "items" ? (f(), i("div", st, [(f(!0), i(e, null, m(u.value, (e, t) => (f(), i("div", {
632
647
  key: t,
633
648
  dir: "auto"
634
649
  }, [s(Y, { text: e }, null, 8, ["text"])]))), 128)), s(J, {
635
650
  count: o.value.items.length,
636
651
  open: c.value,
637
652
  onToggle: r[1] ||= (e) => c.value = !c.value
638
- }, null, 8, ["count", "open"])])) : (f(), i("dl", st, [(f(!0), i(e, null, m(o.value.rows, (e) => (f(), i("div", {
653
+ }, null, 8, ["count", "open"])])) : (f(), i("dl", ct, [(f(!0), i(e, null, m(o.value.rows, (e) => (f(), i("div", {
639
654
  key: e.name,
640
655
  class: "kvc-field-row",
641
656
  "data-name": e.name,
642
657
  "data-test": "field-row"
643
- }, [a("dt", lt, _(e.name), 1), a("dd", ut, [s(d, { value: e.value }, null, 8, ["value"])])], 8, ct))), 128))]));
658
+ }, [a("dt", ut, _(e.name), 1), a("dd", dt, [s(d, { value: e.value }, null, 8, ["value"])])], 8, lt))), 128))]));
644
659
  };
645
660
  }
646
- }), dt = ["aria-label"], ft = ["aria-label"], pt = /* @__PURE__ */ c({
661
+ }), ft = ["aria-label"], pt = ["aria-label"], mt = {
662
+ class: "kvc-mono",
663
+ dir: "ltr",
664
+ "data-test": "call-step-tool"
665
+ }, ht = { class: "kvc-step-arguments" }, gt = ["aria-label"], _t = /* @__PURE__ */ c({
647
666
  __name: "CallRequest",
648
667
  props: { view: {} },
649
- setup(a) {
650
- let o = a, c = A(), l = t(() => W(o.view)), u = t(() => o.view.fields ?? {}), d = t(() => V(u.value).map((e) => L(e.oldText, e.newText))), p = t(() => typeof u.value.content == "string" ? u.value.content : ""), h = t(() => typeof u.value.task == "string" ? u.value.task : ""), g = t(() => l.value === "mcp-call" ? j(u.value.arguments) : l.value === "fields" ? u.value : {});
651
- return (t, a) => l.value === "edit" ? (f(!0), i(e, { key: 0 }, m(d.value, (e, t) => (f(), n(X, {
668
+ setup(o) {
669
+ let c = o, l = A(), u = t(() => W(c.view)), d = t(() => c.view.fields ?? {}), p = t(() => _e(d.value).map((e) => L(e.oldText, e.newText))), h = t(() => typeof d.value.content == "string" ? d.value.content : ""), g = t(() => typeof d.value.task == "string" ? d.value.task : ""), y = t(() => u.value === "mcp-run" ? R(d.value) : []), b = t(() => u.value === "mcp-call" ? j(d.value.arguments) : u.value === "fields" ? d.value : {});
670
+ return (t, o) => u.value === "edit" ? (f(!0), i(e, { key: 0 }, m(p.value, (e, t) => (f(), n(X, {
652
671
  key: t,
653
672
  class: "kvc-block",
654
673
  lines: e,
655
674
  "data-test": "call-diff"
656
- }, null, 8, ["lines"]))), 128)) : l.value === "write" ? (f(), n(X, {
675
+ }, null, 8, ["lines"]))), 128)) : u.value === "write" ? (f(), n(X, {
657
676
  key: 1,
658
677
  class: "kvc-block",
659
- lines: v(We)(p.value, 1),
678
+ lines: v(Ge)(h.value, 1),
660
679
  "data-test": "call-content"
661
- }, null, 8, ["lines"])) : l.value === "line" ? (f(), i("pre", {
680
+ }, null, 8, ["lines"])) : u.value === "line" ? (f(), i("pre", {
662
681
  key: 2,
663
682
  class: "kvc-output kvc-mono",
664
683
  dir: "ltr",
665
- "aria-label": v(c).t("kvcoder.ui.command"),
684
+ "aria-label": v(l).t("kvcoder.ui.command"),
666
685
  "data-test": "call-payload"
667
- }, "$ " + _(o.view.line), 9, dt)) : l.value === "delegate" ? (f(), n(X, {
686
+ }, "$ " + _(c.view.line), 9, ft)) : y.value.length > 0 ? (f(), i("ol", {
668
687
  key: 3,
688
+ class: "kvc-block kvc-steps",
689
+ "aria-label": v(l).t("kvcoder.ui.call.payload"),
690
+ "data-test": "call-steps"
691
+ }, [(f(!0), i(e, null, m(y.value, (e, t) => (f(), i("li", {
692
+ key: t,
693
+ "data-test": "call-step"
694
+ }, [a("span", mt, _(e.label), 1), a("div", ht, [s(Z, { value: v(K)(e.arguments) }, null, 8, ["value"])])]))), 128))], 8, pt)) : u.value === "delegate" ? (f(), n(X, {
695
+ key: 4,
669
696
  class: "kvc-block kvc-prose-lines",
670
- lines: v(Ue)(h.value),
671
- "aria-label": v(c).t("kvcoder.ui.call.task"),
697
+ lines: v(We)(g.value),
698
+ "aria-label": v(l).t("kvcoder.ui.call.task"),
672
699
  "data-test": "call-task"
673
- }, null, 8, ["lines", "aria-label"])) : Object.keys(g.value).length > 0 ? (f(), i("div", {
674
- key: 4,
700
+ }, null, 8, ["lines", "aria-label"])) : Object.keys(b.value).length > 0 ? (f(), i("div", {
701
+ key: 5,
675
702
  class: "kvc-block",
676
- "aria-label": v(c).t("kvcoder.ui.call.payload"),
703
+ "aria-label": v(l).t("kvcoder.ui.call.payload"),
677
704
  "data-test": "call-payload-fields"
678
- }, [s(Z, { value: v(K)(g.value) }, null, 8, ["value"])], 8, ft)) : r("v-if", !0);
705
+ }, [s(Z, { value: v(K)(b.value) }, null, 8, ["value"])], 8, gt)) : r("v-if", !0);
679
706
  }
680
- }), mt = { class: "kvc-output-block" }, ht = ["aria-label"], Q = /* @__PURE__ */ c({
707
+ }), vt = { class: "kvc-output-block" }, yt = ["aria-label"], Q = /* @__PURE__ */ c({
681
708
  __name: "FoldedOutput",
682
709
  props: { output: {} },
683
710
  setup(e) {
684
- let n = e, r = A(), o = p(!1), c = t(() => n.output.split("\n")), l = t(() => Ge(c.value, o.value).join("\n"));
685
- return (e, t) => (f(), i("div", mt, [a("pre", {
711
+ let n = e, r = A(), o = p(!1), c = t(() => n.output.split("\n")), l = t(() => Ke(c.value, o.value).join("\n"));
712
+ return (e, t) => (f(), i("div", vt, [a("pre", {
686
713
  class: "kvc-output",
687
714
  dir: "auto",
688
715
  "aria-label": v(r).t("kvcoder.ui.output"),
689
716
  "data-test": "call-output"
690
- }, [s(Y, { text: l.value }, null, 8, ["text"])], 8, ht), s(J, {
717
+ }, [s(Y, { text: l.value }, null, 8, ["text"])], 8, yt), s(J, {
691
718
  count: c.value.length,
692
719
  open: o.value,
693
720
  over: v(12) + v(5),
@@ -712,21 +739,21 @@ function $(e, t) {
712
739
  }
713
740
  //#endregion
714
741
  //#region web/src/RunOutput.vue?vue&type=script&setup=true&lang.ts
715
- var gt = {
742
+ var bt = {
716
743
  class: "kvc-block kvc-run-row",
717
744
  "data-test": "run-row"
718
- }, _t = {
745
+ }, xt = {
719
746
  class: "kvc-run-call",
720
747
  dir: "auto",
721
748
  "data-test": "run-call"
722
- }, vt = {
749
+ }, St = {
723
750
  class: "kvc-chip",
724
751
  "data-test": "run-status"
725
- }, yt = {
752
+ }, Ct = {
726
753
  key: 0,
727
754
  class: "kvc-muted",
728
755
  "data-test": "run-time"
729
- }, bt = ["aria-label"], xt = ["aria-label"], St = ["aria-label"], Ct = ["aria-label"], wt = /* @__PURE__ */ c({
756
+ }, wt = ["aria-label"], Tt = ["aria-label"], Et = ["aria-label"], Dt = ["aria-label"], Ot = /* @__PURE__ */ c({
730
757
  __name: "RunOutput",
731
758
  props: { run: {} },
732
759
  setup(c) {
@@ -736,59 +763,59 @@ var gt = {
736
763
  params: { text: p.value ?? "" }
737
764
  }));
738
765
  return (t, c) => (f(), i(e, null, [
739
- a("div", gt, [
740
- a("span", _t, _(l.run.call), 1),
741
- a("span", vt, [o(_(v(M)(v(u).t, l.run.status)), 1), l.run.exitCode === void 0 ? r("v-if", !0) : (f(), i(e, { key: 0 }, [o(" · " + _(v(u).t("kvcoder.ui.exitCode", { code: l.run.exitCode })), 1)], 64))]),
742
- l.run.ranMs === void 0 ? r("v-if", !0) : (f(), i("span", yt, _(v($)(v(u).t, l.run.ranMs)), 1))
766
+ a("div", bt, [
767
+ a("span", xt, _(l.run.call), 1),
768
+ a("span", St, [o(_(v(M)(v(u).t, l.run.status)), 1), l.run.exitCode === void 0 ? r("v-if", !0) : (f(), i(e, { key: 0 }, [o(" · " + _(v(u).t("kvcoder.ui.exitCode", { code: l.run.exitCode })), 1)], 64))]),
769
+ l.run.ranMs === void 0 ? r("v-if", !0) : (f(), i("span", Ct, _(v($)(v(u).t, l.run.ranMs)), 1))
743
770
  ]),
744
771
  m.value === void 0 ? l.run.problem === void 0 ? r("v-if", !0) : (f(), i("div", {
745
772
  key: 1,
746
773
  class: "kvc-block kvc-error",
747
774
  "aria-label": v(u).t("kvcoder.ui.call.error"),
748
775
  "data-test": "run-problem"
749
- }, [s(Z, { value: v(K)(l.run.problem) }, null, 8, ["value"])], 8, xt)) : (f(), i("pre", {
776
+ }, [s(Z, { value: v(K)(l.run.problem) }, null, 8, ["value"])], 8, Tt)) : (f(), i("pre", {
750
777
  key: 0,
751
778
  class: "kvc-block kvc-error",
752
779
  dir: "auto",
753
780
  "aria-label": v(u).t("kvcoder.ui.call.error"),
754
781
  "data-test": "run-problem"
755
- }, [s(Y, { text: m.value }, null, 8, ["text"])], 8, bt)),
782
+ }, [s(Y, { text: m.value }, null, 8, ["text"])], 8, wt)),
756
783
  p.value === void 0 && l.run.output !== void 0 ? (f(), i("div", {
757
784
  key: 2,
758
785
  class: "kvc-block",
759
786
  "aria-label": v(u).t("kvcoder.ui.output"),
760
787
  "data-test": "call-result-fields"
761
- }, [s(Z, { value: v(K)(l.run.output) }, null, 8, ["value"])], 8, St)) : l.run.answer && p.value ? (f(), i("div", {
788
+ }, [s(Z, { value: v(K)(l.run.output) }, null, 8, ["value"])], 8, Et)) : l.run.answer && p.value ? (f(), i("div", {
762
789
  key: 3,
763
790
  class: "kvc-block",
764
791
  "aria-label": v(u).t("kvcoder.ui.call.answer"),
765
792
  "data-test": "call-answer"
766
- }, [(f(), n(g(v(u).View), { view: h.value }, null, 8, ["view"]))], 8, Ct)) : p.value ? (f(), n(Q, {
793
+ }, [(f(), n(g(v(u).View), { view: h.value }, null, 8, ["view"]))], 8, Dt)) : p.value ? (f(), n(Q, {
767
794
  key: 4,
768
795
  output: p.value
769
796
  }, null, 8, ["output"])) : r("v-if", !0)
770
797
  ], 64));
771
798
  }
772
- }), Tt = {
799
+ }), kt = {
773
800
  key: 0,
774
801
  class: "kvc-muted kvc-call-parts",
775
802
  "data-test": "call-replacements"
776
- }, Et = {
803
+ }, At = {
777
804
  key: 2,
778
805
  class: "kvc-block kvc-entries",
779
806
  "data-test": "call-entries"
780
- }, Dt = ["data-kind"], Ot = {
807
+ }, jt = ["data-kind"], Mt = {
781
808
  class: "kvc-mono",
782
809
  dir: "auto",
783
810
  "data-test": "call-entry-name"
784
- }, kt = {
811
+ }, Nt = {
785
812
  key: 0,
786
813
  class: "kvc-muted",
787
814
  "data-test": "call-entry-size"
788
- }, At = {
815
+ }, Pt = {
789
816
  class: "kvc-mono kvc-file-path",
790
817
  "data-test": "call-file-path"
791
- }, jt = ["aria-label"], Mt = ["aria-label"], Nt = /* @__PURE__ */ c({
818
+ }, Ft = ["aria-label"], It = ["aria-label"], Lt = /* @__PURE__ */ c({
792
819
  __name: "CallResult",
793
820
  props: {
794
821
  view: {},
@@ -806,25 +833,25 @@ var gt = {
806
833
  class: "kvc-block",
807
834
  "aria-label": v(l).t("kvcoder.ui.call.answer"),
808
835
  "data-test": "call-answer"
809
- }, [(f(), n(g(v(l).View), { view: w.value }, null, 8, ["view"]))], 8, jt)) : T.value ? (f(), i("div", {
836
+ }, [(f(), n(g(v(l).View), { view: w.value }, null, 8, ["view"]))], 8, Ft)) : T.value ? (f(), i("div", {
810
837
  key: 7,
811
838
  class: "kvc-block",
812
839
  "aria-label": v(l).t("kvcoder.ui.output"),
813
840
  "data-test": "call-result-fields"
814
- }, [s(Z, { value: v(K)(c.result) }, null, 8, ["value"])], 8, Mt)) : c.output === "" ? r("v-if", !0) : (f(), n(Q, {
841
+ }, [s(Z, { value: v(K)(c.result) }, null, 8, ["value"])], 8, It)) : c.output === "" ? r("v-if", !0) : (f(), n(Q, {
815
842
  key: 8,
816
843
  output: c.output
817
- }, null, 8, ["output"])) : (f(), n(wt, {
844
+ }, null, 8, ["output"])) : (f(), n(Ot, {
818
845
  key: 5,
819
846
  run: x.value
820
847
  }, null, 8, ["run"])) : (f(!0), i(e, { key: 3 }, m(b.value, (e) => (f(), i("div", {
821
848
  key: e.path,
822
849
  class: "kvc-block",
823
850
  "data-test": "call-file"
824
- }, [a("div", At, _(e.path), 1), s(X, { lines: e.matches.map((e) => ({
851
+ }, [a("div", Pt, _(e.path), 1), s(X, { lines: e.matches.map((e) => ({
825
852
  text: e.text,
826
853
  number: e.line
827
- })) }, null, 8, ["lines"])]))), 128)) : (f(), i("div", Et, [(f(!0), i(e, null, m(C.value, (e) => (f(), i("div", {
854
+ })) }, null, 8, ["lines"])]))), 128)) : (f(), i("div", At, [(f(!0), i(e, null, m(C.value, (e) => (f(), i("div", {
828
855
  key: e.name,
829
856
  class: "kvc-entry",
830
857
  "data-kind": e.kind,
@@ -834,40 +861,40 @@ var gt = {
834
861
  size: 14,
835
862
  "aria-hidden": "true"
836
863
  })),
837
- a("span", Ot, _(e.name), 1),
838
- e.kind === "file" ? (f(), i("span", kt, _(v(z)(v(l).t, e.bytes)), 1)) : r("v-if", !0)
839
- ], 8, Dt))), 128)), s(J, {
864
+ a("span", Mt, _(e.name), 1),
865
+ e.kind === "file" ? (f(), i("span", Nt, _(v(B)(v(l).t, e.bytes)), 1)) : r("v-if", !0)
866
+ ], 8, jt))), 128)), s(J, {
840
867
  count: y.value.length,
841
868
  open: S.value,
842
869
  onToggle: o[0] ||= (e) => S.value = !S.value
843
870
  }, null, 8, ["count", "open"])])) : (f(), n(X, {
844
871
  key: 1,
845
872
  class: "kvc-block",
846
- lines: v(We)(h.value.content, h.value.fromLine),
873
+ lines: v(Ge)(h.value.content, h.value.fromLine),
847
874
  "data-test": "call-content"
848
- }, null, 8, ["lines"])) : (f(), i("p", Tt, _(v(l).t("kvcoder.ui.call.replacements", {
875
+ }, null, 8, ["lines"])) : (f(), i("p", kt, _(v(l).t("kvcoder.ui.call.replacements", {
849
876
  count: d.value.replacements,
850
877
  line: d.value.firstChangedLine
851
878
  })), 1));
852
879
  }
853
- }), Pt = {
880
+ }), Rt = {
854
881
  key: 0,
855
882
  class: "kvc-summary",
856
883
  "data-test": "call-summary"
857
- }, Ft = {
884
+ }, zt = {
858
885
  key: 0,
859
886
  "data-test": "call-words"
860
- }, It = {
887
+ }, Bt = {
861
888
  key: 1,
862
889
  class: "kvc-mono",
863
890
  "data-test": "call-subject"
864
- }, Lt = ["dir"], Rt = {
891
+ }, Vt = ["dir"], Ht = {
865
892
  key: 1,
866
893
  class: "kvc-muted",
867
894
  dir: "ltr",
868
895
  style: { "align-self": "flex-start" },
869
896
  "data-test": "call-label"
870
- }, zt = /* @__PURE__ */ c({
897
+ }, Ut = /* @__PURE__ */ c({
871
898
  __name: "CallSummaryLine",
872
899
  props: {
873
900
  view: {},
@@ -875,50 +902,50 @@ var gt = {
875
902
  whole: { type: Boolean }
876
903
  },
877
904
  setup(e) {
878
- let n = e, a = A(), o = t(() => De(a.t, n.view, n.result)), s = t(() => /\p{L}/u.test(o.value?.outcome ?? "") ? void 0 : "ltr"), c = t(() => o.value?.subject === void 0 || n.whole === !0 ? o.value?.subject : G(o.value.subject));
879
- return (e, t) => o.value === void 0 ? n.view.label ? (f(), i("span", Rt, _(n.view.label), 1)) : r("v-if", !0) : (f(), i("span", Pt, [
880
- o.value.words ? (f(), i("span", Ft, _(o.value.words), 1)) : r("v-if", !0),
881
- c.value ? (f(), i("span", It, _(c.value), 1)) : r("v-if", !0),
905
+ let n = e, a = A(), o = t(() => Oe(a.t, n.view, n.result)), s = t(() => /\p{L}/u.test(o.value?.outcome ?? "") ? void 0 : "ltr"), c = t(() => o.value?.subject === void 0 || n.whole === !0 ? o.value?.subject : Ie(o.value.subject));
906
+ return (e, t) => o.value === void 0 ? n.view.label ? (f(), i("span", Ht, _(n.view.label), 1)) : r("v-if", !0) : (f(), i("span", Rt, [
907
+ o.value.words ? (f(), i("span", zt, _(o.value.words), 1)) : r("v-if", !0),
908
+ c.value ? (f(), i("span", Bt, _(c.value), 1)) : r("v-if", !0),
882
909
  o.value.outcome ? (f(), i("span", {
883
910
  key: 2,
884
911
  class: "kvc-muted",
885
912
  dir: s.value,
886
913
  "data-test": "call-outcome"
887
- }, _(o.value.outcome), 9, Lt)) : r("v-if", !0)
914
+ }, _(o.value.outcome), 9, Vt)) : r("v-if", !0)
888
915
  ]));
889
916
  }
890
- }), Bt = ["aria-expanded", "disabled"], Vt = ["aria-label"], Ht = { class: "kvc-lines" }, Ut = {
917
+ }), Wt = ["aria-expanded", "disabled"], Gt = ["aria-label"], Kt = { class: "kvc-lines" }, qt = {
891
918
  key: 0,
892
919
  style: { "font-weight": "600" },
893
920
  "data-test": "call-description"
894
- }, Wt = {
921
+ }, Jt = {
895
922
  key: 1,
896
923
  class: "kvc-oneline",
897
924
  "data-test": "call-line"
898
- }, Gt = { class: "kvc-mono" }, Kt = {
925
+ }, Yt = { class: "kvc-mono" }, Xt = {
899
926
  key: 2,
900
927
  class: "kvc-chip kvc-warn",
901
928
  "data-test": "call-risky"
902
- }, qt = {
929
+ }, Zt = {
903
930
  key: 3,
904
931
  class: "kvc-chip",
905
932
  "data-test": "call-background"
906
- }, Jt = {
933
+ }, Qt = {
907
934
  key: 4,
908
935
  class: "kvc-chip",
909
936
  "data-test": "call-not-run"
910
- }, Yt = {
937
+ }, $t = {
911
938
  key: 5,
912
939
  class: "kvc-chip kvc-danger",
913
940
  "data-test": "call-failed"
914
- }, Xt = {
941
+ }, en = {
915
942
  class: "kvc-muted",
916
943
  "data-test": "call-time"
917
- }, Zt = {
944
+ }, tn = {
918
945
  key: 0,
919
946
  class: "kvc-muted kvc-call-parts",
920
947
  "data-test": "call-parts"
921
- }, Qt = ["aria-expanded"], $t = ["aria-label"], en = /* @__PURE__ */ c({
948
+ }, nn = ["aria-expanded"], rn = ["aria-label"], an = /* @__PURE__ */ c({
922
949
  __name: "CallCard",
923
950
  props: {
924
951
  view: {},
@@ -957,14 +984,14 @@ var gt = {
957
984
  key: 0,
958
985
  class: "kvc-spin",
959
986
  "aria-label": v(l).t("kvcoder.ui.running")
960
- }, null, 8, Vt)) : (f(), n(g(m.value ? v(D) : v(O)), {
987
+ }, null, 8, Gt)) : (f(), n(g(m.value ? v(D) : v(O)), {
961
988
  key: 1,
962
989
  size: 16,
963
990
  "aria-hidden": "true"
964
991
  })),
965
- a("span", Ht, [
966
- c.view.description ? (f(), i("span", Ut, _(c.view.description), 1)) : c.view.connector === void 0 && c.view.line ? (f(), i("span", Wt, [a("span", Gt, _(v(G)(c.view.line)), 1)])) : r("v-if", !0),
967
- s(zt, {
992
+ a("span", Kt, [
993
+ c.view.description ? (f(), i("span", qt, _(c.view.description), 1)) : c.view.connector === void 0 && c.view.line ? (f(), i("span", Jt, [a("span", Yt, _(v(Ie)(c.view.line)), 1)])) : r("v-if", !0),
994
+ s(Ut, {
968
995
  view: c.view,
969
996
  result: S.value
970
997
  }, null, 8, ["view", "result"]),
@@ -975,22 +1002,22 @@ var gt = {
975
1002
  "data-test": "call-reason"
976
1003
  }, _(x.value), 3))
977
1004
  ]),
978
- c.view.risky ? (f(), i("span", Kt, _(v(l).t("kvcoder.ui.call.risky")), 1)) : r("v-if", !0),
979
- c.view.background ? (f(), i("span", qt, _(v(l).t("kvcoder.ui.jobs.background")), 1)) : r("v-if", !0),
980
- b.value ? (f(), i("span", Jt, _(v(l).t("kvcoder.ui.callNotRun")), 1)) : c.failed ? (f(), i("span", Yt, _(v(l).t("kvcoder.ui.callFailed")), 1)) : r("v-if", !0),
981
- a("span", Xt, _(w.value), 1)
982
- ], 8, Bt), m.value && c.output !== void 0 ? (f(), i(e, { key: 0 }, [T.value === "" ? r("v-if", !0) : (f(), i("p", Zt, _(T.value), 1)), C.value ? (f(), i(e, { key: 1 }, [a("button", {
1005
+ c.view.risky ? (f(), i("span", Xt, _(v(l).t("kvcoder.ui.call.risky")), 1)) : r("v-if", !0),
1006
+ c.view.background ? (f(), i("span", Zt, _(v(l).t("kvcoder.ui.jobs.background")), 1)) : r("v-if", !0),
1007
+ b.value ? (f(), i("span", Qt, _(v(l).t("kvcoder.ui.callNotRun")), 1)) : c.failed ? (f(), i("span", $t, _(v(l).t("kvcoder.ui.callFailed")), 1)) : r("v-if", !0),
1008
+ a("span", en, _(w.value), 1)
1009
+ ], 8, Wt), m.value && c.output !== void 0 ? (f(), i(e, { key: 0 }, [T.value === "" ? r("v-if", !0) : (f(), i("p", tn, _(T.value), 1)), C.value ? (f(), i(e, { key: 1 }, [a("button", {
983
1010
  type: "button",
984
1011
  class: "kvc-text-button kvc-fold",
985
1012
  "aria-expanded": h.value,
986
1013
  "data-test": "call-details",
987
1014
  onClick: o[1] ||= (e) => h.value = !h.value
988
- }, _(v(l).t(h.value ? "kvcoder.ui.call.hideDetails" : "kvcoder.ui.call.showDetails")), 9, Qt), h.value ? (f(), i(e, { key: 0 }, [a("pre", {
1015
+ }, _(v(l).t(h.value ? "kvcoder.ui.call.hideDetails" : "kvcoder.ui.call.showDetails")), 9, nn), h.value ? (f(), i(e, { key: 0 }, [a("pre", {
989
1016
  class: "kvc-block kvc-error",
990
1017
  dir: "auto",
991
1018
  "aria-label": v(l).t("kvcoder.ui.call.error"),
992
1019
  "data-test": "call-error"
993
- }, [s(Y, { text: c.output }, null, 8, ["text"])], 8, $t), s(pt, { view: c.view }, null, 8, ["view"])], 64)) : r("v-if", !0)], 64)) : (f(), i(e, { key: 2 }, [s(pt, { view: c.view }, null, 8, ["view"]), s(Nt, {
1020
+ }, [s(Y, { text: c.output }, null, 8, ["text"])], 8, rn), s(_t, { view: c.view }, null, 8, ["view"])], 64)) : r("v-if", !0)], 64)) : (f(), i(e, { key: 2 }, [s(_t, { view: c.view }, null, 8, ["view"]), s(Lt, {
994
1021
  view: c.view,
995
1022
  output: c.output,
996
1023
  result: S.value
@@ -1000,7 +1027,7 @@ var gt = {
1000
1027
  "result"
1001
1028
  ])], 64))], 64)) : r("v-if", !0)], 2));
1002
1029
  }
1003
- }), tn = /* @__PURE__ */ c({
1030
+ }), on = /* @__PURE__ */ c({
1004
1031
  __name: "call",
1005
1032
  props: {
1006
1033
  description: {},
@@ -1016,13 +1043,13 @@ var gt = {
1016
1043
  let r = e, i = t(() => r.connector === void 0 ? {
1017
1044
  ...r.description === void 0 ? {} : { description: r.description },
1018
1045
  ...r.line === void 0 ? {} : { line: r.line }
1019
- } : Ne({
1046
+ } : Pe({
1020
1047
  description: r.description,
1021
1048
  connector: r.connector,
1022
1049
  command: r.command,
1023
1050
  payload: r.payload ?? {}
1024
1051
  }));
1025
- return (e, t) => (f(), n(en, {
1052
+ return (e, t) => (f(), n(an, {
1026
1053
  view: i.value,
1027
1054
  failed: r.failed,
1028
1055
  "duration-ms": r.durationMs,
@@ -1036,4 +1063,4 @@ var gt = {
1036
1063
  }
1037
1064
  });
1038
1065
  //#endregion
1039
- export { tn as default };
1066
+ export { on as default };