From 72a0c14ccfc908757a36c0fb80a9c8bb7fb8f305 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 27 Feb 2026 23:48:41 +0000 Subject: [PATCH] Add Cursor agent configuration to fix agent settings loading error - Created .cursor/environment.json with Node.js 18 and yarn setup - Added .cursor/rules/amplitude-sdk.md with repository context - Fixes 'Failed to load agent settings' error by providing required configuration Co-authored-by: Frank Lee --- .cursor/environment.json | 7 ++++++ .cursor/rules/amplitude-sdk.md | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .cursor/environment.json create mode 100644 .cursor/rules/amplitude-sdk.md diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 00000000..57d7f791 --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,7 @@ +{ + "installCommand": "yarn install", + "updateCommand": "yarn install", + "node": { + "version": "18" + } +} diff --git a/.cursor/rules/amplitude-sdk.md b/.cursor/rules/amplitude-sdk.md new file mode 100644 index 00000000..14e5c328 --- /dev/null +++ b/.cursor/rules/amplitude-sdk.md @@ -0,0 +1,40 @@ +# Amplitude JavaScript SDK + +This repository contains the JavaScript SDK for Amplitude Analytics. + +## Project Overview + +- **Language**: JavaScript (ES6+) +- **Build Tool**: Rollup +- **Test Framework**: Mocha + Karma +- **Package Manager**: Yarn +- **Main Entry Point**: `src/amplitude-client.js` + +## Key Commands + +- `yarn install` - Install dependencies +- `yarn build` - Build the SDK +- `yarn test` - Run tests +- `yarn lint` - Run linting +- `yarn fix` - Auto-fix linting issues + +## Code Structure + +- `src/` - Source code for the SDK +- `test/` - Test files +- `website/` - Documentation site (Docusaurus) +- `scripts/` - Build and utility scripts + +## Important Notes + +- This is a client-side analytics tracking library +- The main client is defined in `src/amplitude-client.js` +- Configuration options are in `src/options.js` +- The SDK supports both browser and Node.js environments + +## Development Guidelines + +- Follow existing code style (Prettier + ESLint configured) +- Write tests for new features +- Update documentation when adding public APIs +- Keep backwards compatibility in mind