Cursor / VS Code extension to back up and refresh CSP marker UUIDs in Cursor’s main.js, with a status bar shortcut, bottom panel webview, and palette commands.
Traditional Chinese: README.tw.md
This software is provided for technical research and personal use on environments you control. It is offered as-is, without warranty. Authors and contributors are not liable for any damage, data loss, or terms-of-use violations arising from modifying Cursor installation files.
You are solely responsible for compliance with Cursor’s terms of service and applicable law. If you do not accept that risk, do not install or use this extension.
- Guided workflow: resolve
main.js, preview detected CSP-related UUIDs, confirm, then backup + write (with rollback attempt on write failure). - UI: status bar item cursor-code-reset, bottom panel Reset with actions for workflow, reload, and candidate path listing.
- Build: TypeScript sources bundled with esbuild to
dist/extension.js; typecheck viatsc --noEmit.
- Cursor (primary target) or VS Code matching
engines.vscodeinpackage.json - Bun (recommended) or Node for installing dev tools and running scripts
- Download the latest
.vsixfrom Releases. - In the editor: Extensions → … → Install from VSIX…, pick the file, then reload the window.
git clone https://github.com/911218sky/cursor-code-reset.git
cd cursor-code-reset
bun install
bun run packageThe VSIX is emitted at the repository root (for example cursor-code-reset-1.5.0.vsix; version comes from package.json). Packaging uses the same pattern as common VS Code extensions: bun run compile then vsce package with --no-dependencies --allow-missing-repository.
bun run compile # esbuild → dist/extension.js
bun run typecheck # tsc --noEmit| Setting | Purpose |
|---|---|
cursorCodeReset.storagePath |
Optional directory for cursor-code-reset-cache.json (default: extension global storage). |
cursorCodeReset.autoHideTemplateErrors |
Optionally hide Problems decorations shortly after startup to reduce noise after main.js edits. |
All commands are prefixed cursor-code-reset: — e.g. Start reset workflow, Apply main.js changes, Reload window, Test path search, Clear local cache, Simple reset menu, Hide / Show Problems decorations.
- No
main.jsfound: use Test path search (Output channel) or Show candidate main.js paths in the panel; pick the file manually if install layout differs. - Transform fails (“none” mode): your Cursor build may have changed
main.js; inspectsrc/csp.tsregexes and adjust for your version. - Permission errors on Windows: run the editor with rights that can write under the Cursor install directory, or adjust ownership (still at your own risk).