feat: implement MCP Resources Protocol support and localize documentation

This commit is contained in:
火焰库拉
2026-02-02 14:34:34 +08:00
parent 367a75f701
commit 5c1605c9f1
6 changed files with 582 additions and 231 deletions

View File

@@ -86,6 +86,14 @@ Editor.Panel.extend({
els.result.value = "";
});
els.testBtn.addEventListener("confirm", () => this.runTest(els));
// 添加探查功能
const probeBtn = root.querySelector("#probeApisBtn");
if (probeBtn) {
probeBtn.addEventListener("confirm", () => {
Editor.Ipc.sendToMain("mcp-bridge:inspect-apis");
els.result.value = "Probe command sent. Check console logs.";
});
}
// 5. 【修复】拖拽逻辑
if (els.resizer && els.left) {
@@ -141,10 +149,10 @@ Editor.Panel.extend({
els.toolDescription.textContent = "选择工具查看说明";
return;
}
let description = tool.description || "无描述";
let inputSchema = tool.inputSchema;
let details = [];
if (inputSchema && inputSchema.properties) {
details.push("参数说明:");
@@ -159,7 +167,7 @@ Editor.Panel.extend({
details.push(propDesc);
}
}
els.toolDescription.innerHTML = `${description}<br><br>${details.join('<br>')}`;
},