ms-vite-plugin 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/tools.js +10 -15
- package/package.json +1 -1
package/dist/mcp/tools.js
CHANGED
|
@@ -416,19 +416,6 @@ function formatDeviceLogSubscriptionStatus(status) {
|
|
|
416
416
|
return status;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
/**
|
|
420
|
-
* 将 runtime_status 中的布尔值转为中文状态文本
|
|
421
|
-
* @param value 原始布尔值
|
|
422
|
-
* @returns true 返回“是”,false 返回“否”,其它情况返回“unknown”
|
|
423
|
-
* @example
|
|
424
|
-
* formatBooleanStatusText(true)
|
|
425
|
-
*/
|
|
426
|
-
function formatBooleanStatusText(value) {
|
|
427
|
-
if (typeof value === "boolean") {
|
|
428
|
-
return value ? "是" : "否";
|
|
429
|
-
}
|
|
430
|
-
return "未知";
|
|
431
|
-
}
|
|
432
419
|
/**
|
|
433
420
|
* 将 runtime_status 中的内存数值格式化为可读文本
|
|
434
421
|
* @param value 原始数值
|
|
@@ -457,8 +444,16 @@ function formatRuntimeStatusEntry(entry) {
|
|
|
457
444
|
: {};
|
|
458
445
|
return [
|
|
459
446
|
`[${entry.timestamp}]`,
|
|
460
|
-
`UI: ${
|
|
461
|
-
|
|
447
|
+
`UI: ${typeof raw.isUIShowing === "boolean"
|
|
448
|
+
? raw.isUIShowing
|
|
449
|
+
? "显示中"
|
|
450
|
+
: "未显示"
|
|
451
|
+
: "未知"}`,
|
|
452
|
+
`脚本: ${typeof raw.isRunning === "boolean"
|
|
453
|
+
? raw.isRunning
|
|
454
|
+
? "运行中"
|
|
455
|
+
: "未运行"
|
|
456
|
+
: "未知"}`,
|
|
462
457
|
`总内存: ${formatRuntimeMetricText(memory.total, " MB")}`,
|
|
463
458
|
`可用: ${formatRuntimeMetricText(memory.available, " MB")}`,
|
|
464
459
|
`已用: ${formatRuntimeMetricText(memory.used, " MB")}`,
|