Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
42ba395
refactor: align StreamableHttpMCPServer and mcp-workspace with ShopAg…
dfwgj Mar 23, 2026
538aac4
feat(desktop): add workspace sidebar panel with file explorer
dfwgj Mar 23, 2026
004f7ed
feat(mcp-workspace): add built-in MCP server configuration tools
dfwgj Mar 23, 2026
49287b1
feat(desktop): add mcp-workspace as built-in MCP server
dfwgj Mar 23, 2026
4e93377
fix: sync workspace config path and suppress agentxjs verbose logs
dfwgj Mar 23, 2026
afb3021
feat: start mcp-workspace as stdio process like mcp-office
dfwgj Mar 23, 2026
c13f308
refactor(mcp-workspace): remove mcp-config service, extract ok/err utils
dfwgj Mar 23, 2026
69c2751
feat: drag files from workspace panel to chat input
dfwgj Mar 23, 2026
e0e6cd5
feat: auto-expand workspace folders on load
dfwgj Mar 23, 2026
660c314
feat: open workspace panel by default
dfwgj Mar 23, 2026
95320f4
feat: show Git installation prompt on Windows welcome page
dfwgj Mar 23, 2026
da814ff
fix: improve Git detection on Windows with fallback paths
dfwgj Mar 23, 2026
e660f15
fix: revert workspace auto-expansion and fix Git warning display
dfwgj Mar 23, 2026
6fa6f1f
refactor: split action tool into 4 domain-specific tools to reduce LL…
dfwgj Mar 24, 2026
f33a4ec
fix: deduplicate resources, conditional Git warning, cleanup logs
dfwgj Mar 24, 2026
4545adc
feat: add Feishu bot integration with WebSocket long-connection
dfwgj Mar 24, 2026
45a6e01
feat: add v2.3.0 release notification
dfwgj Mar 24, 2026
f121f2f
docs: update v2.3.0 changeset with full release notes
dfwgj Mar 24, 2026
0b0e664
chore: add @promptx/config to v2.3.0 changeset
dfwgj Mar 24, 2026
dae6322
Revert "chore: add @promptx/config to v2.3.0 changeset"
dfwgj Mar 24, 2026
c5c793d
fix: bundle mcp-workspace deps and fix runtime idle timeout
dfwgj Mar 28, 2026
7e24005
Reapply "chore: add @promptx/config to v2.3.0 changeset"
dfwgj Mar 28, 2026
a021fc9
Revert "chore: add @promptx/config to v2.3.0 changeset"
dfwgj Mar 28, 2026
fc4c084
Merge remote-tracking branch 'origin/main' into workspace
dfwgj Mar 28, 2026
9756ad2
feat: add platform integrations tab in settings
dfwgj Mar 28, 2026
8de57a4
feat: add v2.3.1 release notification
dfwgj Mar 28, 2026
0d74394
fix: include mcp-workspace in production build
dfwgj Mar 28, 2026
0a63506
docs: complete v2.3.1 changeset with release notes
dfwgj Mar 28, 2026
ed5ee33
chore: update lockfile for @promptx/mcp-workspace dependency
dfwgj Mar 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/eleven-bananas-vanish.md
Original file line number Diff line number Diff line change
@@ -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 配置
29 changes: 29 additions & 0 deletions .changeset/red-kings-hear.md
Original file line number Diff line number Diff line change
@@ -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 检测与路径问题
- 清理调试日志输出
4 changes: 4 additions & 0 deletions apps/desktop/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 13 additions & 1 deletion apps/desktop/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"tabs": {
"system": "System",
"agentx": "AgentX",
"remote": "Remote Access"
"remote": "Remote Access",
"platform": "Integrations"
},
"language": {
"title": "Language",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
14 changes: 13 additions & 1 deletion apps/desktop/src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"tabs": {
"system": "系统设置",
"agentx": "AgentX 设置",
"remote": "远程访问"
"remote": "远程访问",
"platform": "接入其他平台"
},
"language": {
"title": "语言",
Expand Down Expand Up @@ -133,6 +134,13 @@
"guide": "前往飞书开放平台创建应用并获取凭证",
"guideLink": "飞书开放平台"
},
"platform": {
"title": "接入其他平台",
"description": "将 PromptX 作为 MCP 服务接入其他 AI 工具,复制以下配置到对应平台即可",
"trae": "Trae 可以使用以下配置:",
"claude": "Claude / Cursor 等 AI 工具:",
"copied": "配置已复制"
},
"wechat": {
"title": "微信接入",
"description": "连接个人微信,通过微信消息与 PromptX 交互",
Expand Down Expand Up @@ -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 的多平台接入能力"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
<div className="space-y-2">
<p className="text-sm font-medium">{label}</p>
<div className="relative group">
<pre className="bg-muted rounded-md p-4 text-sm overflow-x-auto font-mono">
<code>{code}</code>
</pre>
<button
onClick={handleCopy}
className="absolute top-2 right-2 p-1.5 rounded-md bg-background/80 border border-border opacity-0 group-hover:opacity-100 transition-opacity hover:bg-accent"
>
{copied ? (
<Check className="h-4 w-4 text-green-500" />
) : (
<Copy className="h-4 w-4 text-muted-foreground" />
)}
</button>
</div>
</div>
)
}

export function PlatformIntegration() {
const { t } = useTranslation()

return (
<Card>
<CardHeader>
<CardTitle>{t("settings.platform.title")}</CardTitle>
<CardDescription>{t("settings.platform.description")}</CardDescription>
</CardHeader>
<CardContent className="space-y-6">
<CodeBlock
label={t("settings.platform.trae")}
code={TRAE_CONFIG}
/>
<CodeBlock
label={t("settings.platform.claude")}
code={CLAUDE_CONFIG}
/>
</CardContent>
</Card>
)
}
14 changes: 12 additions & 2 deletions apps/desktop/src/view/pages/settings-window/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import { MCPConfig } from "./components/MCPConfig"
import { SkillsConfig } from "./components/SkillsConfig"
import { WebAccessConfig } from "./components/WebAccessConfig"
import { FeishuConfig } from "./components/FeishuConfig"
import { PlatformIntegration } from "./components/PlatformIntegration"
// import { WechatConfig } from "./components/WechatConfig"
import { AgentXProfilesConfig } from "./components/AgentXProfilesConfig"
import { Loader2, Settings, Bot, RefreshCw, Wifi, AlertTriangle } from "lucide-react"
import { Loader2, Settings, Bot, RefreshCw, Wifi, AlertTriangle, Plug } from "lucide-react"

function GitWarningBanner() {
const { t } = useTranslation()
Expand Down Expand Up @@ -222,7 +223,7 @@ function SettingsWindow() {
<Toaster />
<div className="mx-auto max-w-4xl w-full flex-1 flex flex-col">
<Tabs defaultValue="system" className="flex-1 flex flex-col">
<TabsList className="grid w-full grid-cols-3 mb-6">
<TabsList className="grid w-full grid-cols-4 mb-6">
<TabsTrigger value="system" className="flex items-center gap-2">
<Settings className="w-4 h-4" />
{t("settings.tabs.system")}
Expand All @@ -235,6 +236,10 @@ function SettingsWindow() {
<Wifi className="w-4 h-4" />
{t("settings.tabs.remote")}
</TabsTrigger>
<TabsTrigger value="platform" className="flex items-center gap-2">
<Plug className="w-4 h-4" />
{t("settings.tabs.platform")}
</TabsTrigger>
</TabsList>

{/* 系统设置 */}
Expand Down Expand Up @@ -381,6 +386,11 @@ function SettingsWindow() {
<FeishuConfig />
{/* <WechatConfig /> */}
</TabsContent>

{/* 接入其他平台 */}
<TabsContent value="platform" className="flex-1 overflow-y-auto space-y-6">
<PlatformIntegration />
</TabsContent>
</Tabs>
</div>

Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-workspace/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default defineConfig({
clean: true,
target: 'node18',
outDir: 'dist',
external: ['@promptx/logger', '@modelcontextprotocol/sdk'],
noExternal: ['@promptx/logger', '@modelcontextprotocol/sdk'],
});
8 changes: 5 additions & 3 deletions packages/runtime/src/environment/ClaudeEffector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ export class ClaudeEffector implements Effector {
requestId: meta.requestId,
});

// Create pending request with timeout
// Create pending request with idle timeout (resets on each stream event)
this.pendingRequest$ = new Subject<void>();
this.pendingSubscription = this.pendingRequest$.pipe(timeout(timeoutMs)).subscribe({
this.pendingSubscription = this.pendingRequest$.pipe(timeout({ each: timeoutMs })).subscribe({
complete: () => {
logger.debug("Request completed within timeout", { requestId: meta.requestId });
},
error: (err) => {
if (err instanceof TimeoutError) {
logger.warn("Request timeout", { timeout: timeoutMs, requestId: meta.requestId });
logger.warn("Request idle timeout", { timeout: timeoutMs, requestId: meta.requestId });
this.handleTimeout(meta);
}
},
Expand Down Expand Up @@ -221,6 +221,8 @@ export class ClaudeEffector implements Effector {
private handleStreamEvent(msg: SDKMessage): void {
if (this.currentMeta) {
this.receptor.feed(msg as SDKPartialAssistantMessage, this.currentMeta);
// Reset idle timeout on each stream event
this.pendingRequest$?.next();
}
}

Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.