diff --git a/.changeset/eleven-bananas-vanish.md b/.changeset/eleven-bananas-vanish.md new file mode 100644 index 00000000..b943242e --- /dev/null +++ b/.changeset/eleven-bananas-vanish.md @@ -0,0 +1,21 @@ +--- +"@promptx/mcp-workspace": patch +"@promptx/mcp-office": patch +"@promptx/mcp-server": patch +"@promptx/resource": patch +"@agentxjs/runtime": patch +"@promptx/config": patch +"@promptx/logger": patch +"@promptx/core": patch +"@promptx/desktop": patch +"@promptx/cli": patch +--- + +## Bug Fixes + +- **runtime**: 修复对话超时误触发问题 — 将绝对超时改为空闲超时(`timeout({ each: 600000 })`),每次 AI 输出都会重置计时器,只有真正超过 600 秒无任何响应才触发超时 +- **mcp-workspace**: 修复生产环境打包缺失问题 — 将 `external` 改为 `noExternal`,确保 `@promptx/logger` 和 `@modelcontextprotocol/sdk` 被打包进产物;同时在 `electron-builder.yml` 补充 `extraResources` 配置,生产包中正确包含 mcp-workspace + +## New Features + +- **desktop**: 设置页新增「接入其他平台」Tab,提供 Trae 及 Claude/Cursor 等 AI 工具的一键复制 MCP 配置 diff --git a/.changeset/red-kings-hear.md b/.changeset/red-kings-hear.md new file mode 100644 index 00000000..b6af6094 --- /dev/null +++ b/.changeset/red-kings-hear.md @@ -0,0 +1,29 @@ +--- +"@promptx/mcp-workspace": minor +"@promptx/mcp-server": minor +"@promptx/resource": minor +"@promptx/core": minor +"@promptx/desktop": minor +--- + +## v2.3.0 + +### 新功能 + +- **飞书接入**:支持通过飞书机器人与 PromptX 交互,使用 WebSocket 长连接模式无需公网 IP,实现类似 OpenClaw 的多平台接入能力 +- **工作区功能**:新增工作区侧边栏,支持项目文件浏览、拖拽文件到对话输入、文件读写管理 +- **DeepSeek 预配置**:AgentX 配置新增 DeepSeek 预设,开箱即用 +- **Windows Git 检测**:首页添加 Git 安装状态检测与引导提示 +- **MCP Workspace 服务**:新增内置 MCP 工作区服务,支持文件操作和配置管理 + +### 优化 + +- **RoleX 全面优化**:修复组织操作相关的 bug,拆分 action 工具为 4 个领域工具以减少 LLM 调用失败 +- **资源去重**:修复资源页面重复 key 警告,V2 角色正确覆盖 V1 同名角色 +- **通知中心**:新增 v2.3.0 版本更新通知 + +### 修复 + +- 修复工作区文件夹自动展开导致的性能问题 +- 修复 Windows 平台 Git 检测与路径问题 +- 清理调试日志输出 diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 3a0b0468..57cbfb9e 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -32,6 +32,10 @@ extraResources: to: "mcp-office" filter: - "**/*" + - from: "../../packages/mcp-workspace/dist" + to: "mcp-workspace" + filter: + - "**/*" mac: category: public.app-category.developer-tools diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 8a9a772d..95bb14fc 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -46,6 +46,7 @@ "@promptx/core": "workspace:*", "@promptx/mcp-office": "workspace:*", "@promptx/mcp-server": "workspace:*", + "@promptx/mcp-workspace": "workspace:*", "@radix-ui/react-alert-dialog": "^1.1.15", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-label": "^2.1.7", diff --git a/apps/desktop/src/i18n/locales/en.json b/apps/desktop/src/i18n/locales/en.json index 351bc768..4e6c97ec 100644 --- a/apps/desktop/src/i18n/locales/en.json +++ b/apps/desktop/src/i18n/locales/en.json @@ -5,7 +5,8 @@ "tabs": { "system": "System", "agentx": "AgentX", - "remote": "Remote Access" + "remote": "Remote Access", + "platform": "Integrations" }, "language": { "title": "Language", @@ -133,6 +134,13 @@ "guide": "Create an app on Feishu Open Platform to get credentials", "guideLink": "Feishu Open Platform" }, + "platform": { + "title": "Platform Integrations", + "description": "Use PromptX as an MCP service in other AI tools. Copy the config below to the corresponding platform.", + "trae": "Trae configuration:", + "claude": "Claude / Cursor and other AI tools:", + "copied": "Config copied" + }, "wechat": { "title": "WeChat", "description": "Connect personal WeChat to interact with PromptX via WeChat messages", @@ -862,6 +870,10 @@ "title": "RoleX (V2) Architecture Upgrade", "content": "Existing V2 roles need to be upgraded. Please activate Nuwa and ask her to upgrade and migrate your roles to continue using them." }, + "updateV231": { + "title": "v2.3.1 Update Released", + "content": "🔧 Fixed conversation 600s timeout issue, long conversations no longer interrupted\n\n🔧 Fixed workspace MCP bundling issue\n\n✨ New \"Platform Integrations\" in settings — one-click config for Trae / Claude / Cursor and other AI tools" + }, "updateV230": { "title": "v2.3.0 Update Released", "content": "🚀 Comprehensive RoleX improvements with organization operation bug fixes\n\n⚡ Added DeepSeek preset configuration, ready to use out of the box\n\n📂 New workspace feature with project file management\n\n💬 Feishu (Lark) integration for multi-platform access, similar to OpenClaw" diff --git a/apps/desktop/src/i18n/locales/zh-CN.json b/apps/desktop/src/i18n/locales/zh-CN.json index 67c20857..e9ec07cd 100644 --- a/apps/desktop/src/i18n/locales/zh-CN.json +++ b/apps/desktop/src/i18n/locales/zh-CN.json @@ -5,7 +5,8 @@ "tabs": { "system": "系统设置", "agentx": "AgentX 设置", - "remote": "远程访问" + "remote": "远程访问", + "platform": "接入其他平台" }, "language": { "title": "语言", @@ -133,6 +134,13 @@ "guide": "前往飞书开放平台创建应用并获取凭证", "guideLink": "飞书开放平台" }, + "platform": { + "title": "接入其他平台", + "description": "将 PromptX 作为 MCP 服务接入其他 AI 工具,复制以下配置到对应平台即可", + "trae": "Trae 可以使用以下配置:", + "claude": "Claude / Cursor 等 AI 工具:", + "copied": "配置已复制" + }, "wechat": { "title": "微信接入", "description": "连接个人微信,通过微信消息与 PromptX 交互", @@ -859,6 +867,10 @@ "title": "RoleX(V2)架构升级", "content": "原有 V2 角色需要升级。请激活女娲,让女娲进行升级与迁移才能继续使用。" }, + "updateV231": { + "title": "v2.3.1 版本更新", + "content": "🔧 修复对话 600 秒超时问题,长时间对话不再被误中断\n\n🔧 修复工作区 MCP 打包问题\n\n✨ 设置新增「接入其他平台」,一键复制配置接入 Trae / Claude / Cursor 等 AI 工具" + }, "updateV230": { "title": "v2.3.0 版本更新", "content": "🚀 全面优化 RoleX 功能,修复组织操作相关的 bug\n\n⚡ 新增 DeepSeek 预配置,开箱即用\n\n📂 新增工作区功能,支持项目文件管理\n\n💬 支持连接飞书,实现类似 OpenClaw 的多平台接入能力" diff --git a/apps/desktop/src/view/components/notifications/notificationService.ts b/apps/desktop/src/view/components/notifications/notificationService.ts index 987e8e76..a18a0a14 100644 --- a/apps/desktop/src/view/components/notifications/notificationService.ts +++ b/apps/desktop/src/view/components/notifications/notificationService.ts @@ -5,6 +5,14 @@ const SHOWN_KEY = "promptx_notifications_shown" // 默认通知数据 const defaultNotifications: Notification[] = [ + { + id: "update-v2.3.1", + title: "notifications.updateV231.title", + content: "notifications.updateV231.content", + type: "success", + timestamp: Date.now(), + read: false, + }, { id: "update-v2.3.0", title: "notifications.updateV230.title", diff --git a/apps/desktop/src/view/pages/settings-window/components/PlatformIntegration.tsx b/apps/desktop/src/view/pages/settings-window/components/PlatformIntegration.tsx new file mode 100644 index 00000000..197906b1 --- /dev/null +++ b/apps/desktop/src/view/pages/settings-window/components/PlatformIntegration.tsx @@ -0,0 +1,91 @@ +import { useState } from "react" +import { useTranslation } from "react-i18next" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Check, Copy } from "lucide-react" +import { toast } from "sonner" + +const TRAE_CONFIG = `{ + "mcpServers": { + "promptx": { + "url": "http://127.0.0.1:5203/mcp" + } + } +}` + +const CLAUDE_CONFIG = `{ + "mcpServers": { + "promptx": { + "type": "http", + "url": "http://127.0.0.1:5203/mcp" + } + } +}` + +function CodeBlock({ code, label }: { code: string; label: string }) { + const { t } = useTranslation() + const [copied, setCopied] = useState(false) + + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(code) + setCopied(true) + toast.success(t("settings.platform.copied")) + setTimeout(() => setCopied(false), 2000) + } catch { + // fallback + const textarea = document.createElement("textarea") + textarea.value = code + document.body.appendChild(textarea) + textarea.select() + document.execCommand("copy") + document.body.removeChild(textarea) + setCopied(true) + toast.success(t("settings.platform.copied")) + setTimeout(() => setCopied(false), 2000) + } + } + + return ( +
{label}
+
+ {code}
+
+
+