mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-28 16:30:48 +08:00
feat(mcp): 用 MCP 服务替换内置 AI Agent (#319)
在现有 HTTP 服务挂载 /mcp,让外部 AI 经共享 API Key 调用原分辨率截图、批量键鼠、ATX/WOL 和虚拟介质八个工具。所有调用共用有界 FIFO 和全局限流,复用现有采集管线与硬件控制器。 移除内置模型调用、网页 Agent 面板及旧配置,设置页提供可持续查看的 Key、统一的地址/密钥复制样式。补齐 DEB 的 libudev1 运行依赖。 验证:583 项 Rust 库测试、前端生产构建、ARMv7 设备视觉操作与介质/WOL 实测,以及默认 Release 构建和 DEB 包校验通过。 Refs #319
This commit is contained in:
@@ -799,7 +799,6 @@ export default {
|
||||
languageDesc: '选择界面显示语言',
|
||||
featureVisibility: '功能展示',
|
||||
featureVisibilityDesc: '控制控制台页面显示的功能入口',
|
||||
computerUseAgent: 'Computer Use Agent',
|
||||
pasteText: '粘贴文本',
|
||||
videoSettings: '视频采集',
|
||||
videoSettingsDesc: '选择视频采集设备;输入跟随型设备会自动显示当前输入模式',
|
||||
@@ -982,85 +981,26 @@ export default {
|
||||
loadDevicesFailed: '加载设备列表失败',
|
||||
updateFailed: '更新失败',
|
||||
},
|
||||
computerUse: {
|
||||
title: 'Computer Use',
|
||||
status: {
|
||||
waitingScreenshot: '截屏中',
|
||||
thinking: '思考中',
|
||||
executing: '执行中',
|
||||
completed: '已完成',
|
||||
failed: '失败',
|
||||
stopped: '已停止',
|
||||
idle: '空闲',
|
||||
},
|
||||
connection: {
|
||||
connected: '已连接',
|
||||
disconnected: '未连接',
|
||||
socketFailed: 'Computer Use WebSocket 连接失败',
|
||||
messageFailed: '处理 Computer Use WebSocket 消息失败',
|
||||
},
|
||||
buttons: {
|
||||
settings: '设置',
|
||||
clear: '清空',
|
||||
close: '关闭',
|
||||
send: '发送',
|
||||
stop: '停止',
|
||||
save: '保存',
|
||||
clearKey: '清除 Key',
|
||||
},
|
||||
reasoning: {
|
||||
failed: '思考失败',
|
||||
process: '思考过程',
|
||||
thinking: '思考中',
|
||||
},
|
||||
trace: {
|
||||
screenshot: '截图',
|
||||
screenshotAlt: 'Computer Use 截图',
|
||||
executed: '已执行',
|
||||
},
|
||||
input: {
|
||||
placeholder: '输入任务,按下回车换行,按下 Ctrl+Enter 发送',
|
||||
apiKeyRequired: '请先配置 API Key。',
|
||||
},
|
||||
settings: {
|
||||
title: 'Computer Use 设置',
|
||||
enableAi: '启用 AI 操作',
|
||||
model: '模型',
|
||||
apiUrl: 'API URL',
|
||||
apiKey: 'API Key',
|
||||
configured: '已配置:{source}',
|
||||
sourceEnv: '环境变量',
|
||||
sourceConfig: '配置文件',
|
||||
sourceNone: '未配置',
|
||||
},
|
||||
actions: {
|
||||
click: '点击 ({x}, {y}) {button}',
|
||||
doubleClick: '双击 ({x}, {y}) {button}',
|
||||
move: '移动到 ({x}, {y})',
|
||||
drag: '拖拽 {count} 个点',
|
||||
scroll: '滚动 ({x}, {y}) dx={dx} dy={dy}',
|
||||
typeAscii: '输入 {count} 个 ASCII 字符',
|
||||
keypress: '按键 {keys}',
|
||||
wait: '等待 {ms}ms',
|
||||
screenshot: '请求截图',
|
||||
},
|
||||
mouseButtons: {
|
||||
left: '左键',
|
||||
middle: '中键',
|
||||
right: '右键',
|
||||
},
|
||||
errors: {
|
||||
configLoadFailed: '无法加载 Computer Use 配置',
|
||||
taskFailed: 'Computer Use 任务失败',
|
||||
startFailed: 'Computer Use 启动失败',
|
||||
stopFailed: 'Computer Use 停止失败',
|
||||
captureUnavailable: '当前视频画面尚不可用',
|
||||
screenshotFailed: '截图失败',
|
||||
},
|
||||
success: {
|
||||
configSaved: 'Computer Use 配置已保存',
|
||||
apiKeyCleared: 'API Key 已清除',
|
||||
},
|
||||
mcp: {
|
||||
title: "MCP 服务",
|
||||
description: "让外部 AI 工具查看画面,操作键鼠、电源和虚拟介质。",
|
||||
enabled: "启用 MCP",
|
||||
rate: "全局请求频率(每秒 1–100 次)",
|
||||
endpoint: "服务地址",
|
||||
copyEndpoint: "复制服务地址",
|
||||
copyKey: "复制 API Key",
|
||||
copied: "已复制",
|
||||
copyFailed: "复制失败,请手动选择复制",
|
||||
keyConfigured: "已配置 Key,可重新生成后查看。",
|
||||
keyMissing: "启用时会自动生成 Key。",
|
||||
regenerate: "重新生成 Key",
|
||||
connectHint: "在 AI 工具中填写服务地址,并设置 Authorization: Bearer <API Key>。",
|
||||
save: "保存",
|
||||
saved: "MCP 设置已保存",
|
||||
loadFailed: "无法加载 MCP 设置",
|
||||
saveFailed: "无法保存 MCP 设置",
|
||||
invalidRate: "请求频率必须是 1–100 的整数",
|
||||
retry: "重试",
|
||||
},
|
||||
statusCard: {
|
||||
connectionDetails: '连接详情',
|
||||
|
||||
Reference in New Issue
Block a user