I’m trying out the “AI Review” feature added in 0.20.0. The “Review” panel has two buttons: “Run on Working Git Diff” and “Run on Diff With Main”. Presently I’m on a branch two commits away from my main branch. When I click “Run on Diff With Main”, Cursor says “We couldn’t find any code sections to analyze”.
This does work for me. That leads me to think there’s something different about my git repository or perhaps my codebase.
When I go to Help > Toggle Developer Tools, there are some errors and warnings in the console. Here are the ones I get when I run “Developer: Reload Window”.
DevTools failed to load source map: Could not load content for https://cursor-sourcemaps.s3.amazonaws.com/sourcemaps/33c8b08492b48664cb00a8ab054f2d60697bbf90/core/vs/base/parts/sandbox/electron-sandbox/preload.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://cursor-sourcemaps.s3.amazonaws.com/sourcemaps/33c8b08492b48664cb00a8ab054f2d60697bbf90/core/vs/code/electron-sandbox/workbench/workbench.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://cursor-sourcemaps.s3.amazonaws.com/sourcemaps/33c8b08492b48664cb00a8ab054f2d60697bbf90/core/vs/workbench/workbench.desktop.main.nls.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
workbench.desktop.main.js:221 Refused to create a TrustedTypePolicy named 'editorCppGhostText' because it violates the following Content Security Policy directive: "trusted-types amdLoader
cellRendererEditorText
defaultWorkerFactory
diffEditorWidget
diffReview
domLineBreaksComputer
dompurify
editorGhostText
editorViewLayer
notebookRenderer
stickyScrollViewLayer
tokenizeToString
safeInnerHtml
standaloneColorizer
tokenizeToString
solidjs
aibubble
aibubble2
aibubbleSearch
streamingMarkdownPolicy".
S @ workbench.desktop.main.js:221
(anonymous) @ workbench.desktop.main.js:20689
_invokeFactory @ workbench.js:3
complete @ workbench.js:3
_onModuleComplete @ workbench.js:4
_resolve @ workbench.js:4
defineModule @ workbench.js:3
u @ workbench.js:4
(anonymous) @ workbench.desktop.main.js:20689
(anonymous) @ workbench.desktop.main.js:22560
DevTools failed to load source map: Could not load content for https://cursor-sourcemaps.s3.amazonaws.com/sourcemaps/33c8b08492b48664cb00a8ab054f2d60697bbf90/core/vs/workbench/workbench.desktop.main.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
workbench.desktop.main.js:218 Uncaught Error: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy "editorCppGhostText" disallowed.
TypeError: Failed to execute ‘createPolicy’ on ‘TrustedTypePolicyFactory’: Policy “editorCppGhostText” disallowed.
at S (workbench.desktop.main.js:221:982)
at workbench.desktop.main.js:20689:11897
at y._invokeFactory (workbench.js:3:1491)
at y.complete (workbench.js:3:1706)
at g._onModuleComplete (workbench.js:4:1051)
at g._resolve (workbench.js:4:510)
at g.defineModule (workbench.js:3:5585)
at u (workbench.js:4:1770)
at workbench.desktop.main.js:20689:11644
at workbench.desktop.main.js:22560:22533
at workbench.desktop.main.js:218:12
(anonymous) @ workbench.desktop.main.js:218
setTimeout (async)
a @ workbench.desktop.main.js:216
onUnexpectedError @ workbench.desktop.main.js:220
D @ workbench.desktop.main.js:220
S @ workbench.desktop.main.js:221
(anonymous) @ workbench.desktop.main.js:20689
_invokeFactory @ workbench.js:3
complete @ workbench.js:3
_onModuleComplete @ workbench.js:4
_resolve @ workbench.js:4
defineModule @ workbench.js:3
u @ workbench.js:4
(anonymous) @ workbench.desktop.main.js:20689
(anonymous) @ workbench.desktop.main.js:22560
DevTools failed to load source map: Could not load content for vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/node_modules.asar/xterm/lib/xterm.js.map: System error: net::ERR_FILE_NOT_FOUND
DevTools failed to load source map: Could not load content for vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/node_modules.asar/xterm-addon-unicode11/lib/xterm-addon-unicode11.js.map: System error: net::ERR_FILE_NOT_FOUND
DevTools failed to load source map: Could not load content for vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/node_modules.asar/xterm-addon-webgl/lib/xterm-addon-webgl.js.map: System error: net::ERR_FILE_NOT_FOUND
xterm-addon-webgl.js:1 task queue exceeded allotted deadline by 42ms
_process @ xterm-addon-webgl.js:1
requestIdleCallback (async)
_requestCallback @ xterm-addon-webgl.js:1
_start @ xterm-addon-webgl.js:1
_process @ xterm-addon-webgl.js:1
requestIdleCallback (async)
_requestCallback @ xterm-addon-webgl.js:1
_start @ xterm-addon-webgl.js:1
_process @ xterm-addon-webgl.js:1
requestIdleCallback (async)
_requestCallback @ xterm-addon-webgl.js:1
_start @ xterm-addon-webgl.js:1
enqueue @ xterm-addon-webgl.js:1
_doWarmUp @ xterm-addon-webgl.js:1
warmUp @ xterm-addon-webgl.js:1
_refreshCharAtlas @ xterm-addon-webgl.js:1
resize @ xterm-addon-webgl.js:1
resize @ xterm-addon-webgl.js:1
handleResize @ xterm-addon-webgl.js:1
handleCharSizeChanged @ xterm-addon-webgl.js:1
_initializeWebGLState @ xterm-addon-webgl.js:1
C @ xterm-addon-webgl.js:1
activate @ xterm-addon-webgl.js:1
loadAddon @ xterm.js:1
loadAddon @ xterm.js:1
tb @ workbench.desktop.main.js:21290
await in tb (async)
attachToElement @ workbench.desktop.main.js:21290
md @ workbench.desktop.main.js:22469
kd @ workbench.desktop.main.js:22469
await in kd (async)
Ge @ workbench.desktop.main.js:22467
j @ workbench.desktop.main.js:830
createInstance @ workbench.desktop.main.js:830
createInstance @ workbench.desktop.main.js:22558
addInstance @ workbench.desktop.main.js:22435
c @ workbench.desktop.main.js:22435
j @ workbench.desktop.main.js:830
createInstance @ workbench.desktop.main.js:830
createGroup @ workbench.desktop.main.js:22435
Tb @ workbench.desktop.main.js:22558
createTerminal @ workbench.desktop.main.js:22558
await in createTerminal (async)
fc @ workbench.desktop.main.js:22435
(anonymous) @ workbench.desktop.main.js:22435
y @ workbench.desktop.main.js:296
z @ workbench.desktop.main.js:296
fire @ workbench.desktop.main.js:296
xb @ workbench.desktop.main.js:22558
(anonymous) @ workbench.desktop.main.js:22558
Promise.then (async)
initializePrimaryBackend @ workbench.desktop.main.js:22558
await in initializePrimaryBackend (async)
ne @ workbench.desktop.main.js:22558
j @ workbench.desktop.main.js:830
(anonymous) @ workbench.desktop.main.js:830
a @ workbench.desktop.main.js:347
get value @ workbench.desktop.main.js:347
get @ workbench.desktop.main.js:830
shouldShowWelcome @ workbench.desktop.main.js:22435
q @ workbench.desktop.main.js:21080
K @ workbench.desktop.main.js:21080
W @ workbench.desktop.main.js:21086
W @ workbench.desktop.main.js:22435
render @ workbench.desktop.main.js:425
render @ workbench.desktop.main.js:21081
rb @ workbench.desktop.main.js:22255
create @ workbench.desktop.main.js:22255
create @ workbench.desktop.main.js:22255
sb @ workbench.desktop.main.js:21080
sb @ workbench.desktop.main.js:22255
qb @ workbench.desktop.main.js:21080
pb @ workbench.desktop.main.js:21080
hc @ workbench.desktop.main.js:22255
openPaneComposite @ workbench.desktop.main.js:22255
openPaneComposite @ workbench.desktop.main.js:22263
(anonymous) @ workbench.desktop.main.js:22255
await in (anonymous) (async)
Db @ workbench.desktop.main.js:22255
nc @ workbench.desktop.main.js:22263
(anonymous) @ workbench.desktop.main.js:22263
invokeFunction @ workbench.desktop.main.js:830
startup @ workbench.desktop.main.js:22263
open @ workbench.desktop.main.js:22473
await in open (async)
ue @ workbench.desktop.main.js:22473
d.load.configureDeveloperSettings @ workbench.js:4
(anonymous) @ workbench.js:4
_invokeFactory @ workbench.js:3
complete @ workbench.js:3
_onModuleComplete @ workbench.js:4
_onModuleComplete @ workbench.js:4
_resolve @ workbench.js:4
defineModule @ workbench.js:3
u @ workbench.js:4
(anonymous) @ workbench.desktop.main.js:22560
(anonymous) @ workbench.desktop.main.js:22560
workbench.desktop.main.js:21086 [Extension Host] (node:2975) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at Migrating your code to SDK for JavaScript V3 - AWS SDK for JavaScript
(Use Cursor Helper (Plugin) --trace-warnings ... to show where the warning was created)
console.error @ workbench.desktop.main.js:21086
p @ workbench.desktop.main.js:347
$logExtensionHostMessage @ workbench.desktop.main.js:20963
S @ workbench.desktop.main.js:20963
Q @ workbench.desktop.main.js:20963
M @ workbench.desktop.main.js:20963
L @ workbench.desktop.main.js:20963
(anonymous) @ workbench.desktop.main.js:20963
y @ workbench.desktop.main.js:296
fire @ workbench.desktop.main.js:296
fire @ workbench.desktop.main.js:815
K.onmessage @ workbench.desktop.main.js:21055
DevTools failed to load source map: Could not load content for vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/node_modules.asar/vscode-textmate/release/main.js.map: System error: net::ERR_FILE_NOT_FOUND
workbench.desktop.main.js:21311 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///Applications/Cursor.app/Contents/Resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///Users/jharris/.cursor/extensions/ms-azure-devops.azure-pipelines-1.228.0/syntaxes/yaml.tmLanguage.json
And when I click “Run on Diff With Main”, this error appears:
workbench.desktop.main.js:21086 Error: Command failed: git symbolic-ref refs/remotes/origin/HEAD
fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
at ChildProcess.exithandler (node:child_process:430:12)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)
This an issue with no default branch being set on the remote. git remote set-head origin main
Fixes the first issue, but then you run into the next error:
workbench.desktop.main.js:21447 Error: Command failed: git diff --no-color $(git merge-base main test)
fatal: ambiguous argument '$(git': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Basically it’s trying to use command substitution, which does not work on Windows.