Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Fix for Cursor 0.43.x Compatibility #16

Conversation

dulong-lab
Copy link

⚠️ Note: This is a temporary quick fix to make basic features working. Code quality improvements will be addressed in future updates.

Related Issues

Related to #15 #14 #13

@ragunathjawahar
Copy link

I tried this fix on Cursor 0.43.6 but the tool wasn't able to retrieve the chat or the composer history. I checked the configuration path and looked into the directory via terminal to ensure it exists.

Failed to get workspaces: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/workspaces 500 in 22ms
Failed to get workspaces: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/workspaces 500 in 10ms
Failed to get composers: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/composers 500 in 20ms
Failed to get composers: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/composers 500 in 7ms

@dulong-lab
Copy link
Author

I tried this fix on Cursor 0.43.6 but the tool wasn't able to retrieve the chat or the composer history. I checked the configuration path and looked into the directory via terminal to ensure it exists.

Failed to get workspaces: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/workspaces 500 in 22ms
Failed to get workspaces: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/workspaces 500 in 10ms
Failed to get composers: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/composers 500 in 20ms
Failed to get composers: [Error: ENOENT: no such file or directory, scandir ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: ''
}
 GET /api/composers 500 in 7ms

I've only tested this on Windows, but from your error message it seems to be a path issue, since I mainly modified /api/workspaces/[id]/tabs/route and from the error message it hasn't reached there yet. Try console.log the workspacePath

const workspacePath = process.env.WORKSPACE_PATH || ''
here, or try setting the WORKSPACE_PATH environment variable.

@ragunathjawahar
Copy link

ragunathjawahar commented Dec 17, 2024

@dulong-lab you are right, I have temporarily replaced all workspacePath calls with a hard-coded path.

const workspacePath = process.env.WORKSPACE_PATH || '/Users/my-user/Library/Application Support/Cursor/User/workspaceStorage'

@voidman2017
Copy link

cool

@thomas-pedersen thomas-pedersen merged commit 126d1a5 into thomas-pedersen:main Dec 18, 2024
@thomas-pedersen
Copy link
Owner

thanks. Will take a deeper dive to make it compatible with latest version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants