chore: Cursor 全面替换 co-chat → pchat 配置真源

- cursor-config/ 项目级+用户级 MCP 与 rules 模板
- deploy-cursor-config.sh 一键部署
- retire_cochat.sh 支持 patchNativeOk 并自动卸载扩展
- mcp-config/cursor.mcp.json 同步 ensure-hub 唯一套

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
卡若AI
2026-06-29 17:51:28 +08:00
parent e96960ab52
commit 64c3b23468
8 changed files with 580 additions and 35 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# 将 Gitea 仓库内 cursor-config 部署到本机 Cursorco-chat → pchat 唯一套)
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
WS="${1:-/Users/karuo/Documents/个人}"
echo "=== deploy cursor-config → $WS ==="
mkdir -p "$WS/.cursor/rules/_retired"
cp -f "$ROOT/cursor-config/mcp.project.json" "$WS/.cursor/mcp.json"
cp -f "$ROOT/cursor-config/mcp.user.json" "$HOME/.cursor/mcp.json"
cp -f "$ROOT/cursor-config/rules/persistent-chat.mdc" "$WS/.cursor/rules/persistent-chat.mdc"
cp -f "$ROOT/cursor-config/rules/pchat-composer.mdc" "$WS/.cursor/rules/pchat-composer.mdc"
if [[ -f "$WS/.cursor/rules/co-chat.mdc" ]]; then
mv -f "$WS/.cursor/rules/co-chat.mdc" "$WS/.cursor/rules/_retired/co-chat.mdc"
echo "co-chat.mdc → _retired"
fi
bash "$ROOT/scripts/co-integration/sync_pchat_runtime.sh" 2>/dev/null || \
bash "$WS/开发文档/脚本/sync_pchat_runtime.sh" 2>/dev/null || true
echo "完成。请 Cmd+Q 重启 Cursor。"