diff --git a/main/manager-web/src/components/McpToolCallDialog.vue b/main/manager-web/src/components/McpToolCallDialog.vue
index eb7ef85f..d271c3ff 100644
--- a/main/manager-web/src/components/McpToolCallDialog.vue
+++ b/main/manager-web/src/components/McpToolCallDialog.vue
@@ -30,7 +30,7 @@
@@ -160,15 +160,18 @@
-
+
@@ -226,11 +229,20 @@ export default {
};
},
created() {
- // 在created钩子中初始化themeOptions,此时this.$t已经可用
- this.themeOptions = [
- { label: this.$t("mcpToolCall.lightTheme"), value: "light" },
- { label: this.$t("mcpToolCall.darkTheme"), value: "dark" },
- ];
+ // 初始化主题选项
+ this.initializeThemeOptions();
+
+ // 添加对语言变化的监听
+ if (this.$eventBus) {
+ this.$eventBus.$on("languageChanged", this.initializeThemeOptions);
+ }
+ },
+
+ beforeDestroy() {
+ // 移除事件监听,避免内存泄漏
+ if (this.$eventBus) {
+ this.$eventBus.$off("languageChanged", this.initializeThemeOptions);
+ }
},
computed: {
selectedTool() {
@@ -242,7 +254,8 @@ export default {
return this.toolList.filter(
(tool) =>
tool.name.toLowerCase().includes(keyword) ||
- tool.description.toLowerCase().includes(keyword)
+ tool.description.toLowerCase().includes(keyword) ||
+ this.getToolDisplayName(tool.name).toLowerCase().includes(keyword)
);
},
formattedExecutionResult() {
@@ -275,6 +288,17 @@ export default {
},
},
methods: {
+ // 初始化主题选项
+ initializeThemeOptions() {
+ this.themeOptions = [
+ { label: this.$t("mcpToolCall.lightTheme"), value: "light" },
+ { label: this.$t("mcpToolCall.darkTheme"), value: "dark" },
+ ];
+ this.$nextTick(() => {
+ this.$forceUpdate();
+ });
+ },
+
// 添加handleThemeChange方法强制更新视图
handleThemeChange() {
this.$nextTick(() => {
@@ -305,8 +329,8 @@ export default {
if (deviceData.audio_speaker) {
if (deviceData.audio_speaker.volume !== undefined) {
tableData.push({
- category: "音频扬声器",
- property: "音量",
+ category: this.$t("mcpToolCall.table.audioSpeaker"),
+ property: this.$t("mcpToolCall.prop.volume"),
value: deviceData.audio_speaker.volume + "%",
});
}
@@ -315,16 +339,19 @@ export default {
if (deviceData.screen) {
if (deviceData.screen.brightness !== undefined) {
tableData.push({
- category: "屏幕",
- property: "亮度",
+ category: this.$t("mcpToolCall.table.screen"),
+ property: this.$t("mcpToolCall.prop.brightness"),
value: deviceData.screen.brightness + "%",
});
}
if (deviceData.screen.theme !== undefined) {
tableData.push({
- category: "屏幕",
- property: "主题",
- value: deviceData.screen.theme === "dark" ? "深色" : "浅色",
+ category: this.$t("mcpToolCall.table.screen"),
+ property: this.$t("mcpToolCall.prop.theme"),
+ value:
+ deviceData.screen.theme === "dark"
+ ? this.$t("mcpToolCall.darkTheme")
+ : this.$t("mcpToolCall.lightTheme"),
});
}
}
@@ -332,27 +359,27 @@ export default {
if (deviceData.network) {
if (deviceData.network.type !== undefined) {
tableData.push({
- category: "网络",
- property: "类型",
+ category: this.$t("mcpToolCall.table.network"),
+ property: this.$t("mcpToolCall.prop.type"),
value: deviceData.network.type.toUpperCase(),
});
}
if (deviceData.network.ssid !== undefined) {
tableData.push({
- category: "网络",
- property: "SSID",
+ category: this.$t("mcpToolCall.table.network"),
+ property: this.$t("mcpToolCall.prop.ssid"),
value: deviceData.network.ssid,
});
}
if (deviceData.network.signal !== undefined) {
const signalMap = {
- strong: "强",
- medium: "中",
- weak: "弱",
+ strong: this.$t("mcpToolCall.text.strong"),
+ medium: this.$t("mcpToolCall.text.medium"),
+ weak: this.$t("mcpToolCall.text.weak"),
};
tableData.push({
- category: "网络",
- property: "信号强度",
+ category: this.$t("mcpToolCall.table.network"),
+ property: this.$t("mcpToolCall.prop.signalStrength"),
value: signalMap[deviceData.network.signal] || deviceData.network.signal,
});
}
@@ -367,27 +394,35 @@ export default {
if (toolName === "self.audio_speaker.set_volume") {
tableData.push({
- category: "音频控制",
- property: "操作结果",
- value: result.success ? "设置成功" : "设置失败",
+ category: this.$t("mcpToolCall.table.audioControl"),
+ property: this.$t("mcpToolCall.prop.operationResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.setSuccess")
+ : this.$t("mcpToolCall.text.setFailed"),
});
} else if (toolName === "self.screen.set_brightness") {
tableData.push({
- category: "屏幕控制",
- property: "操作结果",
- value: result.success ? "亮度设置成功" : "亮度设置失败",
+ category: this.$t("mcpToolCall.table.screenControl"),
+ property: this.$t("mcpToolCall.prop.operationResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.brightnessSetSuccess")
+ : this.$t("mcpToolCall.text.brightnessSetFailed"),
});
} else if (toolName === "self.screen.set_theme") {
tableData.push({
- category: "屏幕控制",
- property: "操作结果",
- value: result.success ? "主题设置成功" : "主题设置失败",
+ category: this.$t("mcpToolCall.table.screenControl"),
+ property: this.$t("mcpToolCall.prop.operationResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.themeSetSuccess")
+ : this.$t("mcpToolCall.text.themeSetFailed"),
});
} else if (toolName === "self.reboot") {
tableData.push({
- category: "系统控制",
- property: "操作结果",
- value: result.success ? "重启指令已发送" : "重启失败",
+ category: this.$t("mcpToolCall.table.systemControl"),
+ property: this.$t("mcpToolCall.prop.operationResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.rebootCommandSent")
+ : this.$t("mcpToolCall.text.rebootFailed"),
});
} else if (toolName === "self.screen.get_info") {
// 解析屏幕信息
@@ -402,38 +437,44 @@ export default {
const screenInfo = JSON.parse(result.data.content[0].text);
if (screenInfo.width !== undefined) {
tableData.push({
- category: "屏幕信息",
- property: "宽度",
+ category: this.$t("mcpToolCall.table.screenInfo"),
+ property: this.$t("mcpToolCall.prop.width"),
value: screenInfo.width + "像素",
});
}
if (screenInfo.height !== undefined) {
tableData.push({
- category: "屏幕信息",
- property: "高度",
+ category: this.$t("mcpToolCall.table.screenInfo"),
+ property: this.$t("mcpToolCall.prop.height"),
value: screenInfo.height + "像素",
});
}
if (screenInfo.monochrome !== undefined) {
tableData.push({
- category: "屏幕信息",
- property: "类型",
- value: screenInfo.monochrome ? "单色屏" : "彩色屏",
+ category: this.$t("mcpToolCall.table.screenInfo"),
+ property: this.$t("mcpToolCall.prop.screenType"),
+ value: screenInfo.monochrome
+ ? this.$t("mcpToolCall.text.monochrome")
+ : this.$t("mcpToolCall.text.color"),
});
}
} catch (parseError) {
// 解析失败时显示原始信息
tableData.push({
- category: "屏幕信息",
- property: "获取结果",
- value: result.success ? "获取成功,但解析失败" : "获取失败",
+ category: this.$t("mcpToolCall.table.screenInfo"),
+ property: this.$t("mcpToolCall.prop.getResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.getSuccessParseFailed")
+ : this.$t("mcpToolCall.text.getFailed"),
});
}
} else {
tableData.push({
- category: "屏幕信息",
- property: "获取结果",
- value: result.success ? "获取成功,但数据格式异常" : "获取失败",
+ category: this.$t("mcpToolCall.table.screenInfo"),
+ property: this.$t("mcpToolCall.prop.getResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.getSuccessFormatError")
+ : this.$t("mcpToolCall.text.getFailed"),
});
}
} else if (toolName === "self.get_system_info") {
@@ -451,8 +492,8 @@ export default {
// 基本信息
if (systemInfo.chip_model_name) {
tableData.push({
- category: "硬件信息",
- property: "芯片型号",
+ category: this.$t("mcpToolCall.table.hardwareInfo"),
+ property: this.$t("mcpToolCall.prop.chipModel"),
value: systemInfo.chip_model_name.toUpperCase(),
});
}
@@ -460,15 +501,15 @@ export default {
if (systemInfo.chip_info) {
if (systemInfo.chip_info.cores) {
tableData.push({
- category: "硬件信息",
- property: "CPU核心数",
+ category: this.$t("mcpToolCall.table.hardwareInfo"),
+ property: this.$t("mcpToolCall.prop.cpuCores"),
value: systemInfo.chip_info.cores + "核",
});
}
if (systemInfo.chip_info.revision) {
tableData.push({
- category: "硬件信息",
- property: "芯片版本",
+ category: this.$t("mcpToolCall.table.hardwareInfo"),
+ property: this.$t("mcpToolCall.prop.chipVersion"),
value: "Rev " + systemInfo.chip_info.revision,
});
}
@@ -476,8 +517,8 @@ export default {
if (systemInfo.flash_size) {
tableData.push({
- category: "硬件信息",
- property: "Flash大小",
+ category: this.$t("mcpToolCall.table.hardwareInfo"),
+ property: this.$t("mcpToolCall.prop.flashSize"),
value: (systemInfo.flash_size / 1024 / 1024).toFixed(0) + " MB",
});
}
@@ -485,8 +526,8 @@ export default {
// 内存信息
if (systemInfo.minimum_free_heap_size) {
tableData.push({
- category: "内存信息",
- property: "最小可用堆",
+ category: this.$t("mcpToolCall.table.memoryInfo"),
+ property: this.$t("mcpToolCall.prop.minFreeHeap"),
value:
(parseInt(systemInfo.minimum_free_heap_size) / 1024).toFixed(0) + " KB",
});
@@ -496,29 +537,29 @@ export default {
if (systemInfo.application) {
if (systemInfo.application.name) {
tableData.push({
- category: "应用信息",
- property: "应用名称",
+ category: this.$t("mcpToolCall.table.applicationInfo"),
+ property: this.$t("mcpToolCall.prop.applicationName"),
value: systemInfo.application.name,
});
}
if (systemInfo.application.version) {
tableData.push({
- category: "应用信息",
- property: "应用版本",
+ category: this.$t("mcpToolCall.table.applicationInfo"),
+ property: this.$t("mcpToolCall.prop.applicationVersion"),
value: systemInfo.application.version,
});
}
if (systemInfo.application.compile_time) {
tableData.push({
- category: "应用信息",
- property: "编译时间",
+ category: this.$t("mcpToolCall.table.applicationInfo"),
+ property: this.$t("mcpToolCall.prop.compileTime"),
value: systemInfo.application.compile_time,
});
}
if (systemInfo.application.idf_version) {
tableData.push({
- category: "应用信息",
- property: "IDF版本",
+ category: this.$t("mcpToolCall.table.applicationInfo"),
+ property: this.$t("mcpToolCall.prop.idfVersion"),
value: systemInfo.application.idf_version,
});
}
@@ -527,8 +568,8 @@ export default {
// 网络信息
if (systemInfo.mac_address) {
tableData.push({
- category: "网络信息",
- property: "MAC地址",
+ category: this.$t("mcpToolCall.table.networkInfo"),
+ property: this.$t("mcpToolCall.prop.macAddress"),
value: systemInfo.mac_address,
});
}
@@ -536,34 +577,36 @@ export default {
if (systemInfo.board) {
if (systemInfo.board.ip) {
tableData.push({
- category: "网络信息",
- property: "IP地址",
+ category: this.$t("mcpToolCall.table.networkInfo"),
+ property: this.$t("mcpToolCall.prop.ipAddress"),
value: systemInfo.board.ip,
});
}
if (systemInfo.board.ssid) {
tableData.push({
- category: "网络信息",
- property: "WiFi名称",
+ category: this.$t("mcpToolCall.table.networkInfo"),
+ property: this.$t("mcpToolCall.prop.wifiName"),
value: systemInfo.board.ssid,
});
}
if (systemInfo.board.rssi) {
const signalStrength = systemInfo.board.rssi;
- let signalLevel = "弱";
- if (signalStrength > -50) signalLevel = "强";
- else if (signalStrength > -70) signalLevel = "中";
+ let signalLevel = this.$t("mcpToolCall.text.weak");
+ if (signalStrength > -50)
+ signalLevel = this.$t("mcpToolCall.text.strong");
+ else if (signalStrength > -70)
+ signalLevel = this.$t("mcpToolCall.text.medium");
tableData.push({
- category: "网络信息",
- property: "信号强度",
+ category: this.$t("mcpToolCall.table.networkInfo"),
+ property: this.$t("mcpToolCall.prop.signalStrength"),
value: `${signalStrength} dBm (${signalLevel})`,
});
}
if (systemInfo.board.channel) {
tableData.push({
- category: "网络信息",
- property: "WiFi信道",
+ category: this.$t("mcpToolCall.table.networkInfo"),
+ property: this.$t("mcpToolCall.prop.wifiChannel"),
value: systemInfo.board.channel + "频道",
});
}
@@ -573,16 +616,18 @@ export default {
if (systemInfo.display) {
if (systemInfo.display.width && systemInfo.display.height) {
tableData.push({
- category: "显示信息",
- property: "屏幕尺寸",
+ category: this.$t("mcpToolCall.table.displayInfo"),
+ property: this.$t("mcpToolCall.prop.screenSize"),
value: `${systemInfo.display.width} × ${systemInfo.display.height}`,
});
}
if (systemInfo.display.monochrome !== undefined) {
tableData.push({
- category: "显示信息",
- property: "屏幕类型",
- value: systemInfo.display.monochrome ? "单色屏" : "彩色屏",
+ category: this.$t("mcpToolCall.table.displayInfo"),
+ property: this.$t("mcpToolCall.prop.screenType"),
+ value: systemInfo.display.monochrome
+ ? this.$t("mcpToolCall.text.monochrome")
+ : this.$t("mcpToolCall.text.color"),
});
}
}
@@ -590,40 +635,44 @@ export default {
// 其他信息
if (systemInfo.uuid) {
tableData.push({
- category: "设备信息",
- property: "设备UUID",
+ category: this.$t("mcpToolCall.table.deviceInfo"),
+ property: this.$t("mcpToolCall.prop.deviceUuid"),
value: systemInfo.uuid,
});
}
if (systemInfo.language) {
tableData.push({
- category: "设备信息",
- property: "系统语言",
+ category: this.$t("mcpToolCall.table.deviceInfo"),
+ property: this.$t("mcpToolCall.prop.systemLanguage"),
value: systemInfo.language,
});
}
if (systemInfo.ota && systemInfo.ota.label) {
tableData.push({
- category: "系统信息",
- property: "当前OTA分区",
+ category: this.$t("mcpToolCall.table.systemInfo"),
+ property: this.$t("mcpToolCall.prop.currentOtaPartition"),
value: systemInfo.ota.label,
});
}
} catch (parseError) {
// 解析失败时显示原始信息
tableData.push({
- category: "系统信息",
- property: "获取结果",
- value: result.success ? "获取成功,但解析失败" : "获取失败",
+ category: this.$t("mcpToolCall.table.systemInfo"),
+ property: this.$t("mcpToolCall.prop.getResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.getSuccessParseFailed")
+ : this.$t("mcpToolCall.text.getFailed"),
});
}
} else {
tableData.push({
- category: "系统信息",
- property: "获取结果",
- value: result.success ? "获取成功,但数据格式异常" : "获取失败",
+ category: this.$t("mcpToolCall.table.systemInfo"),
+ property: this.$t("mcpToolCall.prop.getResult"),
+ value: result.success
+ ? this.$t("mcpToolCall.text.getSuccessFormatError")
+ : this.$t("mcpToolCall.text.getFailed"),
});
}
}
@@ -817,14 +866,14 @@ export default {
},
formatPropertyLabel(key, property) {
- // 将属性名转换为更友好的中文标签
+ // 将属性名转换为更友好的标签
const labelMap = {
- volume: "音量",
- brightness: "亮度",
- theme: "主题",
- question: "问题",
- url: "网址",
- quality: "质量",
+ volume: this.$t("mcpToolCall.prop.volume"),
+ brightness: this.$t("mcpToolCall.prop.brightness"),
+ theme: this.$t("mcpToolCall.prop.theme"),
+ question: this.$t("mcpToolCall.prop.question"),
+ url: this.$t("mcpToolCall.prop.url"),
+ quality: this.$t("mcpToolCall.prop.quality"),
};
return labelMap[key] || key;
},
@@ -832,35 +881,36 @@ export default {
// 获取工具的显示名称
getToolDisplayName(toolName) {
const nameMap = {
- "self.get_device_status": "查看设备状态",
- "self.audio_speaker.set_volume": "设置音量",
- "self.screen.set_brightness": "设置亮度",
- "self.screen.set_theme": "设置主题",
- "self.camera.take_photo": "拍照识别",
- "self.get_system_info": "系统信息",
- "self.reboot": "重启设备",
- "self.upgrade_firmware": "升级固件",
- "self.screen.get_info": "屏幕信息",
- "self.screen.snapshot": "屏幕截图",
- "self.screen.preview_image": "预览图片",
- "self.assets.set_download_url": "设置下载地址",
+ "self.get_device_status": this.$t("mcpToolCall.toolName.getDeviceStatus"),
+ "self.audio_speaker.set_volume": this.$t("mcpToolCall.toolName.setVolume"),
+ "self.screen.set_brightness": this.$t("mcpToolCall.toolName.setBrightness"),
+ "self.screen.set_theme": this.$t("mcpToolCall.toolName.setTheme"),
+ "self.camera.take_photo": this.$t("mcpToolCall.toolName.takePhoto"),
+ "self.get_system_info": this.$t("mcpToolCall.toolName.getSystemInfo"),
+ "self.reboot": this.$t("mcpToolCall.toolName.reboot"),
+ "self.upgrade_firmware": this.$t("mcpToolCall.toolName.upgradeFirmware"),
+ "self.screen.get_info": this.$t("mcpToolCall.toolName.getScreenInfo"),
+ "self.screen.snapshot": this.$t("mcpToolCall.toolName.snapshot"),
+ "self.screen.preview_image": this.$t("mcpToolCall.toolName.previewImage"),
+ "self.assets.set_download_url": this.$t("mcpToolCall.toolName.setDownloadUrl"),
};
return nameMap[toolName] || toolName;
},
// 获取工具分类
getToolCategory(toolName) {
- if (toolName.includes("audio_speaker")) return "音频";
- if (toolName.includes("screen")) return "显示";
- if (toolName.includes("camera")) return "拍摄";
+ if (toolName.includes("audio_speaker"))
+ return this.$t("mcpToolCall.category.audio");
+ if (toolName.includes("screen")) return this.$t("mcpToolCall.category.display");
+ if (toolName.includes("camera")) return this.$t("mcpToolCall.category.camera");
if (
toolName.includes("system") ||
toolName.includes("reboot") ||
toolName.includes("upgrade")
)
- return "系统";
- if (toolName.includes("assets")) return "资源";
- return "设备信息";
+ return this.$t("mcpToolCall.category.system");
+ if (toolName.includes("assets")) return this.$t("mcpToolCall.category.assets");
+ return this.$t("mcpToolCall.category.deviceInfo");
},
// 获取简化的工具描述
@@ -872,19 +922,18 @@ export default {
// 获取工具帮助文本
getToolHelpText(toolName) {
const helpMap = {
- "self.get_device_status": "查看设备的当前运行状态,包括音量、屏幕、电池等信息。",
- "self.audio_speaker.set_volume": "调整设备的音量大小,请输入0-100之间的数值。",
- "self.screen.set_brightness": "调整设备屏幕的亮度,请输入0-100之间的数值。",
- "self.screen.set_theme": "切换设备屏幕的显示主题,可以选择浅色或深色模式。",
- "self.camera.take_photo":
- "使用设备摄像头拍摄照片并进行识别分析,请输入要询问的问题。",
- "self.get_system_info": "获取设备的系统信息,包括硬件规格、软件版本等。",
- "self.reboot": "重启设备,执行后设备将重新启动。",
- "self.upgrade_firmware": "从指定URL下载并升级设备固件,升级后设备会自动重启。",
- "self.screen.get_info": "获取屏幕的详细信息,如分辨率、尺寸等参数。",
- "self.screen.snapshot": "对当前屏幕进行截图并上传到指定URL。",
- "self.screen.preview_image": "在设备屏幕上预览指定URL的图片。",
- "self.assets.set_download_url": "设置设备资源文件的下载地址。",
+ "self.get_device_status": this.$t("mcpToolCall.help.getDeviceStatus"),
+ "self.audio_speaker.set_volume": this.$t("mcpToolCall.help.setVolume"),
+ "self.screen.set_brightness": this.$t("mcpToolCall.help.setBrightness"),
+ "self.screen.set_theme": this.$t("mcpToolCall.help.setTheme"),
+ "self.camera.take_photo": this.$t("mcpToolCall.help.takePhoto"),
+ "self.get_system_info": this.$t("mcpToolCall.help.getSystemInfo"),
+ "self.reboot": this.$t("mcpToolCall.help.reboot"),
+ "self.upgrade_firmware": this.$t("mcpToolCall.help.upgradeFirmware"),
+ "self.screen.get_info": this.$t("mcpToolCall.help.getScreenInfo"),
+ "self.screen.snapshot": this.$t("mcpToolCall.help.snapshot"),
+ "self.screen.preview_image": this.$t("mcpToolCall.help.previewImage"),
+ "self.assets.set_download_url": this.$t("mcpToolCall.help.setDownloadUrl"),
};
return helpMap[toolName] || "";
},
diff --git a/main/manager-web/src/i18n/en.js b/main/manager-web/src/i18n/en.js
index b5d7b856..462f0ed1 100644
--- a/main/manager-web/src/i18n/en.js
+++ b/main/manager-web/src/i18n/en.js
@@ -29,6 +29,115 @@ export default {
'mcpToolCall.executionResult': '3、Execution Result',
'mcpToolCall.copyResult': 'Copy Result',
'mcpToolCall.noResultYet': 'No result yet',
+ 'mcpToolCall.loadingToolList': 'Loading tool list...',
+
+ // Tool names
+ 'mcpToolCall.toolName.getDeviceStatus': 'View Device Status',
+ 'mcpToolCall.toolName.setVolume': 'Set Volume',
+ 'mcpToolCall.toolName.setBrightness': 'Set Brightness',
+ 'mcpToolCall.toolName.setTheme': 'Set Theme',
+ 'mcpToolCall.toolName.takePhoto': 'Take Photo & Recognize',
+ 'mcpToolCall.toolName.getSystemInfo': 'System Info',
+ 'mcpToolCall.toolName.reboot': 'Reboot Device',
+ 'mcpToolCall.toolName.upgradeFirmware': 'Upgrade Firmware',
+ 'mcpToolCall.toolName.getScreenInfo': 'Screen Info',
+ 'mcpToolCall.toolName.snapshot': 'Screen Snapshot',
+ 'mcpToolCall.toolName.previewImage': 'Preview Image',
+ 'mcpToolCall.toolName.setDownloadUrl': 'Set Download URL',
+
+ // Tool categories
+ 'mcpToolCall.category.audio': 'Audio',
+ 'mcpToolCall.category.display': 'Display',
+ 'mcpToolCall.category.camera': 'Camera',
+ 'mcpToolCall.category.system': 'System',
+ 'mcpToolCall.category.assets': 'Assets',
+ 'mcpToolCall.category.deviceInfo': 'Device Info',
+
+ // Table categories and properties
+ 'mcpToolCall.table.audioSpeaker': 'Audio Speaker',
+ 'mcpToolCall.table.screen': 'Screen',
+ 'mcpToolCall.table.network': 'Network',
+ 'mcpToolCall.table.audioControl': 'Audio Control',
+ 'mcpToolCall.table.screenControl': 'Screen Control',
+ 'mcpToolCall.table.systemControl': 'System Control',
+ 'mcpToolCall.table.screenInfo': 'Screen Info',
+ 'mcpToolCall.table.hardwareInfo': 'Hardware Info',
+ 'mcpToolCall.table.memoryInfo': 'Memory Info',
+ 'mcpToolCall.table.applicationInfo': 'Application Info',
+ 'mcpToolCall.table.networkInfo': 'Network Info',
+ 'mcpToolCall.table.displayInfo': 'Display Info',
+ 'mcpToolCall.table.deviceInfo': 'Device Info',
+ 'mcpToolCall.table.systemInfo': 'System Info',
+ // Table column headers
+ 'mcpToolCall.table.component': 'Component',
+ 'mcpToolCall.table.property': 'Property',
+ 'mcpToolCall.table.value': 'Value',
+
+ 'mcpToolCall.prop.volume': 'Volume',
+ 'mcpToolCall.prop.brightness': 'Brightness',
+ 'mcpToolCall.prop.theme': 'Theme',
+ 'mcpToolCall.prop.type': 'Type',
+ 'mcpToolCall.prop.ssid': 'SSID',
+ 'mcpToolCall.prop.signalStrength': 'Signal Strength',
+ 'mcpToolCall.prop.operationResult': 'Operation Result',
+ 'mcpToolCall.prop.width': 'Width',
+ 'mcpToolCall.prop.height': 'Height',
+ 'mcpToolCall.prop.screenType': 'Type',
+ 'mcpToolCall.prop.chipModel': 'Chip Model',
+ 'mcpToolCall.prop.cpuCores': 'CPU Cores',
+ 'mcpToolCall.prop.chipVersion': 'Chip Version',
+ 'mcpToolCall.prop.flashSize': 'Flash Size',
+ 'mcpToolCall.prop.minFreeHeap': 'Minimum Free Heap',
+ 'mcpToolCall.prop.applicationName': 'Application Name',
+ 'mcpToolCall.prop.applicationVersion': 'Application Version',
+ 'mcpToolCall.prop.compileTime': 'Compile Time',
+ 'mcpToolCall.prop.idfVersion': 'IDF Version',
+ 'mcpToolCall.prop.macAddress': 'MAC Address',
+ 'mcpToolCall.prop.ipAddress': 'IP Address',
+ 'mcpToolCall.prop.wifiName': 'WiFi Name',
+ 'mcpToolCall.prop.wifiChannel': 'WiFi Channel',
+ 'mcpToolCall.prop.screenSize': 'Screen Size',
+ 'mcpToolCall.prop.deviceUuid': 'Device UUID',
+ 'mcpToolCall.prop.systemLanguage': 'System Language',
+ 'mcpToolCall.prop.currentOtaPartition': 'Current OTA Partition',
+ 'mcpToolCall.prop.getResult': 'Get Result',
+ 'mcpToolCall.prop.url': 'URL',
+ 'mcpToolCall.prop.quality': 'Quality',
+ 'mcpToolCall.prop.question': 'Question',
+
+ // Tool help texts
+ 'mcpToolCall.help.getDeviceStatus': 'View the current running status of the device, including volume, screen, battery and other information.',
+ 'mcpToolCall.help.setVolume': 'Adjust the volume of the device, please enter a value between 0-100.',
+ 'mcpToolCall.help.setBrightness': 'Adjust the brightness of the device screen, please enter a value between 0-100.',
+ 'mcpToolCall.help.setTheme': 'Switch the display theme of the device screen, you can choose light or dark mode.',
+ 'mcpToolCall.help.takePhoto': 'Take photos with the device camera and perform recognition analysis, please enter the question you want to ask.',
+ 'mcpToolCall.help.getSystemInfo': 'Get the system information of the device, including hardware specifications, software version, etc.',
+ 'mcpToolCall.help.reboot': 'Reboot the device, the device will restart after execution.',
+ 'mcpToolCall.help.upgradeFirmware': 'Download and upgrade the device firmware from the specified URL, the device will restart automatically after the upgrade.',
+ 'mcpToolCall.help.getScreenInfo': 'Get detailed information about the screen, such as resolution, size and other parameters.',
+ 'mcpToolCall.help.snapshot': 'Take a screenshot of the current screen and upload it to the specified URL.',
+ 'mcpToolCall.help.previewImage': 'Preview images from the specified URL on the device screen.',
+ 'mcpToolCall.help.setDownloadUrl': 'Set the download address for device resource files.',
+
+ // Other text
+ 'mcpToolCall.text.strong': 'Strong',
+ 'mcpToolCall.text.medium': 'Medium',
+ 'mcpToolCall.text.weak': 'Weak',
+ 'mcpToolCall.text.dark': 'Dark',
+ 'mcpToolCall.text.light': 'Light',
+ 'mcpToolCall.text.setSuccess': 'Setting successful',
+ 'mcpToolCall.text.setFailed': 'Setting failed',
+ 'mcpToolCall.text.brightnessSetSuccess': 'Brightness setting successful',
+ 'mcpToolCall.text.brightnessSetFailed': 'Brightness setting failed',
+ 'mcpToolCall.text.themeSetSuccess': 'Theme setting successful',
+ 'mcpToolCall.text.themeSetFailed': 'Theme setting failed',
+ 'mcpToolCall.text.rebootCommandSent': 'Reboot command sent',
+ 'mcpToolCall.text.rebootFailed': 'Reboot failed',
+ 'mcpToolCall.text.monochrome': 'Monochrome Screen',
+ 'mcpToolCall.text.color': 'Color Screen',
+ 'mcpToolCall.text.getSuccessParseFailed': 'Get successful, but parse failed',
+ 'mcpToolCall.text.getFailed': 'Get failed',
+ 'mcpToolCall.text.getSuccessFormatError': 'Get successful, but data format is abnormal',
// Dictionary data dialog related
'dictDataDialog.addDictData': 'Add Dictionary Data',
diff --git a/main/manager-web/src/i18n/zh_CN.js b/main/manager-web/src/i18n/zh_CN.js
index 323e936e..332e8d43 100644
--- a/main/manager-web/src/i18n/zh_CN.js
+++ b/main/manager-web/src/i18n/zh_CN.js
@@ -29,6 +29,115 @@ export default {
'mcpToolCall.executionResult': '3、执行结果',
'mcpToolCall.copyResult': '复制结果',
'mcpToolCall.noResultYet': '暂无执行结果',
+ 'mcpToolCall.loadingToolList': '正在获取工具列表...',
+
+ // 工具名称
+ 'mcpToolCall.toolName.getDeviceStatus': '查看设备状态',
+ 'mcpToolCall.toolName.setVolume': '设置音量',
+ 'mcpToolCall.toolName.setBrightness': '设置亮度',
+ 'mcpToolCall.toolName.setTheme': '设置主题',
+ 'mcpToolCall.toolName.takePhoto': '拍照识别',
+ 'mcpToolCall.toolName.getSystemInfo': '系统信息',
+ 'mcpToolCall.toolName.reboot': '重启设备',
+ 'mcpToolCall.toolName.upgradeFirmware': '升级固件',
+ 'mcpToolCall.toolName.getScreenInfo': '屏幕信息',
+ 'mcpToolCall.toolName.snapshot': '屏幕截图',
+ 'mcpToolCall.toolName.previewImage': '预览图片',
+ 'mcpToolCall.toolName.setDownloadUrl': '设置下载地址',
+
+ // 工具分类
+ 'mcpToolCall.category.audio': '音频',
+ 'mcpToolCall.category.display': '显示',
+ 'mcpToolCall.category.camera': '拍摄',
+ 'mcpToolCall.category.system': '系统',
+ 'mcpToolCall.category.assets': '资源',
+ 'mcpToolCall.category.deviceInfo': '设备信息',
+
+ // 表格分类和属性
+ 'mcpToolCall.table.audioSpeaker': '音频扬声器',
+ 'mcpToolCall.table.screen': '屏幕',
+ 'mcpToolCall.table.network': '网络',
+ 'mcpToolCall.table.audioControl': '音频控制',
+ 'mcpToolCall.table.screenControl': '屏幕控制',
+ 'mcpToolCall.table.systemControl': '系统控制',
+ 'mcpToolCall.table.screenInfo': '屏幕信息',
+ 'mcpToolCall.table.hardwareInfo': '硬件信息',
+ 'mcpToolCall.table.memoryInfo': '内存信息',
+ 'mcpToolCall.table.applicationInfo': '应用信息',
+ 'mcpToolCall.table.networkInfo': '网络信息',
+ 'mcpToolCall.table.displayInfo': '显示信息',
+ 'mcpToolCall.table.deviceInfo': '设备信息',
+ 'mcpToolCall.table.systemInfo': '系统信息',
+ // 表格列标题
+ 'mcpToolCall.table.component': '组件',
+ 'mcpToolCall.table.property': '属性',
+ 'mcpToolCall.table.value': '值',
+
+ 'mcpToolCall.prop.volume': '音量',
+ 'mcpToolCall.prop.brightness': '亮度',
+ 'mcpToolCall.prop.theme': '主题',
+ 'mcpToolCall.prop.type': '类型',
+ 'mcpToolCall.prop.ssid': 'SSID',
+ 'mcpToolCall.prop.signalStrength': '信号强度',
+ 'mcpToolCall.prop.operationResult': '操作结果',
+ 'mcpToolCall.prop.width': '宽度',
+ 'mcpToolCall.prop.height': '高度',
+ 'mcpToolCall.prop.screenType': '类型',
+ 'mcpToolCall.prop.chipModel': '芯片型号',
+ 'mcpToolCall.prop.cpuCores': 'CPU核心数',
+ 'mcpToolCall.prop.chipVersion': '芯片版本',
+ 'mcpToolCall.prop.flashSize': 'Flash大小',
+ 'mcpToolCall.prop.minFreeHeap': '最小可用堆',
+ 'mcpToolCall.prop.applicationName': '应用名称',
+ 'mcpToolCall.prop.applicationVersion': '应用版本',
+ 'mcpToolCall.prop.compileTime': '编译时间',
+ 'mcpToolCall.prop.idfVersion': 'IDF版本',
+ 'mcpToolCall.prop.macAddress': 'MAC地址',
+ 'mcpToolCall.prop.ipAddress': 'IP地址',
+ 'mcpToolCall.prop.wifiName': 'WiFi名称',
+ 'mcpToolCall.prop.wifiChannel': 'WiFi信道',
+ 'mcpToolCall.prop.screenSize': '屏幕尺寸',
+ 'mcpToolCall.prop.deviceUuid': '设备UUID',
+ 'mcpToolCall.prop.systemLanguage': '系统语言',
+ 'mcpToolCall.prop.currentOtaPartition': '当前OTA分区',
+ 'mcpToolCall.prop.getResult': '获取结果',
+ 'mcpToolCall.prop.url': 'URL',
+ 'mcpToolCall.prop.quality': '质量',
+ 'mcpToolCall.prop.question': '问题',
+
+ // 工具帮助文本
+ 'mcpToolCall.help.getDeviceStatus': '查看设备的当前运行状态,包括音量、屏幕、电池等信息。',
+ 'mcpToolCall.help.setVolume': '调整设备的音量大小,请输入0-100之间的数值。',
+ 'mcpToolCall.help.setBrightness': '调整设备屏幕的亮度,请输入0-100之间的数值。',
+ 'mcpToolCall.help.setTheme': '切换设备屏幕的显示主题,可以选择浅色或深色模式。',
+ 'mcpToolCall.help.takePhoto': '使用设备摄像头拍摄照片并进行识别分析,请输入要询问的问题。',
+ 'mcpToolCall.help.getSystemInfo': '获取设备的系统信息,包括硬件规格、软件版本等。',
+ 'mcpToolCall.help.reboot': '重启设备,执行后设备将重新启动。',
+ 'mcpToolCall.help.upgradeFirmware': '从指定URL下载并升级设备固件,升级后设备会自动重启。',
+ 'mcpToolCall.help.getScreenInfo': '获取屏幕的详细信息,如分辨率、尺寸等参数。',
+ 'mcpToolCall.help.snapshot': '对当前屏幕进行截图并上传到指定URL。',
+ 'mcpToolCall.help.previewImage': '在设备屏幕上预览指定URL的图片。',
+ 'mcpToolCall.help.setDownloadUrl': '设置设备资源文件的下载地址。',
+
+ // 其他文本
+ 'mcpToolCall.text.strong': '强',
+ 'mcpToolCall.text.medium': '中',
+ 'mcpToolCall.text.weak': '弱',
+ 'mcpToolCall.text.dark': '深色',
+ 'mcpToolCall.text.light': '浅色',
+ 'mcpToolCall.text.setSuccess': '设置成功',
+ 'mcpToolCall.text.setFailed': '设置失败',
+ 'mcpToolCall.text.brightnessSetSuccess': '亮度设置成功',
+ 'mcpToolCall.text.brightnessSetFailed': '亮度设置失败',
+ 'mcpToolCall.text.themeSetSuccess': '主题设置成功',
+ 'mcpToolCall.text.themeSetFailed': '主题设置失败',
+ 'mcpToolCall.text.rebootCommandSent': '重启指令已发送',
+ 'mcpToolCall.text.rebootFailed': '重启失败',
+ 'mcpToolCall.text.monochrome': '单色屏',
+ 'mcpToolCall.text.color': '彩色屏',
+ 'mcpToolCall.text.getSuccessParseFailed': '获取成功,但解析失败',
+ 'mcpToolCall.text.getFailed': '获取失败',
+ 'mcpToolCall.text.getSuccessFormatError': '获取成功,但数据格式异常',
// 字典数据对话框相关
'dictDataDialog.addDictData': '新增字典数据',
diff --git a/main/manager-web/src/i18n/zh_TW.js b/main/manager-web/src/i18n/zh_TW.js
index 3f921279..df766c05 100644
--- a/main/manager-web/src/i18n/zh_TW.js
+++ b/main/manager-web/src/i18n/zh_TW.js
@@ -29,6 +29,115 @@ export default {
'mcpToolCall.executionResult': '3、執行結果',
'mcpToolCall.copyResult': '複製結果',
'mcpToolCall.noResultYet': '暫無執行結果',
+ 'mcpToolCall.loadingToolList': '正在獲取工具列表...',
+
+ // 工具名稱
+ 'mcpToolCall.toolName.getDeviceStatus': '查看設備狀態',
+ 'mcpToolCall.toolName.setVolume': '設置音量',
+ 'mcpToolCall.toolName.setBrightness': '設置亮度',
+ 'mcpToolCall.toolName.setTheme': '設置主題',
+ 'mcpToolCall.toolName.takePhoto': '拍照識別',
+ 'mcpToolCall.toolName.getSystemInfo': '系統資訊',
+ 'mcpToolCall.toolName.reboot': '重啟設備',
+ 'mcpToolCall.toolName.upgradeFirmware': '升級固件',
+ 'mcpToolCall.toolName.getScreenInfo': '螢幕資訊',
+ 'mcpToolCall.toolName.snapshot': '螢幕截圖',
+ 'mcpToolCall.toolName.previewImage': '預覽圖片',
+ 'mcpToolCall.toolName.setDownloadUrl': '設置下載地址',
+
+ // 工具分類
+ 'mcpToolCall.category.audio': '音頻',
+ 'mcpToolCall.category.display': '顯示',
+ 'mcpToolCall.category.camera': '拍攝',
+ 'mcpToolCall.category.system': '系統',
+ 'mcpToolCall.category.assets': '資源',
+ 'mcpToolCall.category.deviceInfo': '設備資訊',
+
+ // 表格分類和屬性
+ 'mcpToolCall.table.audioSpeaker': '音頻揚聲器',
+ 'mcpToolCall.table.screen': '螢幕',
+ 'mcpToolCall.table.network': '網路',
+ 'mcpToolCall.table.audioControl': '音頻控制',
+ 'mcpToolCall.table.screenControl': '螢幕控制',
+ 'mcpToolCall.table.systemControl': '系統控制',
+ 'mcpToolCall.table.screenInfo': '螢幕資訊',
+ 'mcpToolCall.table.hardwareInfo': '硬體資訊',
+ 'mcpToolCall.table.memoryInfo': '記憶體資訊',
+ 'mcpToolCall.table.applicationInfo': '應用資訊',
+ 'mcpToolCall.table.networkInfo': '網路資訊',
+ 'mcpToolCall.table.displayInfo': '顯示資訊',
+ 'mcpToolCall.table.deviceInfo': '設備資訊',
+ 'mcpToolCall.table.systemInfo': '系統資訊',
+ // 表格列標題
+ 'mcpToolCall.table.component': '組件',
+ 'mcpToolCall.table.property': '屬性',
+ 'mcpToolCall.table.value': '值',
+
+ 'mcpToolCall.prop.volume': '音量',
+ 'mcpToolCall.prop.brightness': '亮度',
+ 'mcpToolCall.prop.theme': '主題',
+ 'mcpToolCall.prop.type': '類型',
+ 'mcpToolCall.prop.ssid': 'SSID',
+ 'mcpToolCall.prop.signalStrength': '信號強度',
+ 'mcpToolCall.prop.operationResult': '操作結果',
+ 'mcpToolCall.prop.width': '寬度',
+ 'mcpToolCall.prop.height': '高度',
+ 'mcpToolCall.prop.screenType': '類型',
+ 'mcpToolCall.prop.chipModel': '晶片型號',
+ 'mcpToolCall.prop.cpuCores': 'CPU核心數',
+ 'mcpToolCall.prop.chipVersion': '晶片版本',
+ 'mcpToolCall.prop.flashSize': 'Flash大小',
+ 'mcpToolCall.prop.minFreeHeap': '最小可用堆',
+ 'mcpToolCall.prop.applicationName': '應用名稱',
+ 'mcpToolCall.prop.applicationVersion': '應用版本',
+ 'mcpToolCall.prop.compileTime': '編譯時間',
+ 'mcpToolCall.prop.idfVersion': 'IDF版本',
+ 'mcpToolCall.prop.macAddress': 'MAC地址',
+ 'mcpToolCall.prop.ipAddress': 'IP地址',
+ 'mcpToolCall.prop.wifiName': 'WiFi名稱',
+ 'mcpToolCall.prop.wifiChannel': 'WiFi信道',
+ 'mcpToolCall.prop.screenSize': '螢幕尺寸',
+ 'mcpToolCall.prop.deviceUuid': '設備UUID',
+ 'mcpToolCall.prop.systemLanguage': '系統語言',
+ 'mcpToolCall.prop.currentOtaPartition': '當前OTA分區',
+ 'mcpToolCall.prop.getResult': '獲取結果',
+ 'mcpToolCall.prop.url': 'URL',
+ 'mcpToolCall.prop.quality': '品質',
+ 'mcpToolCall.prop.question': '問題',
+
+ // 工具幫助文本
+ 'mcpToolCall.help.getDeviceStatus': '查看設備的當前運行狀態,包括音量、螢幕、電池等資訊。',
+ 'mcpToolCall.help.setVolume': '調整設備的音量大小,請輸入0-100之間的數值。',
+ 'mcpToolCall.help.setBrightness': '調整設備螢幕的亮度,請輸入0-100之間的數值。',
+ 'mcpToolCall.help.setTheme': '切換設備螢幕的顯示主題,可以選擇淺色或深色模式。',
+ 'mcpToolCall.help.takePhoto': '使用設備攝像頭拍攝照片並進行識別分析,請輸入要詢問的問題。',
+ 'mcpToolCall.help.getSystemInfo': '獲取設備的系統資訊,包括硬體規格、軟體版本等。',
+ 'mcpToolCall.help.reboot': '重啟設備,執行後設備將重新啟動。',
+ 'mcpToolCall.help.upgradeFirmware': '從指定URL下載並升級設備固件,升級後設備會自動重啟。',
+ 'mcpToolCall.help.getScreenInfo': '獲取螢幕的詳細資訊,如解析度、尺寸等參數。',
+ 'mcpToolCall.help.snapshot': '對當前螢幕進行截圖並上傳到指定URL。',
+ 'mcpToolCall.help.previewImage': '在設備螢幕上預覽指定URL的圖片。',
+ 'mcpToolCall.help.setDownloadUrl': '設置設備資源文件的下載地址。',
+
+ // 其他文本
+ 'mcpToolCall.text.strong': '強',
+ 'mcpToolCall.text.medium': '中',
+ 'mcpToolCall.text.weak': '弱',
+ 'mcpToolCall.text.dark': '深色',
+ 'mcpToolCall.text.light': '淺色',
+ 'mcpToolCall.text.setSuccess': '設置成功',
+ 'mcpToolCall.text.setFailed': '設置失敗',
+ 'mcpToolCall.text.brightnessSetSuccess': '亮度設置成功',
+ 'mcpToolCall.text.brightnessSetFailed': '亮度設置失敗',
+ 'mcpToolCall.text.themeSetSuccess': '主題設置成功',
+ 'mcpToolCall.text.themeSetFailed': '主題設置失敗',
+ 'mcpToolCall.text.rebootCommandSent': '重啟指令已發送',
+ 'mcpToolCall.text.rebootFailed': '重啟失敗',
+ 'mcpToolCall.text.monochrome': '單色屏',
+ 'mcpToolCall.text.color': '彩色屏',
+ 'mcpToolCall.text.getSuccessParseFailed': '獲取成功,但解析失敗',
+ 'mcpToolCall.text.getFailed': '獲取失敗',
+ 'mcpToolCall.text.getSuccessFormatError': '獲取成功,但數據格式異常',
// 字典數據對話框相關
'dictDataDialog.addDictData': '新增字典數據',