509 - 《AI Tips(1)》

发布于 2025年1月5日

感觉有不少 AI 相关的 Tips,不足以单条成文,但不记下来又可惜,所以搞个 AI Tips 的系列。

1、Cursor「Too many free trials」问题的解。删除 storage.json 里的指纹信息就好了,注意做好备份。注:我还没试过,买的会员还没到期。

亲自验证有效的极简代码。

import os from 'os';
import path from 'path';
import fs from 'fs';

// Mac固定路径
const storagePath = path.join(
  os.homedir(),
  'Library/Application Support/Cursor/User/globalStorage/storage.json',
);

if (!fs.existsSync(storagePath)) {
  throw new Error('storage.json not found');
}

// 读取并修改文件
const data = JSON.parse(fs.readFileSync(storagePath, 'utf8'));
const newId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
  const r = (Math.random() * 16) | 0;
  return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
});
data['telemetry.macMachineId'] = newId;
fs.writeFileSync(storagePath, JSON.stringify(data, null, 2));

参考:
https://g

内容预览已结束

此内容需要会员权限。请先登录以查看完整内容。