#!/usr/bin/env bash # 将 workspace 内 active co-chat.mdc 移入 _retired(防与 persistent-chat 冲突) set -euo pipefail WS="${1:-$(cd "$(dirname "$0")/../.." && pwd)}" RULES="$WS/.cursor/rules" RET="$RULES/_retired" mkdir -p "$RET" SRC="$RULES/co-chat.mdc" if [[ ! -f "$SRC" ]]; then echo "OK: 无 active co-chat.mdc" exit 0 fi STAMP=$(date +%Y%m%d-%H%M%S) cp -f "$SRC" "$RET/co-chat.mdc.$STAMP" mv -f "$SRC" "$RET/co-chat.mdc" echo "OK: 已移入 $RET/co-chat.mdc" echo "验证: curl -s http://127.0.0.1:13458/api/mode/check"