Files
persistent-chat-plugin/cursor-config/deploy-cursor-config.sh
卡若AI 64c3b23468 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>
2026-06-29 17:51:28 +08:00

24 lines
981 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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。"