@kvman/kvcoder 0.1.9 → 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.
- package/dist/api.d.ts +3 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/calls/call-name.d.ts +8 -0
- package/dist/calls/call-name.d.ts.map +1 -0
- package/dist/calls/call-name.js +38 -0
- package/dist/calls/call-name.js.map +1 -0
- package/dist/calls/line-run.d.ts +1 -4
- package/dist/calls/line-run.d.ts.map +1 -1
- package/dist/calls/line-run.js +2 -2
- package/dist/calls/line-run.js.map +1 -1
- package/dist/calls/run-tool.d.ts +1 -6
- package/dist/calls/run-tool.d.ts.map +1 -1
- package/dist/calls/run-tool.js +3 -6
- package/dist/calls/run-tool.js.map +1 -1
- package/dist/connector-call.d.ts +1 -1
- package/dist/connector-call.d.ts.map +1 -1
- package/dist/connectors/artifact.d.ts +1 -1
- package/dist/connectors/artifact.d.ts.map +1 -1
- package/dist/connectors/artifact.js +1 -1
- package/dist/connectors/artifact.js.map +1 -1
- package/dist/connectors/background.d.ts.map +1 -1
- package/dist/connectors/background.js +9 -3
- package/dist/connectors/background.js.map +1 -1
- package/dist/connectors/binary.js +2 -2
- package/dist/connectors/binary.js.map +1 -1
- package/dist/connectors/builtin-connectors.d.ts +24 -2
- package/dist/connectors/builtin-connectors.d.ts.map +1 -1
- package/dist/connectors/connector-command.d.ts +0 -1
- package/dist/connectors/connector-command.d.ts.map +1 -1
- package/dist/connectors/connector-command.js +1 -1
- package/dist/connectors/connector-command.js.map +1 -1
- package/dist/connectors/delegate.d.ts +17 -0
- package/dist/connectors/delegate.d.ts.map +1 -1
- package/dist/connectors/delegate.js +28 -6
- package/dist/connectors/delegate.js.map +1 -1
- package/dist/connectors/execution-map.d.ts +14 -3
- package/dist/connectors/execution-map.d.ts.map +1 -1
- package/dist/connectors/execution-map.js +43 -12
- package/dist/connectors/execution-map.js.map +1 -1
- package/dist/connectors/shell.js +1 -1
- package/dist/connectors/shell.js.map +1 -1
- package/dist/delegate/approved-run.js +2 -2
- package/dist/delegate/approved-run.js.map +1 -1
- package/dist/delegate/continue-helper.d.ts +18 -0
- package/dist/delegate/continue-helper.d.ts.map +1 -0
- package/dist/delegate/continue-helper.js +64 -0
- package/dist/delegate/continue-helper.js.map +1 -0
- package/dist/delegate/permission.d.ts +5 -5
- package/dist/delegate/runs.d.ts +9 -11
- package/dist/delegate/runs.d.ts.map +1 -1
- package/dist/delegate/runs.js +13 -9
- package/dist/delegate/runs.js.map +1 -1
- package/dist/delegate/workers.d.ts +6 -0
- package/dist/delegate/workers.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/jobs/helper-progress.d.ts +11 -0
- package/dist/jobs/helper-progress.d.ts.map +1 -0
- package/dist/jobs/helper-progress.js +38 -0
- package/dist/jobs/helper-progress.js.map +1 -0
- package/dist/jobs/job-rows.d.ts +3 -1
- package/dist/jobs/job-rows.d.ts.map +1 -1
- package/dist/jobs/job-rows.js +46 -22
- package/dist/jobs/job-rows.js.map +1 -1
- package/dist/jobs/process-report.d.ts +1 -1
- package/dist/jobs/process-report.d.ts.map +1 -1
- package/dist/jobs/process-report.js +11 -6
- package/dist/jobs/process-report.js.map +1 -1
- package/dist/jobs/process-run.d.ts +2 -5
- package/dist/jobs/process-run.d.ts.map +1 -1
- package/dist/jobs/process-run.js +6 -5
- package/dist/jobs/process-run.js.map +1 -1
- package/dist/jobs/register-jobs.js +3 -3
- package/dist/jobs/register-jobs.js.map +1 -1
- package/dist/maps/map-rules.d.ts +4 -2
- package/dist/maps/map-rules.d.ts.map +1 -1
- package/dist/maps/map-rules.js +7 -4
- package/dist/maps/map-rules.js.map +1 -1
- package/dist/maps/map-schema.d.ts +4 -4
- package/dist/maps/map-schema.d.ts.map +1 -1
- package/dist/maps/map-schema.js +10 -3
- package/dist/maps/map-schema.js.map +1 -1
- package/dist/prompt/build-prompt.js +2 -2
- package/dist/prompt/build-prompt.js.map +1 -1
- package/dist/prompt/session-grants.d.ts +3 -3
- package/dist/prompt/working-method.js +12 -12
- package/dist/prompt/working-method.js.map +1 -1
- package/dist/register-settings.d.ts +4 -0
- package/dist/register-settings.d.ts.map +1 -1
- package/dist/schemas/records.d.ts +10 -6
- package/dist/schemas/records.d.ts.map +1 -1
- package/dist/schemas/records.js +7 -4
- package/dist/schemas/records.js.map +1 -1
- package/dist/sessions/new-session.d.ts.map +1 -1
- package/dist/sessions/new-session.js +4 -2
- package/dist/sessions/new-session.js.map +1 -1
- package/dist/sessions/register-sessions.d.ts.map +1 -1
- package/dist/sessions/register-sessions.js +5 -2
- package/dist/sessions/register-sessions.js.map +1 -1
- package/dist/sessions/session-view.d.ts +2 -0
- package/dist/sessions/session-view.d.ts.map +1 -1
- package/dist/store/collections.d.ts +8 -8
- package/dist/thinking-levels.d.ts +6 -0
- package/dist/thinking-levels.d.ts.map +1 -0
- package/dist/thinking-levels.js +13 -0
- package/dist/thinking-levels.js.map +1 -0
- package/dist/turns/cache-retention.d.ts +6 -0
- package/dist/turns/cache-retention.d.ts.map +1 -0
- package/dist/turns/cache-retention.js +7 -0
- package/dist/turns/cache-retention.js.map +1 -0
- package/dist/turns/call-results.d.ts +6 -0
- package/dist/turns/call-results.d.ts.map +1 -0
- package/dist/turns/call-results.js +21 -0
- package/dist/turns/call-results.js.map +1 -0
- package/dist/turns/child-result.d.ts.map +1 -1
- package/dist/turns/child-result.js +4 -2
- package/dist/turns/child-result.js.map +1 -1
- package/dist/turns/compaction.d.ts.map +1 -1
- package/dist/turns/compaction.js +2 -1
- package/dist/turns/compaction.js.map +1 -1
- package/dist/turns/end-turn-state.d.ts.map +1 -1
- package/dist/turns/end-turn-state.js +2 -0
- package/dist/turns/end-turn-state.js.map +1 -1
- package/dist/turns/ended-calls.d.ts +6 -0
- package/dist/turns/ended-calls.d.ts.map +1 -0
- package/dist/turns/ended-calls.js +43 -0
- package/dist/turns/ended-calls.js.map +1 -0
- package/dist/turns/model-context.d.ts.map +1 -1
- package/dist/turns/model-context.js +16 -1
- package/dist/turns/model-context.js.map +1 -1
- package/dist/turns/model-info.d.ts +4 -0
- package/dist/turns/model-info.d.ts.map +1 -1
- package/dist/turns/model-info.js +7 -1
- package/dist/turns/model-info.js.map +1 -1
- package/dist/turns/model-retry.d.ts.map +1 -1
- package/dist/turns/model-retry.js +5 -4
- package/dist/turns/model-retry.js.map +1 -1
- package/dist/turns/run-calls.d.ts.map +1 -1
- package/dist/turns/run-calls.js +21 -5
- package/dist/turns/run-calls.js.map +1 -1
- package/dist/turns/run-command.d.ts.map +1 -1
- package/dist/turns/run-command.js +4 -6
- package/dist/turns/run-command.js.map +1 -1
- package/dist/turns/sent-size.d.ts +6 -2
- package/dist/turns/sent-size.d.ts.map +1 -1
- package/dist/turns/sent-size.js +8 -4
- package/dist/turns/sent-size.js.map +1 -1
- package/dist/turns/settle-calls.d.ts +1 -7
- package/dist/turns/settle-calls.d.ts.map +1 -1
- package/dist/turns/settle-calls.js +2 -19
- package/dist/turns/settle-calls.js.map +1 -1
- package/dist/turns/step.d.ts.map +1 -1
- package/dist/turns/step.js +29 -6
- package/dist/turns/step.js.map +1 -1
- package/dist/web/components/approval.css +1 -1
- package/dist/web/components/call.css +1 -1
- package/dist/web/components/call.js +210 -183
- package/dist/web/components/connectors.css +1 -1
- package/dist/web/components/connectors.js +431 -412
- package/dist/web/components/conversation.css +1 -1
- package/dist/web/components/conversation.js +1000 -893
- package/dist/web/components/mcp-sign-in.css +1 -1
- package/dist/web/components/model.css +1 -1
- package/dist/web/components/model.js +2 -1
- package/dist/web/components/question.css +1 -1
- package/dist/web/components/sessions.css +1 -1
- package/docs/connectors.md +4 -5
- package/locales/ar.json +15 -4
- package/locales/en.json +15 -4
- 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
|
|
263
|
-
function
|
|
264
|
-
return t <
|
|
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
|
|
267
|
-
function
|
|
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
|
|
278
|
-
let t =
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
328
|
-
if (t === "
|
|
329
|
-
if (t === "
|
|
330
|
-
|
|
331
|
-
|
|
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
|
-
|
|
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}`),
|
|
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"),
|
|
354
|
+
if (t === "stop") return H(e("kvcoder.ui.call.stop"), V(n.id));
|
|
342
355
|
}
|
|
343
|
-
function
|
|
344
|
-
let i =
|
|
345
|
-
return t === "set" ? H(e("kvcoder.ui.call.mapSet"),
|
|
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
|
|
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 (
|
|
352
|
-
if (r === "
|
|
353
|
-
if (r === "
|
|
354
|
-
if (r === "
|
|
355
|
-
if (r === "
|
|
356
|
-
if (r === "
|
|
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
|
|
376
|
+
var ke = 200, Ae = [
|
|
362
377
|
"text",
|
|
363
378
|
"choice",
|
|
364
379
|
"confirm"
|
|
365
380
|
];
|
|
366
|
-
function
|
|
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
|
|
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
|
|
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
|
|
397
|
+
function Pe(e) {
|
|
383
398
|
let t = U(e.connector), n = U(e.command);
|
|
384
|
-
if (t === void 0) return
|
|
385
|
-
let r = U(e.description), i =
|
|
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:
|
|
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
|
|
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" ?
|
|
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
|
|
428
|
+
function Ie(e) {
|
|
414
429
|
let t = e.replace(/\s+/g, " ");
|
|
415
|
-
return t.length >
|
|
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
|
|
420
|
-
function
|
|
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
|
|
424
|
-
let t =
|
|
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 (!
|
|
443
|
+
if (!Re(r)) return;
|
|
429
444
|
n[e] = r;
|
|
430
445
|
}
|
|
431
446
|
return n;
|
|
432
447
|
}
|
|
433
|
-
function
|
|
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 ?
|
|
453
|
+
rows: e.map((e) => t.map((t) => t in e ? G(e[t] ?? null) : ""))
|
|
439
454
|
};
|
|
440
455
|
}
|
|
441
|
-
function
|
|
456
|
+
function He(e) {
|
|
442
457
|
if (e.length === 0) return { kind: "empty" };
|
|
443
|
-
if (e.every(
|
|
458
|
+
if (e.every(Re)) return {
|
|
444
459
|
kind: "items",
|
|
445
|
-
items: e.map(
|
|
460
|
+
items: e.map(G)
|
|
446
461
|
};
|
|
447
|
-
let t = e.map(
|
|
448
|
-
return t.length === e.length ?
|
|
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
|
|
469
|
-
let t =
|
|
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:
|
|
487
|
+
rows: Ue(t)
|
|
473
488
|
};
|
|
474
489
|
}
|
|
475
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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
|
-
}),
|
|
517
|
-
function
|
|
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(
|
|
520
|
-
let i = r[0].replace(
|
|
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
|
|
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(() =>
|
|
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,
|
|
562
|
+
}, _(t.href), 9, Ze)) : (f(), i(e, { key: 1 }, [o(_(t.text), 1)], 64))], 64))), 128));
|
|
548
563
|
}
|
|
549
|
-
}),
|
|
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
|
-
},
|
|
568
|
+
}, tt = {
|
|
554
569
|
key: 1,
|
|
555
570
|
class: "kvc-line-mark",
|
|
556
571
|
"aria-hidden": "true"
|
|
557
|
-
},
|
|
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",
|
|
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",
|
|
578
|
-
d.value ? (f(), i("span",
|
|
579
|
-
a("span",
|
|
580
|
-
], 8,
|
|
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
|
-
}),
|
|
601
|
+
}), rt = {
|
|
587
602
|
key: 0,
|
|
588
603
|
dir: "auto",
|
|
589
604
|
"data-test": "field-text"
|
|
590
|
-
},
|
|
605
|
+
}, it = {
|
|
591
606
|
key: 1,
|
|
592
607
|
class: "kvc-muted",
|
|
593
608
|
"data-test": "field-empty"
|
|
594
|
-
},
|
|
609
|
+
}, at = {
|
|
595
610
|
key: 3,
|
|
596
611
|
class: "kvc-field-table"
|
|
597
|
-
},
|
|
612
|
+
}, ot = { "data-test": "field-table" }, st = {
|
|
598
613
|
key: 4,
|
|
599
614
|
class: "kvc-field-items",
|
|
600
615
|
"data-test": "field-items"
|
|
601
|
-
},
|
|
616
|
+
}, ct = {
|
|
602
617
|
key: 5,
|
|
603
618
|
class: "kvc-fields",
|
|
604
619
|
"data-test": "call-fields"
|
|
605
|
-
},
|
|
620
|
+
}, lt = ["data-name"], ut = {
|
|
606
621
|
class: "kvc-muted",
|
|
607
622
|
dir: "ltr"
|
|
608
|
-
},
|
|
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",
|
|
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(
|
|
633
|
+
lines: v(We)(o.value.text),
|
|
619
634
|
"data-test": "field-block"
|
|
620
|
-
}, null, 8, ["lines"])) : o.value.kind === "table" ? (f(), i("div",
|
|
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",
|
|
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",
|
|
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",
|
|
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
|
-
}),
|
|
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(
|
|
650
|
-
let
|
|
651
|
-
return (t,
|
|
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)) :
|
|
675
|
+
}, null, 8, ["lines"]))), 128)) : u.value === "write" ? (f(), n(X, {
|
|
657
676
|
key: 1,
|
|
658
677
|
class: "kvc-block",
|
|
659
|
-
lines: v(
|
|
678
|
+
lines: v(Ge)(h.value, 1),
|
|
660
679
|
"data-test": "call-content"
|
|
661
|
-
}, null, 8, ["lines"])) :
|
|
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(
|
|
684
|
+
"aria-label": v(l).t("kvcoder.ui.command"),
|
|
666
685
|
"data-test": "call-payload"
|
|
667
|
-
}, "$ " + _(
|
|
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(
|
|
671
|
-
"aria-label": v(
|
|
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(
|
|
674
|
-
key:
|
|
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(
|
|
703
|
+
"aria-label": v(l).t("kvcoder.ui.call.payload"),
|
|
677
704
|
"data-test": "call-payload-fields"
|
|
678
|
-
}, [s(Z, { value: v(K)(
|
|
705
|
+
}, [s(Z, { value: v(K)(b.value) }, null, 8, ["value"])], 8, gt)) : r("v-if", !0);
|
|
679
706
|
}
|
|
680
|
-
}),
|
|
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(() =>
|
|
685
|
-
return (e, t) => (f(), i("div",
|
|
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,
|
|
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
|
|
742
|
+
var bt = {
|
|
716
743
|
class: "kvc-block kvc-run-row",
|
|
717
744
|
"data-test": "run-row"
|
|
718
|
-
},
|
|
745
|
+
}, xt = {
|
|
719
746
|
class: "kvc-run-call",
|
|
720
747
|
dir: "auto",
|
|
721
748
|
"data-test": "run-call"
|
|
722
|
-
},
|
|
749
|
+
}, St = {
|
|
723
750
|
class: "kvc-chip",
|
|
724
751
|
"data-test": "run-status"
|
|
725
|
-
},
|
|
752
|
+
}, Ct = {
|
|
726
753
|
key: 0,
|
|
727
754
|
class: "kvc-muted",
|
|
728
755
|
"data-test": "run-time"
|
|
729
|
-
},
|
|
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",
|
|
740
|
-
a("span",
|
|
741
|
-
a("span",
|
|
742
|
-
l.run.ranMs === void 0 ? r("v-if", !0) : (f(), i("span",
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
}),
|
|
799
|
+
}), kt = {
|
|
773
800
|
key: 0,
|
|
774
801
|
class: "kvc-muted kvc-call-parts",
|
|
775
802
|
"data-test": "call-replacements"
|
|
776
|
-
},
|
|
803
|
+
}, At = {
|
|
777
804
|
key: 2,
|
|
778
805
|
class: "kvc-block kvc-entries",
|
|
779
806
|
"data-test": "call-entries"
|
|
780
|
-
},
|
|
807
|
+
}, jt = ["data-kind"], Mt = {
|
|
781
808
|
class: "kvc-mono",
|
|
782
809
|
dir: "auto",
|
|
783
810
|
"data-test": "call-entry-name"
|
|
784
|
-
},
|
|
811
|
+
}, Nt = {
|
|
785
812
|
key: 0,
|
|
786
813
|
class: "kvc-muted",
|
|
787
814
|
"data-test": "call-entry-size"
|
|
788
|
-
},
|
|
815
|
+
}, Pt = {
|
|
789
816
|
class: "kvc-mono kvc-file-path",
|
|
790
817
|
"data-test": "call-file-path"
|
|
791
|
-
},
|
|
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,
|
|
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,
|
|
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(
|
|
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",
|
|
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",
|
|
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",
|
|
838
|
-
e.kind === "file" ? (f(), i("span",
|
|
839
|
-
], 8,
|
|
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(
|
|
873
|
+
lines: v(Ge)(h.value.content, h.value.fromLine),
|
|
847
874
|
"data-test": "call-content"
|
|
848
|
-
}, null, 8, ["lines"])) : (f(), i("p",
|
|
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
|
-
}),
|
|
880
|
+
}), Rt = {
|
|
854
881
|
key: 0,
|
|
855
882
|
class: "kvc-summary",
|
|
856
883
|
"data-test": "call-summary"
|
|
857
|
-
},
|
|
884
|
+
}, zt = {
|
|
858
885
|
key: 0,
|
|
859
886
|
"data-test": "call-words"
|
|
860
|
-
},
|
|
887
|
+
}, Bt = {
|
|
861
888
|
key: 1,
|
|
862
889
|
class: "kvc-mono",
|
|
863
890
|
"data-test": "call-subject"
|
|
864
|
-
},
|
|
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
|
-
},
|
|
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(() =>
|
|
879
|
-
return (e, t) => o.value === void 0 ? n.view.label ? (f(), i("span",
|
|
880
|
-
o.value.words ? (f(), i("span",
|
|
881
|
-
c.value ? (f(), i("span",
|
|
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,
|
|
914
|
+
}, _(o.value.outcome), 9, Vt)) : r("v-if", !0)
|
|
888
915
|
]));
|
|
889
916
|
}
|
|
890
|
-
}),
|
|
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
|
-
},
|
|
921
|
+
}, Jt = {
|
|
895
922
|
key: 1,
|
|
896
923
|
class: "kvc-oneline",
|
|
897
924
|
"data-test": "call-line"
|
|
898
|
-
},
|
|
925
|
+
}, Yt = { class: "kvc-mono" }, Xt = {
|
|
899
926
|
key: 2,
|
|
900
927
|
class: "kvc-chip kvc-warn",
|
|
901
928
|
"data-test": "call-risky"
|
|
902
|
-
},
|
|
929
|
+
}, Zt = {
|
|
903
930
|
key: 3,
|
|
904
931
|
class: "kvc-chip",
|
|
905
932
|
"data-test": "call-background"
|
|
906
|
-
},
|
|
933
|
+
}, Qt = {
|
|
907
934
|
key: 4,
|
|
908
935
|
class: "kvc-chip",
|
|
909
936
|
"data-test": "call-not-run"
|
|
910
|
-
},
|
|
937
|
+
}, $t = {
|
|
911
938
|
key: 5,
|
|
912
939
|
class: "kvc-chip kvc-danger",
|
|
913
940
|
"data-test": "call-failed"
|
|
914
|
-
},
|
|
941
|
+
}, en = {
|
|
915
942
|
class: "kvc-muted",
|
|
916
943
|
"data-test": "call-time"
|
|
917
|
-
},
|
|
944
|
+
}, tn = {
|
|
918
945
|
key: 0,
|
|
919
946
|
class: "kvc-muted kvc-call-parts",
|
|
920
947
|
"data-test": "call-parts"
|
|
921
|
-
},
|
|
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,
|
|
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",
|
|
966
|
-
c.view.description ? (f(), i("span",
|
|
967
|
-
s(
|
|
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",
|
|
979
|
-
c.view.background ? (f(), i("span",
|
|
980
|
-
b.value ? (f(), i("span",
|
|
981
|
-
a("span",
|
|
982
|
-
], 8,
|
|
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,
|
|
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,
|
|
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
|
-
}),
|
|
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
|
-
} :
|
|
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(
|
|
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 {
|
|
1066
|
+
export { on as default };
|