@fefeding/aicmd 1.0.12 → 1.0.14

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.
@@ -159,7 +159,7 @@ var init_modal = __esmMin((() => {
159
159
  /**
160
160
  * 解包 API 响应
161
161
  */
162
- function unwrap$4(res) {
162
+ function unwrap$5(res) {
163
163
  if (res && typeof res === "object" && "ret" in res) {
164
164
  if (res.ret !== 0) throw new Error(res.msg || "请求失败");
165
165
  return res.data;
@@ -167,16 +167,16 @@ function unwrap$4(res) {
167
167
  return res;
168
168
  }
169
169
  function getSessions() {
170
- return request("/api/terminal/getSessions", {}).then(unwrap$4);
170
+ return request("/api/terminal/getSessions", {}).then(unwrap$5);
171
171
  }
172
172
  function renameSession(sessionId, name) {
173
173
  return request("/api/terminal/renameSession", {
174
174
  sessionId,
175
175
  name
176
- }).then(unwrap$4);
176
+ }).then(unwrap$5);
177
177
  }
178
178
  function deleteSession(sessionId) {
179
- return request("/api/terminal/deleteSession", { sessionId }).then(unwrap$4);
179
+ return request("/api/terminal/deleteSession", { sessionId }).then(unwrap$5);
180
180
  }
181
181
  var init_terminal$1 = __esmMin((() => {
182
182
  init_base();
@@ -361,51 +361,51 @@ var init_terminal = __esmMin((() => {
361
361
  }));
362
362
  //#endregion
363
363
  //#region src/components/terminal-sidebar.vue?vue&type=script&setup=true&lang.ts
364
- var _hoisted_1$9, _hoisted_2$9, _hoisted_3$9, _hoisted_4$9, _hoisted_5$9, _hoisted_6$8, _hoisted_7$8, _hoisted_8$8, _hoisted_9$8, _hoisted_10$8, _hoisted_11$8, _hoisted_12$8, _hoisted_13$8, _hoisted_14$8, _hoisted_15$8, _hoisted_16$8, _hoisted_17$7, _hoisted_18$7, _hoisted_19$7, _hoisted_20$7, _hoisted_21$6, _hoisted_22$6, _hoisted_23$6, _hoisted_24$6, terminal_sidebar_vue_vue_type_script_setup_true_lang_default;
364
+ var _hoisted_1$10, _hoisted_2$10, _hoisted_3$9, _hoisted_4$9, _hoisted_5$9, _hoisted_6$9, _hoisted_7$9, _hoisted_8$9, _hoisted_9$9, _hoisted_10$9, _hoisted_11$9, _hoisted_12$9, _hoisted_13$9, _hoisted_14$9, _hoisted_15$9, _hoisted_16$9, _hoisted_17$8, _hoisted_18$8, _hoisted_19$8, _hoisted_20$8, _hoisted_21$7, _hoisted_22$7, _hoisted_23$7, _hoisted_24$7, terminal_sidebar_vue_vue_type_script_setup_true_lang_default;
365
365
  var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() => {
366
366
  init_vue_runtime_esm_bundler();
367
367
  init_vue_i18n();
368
368
  init_i18n();
369
- _hoisted_1$9 = {
369
+ _hoisted_1$10 = {
370
370
  class: "d-flex align-items-center justify-content-between p-2 border-bottom",
371
371
  style: { "border-color": "var(--border-color) !important" }
372
372
  };
373
- _hoisted_2$9 = { class: "d-flex gap-1" };
373
+ _hoisted_2$10 = { class: "d-flex gap-1" };
374
374
  _hoisted_3$9 = ["title"];
375
375
  _hoisted_4$9 = ["title"];
376
376
  _hoisted_5$9 = ["title"];
377
- _hoisted_6$8 = { class: "p-2" };
378
- _hoisted_7$8 = ["placeholder"];
379
- _hoisted_8$8 = { class: "flex-grow-1 overflow-auto" };
380
- _hoisted_9$8 = {
377
+ _hoisted_6$9 = { class: "p-2" };
378
+ _hoisted_7$9 = ["placeholder"];
379
+ _hoisted_8$9 = { class: "flex-grow-1 overflow-auto" };
380
+ _hoisted_9$9 = {
381
381
  key: 0,
382
382
  class: "text-center p-4",
383
383
  style: { "color": "var(--text-secondary)" }
384
384
  };
385
- _hoisted_10$8 = {
385
+ _hoisted_10$9 = {
386
386
  key: 1,
387
387
  class: "text-center p-4",
388
388
  style: { "color": "var(--text-secondary)" }
389
389
  };
390
- _hoisted_11$8 = { class: "mt-2" };
391
- _hoisted_12$8 = { key: 2 };
392
- _hoisted_13$8 = ["onDblclick", "onContextmenu"];
393
- _hoisted_14$8 = { class: "flex-grow-1 overflow-hidden" };
394
- _hoisted_15$8 = {
390
+ _hoisted_11$9 = { class: "mt-2" };
391
+ _hoisted_12$9 = { key: 2 };
392
+ _hoisted_13$9 = ["onDblclick", "onContextmenu"];
393
+ _hoisted_14$9 = { class: "flex-grow-1 overflow-hidden" };
394
+ _hoisted_15$9 = {
395
395
  class: "text-truncate",
396
396
  style: { "font-size": "13px" }
397
397
  };
398
- _hoisted_16$8 = {
398
+ _hoisted_16$9 = {
399
399
  class: "text-truncate",
400
400
  style: {
401
401
  "font-size": "11px",
402
402
  "color": "var(--text-secondary)"
403
403
  }
404
404
  };
405
- _hoisted_17$7 = ["onClick", "title"];
406
- _hoisted_18$7 = ["onClick", "title"];
407
- _hoisted_19$7 = ["onClick", "title"];
408
- _hoisted_20$7 = {
405
+ _hoisted_17$8 = ["onClick", "title"];
406
+ _hoisted_18$8 = ["onClick", "title"];
407
+ _hoisted_19$8 = ["onClick", "title"];
408
+ _hoisted_20$8 = {
409
409
  class: "p-2 text-center d-flex align-items-center justify-content-between",
410
410
  style: {
411
411
  "font-size": "11px",
@@ -413,10 +413,10 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
413
413
  "border-top": "1px solid var(--border-color)"
414
414
  }
415
415
  };
416
- _hoisted_21$6 = { class: "d-flex gap-1 align-items-center" };
417
- _hoisted_22$6 = ["title"];
418
- _hoisted_23$6 = ["title"];
419
- _hoisted_24$6 = ["title"];
416
+ _hoisted_21$7 = { class: "d-flex gap-1 align-items-center" };
417
+ _hoisted_22$7 = ["title"];
418
+ _hoisted_23$7 = ["title"];
419
+ _hoisted_24$7 = ["title"];
420
420
  terminal_sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
421
421
  __name: "terminal-sidebar",
422
422
  props: {
@@ -454,10 +454,10 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
454
454
  class: "sidebar d-flex flex-column",
455
455
  style: normalizeStyle({ width: __props.collapsed ? "0px" : "var(--sidebar-width)" })
456
456
  }, [
457
- createBaseVNode("div", _hoisted_1$9, [_cache[11] || (_cache[11] = createBaseVNode("span", {
457
+ createBaseVNode("div", _hoisted_1$10, [_cache[11] || (_cache[11] = createBaseVNode("span", {
458
458
  class: "fw-bold",
459
459
  style: { "color": "var(--accent)" }
460
- }, [createBaseVNode("i", { class: "bi bi-terminal me-1" }), createTextVNode("aicmd ")], -1)), createBaseVNode("div", _hoisted_2$9, [
460
+ }, [createBaseVNode("i", { class: "bi bi-terminal me-1" }), createTextVNode("aicmd ")], -1)), createBaseVNode("div", _hoisted_2$10, [
461
461
  createBaseVNode("button", {
462
462
  class: "btn-toolbar",
463
463
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-connection")),
@@ -474,7 +474,7 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
474
474
  title: unref(t)("sidebar.collapse")
475
475
  }, [..._cache[10] || (_cache[10] = [createBaseVNode("i", { class: "bi bi-chevron-left" }, null, -1)])], 8, _hoisted_5$9)
476
476
  ])]),
477
- createBaseVNode("div", _hoisted_6$8, [withDirectives(createBaseVNode("input", {
477
+ createBaseVNode("div", _hoisted_6$9, [withDirectives(createBaseVNode("input", {
478
478
  type: "text",
479
479
  class: "form-control form-control-sm",
480
480
  placeholder: unref(t)("sidebar.searchPlaceholder"),
@@ -484,18 +484,18 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
484
484
  "border-color": "#45475a",
485
485
  "color": "var(--text-primary)"
486
486
  }
487
- }, null, 8, _hoisted_7$8), [[vModelText, searchQuery.value]])]),
488
- createBaseVNode("div", _hoisted_8$8, [__props.loading ? (openBlock(), createElementBlock("div", _hoisted_9$8, [_cache[12] || (_cache[12] = createBaseVNode("div", { class: "spinner-border spinner-border-sm me-2" }, null, -1)), createTextVNode(toDisplayString(unref(t)("common.loading")), 1)])) : filteredConnections.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_10$8, [
487
+ }, null, 8, _hoisted_7$9), [[vModelText, searchQuery.value]])]),
488
+ createBaseVNode("div", _hoisted_8$9, [__props.loading ? (openBlock(), createElementBlock("div", _hoisted_9$9, [_cache[12] || (_cache[12] = createBaseVNode("div", { class: "spinner-border spinner-border-sm me-2" }, null, -1)), createTextVNode(toDisplayString(unref(t)("common.loading")), 1)])) : filteredConnections.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
489
489
  _cache[14] || (_cache[14] = createBaseVNode("i", {
490
490
  class: "bi bi-inbox",
491
491
  style: { "font-size": "24px" }
492
492
  }, null, -1)),
493
- createBaseVNode("div", _hoisted_11$8, toDisplayString(unref(t)("sidebar.noConnections")), 1),
493
+ createBaseVNode("div", _hoisted_11$9, toDisplayString(unref(t)("sidebar.noConnections")), 1),
494
494
  createBaseVNode("button", {
495
495
  class: "btn btn-sm btn-outline-primary mt-2",
496
496
  onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("add-connection"))
497
497
  }, [_cache[13] || (_cache[13] = createBaseVNode("i", { class: "bi bi-plus me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("sidebar.addConnection")), 1)])
498
- ])) : (openBlock(), createElementBlock("div", _hoisted_12$8, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredConnections.value, (conn) => {
498
+ ])) : (openBlock(), createElementBlock("div", _hoisted_12$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredConnections.value, (conn) => {
499
499
  return openBlock(), createElementBlock("div", {
500
500
  key: conn.id,
501
501
  class: "connection-item",
@@ -506,7 +506,7 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
506
506
  class: normalizeClass(conn.type === "local" ? "bi bi-terminal" : "bi bi-hdd-network"),
507
507
  style: { "color": "var(--accent)" }
508
508
  }, null, 2),
509
- createBaseVNode("div", _hoisted_14$8, [createBaseVNode("div", _hoisted_15$8, toDisplayString(conn.name), 1), createBaseVNode("div", _hoisted_16$8, toDisplayString(conn.type === "local" ? unref(t)("app.localShell") : `${conn.username}@${conn.host}:${conn.port}`), 1)]),
509
+ createBaseVNode("div", _hoisted_14$9, [createBaseVNode("div", _hoisted_15$9, toDisplayString(conn.name), 1), createBaseVNode("div", _hoisted_16$9, toDisplayString(conn.type === "local" ? unref(t)("app.localShell") : `${conn.username}@${conn.host}:${conn.port}`), 1)]),
510
510
  createBaseVNode("div", {
511
511
  class: "d-flex gap-1",
512
512
  onClick: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"]))
@@ -515,36 +515,36 @@ var init_terminal_sidebar_vue_vue_type_script_setup_true_lang = __esmMin((() =>
515
515
  class: "btn-conn",
516
516
  onClick: ($event) => _ctx.$emit("connect", conn),
517
517
  title: unref(t)("sidebar.connect")
518
- }, [..._cache[15] || (_cache[15] = [createBaseVNode("i", { class: "bi bi-play-fill" }, null, -1)])], 8, _hoisted_17$7),
518
+ }, [..._cache[15] || (_cache[15] = [createBaseVNode("i", { class: "bi bi-play-fill" }, null, -1)])], 8, _hoisted_17$8),
519
519
  createBaseVNode("button", {
520
520
  class: "btn-conn",
521
521
  onClick: ($event) => _ctx.$emit("edit-connection", conn),
522
522
  title: unref(t)("common.edit")
523
- }, [..._cache[16] || (_cache[16] = [createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)])], 8, _hoisted_18$7),
523
+ }, [..._cache[16] || (_cache[16] = [createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)])], 8, _hoisted_18$8),
524
524
  createBaseVNode("button", {
525
525
  class: "btn-conn btn-conn-danger",
526
526
  onClick: ($event) => _ctx.$emit("delete-connection", conn),
527
527
  title: unref(t)("common.delete")
528
- }, [..._cache[17] || (_cache[17] = [createBaseVNode("i", { class: "bi bi-trash" }, null, -1)])], 8, _hoisted_19$7)
528
+ }, [..._cache[17] || (_cache[17] = [createBaseVNode("i", { class: "bi bi-trash" }, null, -1)])], 8, _hoisted_19$8)
529
529
  ])
530
- ], 40, _hoisted_13$8);
530
+ ], 40, _hoisted_13$9);
531
531
  }), 128))]))]),
532
- createBaseVNode("div", _hoisted_20$7, [createBaseVNode("span", null, toDisplayString(__props.connections.length) + " " + toDisplayString(unref(t)("sidebar.connectionCount")), 1), createBaseVNode("div", _hoisted_21$6, [
532
+ createBaseVNode("div", _hoisted_20$8, [createBaseVNode("span", null, toDisplayString(__props.connections.length) + " " + toDisplayString(unref(t)("sidebar.connectionCount")), 1), createBaseVNode("div", _hoisted_21$7, [
533
533
  createBaseVNode("button", {
534
534
  class: "btn-ai-settings",
535
535
  onClick: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("open-ai-settings")),
536
536
  title: unref(t)("ai.settings")
537
- }, [..._cache[18] || (_cache[18] = [createBaseVNode("i", { class: "bi bi-robot" }, null, -1)])], 8, _hoisted_22$6),
537
+ }, [..._cache[18] || (_cache[18] = [createBaseVNode("i", { class: "bi bi-robot" }, null, -1)])], 8, _hoisted_22$7),
538
538
  createBaseVNode("button", {
539
539
  class: "btn-ai-settings",
540
540
  onClick: _cache[7] || (_cache[7] = ($event) => _ctx.$emit("open-batch")),
541
541
  title: unref(t)("batch.title")
542
- }, [..._cache[19] || (_cache[19] = [createBaseVNode("i", { class: "bi bi-hdd-rack" }, null, -1)])], 8, _hoisted_23$6),
542
+ }, [..._cache[19] || (_cache[19] = [createBaseVNode("i", { class: "bi bi-hdd-rack" }, null, -1)])], 8, _hoisted_23$7),
543
543
  createBaseVNode("button", {
544
544
  class: "btn-lang-switch",
545
545
  onClick: toggleLocale,
546
546
  title: currentLocale.value === "zh-CN" ? "Switch to English" : "切换到中文"
547
- }, toDisplayString(currentLocale.value === "zh-CN" ? "EN" : "中"), 9, _hoisted_24$6)
547
+ }, toDisplayString(currentLocale.value === "zh-CN" ? "EN" : "中"), 9, _hoisted_24$7)
548
548
  ])])
549
549
  ], 4);
550
550
  };
@@ -3286,7 +3286,7 @@ var init_zmodem = __esmMin((() => {
3286
3286
  * base.request 返回 {ret, msg, data},此函数提取 data 字段
3287
3287
  * 若 ret !== 0 则抛出异常
3288
3288
  */
3289
- function unwrap$3(res) {
3289
+ function unwrap$4(res) {
3290
3290
  if (res && typeof res === "object" && "ret" in res) {
3291
3291
  if (res.ret !== 0) throw new Error(res.msg || "请求失败");
3292
3292
  return res.data;
@@ -3294,42 +3294,42 @@ function unwrap$3(res) {
3294
3294
  return res;
3295
3295
  }
3296
3296
  function getAIConfig() {
3297
- return request("/api/ai/getConfig", {}).then(unwrap$3);
3297
+ return request("/api/ai/getConfig", {}).then(unwrap$4);
3298
3298
  }
3299
3299
  function updateAIConfig(config) {
3300
- return request("/api/ai/updateConfig", config).then(unwrap$3);
3300
+ return request("/api/ai/updateConfig", config).then(unwrap$4);
3301
3301
  }
3302
3302
  function clearHistory(sessionId) {
3303
- return request("/api/ai/clearHistory", { sessionId }).then(unwrap$3);
3303
+ return request("/api/ai/clearHistory", { sessionId }).then(unwrap$4);
3304
3304
  }
3305
3305
  function getDisplayHistory(sessionId) {
3306
- return request("/api/ai/getDisplayHistory", { sessionId }).then(unwrap$3);
3306
+ return request("/api/ai/getDisplayHistory", { sessionId }).then(unwrap$4);
3307
3307
  }
3308
3308
  function saveDisplayHistory(sessionId, messages, sessionName) {
3309
3309
  return request("/api/ai/saveDisplayHistory", {
3310
3310
  sessionId,
3311
3311
  messages,
3312
3312
  sessionName
3313
- }).then(unwrap$3);
3313
+ }).then(unwrap$4);
3314
3314
  }
3315
3315
  function listHistories() {
3316
- return request("/api/ai/listHistories", {}).then(unwrap$3);
3316
+ return request("/api/ai/listHistories", {}).then(unwrap$4);
3317
3317
  }
3318
3318
  function loadHistory(sessionId) {
3319
- return request("/api/ai/loadHistory", { sessionId }).then(unwrap$3);
3319
+ return request("/api/ai/loadHistory", { sessionId }).then(unwrap$4);
3320
3320
  }
3321
3321
  function getSystemContext(sessionId) {
3322
- return request("/api/ai/getSystemContext", { sessionId }).then(unwrap$3);
3322
+ return request("/api/ai/getSystemContext", { sessionId }).then(unwrap$4);
3323
3323
  }
3324
3324
  function getSkills() {
3325
- return request("/api/ai/getSkills", {}).then(unwrap$3);
3325
+ return request("/api/ai/getSkills", {}).then(unwrap$4);
3326
3326
  }
3327
3327
  var init_ai = __esmMin((() => {
3328
3328
  init_base();
3329
3329
  }));
3330
3330
  //#endregion
3331
3331
  //#region src/service/audit.ts
3332
- function unwrap$2(res) {
3332
+ function unwrap$3(res) {
3333
3333
  if (res && typeof res === "object" && "ret" in res) {
3334
3334
  if (res.ret !== 0) throw new Error(res.msg || "请求失败");
3335
3335
  return res.data;
@@ -3337,17 +3337,17 @@ function unwrap$2(res) {
3337
3337
  return res;
3338
3338
  }
3339
3339
  function getAuditLogs(query = {}) {
3340
- return request("/api/audit/list", query).then(unwrap$2);
3340
+ return request("/api/audit/list", query).then(unwrap$3);
3341
3341
  }
3342
3342
  function getAuditStats(date) {
3343
- return request("/api/audit/stats", { date }).then(unwrap$2);
3343
+ return request("/api/audit/stats", { date }).then(unwrap$3);
3344
3344
  }
3345
3345
  function exportAuditLogs(startDate, endDate, format = "json") {
3346
3346
  return request("/api/audit/export", {
3347
3347
  startDate,
3348
3348
  endDate,
3349
3349
  format
3350
- }).then(unwrap$2);
3350
+ }).then(unwrap$3);
3351
3351
  }
3352
3352
  var init_audit = __esmMin((() => {
3353
3353
  init_base();
@@ -3393,69 +3393,69 @@ async function copy(text) {
3393
3393
  var init_clipboard = __esmMin((() => {}));
3394
3394
  //#endregion
3395
3395
  //#region src/components/audit-panel/index.vue?vue&type=script&setup=true&lang.ts
3396
- var _hoisted_1$8, _hoisted_2$8, _hoisted_3$8, _hoisted_4$8, _hoisted_5$8, _hoisted_6$7, _hoisted_7$7, _hoisted_8$7, _hoisted_9$7, _hoisted_10$7, _hoisted_11$7, _hoisted_12$7, _hoisted_13$7, _hoisted_14$7, _hoisted_15$7, _hoisted_16$7, _hoisted_17$6, _hoisted_18$6, _hoisted_19$6, _hoisted_20$6, _hoisted_21$5, _hoisted_22$5, _hoisted_23$5, _hoisted_24$5, _hoisted_25$5, _hoisted_26$4, _hoisted_27$4, _hoisted_28$4, _hoisted_29$4, _hoisted_30$4, _hoisted_31$3, _hoisted_32$2, _hoisted_33$2, _hoisted_34$2, _hoisted_35$2, _hoisted_36$2, _hoisted_37$2, _hoisted_38$2, _hoisted_39$2, _hoisted_40$2, _hoisted_41$2, index_vue_vue_type_script_setup_true_lang_default$6;
3396
+ var _hoisted_1$9, _hoisted_2$9, _hoisted_3$8, _hoisted_4$8, _hoisted_5$8, _hoisted_6$8, _hoisted_7$8, _hoisted_8$8, _hoisted_9$8, _hoisted_10$8, _hoisted_11$8, _hoisted_12$8, _hoisted_13$8, _hoisted_14$8, _hoisted_15$8, _hoisted_16$8, _hoisted_17$7, _hoisted_18$7, _hoisted_19$7, _hoisted_20$7, _hoisted_21$6, _hoisted_22$6, _hoisted_23$6, _hoisted_24$6, _hoisted_25$6, _hoisted_26$5, _hoisted_27$5, _hoisted_28$5, _hoisted_29$5, _hoisted_30$5, _hoisted_31$4, _hoisted_32$3, _hoisted_33$3, _hoisted_34$3, _hoisted_35$3, _hoisted_36$3, _hoisted_37$3, _hoisted_38$3, _hoisted_39$3, _hoisted_40$2, _hoisted_41$2, index_vue_vue_type_script_setup_true_lang_default$6;
3397
3397
  var init_index_vue_vue_type_script_setup_true_lang$6 = __esmMin((() => {
3398
3398
  init_vue_runtime_esm_bundler();
3399
3399
  init_vue_i18n();
3400
3400
  init_audit();
3401
3401
  init_clipboard();
3402
- _hoisted_1$8 = { class: "audit-panel" };
3403
- _hoisted_2$8 = { class: "audit-header" };
3402
+ _hoisted_1$9 = { class: "audit-panel" };
3403
+ _hoisted_2$9 = { class: "audit-header" };
3404
3404
  _hoisted_3$8 = { class: "audit-header-left" };
3405
3405
  _hoisted_4$8 = {
3406
3406
  key: 0,
3407
3407
  class: "audit-badge"
3408
3408
  };
3409
3409
  _hoisted_5$8 = { class: "audit-header-right" };
3410
- _hoisted_6$7 = ["title"];
3411
- _hoisted_7$7 = ["title"];
3412
- _hoisted_8$7 = { class: "audit-filters" };
3413
- _hoisted_9$7 = ["placeholder"];
3414
- _hoisted_10$7 = { value: "" };
3415
- _hoisted_11$7 = { value: "success" };
3416
- _hoisted_12$7 = { value: "error" };
3417
- _hoisted_13$7 = { value: "blocked" };
3418
- _hoisted_14$7 = {
3410
+ _hoisted_6$8 = ["title"];
3411
+ _hoisted_7$8 = ["title"];
3412
+ _hoisted_8$8 = { class: "audit-filters" };
3413
+ _hoisted_9$8 = ["placeholder"];
3414
+ _hoisted_10$8 = { value: "" };
3415
+ _hoisted_11$8 = { value: "success" };
3416
+ _hoisted_12$8 = { value: "error" };
3417
+ _hoisted_13$8 = { value: "blocked" };
3418
+ _hoisted_14$8 = {
3419
3419
  key: 0,
3420
3420
  class: "audit-stats"
3421
3421
  };
3422
- _hoisted_15$7 = { class: "stat-item stat-total" };
3423
- _hoisted_16$7 = { class: "stat-item stat-success" };
3424
- _hoisted_17$6 = { class: "stat-item stat-error" };
3425
- _hoisted_18$6 = {
3422
+ _hoisted_15$8 = { class: "stat-item stat-total" };
3423
+ _hoisted_16$8 = { class: "stat-item stat-success" };
3424
+ _hoisted_17$7 = { class: "stat-item stat-error" };
3425
+ _hoisted_18$7 = {
3426
3426
  key: 0,
3427
3427
  class: "stat-item stat-blocked"
3428
3428
  };
3429
- _hoisted_19$6 = {
3429
+ _hoisted_19$7 = {
3430
3430
  key: 0,
3431
3431
  class: "audit-empty"
3432
3432
  };
3433
- _hoisted_20$6 = {
3433
+ _hoisted_20$7 = {
3434
3434
  key: 1,
3435
3435
  class: "audit-empty"
3436
3436
  };
3437
- _hoisted_21$5 = ["onClick"];
3438
- _hoisted_22$5 = { class: "entry-header" };
3439
- _hoisted_23$5 = { class: "entry-status" };
3440
- _hoisted_24$5 = { class: "entry-command" };
3441
- _hoisted_25$5 = { class: "entry-meta" };
3442
- _hoisted_26$4 = { class: "entry-duration" };
3443
- _hoisted_27$4 = { class: "entry-time" };
3444
- _hoisted_28$4 = {
3437
+ _hoisted_21$6 = ["onClick"];
3438
+ _hoisted_22$6 = { class: "entry-header" };
3439
+ _hoisted_23$6 = { class: "entry-status" };
3440
+ _hoisted_24$6 = { class: "entry-command" };
3441
+ _hoisted_25$6 = { class: "entry-meta" };
3442
+ _hoisted_26$5 = { class: "entry-duration" };
3443
+ _hoisted_27$5 = { class: "entry-time" };
3444
+ _hoisted_28$5 = {
3445
3445
  key: 0,
3446
3446
  class: "entry-detail"
3447
3447
  };
3448
- _hoisted_29$4 = { class: "detail-row" };
3449
- _hoisted_30$4 = { class: "detail-label" };
3450
- _hoisted_31$3 = { class: "detail-row" };
3451
- _hoisted_32$2 = { class: "detail-label" };
3452
- _hoisted_33$2 = { class: "detail-row" };
3453
- _hoisted_34$2 = { class: "detail-label" };
3454
- _hoisted_35$2 = { class: "detail-code" };
3455
- _hoisted_36$2 = { class: "detail-row" };
3456
- _hoisted_37$2 = { class: "detail-label" };
3457
- _hoisted_38$2 = { class: "detail-code" };
3458
- _hoisted_39$2 = { class: "detail-actions" };
3448
+ _hoisted_29$5 = { class: "detail-row" };
3449
+ _hoisted_30$5 = { class: "detail-label" };
3450
+ _hoisted_31$4 = { class: "detail-row" };
3451
+ _hoisted_32$3 = { class: "detail-label" };
3452
+ _hoisted_33$3 = { class: "detail-row" };
3453
+ _hoisted_34$3 = { class: "detail-label" };
3454
+ _hoisted_35$3 = { class: "detail-code" };
3455
+ _hoisted_36$3 = { class: "detail-row" };
3456
+ _hoisted_37$3 = { class: "detail-label" };
3457
+ _hoisted_38$3 = { class: "detail-code" };
3458
+ _hoisted_39$3 = { class: "detail-actions" };
3459
3459
  _hoisted_40$2 = ["onClick"];
3460
3460
  _hoisted_41$2 = ["onClick"];
3461
3461
  index_vue_vue_type_script_setup_true_lang_default$6 = /* @__PURE__ */ defineComponent({
@@ -3555,8 +3555,8 @@ var init_index_vue_vue_type_script_setup_true_lang$6 = __esmMin((() => {
3555
3555
  refresh
3556
3556
  });
3557
3557
  return (_ctx, _cache) => {
3558
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
3559
- createBaseVNode("div", _hoisted_2$8, [createBaseVNode("div", _hoisted_3$8, [
3558
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
3559
+ createBaseVNode("div", _hoisted_2$9, [createBaseVNode("div", _hoisted_3$8, [
3560
3560
  _cache[3] || (_cache[3] = createBaseVNode("i", { class: "bi bi-shield-check me-1" }, null, -1)),
3561
3561
  createBaseVNode("span", null, toDisplayString(unref(t)("audit.title")), 1),
3562
3562
  stats.value ? (openBlock(), createElementBlock("span", _hoisted_4$8, toDisplayString(stats.value.today) + " " + toDisplayString(unref(t)("audit.today")), 1)) : createCommentVNode("", true)
@@ -3564,12 +3564,12 @@ var init_index_vue_vue_type_script_setup_true_lang$6 = __esmMin((() => {
3564
3564
  class: "btn-audit",
3565
3565
  onClick: refresh,
3566
3566
  title: unref(t)("common.refresh")
3567
- }, [..._cache[4] || (_cache[4] = [createBaseVNode("i", { class: "bi bi-arrow-clockwise" }, null, -1)])], 8, _hoisted_6$7), createBaseVNode("button", {
3567
+ }, [..._cache[4] || (_cache[4] = [createBaseVNode("i", { class: "bi bi-arrow-clockwise" }, null, -1)])], 8, _hoisted_6$8), createBaseVNode("button", {
3568
3568
  class: "btn-audit",
3569
3569
  onClick: handleExport,
3570
3570
  title: unref(t)("audit.export")
3571
- }, [..._cache[5] || (_cache[5] = [createBaseVNode("i", { class: "bi bi-download" }, null, -1)])], 8, _hoisted_7$7)])]),
3572
- createBaseVNode("div", _hoisted_8$7, [
3571
+ }, [..._cache[5] || (_cache[5] = [createBaseVNode("i", { class: "bi bi-download" }, null, -1)])], 8, _hoisted_7$8)])]),
3572
+ createBaseVNode("div", _hoisted_8$8, [
3573
3573
  withDirectives(createBaseVNode("input", {
3574
3574
  type: "date",
3575
3575
  class: "filter-input",
@@ -3582,50 +3582,50 @@ var init_index_vue_vue_type_script_setup_true_lang$6 = __esmMin((() => {
3582
3582
  placeholder: unref(t)("audit.searchPlaceholder"),
3583
3583
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => keyword.value = $event),
3584
3584
  onInput: debouncedLoad
3585
- }, null, 40, _hoisted_9$7), [[vModelText, keyword.value]]),
3585
+ }, null, 40, _hoisted_9$8), [[vModelText, keyword.value]]),
3586
3586
  withDirectives(createBaseVNode("select", {
3587
3587
  class: "filter-input",
3588
3588
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => statusFilter.value = $event),
3589
3589
  onChange: loadLogs
3590
3590
  }, [
3591
- createBaseVNode("option", _hoisted_10$7, toDisplayString(unref(t)("audit.allStatus")), 1),
3592
- createBaseVNode("option", _hoisted_11$7, toDisplayString(unref(t)("audit.success")), 1),
3593
- createBaseVNode("option", _hoisted_12$7, toDisplayString(unref(t)("audit.error")), 1),
3594
- createBaseVNode("option", _hoisted_13$7, toDisplayString(unref(t)("audit.blocked")), 1)
3591
+ createBaseVNode("option", _hoisted_10$8, toDisplayString(unref(t)("audit.allStatus")), 1),
3592
+ createBaseVNode("option", _hoisted_11$8, toDisplayString(unref(t)("audit.success")), 1),
3593
+ createBaseVNode("option", _hoisted_12$8, toDisplayString(unref(t)("audit.error")), 1),
3594
+ createBaseVNode("option", _hoisted_13$8, toDisplayString(unref(t)("audit.blocked")), 1)
3595
3595
  ], 544), [[vModelSelect, statusFilter.value]])
3596
3596
  ]),
3597
- stats.value ? (openBlock(), createElementBlock("div", _hoisted_14$7, [
3598
- createBaseVNode("span", _hoisted_15$7, toDisplayString(stats.value.total) + " " + toDisplayString(unref(t)("audit.total")), 1),
3599
- createBaseVNode("span", _hoisted_16$7, [createTextVNode(toDisplayString(stats.value.success) + " ", 1), _cache[6] || (_cache[6] = createBaseVNode("i", { class: "bi bi-check-circle" }, null, -1))]),
3600
- createBaseVNode("span", _hoisted_17$6, [createTextVNode(toDisplayString(stats.value.error) + " ", 1), _cache[7] || (_cache[7] = createBaseVNode("i", { class: "bi bi-x-circle" }, null, -1))]),
3601
- stats.value.blocked ? (openBlock(), createElementBlock("span", _hoisted_18$6, [createTextVNode(toDisplayString(stats.value.blocked) + " ", 1), _cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-shield-x" }, null, -1))])) : createCommentVNode("", true)
3597
+ stats.value ? (openBlock(), createElementBlock("div", _hoisted_14$8, [
3598
+ createBaseVNode("span", _hoisted_15$8, toDisplayString(stats.value.total) + " " + toDisplayString(unref(t)("audit.total")), 1),
3599
+ createBaseVNode("span", _hoisted_16$8, [createTextVNode(toDisplayString(stats.value.success) + " ", 1), _cache[6] || (_cache[6] = createBaseVNode("i", { class: "bi bi-check-circle" }, null, -1))]),
3600
+ createBaseVNode("span", _hoisted_17$7, [createTextVNode(toDisplayString(stats.value.error) + " ", 1), _cache[7] || (_cache[7] = createBaseVNode("i", { class: "bi bi-x-circle" }, null, -1))]),
3601
+ stats.value.blocked ? (openBlock(), createElementBlock("span", _hoisted_18$7, [createTextVNode(toDisplayString(stats.value.blocked) + " ", 1), _cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-shield-x" }, null, -1))])) : createCommentVNode("", true)
3602
3602
  ])) : createCommentVNode("", true),
3603
3603
  createBaseVNode("div", {
3604
3604
  class: "audit-list",
3605
3605
  ref_key: "listRef",
3606
3606
  ref: listRef
3607
- }, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_19$6, [_cache[9] || (_cache[9] = createBaseVNode("i", { class: "bi bi-hourglass-split" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("common.loading")), 1)])) : entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_20$6, [_cache[10] || (_cache[10] = createBaseVNode("i", { class: "bi bi-inbox" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("audit.noLogs")), 1)])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(entries.value, (entry) => {
3607
+ }, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_19$7, [_cache[9] || (_cache[9] = createBaseVNode("i", { class: "bi bi-hourglass-split" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("common.loading")), 1)])) : entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_20$7, [_cache[10] || (_cache[10] = createBaseVNode("i", { class: "bi bi-inbox" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("audit.noLogs")), 1)])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(entries.value, (entry) => {
3608
3608
  return openBlock(), createElementBlock("div", {
3609
3609
  key: entry.id,
3610
3610
  class: normalizeClass(["audit-entry", "status-" + entry.status]),
3611
3611
  onClick: ($event) => toggleExpand(entry.id)
3612
- }, [createBaseVNode("div", _hoisted_22$5, [
3613
- createBaseVNode("span", _hoisted_23$5, [createBaseVNode("i", { class: normalizeClass(statusIcon(entry.status)) }, null, 2)]),
3614
- createBaseVNode("code", _hoisted_24$5, toDisplayString(entry.command || entry.tool), 1),
3615
- createBaseVNode("span", _hoisted_25$5, [createBaseVNode("span", _hoisted_26$4, toDisplayString(formatDuration(entry.duration)), 1), createBaseVNode("span", _hoisted_27$4, toDisplayString(formatTime(entry.timestamp)), 1)])
3616
- ]), expandedIds.has(entry.id) ? (openBlock(), createElementBlock("div", _hoisted_28$4, [
3617
- createBaseVNode("div", _hoisted_29$4, [createBaseVNode("span", _hoisted_30$4, toDisplayString(unref(t)("audit.session")) + ":", 1), createBaseVNode("span", null, toDisplayString(entry.sessionName || entry.sessionId), 1)]),
3618
- createBaseVNode("div", _hoisted_31$3, [createBaseVNode("span", _hoisted_32$2, toDisplayString(unref(t)("audit.userRequest")) + ":", 1), createBaseVNode("span", null, toDisplayString(entry.userMessage), 1)]),
3619
- createBaseVNode("div", _hoisted_33$2, [createBaseVNode("span", _hoisted_34$2, toDisplayString(unref(t)("audit.command")) + ":", 1), createBaseVNode("pre", _hoisted_35$2, toDisplayString(entry.command), 1)]),
3620
- createBaseVNode("div", _hoisted_36$2, [createBaseVNode("span", _hoisted_37$2, toDisplayString(unref(t)("audit.result")) + ":", 1), createBaseVNode("pre", _hoisted_38$2, toDisplayString(entry.result), 1)]),
3621
- createBaseVNode("div", _hoisted_39$2, [createBaseVNode("button", {
3612
+ }, [createBaseVNode("div", _hoisted_22$6, [
3613
+ createBaseVNode("span", _hoisted_23$6, [createBaseVNode("i", { class: normalizeClass(statusIcon(entry.status)) }, null, 2)]),
3614
+ createBaseVNode("code", _hoisted_24$6, toDisplayString(entry.command || entry.tool), 1),
3615
+ createBaseVNode("span", _hoisted_25$6, [createBaseVNode("span", _hoisted_26$5, toDisplayString(formatDuration(entry.duration)), 1), createBaseVNode("span", _hoisted_27$5, toDisplayString(formatTime(entry.timestamp)), 1)])
3616
+ ]), expandedIds.has(entry.id) ? (openBlock(), createElementBlock("div", _hoisted_28$5, [
3617
+ createBaseVNode("div", _hoisted_29$5, [createBaseVNode("span", _hoisted_30$5, toDisplayString(unref(t)("audit.session")) + ":", 1), createBaseVNode("span", null, toDisplayString(entry.sessionName || entry.sessionId), 1)]),
3618
+ createBaseVNode("div", _hoisted_31$4, [createBaseVNode("span", _hoisted_32$3, toDisplayString(unref(t)("audit.userRequest")) + ":", 1), createBaseVNode("span", null, toDisplayString(entry.userMessage), 1)]),
3619
+ createBaseVNode("div", _hoisted_33$3, [createBaseVNode("span", _hoisted_34$3, toDisplayString(unref(t)("audit.command")) + ":", 1), createBaseVNode("pre", _hoisted_35$3, toDisplayString(entry.command), 1)]),
3620
+ createBaseVNode("div", _hoisted_36$3, [createBaseVNode("span", _hoisted_37$3, toDisplayString(unref(t)("audit.result")) + ":", 1), createBaseVNode("pre", _hoisted_38$3, toDisplayString(entry.result), 1)]),
3621
+ createBaseVNode("div", _hoisted_39$3, [createBaseVNode("button", {
3622
3622
  class: "btn-copy",
3623
3623
  onClick: withModifiers(($event) => copyText(entry.command), ["stop"])
3624
3624
  }, [_cache[11] || (_cache[11] = createBaseVNode("i", { class: "bi bi-clipboard" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("audit.copyCommand")), 1)], 8, _hoisted_40$2), createBaseVNode("button", {
3625
3625
  class: "btn-copy",
3626
3626
  onClick: withModifiers(($event) => copyText(entry.result), ["stop"])
3627
3627
  }, [_cache[12] || (_cache[12] = createBaseVNode("i", { class: "bi bi-clipboard" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("audit.copyResult")), 1)], 8, _hoisted_41$2)])
3628
- ])) : createCommentVNode("", true)], 10, _hoisted_21$5);
3628
+ ])) : createCommentVNode("", true)], 10, _hoisted_21$6);
3629
3629
  }), 128))], 512)
3630
3630
  ]);
3631
3631
  };
@@ -3647,7 +3647,7 @@ var init_audit_panel = __esmMin((() => {
3647
3647
  }));
3648
3648
  //#endregion
3649
3649
  //#region src/service/monitor.ts
3650
- function unwrap$1(res) {
3650
+ function unwrap$2(res) {
3651
3651
  if (res && typeof res === "object" && "ret" in res) {
3652
3652
  if (res.ret !== 0) throw new Error(res.msg || "请求失败");
3653
3653
  return res.data;
@@ -3660,13 +3660,13 @@ function startMonitor(sessionId, connectionId, logPath, pattern) {
3660
3660
  connectionId,
3661
3661
  logPath,
3662
3662
  pattern
3663
- }).then(unwrap$1);
3663
+ }).then(unwrap$2);
3664
3664
  }
3665
3665
  function stopMonitor(monitorId) {
3666
- return request("/api/monitor/stop", { monitorId }).then(unwrap$1);
3666
+ return request("/api/monitor/stop", { monitorId }).then(unwrap$2);
3667
3667
  }
3668
3668
  function getMonitorBatch(monitorId) {
3669
- return request("/api/monitor/analyze", { monitorId }).then(unwrap$1);
3669
+ return request("/api/monitor/analyze", { monitorId }).then(unwrap$2);
3670
3670
  }
3671
3671
  var init_monitor = __esmMin((() => {
3672
3672
  init_base();
@@ -3756,48 +3756,48 @@ var init_sanitize_html = __esmMin((() => {
3756
3756
  }));
3757
3757
  //#endregion
3758
3758
  //#region src/components/log-monitor/index.vue?vue&type=script&setup=true&lang.ts
3759
- var _hoisted_1$7, _hoisted_2$7, _hoisted_3$7, _hoisted_4$7, _hoisted_5$7, _hoisted_6$6, _hoisted_7$6, _hoisted_8$6, _hoisted_9$6, _hoisted_10$6, _hoisted_11$6, _hoisted_12$6, _hoisted_13$6, _hoisted_14$6, _hoisted_15$6, _hoisted_16$6, _hoisted_17$5, _hoisted_18$5, _hoisted_19$5, _hoisted_20$5, index_vue_vue_type_script_setup_true_lang_default$5;
3759
+ var _hoisted_1$8, _hoisted_2$8, _hoisted_3$7, _hoisted_4$7, _hoisted_5$7, _hoisted_6$7, _hoisted_7$7, _hoisted_8$7, _hoisted_9$7, _hoisted_10$7, _hoisted_11$7, _hoisted_12$7, _hoisted_13$7, _hoisted_14$7, _hoisted_15$7, _hoisted_16$7, _hoisted_17$6, _hoisted_18$6, _hoisted_19$6, _hoisted_20$6, index_vue_vue_type_script_setup_true_lang_default$5;
3760
3760
  var init_index_vue_vue_type_script_setup_true_lang$5 = __esmMin((() => {
3761
3761
  init_vue_runtime_esm_bundler();
3762
3762
  init_vue_i18n();
3763
3763
  init_monitor();
3764
3764
  init_ai();
3765
3765
  init_sanitize_html();
3766
- _hoisted_1$7 = { class: "monitor-panel" };
3767
- _hoisted_2$7 = { class: "monitor-controls" };
3766
+ _hoisted_1$8 = { class: "monitor-panel" };
3767
+ _hoisted_2$8 = { class: "monitor-controls" };
3768
3768
  _hoisted_3$7 = ["placeholder", "disabled"];
3769
3769
  _hoisted_4$7 = ["disabled"];
3770
3770
  _hoisted_5$7 = ["disabled", "title"];
3771
- _hoisted_6$6 = {
3771
+ _hoisted_6$7 = {
3772
3772
  key: 0,
3773
3773
  class: "monitor-status"
3774
3774
  };
3775
- _hoisted_7$6 = { class: "status-stats" };
3776
- _hoisted_8$6 = {
3775
+ _hoisted_7$7 = { class: "status-stats" };
3776
+ _hoisted_8$7 = {
3777
3777
  key: 1,
3778
3778
  class: "monitor-alerts"
3779
3779
  };
3780
- _hoisted_9$6 = ["title"];
3781
- _hoisted_10$6 = {
3780
+ _hoisted_9$7 = ["title"];
3781
+ _hoisted_10$7 = {
3782
3782
  key: 0,
3783
3783
  class: "alerts-list"
3784
3784
  };
3785
- _hoisted_11$6 = { class: "alert-header" };
3786
- _hoisted_12$6 = { class: "alert-level" };
3787
- _hoisted_13$6 = { class: "alert-time" };
3788
- _hoisted_14$6 = { class: "alert-message" };
3789
- _hoisted_15$6 = {
3785
+ _hoisted_11$7 = { class: "alert-header" };
3786
+ _hoisted_12$7 = { class: "alert-level" };
3787
+ _hoisted_13$7 = { class: "alert-time" };
3788
+ _hoisted_14$7 = { class: "alert-message" };
3789
+ _hoisted_15$7 = {
3790
3790
  key: 0,
3791
3791
  class: "alert-analysis"
3792
3792
  };
3793
- _hoisted_16$6 = ["innerHTML"];
3794
- _hoisted_17$5 = {
3793
+ _hoisted_16$7 = ["innerHTML"];
3794
+ _hoisted_17$6 = {
3795
3795
  key: 2,
3796
3796
  class: "monitor-analysis"
3797
3797
  };
3798
- _hoisted_18$5 = { class: "analysis-header" };
3799
- _hoisted_19$5 = ["innerHTML"];
3800
- _hoisted_20$5 = {
3798
+ _hoisted_18$6 = { class: "analysis-header" };
3799
+ _hoisted_19$6 = ["innerHTML"];
3800
+ _hoisted_20$6 = {
3801
3801
  key: 0,
3802
3802
  class: "monitor-empty"
3803
3803
  };
@@ -3938,8 +3938,8 @@ var init_index_vue_vue_type_script_setup_true_lang$5 = __esmMin((() => {
3938
3938
  stopMonitoring
3939
3939
  });
3940
3940
  return (_ctx, _cache) => {
3941
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
3942
- createBaseVNode("div", _hoisted_2$7, [
3941
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
3942
+ createBaseVNode("div", _hoisted_2$8, [
3943
3943
  withDirectives(createBaseVNode("input", {
3944
3944
  type: "text",
3945
3945
  class: "monitor-input",
@@ -3960,12 +3960,12 @@ var init_index_vue_vue_type_script_setup_true_lang$5 = __esmMin((() => {
3960
3960
  title: unref(t)("monitor.aiAnalyze")
3961
3961
  }, [_cache[4] || (_cache[4] = createBaseVNode("i", { class: "bi bi-robot" }, null, -1)), createTextVNode(" " + toDisplayString(analyzing.value ? unref(t)("monitor.analyzing") : unref(t)("monitor.aiAnalyze")), 1)], 8, _hoisted_5$7)) : createCommentVNode("", true)
3962
3962
  ]),
3963
- isMonitoring.value ? (openBlock(), createElementBlock("div", _hoisted_6$6, [
3963
+ isMonitoring.value ? (openBlock(), createElementBlock("div", _hoisted_6$7, [
3964
3964
  _cache[5] || (_cache[5] = createBaseVNode("span", { class: "status-indicator active" }, null, -1)),
3965
3965
  createBaseVNode("span", null, toDisplayString(unref(t)("monitor.monitoring")) + ": " + toDisplayString(logPath.value), 1),
3966
- createBaseVNode("span", _hoisted_7$6, toDisplayString(lineCount.value) + " " + toDisplayString(unref(t)("monitor.lines")) + " · " + toDisplayString(alerts.value.length) + " " + toDisplayString(unref(t)("monitor.alerts")), 1)
3966
+ createBaseVNode("span", _hoisted_7$7, toDisplayString(lineCount.value) + " " + toDisplayString(unref(t)("monitor.lines")) + " · " + toDisplayString(alerts.value.length) + " " + toDisplayString(unref(t)("monitor.alerts")), 1)
3967
3967
  ])) : createCommentVNode("", true),
3968
- alerts.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_8$6, [createBaseVNode("div", {
3968
+ alerts.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_8$7, [createBaseVNode("div", {
3969
3969
  class: "alerts-header",
3970
3970
  onClick: _cache[2] || (_cache[2] = ($event) => showAlerts.value = !showAlerts.value)
3971
3971
  }, [
@@ -3976,18 +3976,18 @@ var init_index_vue_vue_type_script_setup_true_lang$5 = __esmMin((() => {
3976
3976
  class: "btn-clear-alerts",
3977
3977
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => alerts.value = [], ["stop"])),
3978
3978
  title: unref(t)("monitor.clearAlerts")
3979
- }, [..._cache[6] || (_cache[6] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])], 8, _hoisted_9$6)
3980
- ]), showAlerts.value ? (openBlock(), createElementBlock("div", _hoisted_10$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(alerts.value.slice(-20).reverse(), (alert) => {
3979
+ }, [..._cache[6] || (_cache[6] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])], 8, _hoisted_9$7)
3980
+ ]), showAlerts.value ? (openBlock(), createElementBlock("div", _hoisted_10$7, [(openBlock(true), createElementBlock(Fragment, null, renderList(alerts.value.slice(-20).reverse(), (alert) => {
3981
3981
  return openBlock(), createElementBlock("div", {
3982
3982
  key: alert.id,
3983
3983
  class: normalizeClass(["alert-item", "level-" + alert.level])
3984
3984
  }, [
3985
- createBaseVNode("div", _hoisted_11$6, [createBaseVNode("span", _hoisted_12$6, toDisplayString(alert.level.toUpperCase()), 1), createBaseVNode("span", _hoisted_13$6, toDisplayString(formatTime(alert.timestamp)), 1)]),
3986
- createBaseVNode("div", _hoisted_14$6, toDisplayString(alert.message), 1),
3987
- alert.aiAnalysis ? (openBlock(), createElementBlock("div", _hoisted_15$6, [_cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-robot" }, null, -1)), createBaseVNode("span", { innerHTML: renderSimpleMarkdown(alert.aiAnalysis) }, null, 8, _hoisted_16$6)])) : createCommentVNode("", true)
3985
+ createBaseVNode("div", _hoisted_11$7, [createBaseVNode("span", _hoisted_12$7, toDisplayString(alert.level.toUpperCase()), 1), createBaseVNode("span", _hoisted_13$7, toDisplayString(formatTime(alert.timestamp)), 1)]),
3986
+ createBaseVNode("div", _hoisted_14$7, toDisplayString(alert.message), 1),
3987
+ alert.aiAnalysis ? (openBlock(), createElementBlock("div", _hoisted_15$7, [_cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-robot" }, null, -1)), createBaseVNode("span", { innerHTML: renderSimpleMarkdown(alert.aiAnalysis) }, null, 8, _hoisted_16$7)])) : createCommentVNode("", true)
3988
3988
  ], 2);
3989
3989
  }), 128))])) : createCommentVNode("", true)])) : createCommentVNode("", true),
3990
- aiAnalysisResult.value ? (openBlock(), createElementBlock("div", _hoisted_17$5, [createBaseVNode("div", _hoisted_18$5, [
3990
+ aiAnalysisResult.value ? (openBlock(), createElementBlock("div", _hoisted_17$6, [createBaseVNode("div", _hoisted_18$6, [
3991
3991
  _cache[10] || (_cache[10] = createBaseVNode("i", { class: "bi bi-robot" }, null, -1)),
3992
3992
  createBaseVNode("span", null, toDisplayString(unref(t)("monitor.aiAnalysisResult")), 1),
3993
3993
  createBaseVNode("button", {
@@ -3997,12 +3997,12 @@ var init_index_vue_vue_type_script_setup_true_lang$5 = __esmMin((() => {
3997
3997
  ]), createBaseVNode("div", {
3998
3998
  class: "analysis-content",
3999
3999
  innerHTML: renderSimpleMarkdown(aiAnalysisResult.value)
4000
- }, null, 8, _hoisted_19$5)])) : createCommentVNode("", true),
4000
+ }, null, 8, _hoisted_19$6)])) : createCommentVNode("", true),
4001
4001
  createBaseVNode("div", {
4002
4002
  class: "monitor-output",
4003
4003
  ref_key: "outputRef",
4004
4004
  ref: outputRef
4005
- }, [lines.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_20$5, [_cache[11] || (_cache[11] = createBaseVNode("i", { class: "bi bi-terminal" }, null, -1)), createBaseVNode("span", null, toDisplayString(isMonitoring.value ? unref(t)("monitor.waitingForLogs") : unref(t)("monitor.notStarted")), 1)])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(displayLines.value, (line, idx) => {
4005
+ }, [lines.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_20$6, [_cache[11] || (_cache[11] = createBaseVNode("i", { class: "bi bi-terminal" }, null, -1)), createBaseVNode("span", null, toDisplayString(isMonitoring.value ? unref(t)("monitor.waitingForLogs") : unref(t)("monitor.notStarted")), 1)])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(displayLines.value, (line, idx) => {
4006
4006
  return openBlock(), createElementBlock("div", {
4007
4007
  key: idx,
4008
4008
  class: normalizeClass(["log-line", getLineClass(line)])
@@ -4028,7 +4028,7 @@ var init_log_monitor = __esmMin((() => {
4028
4028
  }));
4029
4029
  //#endregion
4030
4030
  //#region src/components/ai-chat/index.vue?vue&type=script&setup=true&lang.ts
4031
- var _hoisted_1$6, _hoisted_2$6, _hoisted_3$6, _hoisted_4$6, _hoisted_5$6, _hoisted_6$5, _hoisted_7$5, _hoisted_8$5, _hoisted_9$5, _hoisted_10$5, _hoisted_11$5, _hoisted_12$5, _hoisted_13$5, _hoisted_14$5, _hoisted_15$5, _hoisted_16$5, _hoisted_17$4, _hoisted_18$4, _hoisted_19$4, _hoisted_20$4, _hoisted_21$4, _hoisted_22$4, _hoisted_23$4, _hoisted_24$4, _hoisted_25$4, _hoisted_26$3, _hoisted_27$3, _hoisted_28$3, _hoisted_29$3, _hoisted_30$3, _hoisted_31$2, _hoisted_32$1, _hoisted_33$1, _hoisted_34$1, _hoisted_35$1, _hoisted_36$1, _hoisted_37$1, _hoisted_38$1, _hoisted_39$1, _hoisted_40$1, _hoisted_41$1, _hoisted_42$1, _hoisted_43$1, _hoisted_44$1, _hoisted_45$1, _hoisted_46$1, _hoisted_47$1, _hoisted_48$1, index_vue_vue_type_script_setup_true_lang_default$4;
4031
+ var _hoisted_1$7, _hoisted_2$7, _hoisted_3$6, _hoisted_4$6, _hoisted_5$6, _hoisted_6$6, _hoisted_7$6, _hoisted_8$6, _hoisted_9$6, _hoisted_10$6, _hoisted_11$6, _hoisted_12$6, _hoisted_13$6, _hoisted_14$6, _hoisted_15$6, _hoisted_16$6, _hoisted_17$5, _hoisted_18$5, _hoisted_19$5, _hoisted_20$5, _hoisted_21$5, _hoisted_22$5, _hoisted_23$5, _hoisted_24$5, _hoisted_25$5, _hoisted_26$4, _hoisted_27$4, _hoisted_28$4, _hoisted_29$4, _hoisted_30$4, _hoisted_31$3, _hoisted_32$2, _hoisted_33$2, _hoisted_34$2, _hoisted_35$2, _hoisted_36$2, _hoisted_37$2, _hoisted_38$2, _hoisted_39$2, _hoisted_40$1, _hoisted_41$1, _hoisted_42$1, _hoisted_43$1, _hoisted_44$1, _hoisted_45$1, _hoisted_46$1, _hoisted_47$1, _hoisted_48$1, index_vue_vue_type_script_setup_true_lang_default$4;
4032
4032
  var init_index_vue_vue_type_script_setup_true_lang$4 = __esmMin((() => {
4033
4033
  init_vue_runtime_esm_bundler();
4034
4034
  init_vue_i18n();
@@ -4036,78 +4036,78 @@ var init_index_vue_vue_type_script_setup_true_lang$4 = __esmMin((() => {
4036
4036
  init_audit_panel();
4037
4037
  init_log_monitor();
4038
4038
  init_sanitize_html();
4039
- _hoisted_1$6 = { class: "ai-chat-header" };
4040
- _hoisted_2$6 = { class: "d-flex align-items-center gap-2" };
4039
+ _hoisted_1$7 = { class: "ai-chat-header" };
4040
+ _hoisted_2$7 = { class: "d-flex align-items-center gap-2" };
4041
4041
  _hoisted_3$6 = { class: "ai-tab-bar" };
4042
4042
  _hoisted_4$6 = { class: "d-flex gap-1" };
4043
4043
  _hoisted_5$6 = ["title"];
4044
- _hoisted_6$5 = ["title"];
4045
- _hoisted_7$5 = ["title"];
4046
- _hoisted_8$5 = ["title"];
4047
- _hoisted_9$5 = ["title"];
4048
- _hoisted_10$5 = {
4044
+ _hoisted_6$6 = ["title"];
4045
+ _hoisted_7$6 = ["title"];
4046
+ _hoisted_8$6 = ["title"];
4047
+ _hoisted_9$6 = ["title"];
4048
+ _hoisted_10$6 = {
4049
4049
  key: 0,
4050
4050
  class: "ai-chat-empty"
4051
4051
  };
4052
- _hoisted_11$5 = { class: "ai-message-avatar" };
4053
- _hoisted_12$5 = { class: "ai-message-content" };
4054
- _hoisted_13$5 = {
4052
+ _hoisted_11$6 = { class: "ai-message-avatar" };
4053
+ _hoisted_12$6 = { class: "ai-message-content" };
4054
+ _hoisted_13$6 = {
4055
4055
  key: 0,
4056
4056
  class: "skill-badge"
4057
4057
  };
4058
- _hoisted_14$5 = {
4058
+ _hoisted_14$6 = {
4059
4059
  key: 1,
4060
4060
  class: "agent-steps"
4061
4061
  };
4062
- _hoisted_15$5 = {
4062
+ _hoisted_15$6 = {
4063
4063
  key: 0,
4064
4064
  class: "agent-step thinking-step"
4065
4065
  };
4066
- _hoisted_16$5 = { class: "step-label" };
4067
- _hoisted_17$4 = {
4066
+ _hoisted_16$6 = { class: "step-label" };
4067
+ _hoisted_17$5 = {
4068
4068
  key: 1,
4069
4069
  class: "agent-step tool-call-step"
4070
4070
  };
4071
- _hoisted_18$4 = ["onClick"];
4072
- _hoisted_19$4 = { class: "step-cmd" };
4073
- _hoisted_20$4 = {
4071
+ _hoisted_18$5 = ["onClick"];
4072
+ _hoisted_19$5 = { class: "step-cmd" };
4073
+ _hoisted_20$5 = {
4074
4074
  key: 0,
4075
4075
  class: "step-result"
4076
4076
  };
4077
- _hoisted_21$4 = ["innerHTML"];
4078
- _hoisted_22$4 = {
4077
+ _hoisted_21$5 = ["innerHTML"];
4078
+ _hoisted_22$5 = {
4079
4079
  key: 0,
4080
4080
  class: "skills-panel"
4081
4081
  };
4082
- _hoisted_23$4 = { class: "skills-panel-header" };
4083
- _hoisted_24$4 = { class: "skills-grid" };
4084
- _hoisted_25$4 = ["onClick"];
4085
- _hoisted_26$3 = { class: "skill-item-header" };
4086
- _hoisted_27$3 = { class: "skill-name" };
4087
- _hoisted_28$3 = {
4082
+ _hoisted_23$5 = { class: "skills-panel-header" };
4083
+ _hoisted_24$5 = { class: "skills-grid" };
4084
+ _hoisted_25$5 = ["onClick"];
4085
+ _hoisted_26$4 = { class: "skill-item-header" };
4086
+ _hoisted_27$4 = { class: "skill-name" };
4087
+ _hoisted_28$4 = {
4088
4088
  key: 0,
4089
4089
  class: "skill-source"
4090
4090
  };
4091
- _hoisted_29$3 = {
4091
+ _hoisted_29$4 = {
4092
4092
  key: 0,
4093
4093
  class: "skill-desc"
4094
4094
  };
4095
- _hoisted_30$3 = {
4095
+ _hoisted_30$4 = {
4096
4096
  key: 0,
4097
4097
  class: "skills-empty"
4098
4098
  };
4099
- _hoisted_31$2 = {
4099
+ _hoisted_31$3 = {
4100
4100
  key: 1,
4101
4101
  class: "history-panel"
4102
4102
  };
4103
- _hoisted_32$1 = { class: "history-panel-header" };
4104
- _hoisted_33$1 = { class: "history-list" };
4105
- _hoisted_34$1 = ["onClick"];
4106
- _hoisted_35$1 = { class: "history-item-top" };
4107
- _hoisted_36$1 = { class: "history-name" };
4108
- _hoisted_37$1 = { class: "history-time" };
4109
- _hoisted_38$1 = { class: "history-preview" };
4110
- _hoisted_39$1 = { class: "history-meta" };
4103
+ _hoisted_32$2 = { class: "history-panel-header" };
4104
+ _hoisted_33$2 = { class: "history-list" };
4105
+ _hoisted_34$2 = ["onClick"];
4106
+ _hoisted_35$2 = { class: "history-item-top" };
4107
+ _hoisted_36$2 = { class: "history-name" };
4108
+ _hoisted_37$2 = { class: "history-time" };
4109
+ _hoisted_38$2 = { class: "history-preview" };
4110
+ _hoisted_39$2 = { class: "history-meta" };
4111
4111
  _hoisted_40$1 = {
4112
4112
  key: 0,
4113
4113
  class: "history-empty"
@@ -4498,7 +4498,7 @@ var init_index_vue_vue_type_script_setup_true_lang$4 = __esmMin((() => {
4498
4498
  });
4499
4499
  return (_ctx, _cache) => {
4500
4500
  return openBlock(), createElementBlock("div", { class: normalizeClass(["ai-chat-panel", { collapsed: !__props.isOpen }]) }, [
4501
- createBaseVNode("div", _hoisted_1$6, [createBaseVNode("div", _hoisted_2$6, [createBaseVNode("div", _hoisted_3$6, [createBaseVNode("button", {
4501
+ createBaseVNode("div", _hoisted_1$7, [createBaseVNode("div", _hoisted_2$7, [createBaseVNode("div", _hoisted_3$6, [createBaseVNode("button", {
4502
4502
  class: normalizeClass(["ai-tab", { active: activeTab.value === "chat" }]),
4503
4503
  onClick: _cache[0] || (_cache[0] = ($event) => activeTab.value = "chat")
4504
4504
  }, [_cache[6] || (_cache[6] = createBaseVNode("i", { class: "bi bi-robot" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("ai.chat")), 1)], 2), createBaseVNode("button", {
@@ -4514,28 +4514,28 @@ var init_index_vue_vue_type_script_setup_true_lang$4 = __esmMin((() => {
4514
4514
  class: normalizeClass(["btn-ai-action", { active: showHistoryPanel.value }]),
4515
4515
  onClick: toggleHistoryPanel,
4516
4516
  title: unref(t)("ai.history")
4517
- }, [..._cache[9] || (_cache[9] = [createBaseVNode("i", { class: "bi bi-clock-history" }, null, -1)])], 10, _hoisted_6$5),
4517
+ }, [..._cache[9] || (_cache[9] = [createBaseVNode("i", { class: "bi bi-clock-history" }, null, -1)])], 10, _hoisted_6$6),
4518
4518
  isAgentRunning.value ? (openBlock(), createElementBlock("button", {
4519
4519
  key: 0,
4520
4520
  class: "btn-ai-action btn-stop",
4521
4521
  onClick: handleStop,
4522
4522
  title: unref(t)("ai.stopAgent")
4523
- }, [..._cache[10] || (_cache[10] = [createBaseVNode("i", { class: "bi bi-stop-circle" }, null, -1)])], 8, _hoisted_7$5)) : createCommentVNode("", true),
4523
+ }, [..._cache[10] || (_cache[10] = [createBaseVNode("i", { class: "bi bi-stop-circle" }, null, -1)])], 8, _hoisted_7$6)) : createCommentVNode("", true),
4524
4524
  createBaseVNode("button", {
4525
4525
  class: "btn-ai-action",
4526
4526
  onClick: handleClear,
4527
4527
  title: unref(t)("ai.clearHistory")
4528
- }, [..._cache[11] || (_cache[11] = [createBaseVNode("i", { class: "bi bi-trash" }, null, -1)])], 8, _hoisted_8$5)
4528
+ }, [..._cache[11] || (_cache[11] = [createBaseVNode("i", { class: "bi bi-trash" }, null, -1)])], 8, _hoisted_8$6)
4529
4529
  ], 64)) : createCommentVNode("", true), createBaseVNode("button", {
4530
4530
  class: "btn-ai-action",
4531
4531
  onClick: handleClose,
4532
4532
  title: unref(t)("common.close")
4533
- }, [..._cache[12] || (_cache[12] = [createBaseVNode("i", { class: "bi bi-x-lg" }, null, -1)])], 8, _hoisted_9$5)])]),
4533
+ }, [..._cache[12] || (_cache[12] = [createBaseVNode("i", { class: "bi bi-x-lg" }, null, -1)])], 8, _hoisted_9$6)])]),
4534
4534
  withDirectives(createBaseVNode("div", {
4535
4535
  class: "ai-chat-messages",
4536
4536
  ref_key: "messagesContainer",
4537
4537
  ref: messagesContainer
4538
- }, [messages.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_10$5, [_cache[13] || (_cache[13] = createBaseVNode("i", {
4538
+ }, [messages.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_10$6, [_cache[13] || (_cache[13] = createBaseVNode("i", {
4539
4539
  class: "bi bi-robot",
4540
4540
  style: {
4541
4541
  "font-size": "32px",
@@ -4545,60 +4545,60 @@ var init_index_vue_vue_type_script_setup_true_lang$4 = __esmMin((() => {
4545
4545
  return openBlock(), createElementBlock("div", {
4546
4546
  key: index,
4547
4547
  class: normalizeClass(["ai-message", [msg.role, { "system-info": msg.isSystemInfo }]])
4548
- }, [createBaseVNode("div", _hoisted_11$5, [createBaseVNode("i", { class: normalizeClass(msg.isSystemInfo ? "bi bi-info-circle" : msg.role === "user" ? "bi bi-person" : "bi bi-robot") }, null, 2)]), createBaseVNode("div", _hoisted_12$5, [
4549
- msg.skillName ? (openBlock(), createElementBlock("div", _hoisted_13$5, [_cache[14] || (_cache[14] = createBaseVNode("i", { class: "bi bi-lightning-charge-fill" }, null, -1)), createBaseVNode("span", null, toDisplayString(msg.skillName), 1)])) : createCommentVNode("", true),
4550
- msg.agentSteps && msg.agentSteps.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_14$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(msg.agentSteps, (step, stepIdx) => {
4551
- return openBlock(), createElementBlock(Fragment, { key: stepIdx }, [step.type === "thinking" ? (openBlock(), createElementBlock("div", _hoisted_15$5, [_cache[15] || (_cache[15] = createBaseVNode("div", { class: "ai-loading" }, [
4548
+ }, [createBaseVNode("div", _hoisted_11$6, [createBaseVNode("i", { class: normalizeClass(msg.isSystemInfo ? "bi bi-info-circle" : msg.role === "user" ? "bi bi-person" : "bi bi-robot") }, null, 2)]), createBaseVNode("div", _hoisted_12$6, [
4549
+ msg.skillName ? (openBlock(), createElementBlock("div", _hoisted_13$6, [_cache[14] || (_cache[14] = createBaseVNode("i", { class: "bi bi-lightning-charge-fill" }, null, -1)), createBaseVNode("span", null, toDisplayString(msg.skillName), 1)])) : createCommentVNode("", true),
4550
+ msg.agentSteps && msg.agentSteps.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_14$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(msg.agentSteps, (step, stepIdx) => {
4551
+ return openBlock(), createElementBlock(Fragment, { key: stepIdx }, [step.type === "thinking" ? (openBlock(), createElementBlock("div", _hoisted_15$6, [_cache[15] || (_cache[15] = createBaseVNode("div", { class: "ai-loading" }, [
4552
4552
  createBaseVNode("span"),
4553
4553
  createBaseVNode("span"),
4554
4554
  createBaseVNode("span")
4555
- ], -1)), createBaseVNode("span", _hoisted_16$5, toDisplayString(unref(t)("ai.agentThinking")), 1)])) : createCommentVNode("", true), step.type === "tool_call" ? (openBlock(), createElementBlock("div", _hoisted_17$4, [createBaseVNode("div", {
4555
+ ], -1)), createBaseVNode("span", _hoisted_16$6, toDisplayString(unref(t)("ai.agentThinking")), 1)])) : createCommentVNode("", true), step.type === "tool_call" ? (openBlock(), createElementBlock("div", _hoisted_17$5, [createBaseVNode("div", {
4556
4556
  class: "step-header",
4557
4557
  onClick: ($event) => toggleStep(step)
4558
4558
  }, [
4559
4559
  createBaseVNode("i", { class: normalizeClass([step.collapsed ? "bi bi-chevron-right" : "bi bi-chevron-down", "step-chevron"]) }, null, 2),
4560
4560
  _cache[16] || (_cache[16] = createBaseVNode("i", { class: "bi bi-terminal step-icon" }, null, -1)),
4561
- createBaseVNode("code", _hoisted_19$4, toDisplayString(getToolDisplayCmd(step)), 1),
4561
+ createBaseVNode("code", _hoisted_19$5, toDisplayString(getToolDisplayCmd(step)), 1),
4562
4562
  step.result ? (openBlock(), createElementBlock("i", {
4563
4563
  key: 0,
4564
4564
  class: normalizeClass([step.collapsed ? "bi bi-check-circle" : "bi bi-check-circle-fill", "step-status"])
4565
4565
  }, null, 2)) : createCommentVNode("", true)
4566
- ], 8, _hoisted_18$4), !step.collapsed && step.result ? (openBlock(), createElementBlock("div", _hoisted_20$4, [createBaseVNode("pre", null, toDisplayString(step.result), 1)])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 64);
4566
+ ], 8, _hoisted_18$5), !step.collapsed && step.result ? (openBlock(), createElementBlock("div", _hoisted_20$5, [createBaseVNode("pre", null, toDisplayString(step.result), 1)])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 64);
4567
4567
  }), 128))])) : createCommentVNode("", true),
4568
4568
  msg.content ? (openBlock(), createElementBlock("div", {
4569
4569
  key: 2,
4570
4570
  class: "ai-message-text",
4571
4571
  innerHTML: renderMarkdown(msg.content)
4572
- }, null, 8, _hoisted_21$4)) : createCommentVNode("", true)
4572
+ }, null, 8, _hoisted_21$5)) : createCommentVNode("", true)
4573
4573
  ])], 2);
4574
4574
  }), 128))], 512), [[vShow, activeTab.value === "chat"]]),
4575
- showSkillsPanel.value ? (openBlock(), createElementBlock("div", _hoisted_22$4, [createBaseVNode("div", _hoisted_23$4, [createBaseVNode("span", null, toDisplayString(unref(t)("ai.selectSkill")), 1), createBaseVNode("button", {
4575
+ showSkillsPanel.value ? (openBlock(), createElementBlock("div", _hoisted_22$5, [createBaseVNode("div", _hoisted_23$5, [createBaseVNode("span", null, toDisplayString(unref(t)("ai.selectSkill")), 1), createBaseVNode("button", {
4576
4576
  class: "btn-ai-action",
4577
4577
  onClick: _cache[2] || (_cache[2] = ($event) => showSkillsPanel.value = false)
4578
- }, [..._cache[17] || (_cache[17] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])])]), createBaseVNode("div", _hoisted_24$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(skills.value, (skill) => {
4578
+ }, [..._cache[17] || (_cache[17] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])])]), createBaseVNode("div", _hoisted_24$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(skills.value, (skill) => {
4579
4579
  return openBlock(), createElementBlock("div", {
4580
4580
  key: skill.id,
4581
4581
  class: normalizeClass(["skill-item", { active: selectedSkill.value?.id === skill.id }]),
4582
4582
  onClick: ($event) => toggleSkill(skill)
4583
- }, [createBaseVNode("div", _hoisted_26$3, [
4583
+ }, [createBaseVNode("div", _hoisted_26$4, [
4584
4584
  _cache[18] || (_cache[18] = createBaseVNode("i", { class: "bi bi-lightning-charge-fill" }, null, -1)),
4585
- createBaseVNode("span", _hoisted_27$3, toDisplayString(skill.name), 1),
4586
- skill.source === "user" ? (openBlock(), createElementBlock("span", _hoisted_28$3, toDisplayString(unref(t)("ai.userSkill")), 1)) : createCommentVNode("", true)
4587
- ]), skill.description ? (openBlock(), createElementBlock("div", _hoisted_29$3, toDisplayString(skill.description), 1)) : createCommentVNode("", true)], 10, _hoisted_25$4);
4588
- }), 128)), skills.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_30$3, toDisplayString(unref(t)("ai.noSkills")), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
4589
- showHistoryPanel.value ? (openBlock(), createElementBlock("div", _hoisted_31$2, [createBaseVNode("div", _hoisted_32$1, [createBaseVNode("span", null, toDisplayString(unref(t)("ai.history")), 1), createBaseVNode("button", {
4585
+ createBaseVNode("span", _hoisted_27$4, toDisplayString(skill.name), 1),
4586
+ skill.source === "user" ? (openBlock(), createElementBlock("span", _hoisted_28$4, toDisplayString(unref(t)("ai.userSkill")), 1)) : createCommentVNode("", true)
4587
+ ]), skill.description ? (openBlock(), createElementBlock("div", _hoisted_29$4, toDisplayString(skill.description), 1)) : createCommentVNode("", true)], 10, _hoisted_25$5);
4588
+ }), 128)), skills.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_30$4, toDisplayString(unref(t)("ai.noSkills")), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
4589
+ showHistoryPanel.value ? (openBlock(), createElementBlock("div", _hoisted_31$3, [createBaseVNode("div", _hoisted_32$2, [createBaseVNode("span", null, toDisplayString(unref(t)("ai.history")), 1), createBaseVNode("button", {
4590
4590
  class: "btn-ai-action",
4591
4591
  onClick: _cache[3] || (_cache[3] = ($event) => showHistoryPanel.value = false)
4592
- }, [..._cache[19] || (_cache[19] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])])]), createBaseVNode("div", _hoisted_33$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (h) => {
4592
+ }, [..._cache[19] || (_cache[19] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])])]), createBaseVNode("div", _hoisted_33$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (h) => {
4593
4593
  return openBlock(), createElementBlock("div", {
4594
4594
  key: h.sessionId,
4595
4595
  class: "history-item",
4596
4596
  onClick: ($event) => loadPastHistory(h.sessionId)
4597
4597
  }, [
4598
- createBaseVNode("div", _hoisted_35$1, [createBaseVNode("span", _hoisted_36$1, toDisplayString(h.sessionName || h.sessionId.substring(0, 8)), 1), createBaseVNode("span", _hoisted_37$1, toDisplayString(formatTime(h.savedAt)), 1)]),
4599
- createBaseVNode("div", _hoisted_38$1, toDisplayString(h.preview || unref(t)("ai.noHistory")), 1),
4600
- createBaseVNode("div", _hoisted_39$1, toDisplayString(h.messageCount) + " " + toDisplayString(unref(t)("ai.messages")), 1)
4601
- ], 8, _hoisted_34$1);
4598
+ createBaseVNode("div", _hoisted_35$2, [createBaseVNode("span", _hoisted_36$2, toDisplayString(h.sessionName || h.sessionId.substring(0, 8)), 1), createBaseVNode("span", _hoisted_37$2, toDisplayString(formatTime(h.savedAt)), 1)]),
4599
+ createBaseVNode("div", _hoisted_38$2, toDisplayString(h.preview || unref(t)("ai.noHistory")), 1),
4600
+ createBaseVNode("div", _hoisted_39$2, toDisplayString(h.messageCount) + " " + toDisplayString(unref(t)("ai.messages")), 1)
4601
+ ], 8, _hoisted_34$2);
4602
4602
  }), 128)), historyList.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_40$1, toDisplayString(unref(t)("ai.noHistory")), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
4603
4603
  withDirectives(createBaseVNode("div", _hoisted_41$1, [createVNode(audit_panel_default, {
4604
4604
  ref_key: "auditPanelRef",
@@ -4661,84 +4661,84 @@ var init_ai_chat = __esmMin((() => {
4661
4661
  }));
4662
4662
  //#endregion
4663
4663
  //#region src/components/file-transfer.vue?vue&type=script&setup=true&lang.ts
4664
- var _hoisted_1$5, _hoisted_2$5, _hoisted_3$5, _hoisted_4$5, _hoisted_5$5, _hoisted_6$4, _hoisted_7$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$4, _hoisted_13$4, _hoisted_14$4, _hoisted_15$4, _hoisted_16$4, _hoisted_17$3, _hoisted_18$3, _hoisted_19$3, _hoisted_20$3, _hoisted_21$3, _hoisted_22$3, _hoisted_23$3, _hoisted_24$3, _hoisted_25$3, _hoisted_26$2, _hoisted_27$2, _hoisted_28$2, _hoisted_29$2, _hoisted_30$2, file_transfer_vue_vue_type_script_setup_true_lang_default;
4664
+ var _hoisted_1$6, _hoisted_2$6, _hoisted_3$5, _hoisted_4$5, _hoisted_5$5, _hoisted_6$5, _hoisted_7$5, _hoisted_8$5, _hoisted_9$5, _hoisted_10$5, _hoisted_11$5, _hoisted_12$5, _hoisted_13$5, _hoisted_14$5, _hoisted_15$5, _hoisted_16$5, _hoisted_17$4, _hoisted_18$4, _hoisted_19$4, _hoisted_20$4, _hoisted_21$4, _hoisted_22$4, _hoisted_23$4, _hoisted_24$4, _hoisted_25$4, _hoisted_26$3, _hoisted_27$3, _hoisted_28$3, _hoisted_29$3, _hoisted_30$3, file_transfer_vue_vue_type_script_setup_true_lang_default;
4665
4665
  var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
4666
4666
  init_vue_runtime_esm_bundler();
4667
4667
  init_vue_i18n();
4668
4668
  init_zmodem();
4669
4669
  init_toast();
4670
- _hoisted_1$5 = { class: "ft-title" };
4671
- _hoisted_2$5 = { class: "ft-header-actions" };
4670
+ _hoisted_1$6 = { class: "ft-title" };
4671
+ _hoisted_2$6 = { class: "ft-header-actions" };
4672
4672
  _hoisted_3$5 = ["title"];
4673
4673
  _hoisted_4$5 = ["title"];
4674
4674
  _hoisted_5$5 = { class: "ft-body" };
4675
- _hoisted_6$4 = {
4675
+ _hoisted_6$5 = {
4676
4676
  key: 0,
4677
4677
  class: "d-flex gap-2 mb-2"
4678
4678
  };
4679
- _hoisted_7$4 = { key: 1 };
4680
- _hoisted_8$4 = { class: "ms-2" };
4681
- _hoisted_9$4 = {
4679
+ _hoisted_7$5 = { key: 1 };
4680
+ _hoisted_8$5 = { class: "ms-2" };
4681
+ _hoisted_9$5 = {
4682
4682
  key: 0,
4683
4683
  class: "dest-dir-hint mt-2 px-2 py-1"
4684
4684
  };
4685
- _hoisted_10$4 = { class: "text-info" };
4686
- _hoisted_11$4 = { class: "d-flex align-items-center gap-2" };
4687
- _hoisted_12$4 = ["disabled"];
4688
- _hoisted_13$4 = {
4685
+ _hoisted_10$5 = { class: "text-info" };
4686
+ _hoisted_11$5 = { class: "d-flex align-items-center gap-2" };
4687
+ _hoisted_12$5 = ["disabled"];
4688
+ _hoisted_13$5 = {
4689
4689
  key: 0,
4690
4690
  class: "text-danger mt-1",
4691
4691
  style: { "font-size": "12px" }
4692
4692
  };
4693
- _hoisted_14$4 = {
4693
+ _hoisted_14$5 = {
4694
4694
  key: 1,
4695
4695
  class: "text-warning mt-1",
4696
4696
  style: { "font-size": "12px" }
4697
4697
  };
4698
- _hoisted_15$4 = { key: 2 };
4699
- _hoisted_16$4 = {
4698
+ _hoisted_15$5 = { key: 2 };
4699
+ _hoisted_16$5 = {
4700
4700
  key: 0,
4701
4701
  class: "text-center py-2"
4702
4702
  };
4703
- _hoisted_17$3 = {
4703
+ _hoisted_17$4 = {
4704
4704
  key: 1,
4705
4705
  class: "mb-2"
4706
4706
  };
4707
- _hoisted_18$3 = ["placeholder"];
4708
- _hoisted_19$3 = ["disabled"];
4709
- _hoisted_20$3 = {
4707
+ _hoisted_18$4 = ["placeholder"];
4708
+ _hoisted_19$4 = ["disabled"];
4709
+ _hoisted_20$4 = {
4710
4710
  key: 3,
4711
4711
  class: "mt-2"
4712
4712
  };
4713
- _hoisted_21$3 = { class: "transfer-list" };
4714
- _hoisted_22$3 = {
4713
+ _hoisted_21$4 = { class: "transfer-list" };
4714
+ _hoisted_22$4 = {
4715
4715
  key: 0,
4716
4716
  class: "transfer-item"
4717
4717
  };
4718
- _hoisted_23$3 = { class: "d-flex align-items-center justify-content-between mb-1" };
4719
- _hoisted_24$3 = {
4718
+ _hoisted_23$4 = { class: "d-flex align-items-center justify-content-between mb-1" };
4719
+ _hoisted_24$4 = {
4720
4720
  class: "text-truncate",
4721
4721
  style: { "font-size": "12px" }
4722
4722
  };
4723
- _hoisted_25$3 = { style: {
4723
+ _hoisted_25$4 = { style: {
4724
4724
  "font-size": "11px",
4725
4725
  "color": "var(--text-secondary)"
4726
4726
  } };
4727
- _hoisted_26$2 = {
4727
+ _hoisted_26$3 = {
4728
4728
  class: "progress",
4729
4729
  style: { "height": "3px" }
4730
4730
  };
4731
- _hoisted_27$2 = {
4731
+ _hoisted_27$3 = {
4732
4732
  key: 0,
4733
4733
  class: "text-danger",
4734
4734
  style: { "font-size": "11px" }
4735
4735
  };
4736
- _hoisted_28$2 = { class: "d-flex align-items-center justify-content-between" };
4737
- _hoisted_29$2 = {
4736
+ _hoisted_28$3 = { class: "d-flex align-items-center justify-content-between" };
4737
+ _hoisted_29$3 = {
4738
4738
  class: "text-truncate",
4739
4739
  style: { "font-size": "12px" }
4740
4740
  };
4741
- _hoisted_30$2 = {
4741
+ _hoisted_30$3 = {
4742
4742
  key: 4,
4743
4743
  class: "mt-2 text-center"
4744
4744
  };
@@ -5198,7 +5198,7 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5198
5198
  class: "ft-header",
5199
5199
  onMousedown: onDragStart,
5200
5200
  onDblclick: _cache[1] || (_cache[1] = ($event) => isCollapsed.value = !isCollapsed.value)
5201
- }, [createBaseVNode("span", _hoisted_1$5, [_cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-cloud-arrow-up me-1" }, null, -1)), transferring.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.transferring")), 1)], 64)) : transferHistory.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.title")) + " (" + toDisplayString(transferHistory.value.length) + ") ", 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.title")), 1)], 64))]), createBaseVNode("div", _hoisted_2$5, [createBaseVNode("button", {
5201
+ }, [createBaseVNode("span", _hoisted_1$6, [_cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-cloud-arrow-up me-1" }, null, -1)), transferring.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.transferring")), 1)], 64)) : transferHistory.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.title")) + " (" + toDisplayString(transferHistory.value.length) + ") ", 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(t)("fileTransfer.title")), 1)], 64))]), createBaseVNode("div", _hoisted_2$6, [createBaseVNode("button", {
5202
5202
  class: "ft-btn-icon",
5203
5203
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => isCollapsed.value = !isCollapsed.value, ["stop"])),
5204
5204
  title: isCollapsed.value ? "展开" : "收起"
@@ -5207,14 +5207,14 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5207
5207
  onClick: withModifiers(handleClose, ["stop"]),
5208
5208
  title: unref(t)("common.close")
5209
5209
  }, [..._cache[9] || (_cache[9] = [createBaseVNode("i", { class: "bi bi-x" }, null, -1)])], 8, _hoisted_4$5)])], 32), withDirectives(createBaseVNode("div", _hoisted_5$5, [
5210
- !unref(zmodemAutoMode) ? (openBlock(), createElementBlock("div", _hoisted_6$4, [createBaseVNode("button", {
5210
+ !unref(zmodemAutoMode) ? (openBlock(), createElementBlock("div", _hoisted_6$5, [createBaseVNode("button", {
5211
5211
  class: normalizeClass(["btn btn-sm flex-fill", mode.value === "upload" ? "btn-primary" : "btn-outline-secondary"]),
5212
5212
  onClick: _cache[2] || (_cache[2] = ($event) => mode.value = "upload")
5213
5213
  }, [_cache[10] || (_cache[10] = createBaseVNode("i", { class: "bi bi-upload me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("fileTransfer.upload")), 1)], 2), createBaseVNode("button", {
5214
5214
  class: normalizeClass(["btn btn-sm flex-fill", mode.value === "download" ? "btn-primary" : "btn-outline-secondary"]),
5215
5215
  onClick: _cache[3] || (_cache[3] = ($event) => mode.value = "download")
5216
5216
  }, [_cache[11] || (_cache[11] = createBaseVNode("i", { class: "bi bi-download me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("fileTransfer.download")), 1)], 2)])) : createCommentVNode("", true),
5217
- mode.value === "upload" ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
5217
+ mode.value === "upload" ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
5218
5218
  createBaseVNode("div", {
5219
5219
  class: normalizeClass(["drop-zone", { dragging: isDragging.value }]),
5220
5220
  onDragover: _cache[4] || (_cache[4] = withModifiers(($event) => isDragging.value = true, ["prevent"])),
@@ -5224,7 +5224,7 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5224
5224
  }, [_cache[12] || (_cache[12] = createBaseVNode("i", {
5225
5225
  class: "bi bi-cloud-upload",
5226
5226
  style: { "font-size": "20px" }
5227
- }, null, -1)), createBaseVNode("span", _hoisted_8$4, toDisplayString(unref(t)("fileTransfer.dropZone")), 1)], 34),
5227
+ }, null, -1)), createBaseVNode("span", _hoisted_8$5, toDisplayString(unref(t)("fileTransfer.dropZone")), 1)], 34),
5228
5228
  createBaseVNode("input", {
5229
5229
  ref_key: "fileInput",
5230
5230
  ref: fileInput,
@@ -5233,11 +5233,11 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5233
5233
  style: { "display": "none" },
5234
5234
  onChange: handleFileSelect
5235
5235
  }, null, 544),
5236
- mode.value === "upload" ? (openBlock(), createElementBlock("div", _hoisted_9$4, [isZmodemSend.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5236
+ mode.value === "upload" ? (openBlock(), createElementBlock("div", _hoisted_9$5, [isZmodemSend.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5237
5237
  _cache[13] || (_cache[13] = createBaseVNode("i", { class: "bi bi-folder2 me-1 text-info" }, null, -1)),
5238
5238
  _cache[14] || (_cache[14] = createBaseVNode("span", { class: "text-secondary" }, "远端 rz 将写入当前目录:", -1)),
5239
- createBaseVNode("code", _hoisted_10$4, toDisplayString(destDir.value || "(解析中…)"), 1)
5240
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createBaseVNode("div", _hoisted_11$4, [
5239
+ createBaseVNode("code", _hoisted_10$5, toDisplayString(destDir.value || "(解析中…)"), 1)
5240
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createBaseVNode("div", _hoisted_11$5, [
5241
5241
  _cache[15] || (_cache[15] = createBaseVNode("label", { class: "text-secondary mb-0 text-nowrap" }, [createBaseVNode("i", { class: "bi bi-folder2 me-1 text-info" }), createTextVNode("目标目录")], -1)),
5242
5242
  withDirectives(createBaseVNode("input", {
5243
5243
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => destDir.value = $event),
@@ -5251,10 +5251,10 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5251
5251
  disabled: destDirLoading.value,
5252
5252
  onClick: queryCwd,
5253
5253
  title: "重新检测当前目录"
5254
- }, [createBaseVNode("i", { class: normalizeClass(["bi", destDirLoading.value ? "bi-hourglass-split" : "bi-arrow-clockwise"]) }, null, 2)], 8, _hoisted_12$4)
5255
- ]), destDir.value && !destDir.value.startsWith("/") ? (openBlock(), createElementBlock("div", _hoisted_13$4, [..._cache[16] || (_cache[16] = [createBaseVNode("i", { class: "bi bi-exclamation-triangle me-1" }, null, -1), createTextVNode("目录必须是绝对路径(以 / 开头),否则将回退到家目录。 ", -1)])])) : !destDir.value ? (openBlock(), createElementBlock("div", _hoisted_14$4, [_cache[17] || (_cache[17] = createBaseVNode("i", { class: "bi bi-exclamation-triangle me-1" }, null, -1)), createTextVNode(" 未能自动检测当前目录" + toDisplayString(destDirError.value ? ":" + destDirError.value : "") + ",请手动填写目标目录(绝对路径),否则文件会传到家目录。 ", 1)])) : createCommentVNode("", true)], 64))])) : createCommentVNode("", true)
5254
+ }, [createBaseVNode("i", { class: normalizeClass(["bi", destDirLoading.value ? "bi-hourglass-split" : "bi-arrow-clockwise"]) }, null, 2)], 8, _hoisted_12$5)
5255
+ ]), destDir.value && !destDir.value.startsWith("/") ? (openBlock(), createElementBlock("div", _hoisted_13$5, [..._cache[16] || (_cache[16] = [createBaseVNode("i", { class: "bi bi-exclamation-triangle me-1" }, null, -1), createTextVNode("目录必须是绝对路径(以 / 开头),否则将回退到家目录。 ", -1)])])) : !destDir.value ? (openBlock(), createElementBlock("div", _hoisted_14$5, [_cache[17] || (_cache[17] = createBaseVNode("i", { class: "bi bi-exclamation-triangle me-1" }, null, -1)), createTextVNode(" 未能自动检测当前目录" + toDisplayString(destDirError.value ? ":" + destDirError.value : "") + ",请手动填写目标目录(绝对路径),否则文件会传到家目录。 ", 1)])) : createCommentVNode("", true)], 64))])) : createCommentVNode("", true)
5256
5256
  ])) : createCommentVNode("", true),
5257
- mode.value === "download" ? (openBlock(), createElementBlock("div", _hoisted_15$4, [unref(zmodemAutoMode) ? (openBlock(), createElementBlock("div", _hoisted_16$4, [_cache[18] || (_cache[18] = createBaseVNode("div", { class: "spinner-border spinner-border-sm text-primary me-2" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("fileTransfer.waitingForFiles")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_17$3, [withDirectives(createBaseVNode("input", {
5257
+ mode.value === "download" ? (openBlock(), createElementBlock("div", _hoisted_15$5, [unref(zmodemAutoMode) ? (openBlock(), createElementBlock("div", _hoisted_16$5, [_cache[18] || (_cache[18] = createBaseVNode("div", { class: "spinner-border spinner-border-sm text-primary me-2" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("fileTransfer.waitingForFiles")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_17$4, [withDirectives(createBaseVNode("input", {
5258
5258
  type: "text",
5259
5259
  class: "form-control form-control-sm",
5260
5260
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => remoteFilePath.value = $event),
@@ -5264,28 +5264,28 @@ var init_file_transfer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5264
5264
  "border-color": "#45475a",
5265
5265
  "color": "var(--text-primary)"
5266
5266
  }
5267
- }, null, 8, _hoisted_18$3), [[vModelText, remoteFilePath.value]]), createBaseVNode("button", {
5267
+ }, null, 8, _hoisted_18$4), [[vModelText, remoteFilePath.value]]), createBaseVNode("button", {
5268
5268
  class: "btn btn-primary btn-sm w-100 mt-2",
5269
5269
  disabled: !remoteFilePath.value || transferring.value,
5270
5270
  onClick: startManualDownload
5271
- }, [_cache[19] || (_cache[19] = createBaseVNode("i", { class: "bi bi-download me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("fileTransfer.startDownload")), 1)], 8, _hoisted_19$3)]))])) : createCommentVNode("", true),
5272
- transferring.value || transferHistory.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_20$3, [createBaseVNode("div", _hoisted_21$3, [currentProgress.value ? (openBlock(), createElementBlock("div", _hoisted_22$3, [
5273
- createBaseVNode("div", _hoisted_23$3, [createBaseVNode("span", _hoisted_24$3, [createBaseVNode("i", { class: normalizeClass([currentProgress.value.direction === "upload" ? "bi bi-upload" : "bi bi-download", "me-1"]) }, null, 2), createTextVNode(" " + toDisplayString(currentProgress.value.fileName), 1)]), createBaseVNode("span", _hoisted_25$3, toDisplayString(formatSize(currentProgress.value.bytesSent)) + " / " + toDisplayString(formatSize(currentProgress.value.bytesTotal)), 1)]),
5274
- createBaseVNode("div", _hoisted_26$2, [createBaseVNode("div", {
5271
+ }, [_cache[19] || (_cache[19] = createBaseVNode("i", { class: "bi bi-download me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("fileTransfer.startDownload")), 1)], 8, _hoisted_19$4)]))])) : createCommentVNode("", true),
5272
+ transferring.value || transferHistory.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_20$4, [createBaseVNode("div", _hoisted_21$4, [currentProgress.value ? (openBlock(), createElementBlock("div", _hoisted_22$4, [
5273
+ createBaseVNode("div", _hoisted_23$4, [createBaseVNode("span", _hoisted_24$4, [createBaseVNode("i", { class: normalizeClass([currentProgress.value.direction === "upload" ? "bi bi-upload" : "bi bi-download", "me-1"]) }, null, 2), createTextVNode(" " + toDisplayString(currentProgress.value.fileName), 1)]), createBaseVNode("span", _hoisted_25$4, toDisplayString(formatSize(currentProgress.value.bytesSent)) + " / " + toDisplayString(formatSize(currentProgress.value.bytesTotal)), 1)]),
5274
+ createBaseVNode("div", _hoisted_26$3, [createBaseVNode("div", {
5275
5275
  class: normalizeClass(["progress-bar", currentProgress.value.state === "error" ? "bg-danger" : "bg-primary"]),
5276
5276
  style: normalizeStyle({ width: currentProgress.value.percent + "%" })
5277
5277
  }, null, 6)]),
5278
- currentProgress.value.state === "error" ? (openBlock(), createElementBlock("div", _hoisted_27$2, toDisplayString(unref(t)("fileTransfer.transferFailed")), 1)) : createCommentVNode("", true)
5278
+ currentProgress.value.state === "error" ? (openBlock(), createElementBlock("div", _hoisted_27$3, toDisplayString(unref(t)("fileTransfer.transferFailed")), 1)) : createCommentVNode("", true)
5279
5279
  ])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(transferHistory.value, (item, idx) => {
5280
5280
  return openBlock(), createElementBlock("div", {
5281
5281
  key: idx,
5282
5282
  class: "transfer-item"
5283
- }, [createBaseVNode("div", _hoisted_28$2, [createBaseVNode("span", _hoisted_29$2, [createBaseVNode("i", { class: normalizeClass([item.direction === "upload" ? "bi bi-upload" : "bi bi-download", "me-1"]) }, null, 2), createTextVNode(" " + toDisplayString(item.fileName), 1)]), createBaseVNode("span", {
5283
+ }, [createBaseVNode("div", _hoisted_28$3, [createBaseVNode("span", _hoisted_29$3, [createBaseVNode("i", { class: normalizeClass([item.direction === "upload" ? "bi bi-upload" : "bi bi-download", "me-1"]) }, null, 2), createTextVNode(" " + toDisplayString(item.fileName), 1)]), createBaseVNode("span", {
5284
5284
  style: { "font-size": "11px" },
5285
5285
  class: normalizeClass(item.state === "complete" ? "text-success" : "text-danger")
5286
5286
  }, toDisplayString(item.state === "complete" ? unref(t)("fileTransfer.complete") : unref(t)("fileTransfer.failed")), 3)])]);
5287
5287
  }), 128))])])) : createCommentVNode("", true),
5288
- transferring.value ? (openBlock(), createElementBlock("div", _hoisted_30$2, [createBaseVNode("button", {
5288
+ transferring.value ? (openBlock(), createElementBlock("div", _hoisted_30$3, [createBaseVNode("button", {
5289
5289
  class: "btn btn-outline-danger btn-sm",
5290
5290
  onClick: cancelTransfer
5291
5291
  }, [_cache[20] || (_cache[20] = createBaseVNode("i", { class: "bi bi-x-circle me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("fileTransfer.cancelTransfer")), 1)])])) : createCommentVNode("", true)
@@ -5308,8 +5308,566 @@ var init_file_transfer = __esmMin((() => {
5308
5308
  file_transfer_default = /* @__PURE__ */ _plugin_vue_export_helper_default(file_transfer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bde4aff5"]]);
5309
5309
  }));
5310
5310
  //#endregion
5311
+ //#region src/service/file.ts
5312
+ function unwrap$1(res) {
5313
+ if (res && typeof res === "object" && "ret" in res) {
5314
+ if (res.ret !== 0) throw new Error(res.msg || "请求失败");
5315
+ return res.data;
5316
+ }
5317
+ return res;
5318
+ }
5319
+ function listDirectory(sessionId, remotePath) {
5320
+ return request("/api/file/list", {
5321
+ sessionId,
5322
+ path: remotePath
5323
+ }).then(unwrap$1);
5324
+ }
5325
+ function makeDirectory(sessionId, remotePath) {
5326
+ return request("/api/file/mkdir", {
5327
+ sessionId,
5328
+ path: remotePath
5329
+ }).then(unwrap$1);
5330
+ }
5331
+ function removePath(sessionId, remotePath) {
5332
+ return request("/api/file/remove", {
5333
+ sessionId,
5334
+ path: remotePath
5335
+ }).then(unwrap$1);
5336
+ }
5337
+ function renamePath(sessionId, oldPath, newPath) {
5338
+ return request("/api/file/rename", {
5339
+ sessionId,
5340
+ oldPath,
5341
+ newPath
5342
+ }).then(unwrap$1);
5343
+ }
5344
+ function getDefaultDir(sessionId) {
5345
+ return request("/api/file/defaultDir", { sessionId }).then(unwrap$1);
5346
+ }
5347
+ /** 判断当前是否处于 Electron 生产模式(文件二进制走主进程 IPC) */
5348
+ function isElectronProduction() {
5349
+ const api = window.electronAPI;
5350
+ return !!(api && api.isElectron && api.isPackaged && api.api);
5351
+ }
5352
+ /** 上传本地文件到远程指定路径 */
5353
+ async function uploadFile(sessionId, remotePath, file) {
5354
+ if (isElectronProduction()) {
5355
+ const api = window.electronAPI.api;
5356
+ const buf = await file.arrayBuffer();
5357
+ const res = await api.uploadFile(sessionId, remotePath, buf);
5358
+ if (!res || !res.success) throw new Error(res?.error || "上传失败");
5359
+ return;
5360
+ }
5361
+ const url = getRequestUrl("/api/file-upload");
5362
+ const resp = await fetch(url, {
5363
+ method: "POST",
5364
+ headers: {
5365
+ "X-Session-Id": sessionId,
5366
+ "X-File-Name": remotePath,
5367
+ "Content-Type": "application/octet-stream"
5368
+ },
5369
+ body: file,
5370
+ credentials: "include"
5371
+ });
5372
+ const data = await resp.json().catch(() => ({}));
5373
+ if (!resp.ok || !data.success) throw new Error(data.error || "上传失败");
5374
+ }
5375
+ /** 下载远程文件到本地 */
5376
+ async function downloadFile(sessionId, remotePath, fileName) {
5377
+ if (isElectronProduction()) {
5378
+ const res = await window.electronAPI.api.downloadFile(sessionId, remotePath, fileName);
5379
+ if (res && res.canceled) return;
5380
+ if (!res || !res.success) throw new Error(res?.error || "下载失败");
5381
+ return;
5382
+ }
5383
+ const params = new URLSearchParams({
5384
+ sessionId,
5385
+ path: remotePath
5386
+ });
5387
+ const url = getRequestUrl("/api/file/download") + "?" + params.toString();
5388
+ const resp = await fetch(url, { credentials: "include" });
5389
+ if (!resp.ok) {
5390
+ const errData = await resp.json().catch(() => ({}));
5391
+ throw new Error(errData.error || errData.msg || `下载失败 (${resp.status})`);
5392
+ }
5393
+ const blob = await resp.blob();
5394
+ const blobUrl = URL.createObjectURL(blob);
5395
+ const a = document.createElement("a");
5396
+ a.href = blobUrl;
5397
+ a.download = fileName || remotePath.split("/").pop() || "download";
5398
+ document.body.appendChild(a);
5399
+ a.click();
5400
+ document.body.removeChild(a);
5401
+ URL.revokeObjectURL(blobUrl);
5402
+ }
5403
+ var init_file = __esmMin((() => {
5404
+ init_base();
5405
+ }));
5406
+ //#endregion
5407
+ //#region src/components/file-manager.vue?vue&type=script&setup=true&lang.ts
5408
+ var _hoisted_1$5, _hoisted_2$5, _hoisted_3$4, _hoisted_4$4, _hoisted_5$4, _hoisted_6$4, _hoisted_7$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$4, _hoisted_13$4, _hoisted_14$4, _hoisted_15$4, _hoisted_16$4, _hoisted_17$3, _hoisted_18$3, _hoisted_19$3, _hoisted_20$3, _hoisted_21$3, _hoisted_22$3, _hoisted_23$3, _hoisted_24$3, _hoisted_25$3, _hoisted_26$2, _hoisted_27$2, _hoisted_28$2, _hoisted_29$2, _hoisted_30$2, _hoisted_31$2, _hoisted_32$1, _hoisted_33$1, _hoisted_34$1, _hoisted_35$1, _hoisted_36$1, _hoisted_37$1, _hoisted_38$1, _hoisted_39$1, file_manager_vue_vue_type_script_setup_true_lang_default;
5409
+ var init_file_manager_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5410
+ init_vue_runtime_esm_bundler();
5411
+ init_vue_i18n();
5412
+ init_file();
5413
+ init_modal();
5414
+ init_toast();
5415
+ _hoisted_1$5 = { class: "fm-panel" };
5416
+ _hoisted_2$5 = { class: "fm-header" };
5417
+ _hoisted_3$4 = { class: "fm-title" };
5418
+ _hoisted_4$4 = { class: "fm-header-actions" };
5419
+ _hoisted_5$4 = ["title"];
5420
+ _hoisted_6$4 = { class: "fm-toolbar" };
5421
+ _hoisted_7$4 = ["disabled"];
5422
+ _hoisted_8$4 = ["disabled"];
5423
+ _hoisted_9$4 = ["title"];
5424
+ _hoisted_10$4 = { class: "fm-breadcrumbs" };
5425
+ _hoisted_11$4 = ["onClick"];
5426
+ _hoisted_12$4 = { class: "fm-table" };
5427
+ _hoisted_13$4 = { class: "fm-col-check" };
5428
+ _hoisted_14$4 = ["checked"];
5429
+ _hoisted_15$4 = { class: "fm-col-size" };
5430
+ _hoisted_16$4 = { class: "fm-col-time" };
5431
+ _hoisted_17$3 = { class: "fm-col-perm" };
5432
+ _hoisted_18$3 = { class: "fm-col-actions" };
5433
+ _hoisted_19$3 = ["onClick", "onDblclick"];
5434
+ _hoisted_20$3 = { class: "fm-col-check" };
5435
+ _hoisted_21$3 = ["checked", "onClick"];
5436
+ _hoisted_22$3 = { class: "fm-col-name" };
5437
+ _hoisted_23$3 = { class: "fm-file-icon" };
5438
+ _hoisted_24$3 = { class: "fm-file-name" };
5439
+ _hoisted_25$3 = { class: "fm-col-size" };
5440
+ _hoisted_26$2 = { class: "fm-col-time" };
5441
+ _hoisted_27$2 = { class: "fm-col-perm" };
5442
+ _hoisted_28$2 = { class: "fm-col-actions" };
5443
+ _hoisted_29$2 = ["onClick"];
5444
+ _hoisted_30$2 = ["onClick"];
5445
+ _hoisted_31$2 = ["onClick"];
5446
+ _hoisted_32$1 = { key: 0 };
5447
+ _hoisted_33$1 = {
5448
+ colspan: "6",
5449
+ class: "fm-empty"
5450
+ };
5451
+ _hoisted_34$1 = {
5452
+ key: 0,
5453
+ class: "fm-loading"
5454
+ };
5455
+ _hoisted_35$1 = {
5456
+ key: 1,
5457
+ class: "fm-loading"
5458
+ };
5459
+ _hoisted_36$1 = {
5460
+ key: 2,
5461
+ class: "fm-loading"
5462
+ };
5463
+ _hoisted_37$1 = { class: "fm-prompt" };
5464
+ _hoisted_38$1 = { class: "fm-prompt-title" };
5465
+ _hoisted_39$1 = { class: "fm-prompt-actions" };
5466
+ file_manager_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5467
+ __name: "file-manager",
5468
+ props: {
5469
+ sessionId: {},
5470
+ initialPath: {}
5471
+ },
5472
+ emits: ["close"],
5473
+ setup(__props, { emit: __emit }) {
5474
+ const props = __props;
5475
+ const emit = __emit;
5476
+ const { t } = useI18n();
5477
+ const currentPath = ref("");
5478
+ const items = ref([]);
5479
+ const loading = ref(false);
5480
+ const uploading = ref(false);
5481
+ const uploadProgress = ref({
5482
+ current: 0,
5483
+ total: 0
5484
+ });
5485
+ const downloading = ref(false);
5486
+ const selectedItems = ref([]);
5487
+ const fileInput = ref(null);
5488
+ const promptState = ref(null);
5489
+ const promptInput = ref(null);
5490
+ let loadSeq = 0;
5491
+ const canGoUp = computed(() => currentPath.value !== "/" && currentPath.value !== "");
5492
+ const breadcrumbSegments = computed(() => {
5493
+ const p = currentPath.value.replace(/\/$/, "");
5494
+ if (!p) return [];
5495
+ return p.split("/").filter(Boolean).map((name) => ({ name }));
5496
+ });
5497
+ const allSelected = computed(() => items.value.length > 0 && selectedItems.value.length === items.value.length);
5498
+ function pathOf(index) {
5499
+ const parts = currentPath.value.replace(/\/$/, "").split("/").filter(Boolean);
5500
+ if (index <= 0) return "/";
5501
+ return "/" + parts.slice(0, index).join("/");
5502
+ }
5503
+ function navigateTo(index) {
5504
+ currentPath.value = pathOf(index);
5505
+ load();
5506
+ }
5507
+ function goUp() {
5508
+ if (!canGoUp.value) return;
5509
+ const p = currentPath.value.replace(/\/$/, "");
5510
+ const idx = p.lastIndexOf("/");
5511
+ currentPath.value = idx <= 0 ? "/" : p.substring(0, idx);
5512
+ load();
5513
+ }
5514
+ async function load(path) {
5515
+ if (!props.sessionId) {
5516
+ toast.error(t("fileManager.noSession"));
5517
+ return;
5518
+ }
5519
+ const target = path ?? currentPath.value;
5520
+ const seq = ++loadSeq;
5521
+ loading.value = true;
5522
+ try {
5523
+ const list = await listDirectory(props.sessionId, target);
5524
+ if (seq !== loadSeq) return;
5525
+ items.value = list;
5526
+ selectedItems.value = [];
5527
+ } catch (e) {
5528
+ if (seq !== loadSeq) return;
5529
+ items.value = [];
5530
+ toast.error(t("fileManager.loadFailed", { msg: e?.message || String(e) }));
5531
+ } finally {
5532
+ if (seq === loadSeq) loading.value = false;
5533
+ }
5534
+ }
5535
+ function isSelected(item) {
5536
+ return selectedItems.value.some((i) => i.path === item.path);
5537
+ }
5538
+ function toggleSelect(item) {
5539
+ const idx = selectedItems.value.findIndex((i) => i.path === item.path);
5540
+ if (idx >= 0) selectedItems.value.splice(idx, 1);
5541
+ else selectedItems.value.push(item);
5542
+ }
5543
+ function toggleAll() {
5544
+ if (allSelected.value) selectedItems.value = [];
5545
+ else selectedItems.value = [...items.value];
5546
+ }
5547
+ function openItem(item) {
5548
+ if (item.isDirectory) {
5549
+ currentPath.value = item.path;
5550
+ load();
5551
+ } else downloadItem(item);
5552
+ }
5553
+ function refresh() {
5554
+ load();
5555
+ }
5556
+ function onUploadClick() {
5557
+ fileInput.value?.click();
5558
+ }
5559
+ async function uploadFiles(files) {
5560
+ if (!props.sessionId) return;
5561
+ const list = Array.from(files);
5562
+ if (!list.length) return;
5563
+ uploading.value = true;
5564
+ uploadProgress.value = {
5565
+ current: 0,
5566
+ total: list.length
5567
+ };
5568
+ let ok = 0;
5569
+ for (const file of list) {
5570
+ const remotePath = currentPath.value.replace(/\/$/, "") + "/" + file.name;
5571
+ try {
5572
+ await uploadFile(props.sessionId, remotePath, file);
5573
+ ok++;
5574
+ } catch (e) {
5575
+ toast.error(t("fileManager.uploadFailed", { msg: e?.message || String(e) }));
5576
+ }
5577
+ uploadProgress.value.current++;
5578
+ }
5579
+ uploading.value = false;
5580
+ if (ok > 0) {
5581
+ toast.success(t("fileManager.uploadSuccess", { count: ok }));
5582
+ await load();
5583
+ }
5584
+ }
5585
+ function onFileSelected(e) {
5586
+ const input = e.target;
5587
+ if (input.files) uploadFiles(input.files);
5588
+ input.value = "";
5589
+ }
5590
+ function onDrop(e) {
5591
+ if (e.dataTransfer?.files?.length) uploadFiles(e.dataTransfer.files);
5592
+ }
5593
+ async function downloadItem(item) {
5594
+ downloading.value = true;
5595
+ try {
5596
+ await downloadFile(props.sessionId, item.path, item.name);
5597
+ } catch (e) {
5598
+ toast.error(e?.message || String(e));
5599
+ } finally {
5600
+ downloading.value = false;
5601
+ }
5602
+ }
5603
+ function requestNewFolder() {
5604
+ promptState.value = {
5605
+ mode: "mkdir",
5606
+ value: ""
5607
+ };
5608
+ nextTick(() => promptInput.value?.focus());
5609
+ }
5610
+ function requestRename(item) {
5611
+ promptState.value = {
5612
+ mode: "rename",
5613
+ value: item.name,
5614
+ target: item
5615
+ };
5616
+ nextTick(() => promptInput.value?.focus());
5617
+ }
5618
+ async function confirmPrompt() {
5619
+ const ps = promptState.value;
5620
+ if (!ps) return;
5621
+ const name = ps.value.trim();
5622
+ if (!name) {
5623
+ promptState.value = null;
5624
+ return;
5625
+ }
5626
+ if (name.includes("/")) {
5627
+ toast.error(t("fileManager.invalidName"));
5628
+ return;
5629
+ }
5630
+ try {
5631
+ if (ps.mode === "mkdir") {
5632
+ const remotePath = currentPath.value.replace(/\/$/, "") + "/" + name;
5633
+ await makeDirectory(props.sessionId, remotePath);
5634
+ toast.success(t("fileManager.created"));
5635
+ } else if (ps.target) {
5636
+ const parent = ps.target.path.replace(/\/$/, "");
5637
+ const idx = parent.lastIndexOf("/");
5638
+ const newPath = (idx <= 0 ? "" : parent.substring(0, idx)) + "/" + name;
5639
+ await renamePath(props.sessionId, ps.target.path, newPath);
5640
+ toast.success(t("fileManager.renamed"));
5641
+ }
5642
+ promptState.value = null;
5643
+ await load();
5644
+ } catch (e) {
5645
+ toast.error(e?.message || String(e));
5646
+ }
5647
+ }
5648
+ async function removeItem(item) {
5649
+ if (!await modal.confirm(t("fileManager.confirmDelete", { name: item.name }))) return;
5650
+ try {
5651
+ await removePath(props.sessionId, item.path);
5652
+ toast.success(t("fileManager.deleted"));
5653
+ await load();
5654
+ } catch (e) {
5655
+ toast.error(e?.message || String(e));
5656
+ }
5657
+ }
5658
+ async function removeSelected() {
5659
+ if (!selectedItems.value.length) return;
5660
+ if (!await modal.confirm(t("fileManager.confirmDeleteMulti", { count: selectedItems.value.length }))) return;
5661
+ for (const item of selectedItems.value) try {
5662
+ await removePath(props.sessionId, item.path);
5663
+ } catch (e) {
5664
+ toast.error(e?.message || String(e));
5665
+ }
5666
+ toast.success(t("fileManager.deleted"));
5667
+ await load();
5668
+ }
5669
+ function close() {
5670
+ emit("close");
5671
+ }
5672
+ function formatSize(bytes) {
5673
+ if (bytes < 1024) return `${bytes} B`;
5674
+ const units = [
5675
+ "KB",
5676
+ "MB",
5677
+ "GB",
5678
+ "TB"
5679
+ ];
5680
+ let size = bytes / 1024;
5681
+ let i = 0;
5682
+ while (size >= 1024 && i < units.length - 1) {
5683
+ size /= 1024;
5684
+ i++;
5685
+ }
5686
+ return `${size.toFixed(1)} ${units[i]}`;
5687
+ }
5688
+ function formatTime(ms) {
5689
+ if (!ms) return "—";
5690
+ const d = new Date(ms);
5691
+ if (isNaN(d.getTime())) return "—";
5692
+ return d.toLocaleString();
5693
+ }
5694
+ function iconFor(item) {
5695
+ if (item.isDirectory) return "📁";
5696
+ if (item.isSymbolicLink) return "🔗";
5697
+ return "📄";
5698
+ }
5699
+ function onKey(e) {
5700
+ if (e.key === "Escape") if (promptState.value) promptState.value = null;
5701
+ else close();
5702
+ }
5703
+ onMounted(async () => {
5704
+ window.addEventListener("keydown", onKey);
5705
+ selectedItems.value = [];
5706
+ if (props.initialPath) {
5707
+ currentPath.value = props.initialPath;
5708
+ await load();
5709
+ } else {
5710
+ try {
5711
+ currentPath.value = await getDefaultDir(props.sessionId) || "/";
5712
+ } catch {
5713
+ currentPath.value = "/";
5714
+ }
5715
+ await load();
5716
+ }
5717
+ });
5718
+ onBeforeUnmount(() => {
5719
+ window.removeEventListener("keydown", onKey);
5720
+ });
5721
+ return (_ctx, _cache) => {
5722
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
5723
+ createBaseVNode("div", _hoisted_2$5, [createBaseVNode("div", _hoisted_3$4, [_cache[7] || (_cache[7] = createBaseVNode("span", { class: "fm-icon" }, "🗂", -1)), createTextVNode(" " + toDisplayString(unref(t)("fileManager.title")), 1)]), createBaseVNode("div", _hoisted_4$4, [createBaseVNode("button", {
5724
+ class: "fm-btn fm-close",
5725
+ title: unref(t)("common.close"),
5726
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
5727
+ }, "✕", 8, _hoisted_5$4)])]),
5728
+ createBaseVNode("div", _hoisted_6$4, [
5729
+ createBaseVNode("button", {
5730
+ class: "fm-btn",
5731
+ disabled: !canGoUp.value,
5732
+ onClick: goUp
5733
+ }, "⬆ " + toDisplayString(unref(t)("fileManager.up")), 9, _hoisted_7$4),
5734
+ createBaseVNode("button", {
5735
+ class: "fm-btn",
5736
+ onClick: refresh
5737
+ }, "⟳ " + toDisplayString(unref(t)("fileManager.refresh")), 1),
5738
+ createBaseVNode("button", {
5739
+ class: "fm-btn",
5740
+ onClick: requestNewFolder
5741
+ }, "+ " + toDisplayString(unref(t)("fileManager.newFolder")), 1),
5742
+ createBaseVNode("button", {
5743
+ class: "fm-btn",
5744
+ onClick: onUploadClick
5745
+ }, "⬆ " + toDisplayString(unref(t)("fileManager.upload")), 1),
5746
+ createBaseVNode("button", {
5747
+ class: "fm-btn fm-danger",
5748
+ disabled: !selectedItems.value.length,
5749
+ onClick: removeSelected
5750
+ }, " 🗑 " + toDisplayString(unref(t)("fileManager.deleteSelected")) + " (" + toDisplayString(selectedItems.value.length) + ") ", 9, _hoisted_8$4),
5751
+ createBaseVNode("span", {
5752
+ class: "fm-cwd",
5753
+ title: currentPath.value
5754
+ }, toDisplayString(currentPath.value), 9, _hoisted_9$4)
5755
+ ]),
5756
+ createBaseVNode("div", _hoisted_10$4, [createBaseVNode("span", {
5757
+ class: "fm-crumb",
5758
+ onClick: _cache[1] || (_cache[1] = ($event) => navigateTo(0))
5759
+ }, "/"), (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbSegments.value, (seg, i) => {
5760
+ return openBlock(), createElementBlock(Fragment, { key: i }, [_cache[8] || (_cache[8] = createBaseVNode("span", { class: "fm-sep" }, "/", -1)), createBaseVNode("span", {
5761
+ class: "fm-crumb",
5762
+ onClick: ($event) => navigateTo(i + 1)
5763
+ }, toDisplayString(seg.name), 9, _hoisted_11$4)], 64);
5764
+ }), 128))]),
5765
+ createBaseVNode("div", {
5766
+ class: "fm-list",
5767
+ onDragover: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
5768
+ onDrop: withModifiers(onDrop, ["prevent"])
5769
+ }, [
5770
+ createBaseVNode("table", _hoisted_12$4, [createBaseVNode("thead", null, [createBaseVNode("tr", null, [
5771
+ createBaseVNode("th", _hoisted_13$4, [createBaseVNode("input", {
5772
+ type: "checkbox",
5773
+ checked: allSelected.value,
5774
+ onChange: toggleAll
5775
+ }, null, 40, _hoisted_14$4)]),
5776
+ createBaseVNode("th", null, toDisplayString(unref(t)("fileManager.name")), 1),
5777
+ createBaseVNode("th", _hoisted_15$4, toDisplayString(unref(t)("fileManager.size")), 1),
5778
+ createBaseVNode("th", _hoisted_16$4, toDisplayString(unref(t)("fileManager.modified")), 1),
5779
+ createBaseVNode("th", _hoisted_17$3, toDisplayString(unref(t)("fileManager.permissions")), 1),
5780
+ createBaseVNode("th", _hoisted_18$3, toDisplayString(unref(t)("fileManager.actions")), 1)
5781
+ ])]), createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
5782
+ return openBlock(), createElementBlock("tr", {
5783
+ key: item.path,
5784
+ class: normalizeClass({ "fm-selected": isSelected(item) }),
5785
+ onClick: ($event) => toggleSelect(item),
5786
+ onDblclick: withModifiers(($event) => openItem(item), ["stop"])
5787
+ }, [
5788
+ createBaseVNode("td", _hoisted_20$3, [createBaseVNode("input", {
5789
+ type: "checkbox",
5790
+ checked: isSelected(item),
5791
+ onClick: withModifiers(($event) => toggleSelect(item), ["stop"])
5792
+ }, null, 8, _hoisted_21$3)]),
5793
+ createBaseVNode("td", _hoisted_22$3, [createBaseVNode("span", _hoisted_23$3, toDisplayString(iconFor(item)), 1), createBaseVNode("span", _hoisted_24$3, toDisplayString(item.name), 1)]),
5794
+ createBaseVNode("td", _hoisted_25$3, toDisplayString(item.isDirectory ? "—" : formatSize(item.size)), 1),
5795
+ createBaseVNode("td", _hoisted_26$2, toDisplayString(formatTime(item.mtime)), 1),
5796
+ createBaseVNode("td", _hoisted_27$2, toDisplayString(item.permissions), 1),
5797
+ createBaseVNode("td", _hoisted_28$2, [
5798
+ !item.isDirectory ? (openBlock(), createElementBlock("button", {
5799
+ key: 0,
5800
+ class: "fm-link",
5801
+ onClick: withModifiers(($event) => downloadItem(item), ["stop"])
5802
+ }, toDisplayString(unref(t)("fileManager.download")), 9, _hoisted_29$2)) : createCommentVNode("", true),
5803
+ createBaseVNode("button", {
5804
+ class: "fm-link",
5805
+ onClick: withModifiers(($event) => requestRename(item), ["stop"])
5806
+ }, toDisplayString(unref(t)("fileManager.rename")), 9, _hoisted_30$2),
5807
+ createBaseVNode("button", {
5808
+ class: "fm-link fm-link-danger",
5809
+ onClick: withModifiers(($event) => removeItem(item), ["stop"])
5810
+ }, toDisplayString(unref(t)("fileManager.delete")), 9, _hoisted_31$2)
5811
+ ])
5812
+ ], 42, _hoisted_19$3);
5813
+ }), 128)), !loading.value && !items.value.length ? (openBlock(), createElementBlock("tr", _hoisted_32$1, [createBaseVNode("td", _hoisted_33$1, toDisplayString(unref(t)("fileManager.empty")), 1)])) : createCommentVNode("", true)])]),
5814
+ loading.value ? (openBlock(), createElementBlock("div", _hoisted_34$1, toDisplayString(unref(t)("fileManager.loading")), 1)) : createCommentVNode("", true),
5815
+ uploading.value ? (openBlock(), createElementBlock("div", _hoisted_35$1, toDisplayString(unref(t)("fileManager.uploading", {
5816
+ current: uploadProgress.value.current,
5817
+ total: uploadProgress.value.total
5818
+ })), 1)) : createCommentVNode("", true),
5819
+ downloading.value ? (openBlock(), createElementBlock("div", _hoisted_36$1, toDisplayString(unref(t)("fileManager.downloading")), 1)) : createCommentVNode("", true)
5820
+ ], 32),
5821
+ createBaseVNode("input", {
5822
+ ref_key: "fileInput",
5823
+ ref: fileInput,
5824
+ type: "file",
5825
+ multiple: "",
5826
+ hidden: "",
5827
+ onChange: onFileSelected
5828
+ }, null, 544),
5829
+ promptState.value ? (openBlock(), createElementBlock("div", {
5830
+ key: 0,
5831
+ class: "fm-prompt-mask",
5832
+ onClick: _cache[6] || (_cache[6] = withModifiers(($event) => promptState.value = null, ["self"]))
5833
+ }, [createBaseVNode("div", _hoisted_37$1, [
5834
+ createBaseVNode("div", _hoisted_38$1, toDisplayString(promptState.value.mode === "mkdir" ? unref(t)("fileManager.newFolderPrompt") : unref(t)("fileManager.renamePrompt")), 1),
5835
+ withDirectives(createBaseVNode("input", {
5836
+ ref_key: "promptInput",
5837
+ ref: promptInput,
5838
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => promptState.value.value = $event),
5839
+ class: "fm-prompt-input",
5840
+ onKeyup: [withKeys(confirmPrompt, ["enter"]), _cache[4] || (_cache[4] = withKeys(($event) => promptState.value = null, ["esc"]))]
5841
+ }, null, 544), [[vModelText, promptState.value.value]]),
5842
+ createBaseVNode("div", _hoisted_39$1, [createBaseVNode("button", {
5843
+ class: "fm-btn",
5844
+ onClick: confirmPrompt
5845
+ }, toDisplayString(unref(t)("common.confirm")), 1), createBaseVNode("button", {
5846
+ class: "fm-btn",
5847
+ onClick: _cache[5] || (_cache[5] = ($event) => promptState.value = null)
5848
+ }, toDisplayString(unref(t)("common.cancel")), 1)])
5849
+ ])])) : createCommentVNode("", true)
5850
+ ]);
5851
+ };
5852
+ }
5853
+ });
5854
+ }));
5855
+ //#endregion
5856
+ //#region src/components/file-manager.vue?vue&type=style&index=0&scoped=aa64e51d&lang.css
5857
+ var init_file_manager_vue_vue_type_style_index_0_scoped_aa64e51d_lang = __esmMin((() => {}));
5858
+ //#endregion
5859
+ //#region src/components/file-manager.vue
5860
+ var file_manager_default;
5861
+ var init_file_manager = __esmMin((() => {
5862
+ init_file_manager_vue_vue_type_script_setup_true_lang();
5863
+ init_file_manager_vue_vue_type_script_setup_true_lang();
5864
+ init_file_manager_vue_vue_type_style_index_0_scoped_aa64e51d_lang();
5865
+ init__plugin_vue_export_helper();
5866
+ file_manager_default = /* @__PURE__ */ _plugin_vue_export_helper_default(file_manager_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-aa64e51d"]]);
5867
+ }));
5868
+ //#endregion
5311
5869
  //#region src/components/terminal-tab.vue?vue&type=script&setup=true&lang.ts
5312
- var import_xterm, import_addon_fit, import_addon_web_links, _hoisted_1$4, _hoisted_2$4, _hoisted_3$4, _hoisted_4$4, _hoisted_5$4, MAX_RECONNECT_ATTEMPTS, RECONNECT_BASE_DELAY, AI_CHAT_MIN_WIDTH, AI_CHAT_MAX_WIDTH_RATIO, terminal_tab_vue_vue_type_script_setup_true_lang_default;
5870
+ var import_xterm, import_addon_fit, import_addon_web_links, _hoisted_1$4, _hoisted_2$4, FM_MIN_WIDTH, FM_MAX_WIDTH_RATIO, MAX_RECONNECT_ATTEMPTS, RECONNECT_BASE_DELAY, AI_CHAT_MIN_WIDTH, AI_CHAT_MAX_WIDTH_RATIO, terminal_tab_vue_vue_type_script_setup_true_lang_default;
5313
5871
  var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5314
5872
  init_vue_runtime_esm_bundler();
5315
5873
  init_vue_i18n();
@@ -5320,23 +5878,11 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5320
5878
  init_zmodem();
5321
5879
  init_ai_chat();
5322
5880
  init_file_transfer();
5881
+ init_file_manager();
5323
5882
  _hoisted_1$4 = ["title"];
5324
- _hoisted_2$4 = {
5325
- key: 1,
5326
- class: "terminal-status"
5327
- };
5328
- _hoisted_3$4 = {
5329
- key: 2,
5330
- class: "terminal-status text-danger"
5331
- };
5332
- _hoisted_4$4 = {
5333
- key: 3,
5334
- class: "terminal-status text-secondary"
5335
- };
5336
- _hoisted_5$4 = {
5337
- key: 4,
5338
- class: "terminal-status text-warning"
5339
- };
5883
+ _hoisted_2$4 = ["title"];
5884
+ FM_MIN_WIDTH = 280;
5885
+ FM_MAX_WIDTH_RATIO = .5;
5340
5886
  MAX_RECONNECT_ATTEMPTS = 5;
5341
5887
  RECONNECT_BASE_DELAY = 2e3;
5342
5888
  AI_CHAT_MIN_WIDTH = 280;
@@ -5364,6 +5910,28 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5364
5910
  const errorMessage = ref("");
5365
5911
  const showAIChat = ref(false);
5366
5912
  const aiChatRef = ref();
5913
+ const showFileManager = ref(false);
5914
+ const fmWidth = ref(360);
5915
+ function startFmResize(e) {
5916
+ e.preventDefault();
5917
+ const startX = e.clientX;
5918
+ const startWidth = fmWidth.value;
5919
+ const maxWidth = (terminalWrapper.value?.clientWidth || 800) * FM_MAX_WIDTH_RATIO;
5920
+ const onMouseMove = (ev) => {
5921
+ const delta = ev.clientX - startX;
5922
+ fmWidth.value = Math.min(Math.max(startWidth + delta, FM_MIN_WIDTH), maxWidth);
5923
+ };
5924
+ const onMouseUp = () => {
5925
+ document.removeEventListener("mousemove", onMouseMove);
5926
+ document.removeEventListener("mouseup", onMouseUp);
5927
+ document.body.style.cursor = "";
5928
+ document.body.style.userSelect = "";
5929
+ };
5930
+ document.addEventListener("mousemove", onMouseMove);
5931
+ document.addEventListener("mouseup", onMouseUp);
5932
+ document.body.style.cursor = "col-resize";
5933
+ document.body.style.userSelect = "none";
5934
+ }
5367
5935
  /** 显示文件传输浮动面板 */
5368
5936
  function showFileTransfer(info) {
5369
5937
  const termRef = {
@@ -5751,6 +6319,7 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5751
6319
  function scheduleReconnect() {
5752
6320
  if (reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
5753
6321
  console.log("[TerminalTab] Max reconnect attempts reached");
6322
+ if (terminal) terminal.writeln(`\x1b[31m✗ ${t("tab.maxReconnectReached")}\x1b[0m`);
5754
6323
  return;
5755
6324
  }
5756
6325
  const delay = RECONNECT_BASE_DELAY * Math.pow(1.5, reconnectAttempts);
@@ -5968,6 +6537,9 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5968
6537
  case "error":
5969
6538
  setStatus("error", msg.data || "连接失败");
5970
6539
  break;
6540
+ case "conn-log":
6541
+ if (terminal && msg.data) terminal.writeln(`\r\n\x1b[36m[SSH] ${msg.data}\x1b[0m`);
6542
+ break;
5971
6543
  case "ai-agent-event":
5972
6544
  if (aiChatRef.value && msg.event) aiChatRef.value.handleAgentEvent(msg.event);
5973
6545
  break;
@@ -5982,9 +6554,29 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
5982
6554
  function sendToServer(msg) {
5983
6555
  if (ws && ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify(msg));
5984
6556
  }
6557
+ function writeStatusToTerminal(s, detail) {
6558
+ if (!terminal) return;
6559
+ const host = props.connection.host || "";
6560
+ switch (s) {
6561
+ case "connecting":
6562
+ terminal.writeln(`\r\n\x1b[33m⚡ ${t("tab.connectingTo", { host })}\x1b[0m`);
6563
+ break;
6564
+ case "connected": break;
6565
+ case "error":
6566
+ terminal.writeln(`\x1b[31m✗ ${t("tab.connectionFailed")}: ${detail || errorMessage.value}\x1b[0m`);
6567
+ break;
6568
+ case "disconnected":
6569
+ terminal.writeln(`\x1b[90m⚠ ${t("tab.disconnected")}\x1b[0m`);
6570
+ break;
6571
+ case "reconnecting":
6572
+ terminal.writeln(`\x1b[33m⟳ ${t("tab.reconnecting")} (${reconnectAttempts + 1}/${MAX_RECONNECT_ATTEMPTS})\x1b[0m`);
6573
+ break;
6574
+ }
6575
+ }
5985
6576
  function setStatus(s, detail) {
5986
6577
  status.value = s;
5987
6578
  if (s === "error" && detail) errorMessage.value = detail;
6579
+ writeStatusToTerminal(s, detail);
5988
6580
  emit("status-change", s, sessionId || void 0);
5989
6581
  }
5990
6582
  function focus() {
@@ -6018,6 +6610,7 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
6018
6610
  });
6019
6611
  onMounted(() => {
6020
6612
  initTerminal();
6613
+ writeStatusToTerminal("connecting");
6021
6614
  document.addEventListener("click", onDocumentClick);
6022
6615
  if (terminalContainer.value) {
6023
6616
  resizeObserver = new ResizeObserver(() => {
@@ -6140,6 +6733,17 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
6140
6733
  ref_key: "terminalWrapper",
6141
6734
  ref: terminalWrapper
6142
6735
  }, [
6736
+ showFileManager.value && status.value === "connected" ? (openBlock(), createElementBlock("div", {
6737
+ key: 0,
6738
+ class: "file-manager-wrapper",
6739
+ style: normalizeStyle({ width: fmWidth.value + "px" })
6740
+ }, [createBaseVNode("div", {
6741
+ class: "fm-resize-handle",
6742
+ onMousedown: startFmResize
6743
+ }, null, 32), createVNode(file_manager_default, {
6744
+ sessionId: unref(sessionId) || __props.tabId,
6745
+ onClose: _cache[0] || (_cache[0] = ($event) => showFileManager.value = false)
6746
+ }, null, 8, ["sessionId"])], 4)) : createCommentVNode("", true),
6143
6747
  createBaseVNode("div", {
6144
6748
  class: "terminal-container",
6145
6749
  ref_key: "terminalContainer",
@@ -6150,12 +6754,19 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
6150
6754
  ref: fileTransferRef
6151
6755
  }, null, 512),
6152
6756
  status.value === "connected" ? (openBlock(), createElementBlock("button", {
6153
- key: 0,
6757
+ key: 1,
6154
6758
  class: normalizeClass(["ai-toggle-btn", { active: showAIChat.value }]),
6155
6759
  style: normalizeStyle(showAIChat.value ? { right: aiChatWidth.value + 12 + "px" } : {}),
6156
6760
  onClick: toggleAIChat,
6157
6761
  title: unref(t)("ai.chat")
6158
- }, [..._cache[3] || (_cache[3] = [createBaseVNode("i", { class: "bi bi-robot" }, null, -1)])], 14, _hoisted_1$4)) : createCommentVNode("", true),
6762
+ }, [..._cache[5] || (_cache[5] = [createBaseVNode("i", { class: "bi bi-robot" }, null, -1)])], 14, _hoisted_1$4)) : createCommentVNode("", true),
6763
+ status.value === "connected" ? (openBlock(), createElementBlock("button", {
6764
+ key: 2,
6765
+ class: normalizeClass(["ai-toggle-btn", { active: showFileManager.value }]),
6766
+ style: normalizeStyle(showAIChat.value ? { right: aiChatWidth.value + 52 + "px" } : { right: "52px" }),
6767
+ onClick: _cache[1] || (_cache[1] = ($event) => showFileManager.value = !showFileManager.value),
6768
+ title: unref(t)("fileManager.title")
6769
+ }, [..._cache[6] || (_cache[6] = [createBaseVNode("i", { class: "bi bi-folder2-open" }, null, -1)])], 14, _hoisted_2$4)) : createCommentVNode("", true),
6159
6770
  withDirectives(createBaseVNode("div", {
6160
6771
  class: "ai-chat-wrapper",
6161
6772
  style: normalizeStyle({ width: aiChatWidth.value + "px" }),
@@ -6172,58 +6783,47 @@ var init_terminal_tab_vue_vue_type_script_setup_true_lang = __esmMin((() => {
6172
6783
  connectionId: props.connection.id,
6173
6784
  isOpen: showAIChat.value,
6174
6785
  getTerminalContext,
6175
- onClose: _cache[0] || (_cache[0] = ($event) => showAIChat.value = false),
6786
+ onClose: _cache[2] || (_cache[2] = ($event) => showAIChat.value = false),
6176
6787
  onWsSend: handleAISend,
6177
- onOpenSettings: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("open-ai-settings"))
6788
+ onOpenSettings: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("open-ai-settings"))
6178
6789
  }, null, 8, [
6179
6790
  "sessionId",
6180
6791
  "sessionName",
6181
6792
  "connectionId",
6182
6793
  "isOpen"
6183
6794
  ])], 4), [[vShow, showAIChat.value]]),
6184
- status.value === "connecting" ? (openBlock(), createElementBlock("div", _hoisted_2$4, [_cache[4] || (_cache[4] = createBaseVNode("div", { class: "spinner-border spinner-border-sm text-warning me-2" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("tab.connecting")), 1)])) : createCommentVNode("", true),
6185
- status.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_3$4, [_cache[5] || (_cache[5] = createBaseVNode("i", { class: "bi bi-exclamation-triangle me-2" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("tab.connectionFailed")) + ": " + toDisplayString(errorMessage.value), 1)])) : createCommentVNode("", true),
6186
- status.value === "disconnected" ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
6187
- _cache[7] || (_cache[7] = createBaseVNode("i", { class: "bi bi-wifi-off me-2" }, null, -1)),
6188
- createTextVNode(" " + toDisplayString(unref(t)("tab.disconnected")) + " ", 1),
6189
- createBaseVNode("button", {
6190
- class: "btn btn-sm btn-outline-light ms-3",
6191
- onClick: reconnect
6192
- }, [_cache[6] || (_cache[6] = createBaseVNode("i", { class: "bi bi-arrow-clockwise me-1" }, null, -1)), createTextVNode(toDisplayString(unref(t)("tab.reconnect")), 1)])
6193
- ])) : createCommentVNode("", true),
6194
- status.value === "reconnecting" ? (openBlock(), createElementBlock("div", _hoisted_5$4, [_cache[8] || (_cache[8] = createBaseVNode("div", { class: "spinner-border spinner-border-sm text-warning me-2" }, null, -1)), createTextVNode(" " + toDisplayString(unref(t)("tab.reconnecting")), 1)])) : createCommentVNode("", true),
6195
6795
  contextMenuVisible.value ? (openBlock(), createElementBlock("div", {
6196
- key: 5,
6796
+ key: 3,
6197
6797
  class: "terminal-context-menu",
6198
6798
  style: normalizeStyle({
6199
6799
  left: contextMenuX.value + "px",
6200
6800
  top: contextMenuY.value + "px"
6201
6801
  }),
6202
- onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"]))
6802
+ onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
6203
6803
  }, [createBaseVNode("div", {
6204
6804
  class: "context-menu-item",
6205
6805
  onClick: handleContextCopy
6206
- }, [_cache[9] || (_cache[9] = createBaseVNode("i", { class: "bi bi-clipboard" }, null, -1)), createTextVNode(toDisplayString(unref(t)("context.copy") || "Copy"), 1)]), createBaseVNode("div", {
6806
+ }, [_cache[7] || (_cache[7] = createBaseVNode("i", { class: "bi bi-clipboard" }, null, -1)), createTextVNode(toDisplayString(unref(t)("context.copy") || "Copy"), 1)]), createBaseVNode("div", {
6207
6807
  class: "context-menu-item",
6208
6808
  onClick: handleContextPaste
6209
- }, [_cache[10] || (_cache[10] = createBaseVNode("i", { class: "bi bi-clipboard-check" }, null, -1)), createTextVNode(toDisplayString(unref(t)("context.paste") || "Paste"), 1)])], 4)) : createCommentVNode("", true)
6809
+ }, [_cache[8] || (_cache[8] = createBaseVNode("i", { class: "bi bi-clipboard-check" }, null, -1)), createTextVNode(toDisplayString(unref(t)("context.paste") || "Paste"), 1)])], 4)) : createCommentVNode("", true)
6210
6810
  ], 512);
6211
6811
  };
6212
6812
  }
6213
6813
  });
6214
6814
  }));
6215
6815
  //#endregion
6216
- //#region src/components/terminal-tab.vue?vue&type=style&index=0&scoped=9b473ece&lang.css
6217
- var init_terminal_tab_vue_vue_type_style_index_0_scoped_9b473ece_lang = __esmMin((() => {}));
6816
+ //#region src/components/terminal-tab.vue?vue&type=style&index=0&scoped=bc5864bf&lang.css
6817
+ var init_terminal_tab_vue_vue_type_style_index_0_scoped_bc5864bf_lang = __esmMin((() => {}));
6218
6818
  //#endregion
6219
6819
  //#region src/components/terminal-tab.vue
6220
6820
  var terminal_tab_default;
6221
6821
  var init_terminal_tab = __esmMin((() => {
6222
6822
  init_terminal_tab_vue_vue_type_script_setup_true_lang();
6223
6823
  init_terminal_tab_vue_vue_type_script_setup_true_lang();
6224
- init_terminal_tab_vue_vue_type_style_index_0_scoped_9b473ece_lang();
6824
+ init_terminal_tab_vue_vue_type_style_index_0_scoped_bc5864bf_lang();
6225
6825
  init__plugin_vue_export_helper();
6226
- terminal_tab_default = /* @__PURE__ */ _plugin_vue_export_helper_default(terminal_tab_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-9b473ece"]]);
6826
+ terminal_tab_default = /* @__PURE__ */ _plugin_vue_export_helper_default(terminal_tab_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bc5864bf"]]);
6227
6827
  }));
6228
6828
  //#endregion
6229
6829
  //#region src/components/connection-editor/index.vue?vue&type=script&setup=true&lang.ts
@@ -7622,8 +8222,8 @@ var init_index_vue_vue_type_script_setup_true_lang = __esmMin((() => {
7622
8222
  });
7623
8223
  }));
7624
8224
  //#endregion
7625
- //#region src/views/index.vue?vue&type=style&index=0&scoped=5cfb7c8d&lang.css
7626
- var init_index_vue_vue_type_style_index_0_scoped_5cfb7c8d_lang = __esmMin((() => {}));
8225
+ //#region src/views/index.vue?vue&type=style&index=0&scoped=1c14a0a5&lang.css
8226
+ var init_index_vue_vue_type_style_index_0_scoped_1c14a0a5_lang = __esmMin((() => {}));
7627
8227
  //#endregion
7628
8228
  //#region src/views/index.vue
7629
8229
  var views_default;
@@ -7631,8 +8231,8 @@ var views_default;
7631
8231
  __esmMin((() => {
7632
8232
  init_index_vue_vue_type_script_setup_true_lang();
7633
8233
  init_index_vue_vue_type_script_setup_true_lang();
7634
- init_index_vue_vue_type_style_index_0_scoped_5cfb7c8d_lang();
8234
+ init_index_vue_vue_type_style_index_0_scoped_1c14a0a5_lang();
7635
8235
  init__plugin_vue_export_helper();
7636
- views_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5cfb7c8d"]]);
8236
+ views_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1c14a0a5"]]);
7637
8237
  }))();
7638
8238
  export { views_default as default };