fix(providers): normalize CursorAgent citations to qfix lines#188
fix(providers): normalize CursorAgent citations to qfix lines#188Spencer1O1 wants to merge 5 commits into
Conversation
99 saves the full prompt to tmp/99-*-prompt before make_request. Pass a single-line --print message referencing that file with @ instead of putting the multiline XML query on argv. Closes ThePrimeagen#180
Pass --workspace and set vim.system cwd to the project root. Resolve context.tmp_file under that root so agent writes and 99 reads the same TEMP_FILE path. Closes ThePrimeagen#181
Convert cursor-agent citation blocks in TEMP_FILE to 99 qfix lines for search/vibe in _retrieve_response via normalize_qfix_response. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Avoid false qfix matches from code inside citation blocks (e.g. strings containing colons). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Addressing Sentry review: parse citation fences before the per-line QFixHelpers.parse_line scan. Code inside citation blocks (e.g. strings with colons) could false-match as qfix and short-circuit before citation gmatch ran. 803d995 reverses order + adds a spec. |
Plain ` fences without citation headers bypassed the citation-first path but still contained scannable lines. Only scan text outside fenced regions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Re: Sentry follow-up — valid. Citation-first parsing only protects content inside \\start:end:path fences. Plain \\javascript blocks bypassed that path and still ran the per-line qfix scanner. 80b79e9 scans only lines outside any markdown fence (toggle on ^\\ lines). Specs added for plain fences and qfix-outside + code-inside. |
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Summary
cursor-agent often writes citation blocks (
startLine:endLine:filepathfenced format) or mixed text to TEMP_FILE instead of 99 qfix lines. For search/vibe, normalize agent output to qfix format in_retrieve_responsevianormalize_qfix_response.Depends on #185 and the workspace PR #186. Rebase onto
masterafter they merge. When stacked onmaster, review only commit121599a.Closes #187 when response issue is filed
Verification
Linux
Repro: Neovim
:pwd->/home, search "Find the main entrypoint".Agent writes qfix lines to TEMP_FILE;
qf_listpopulated with correct paths:Windows
Repro:
cd C:\Dev, openC:\Dev\test\test.js, search "Find the main entrypoint".qf_listpopulated (response fix works). Filename shows"C"instead of full path. This is a separate upstream bug, fixed by #178 (not in this PR stack):Test plan
normalize_qfix_responseconverts citation -> qfix lineqf_listpopulated (paths need fix: quickfix parser breaks on Windows paths with drive letters #178)qf_listpopulated with correct filenames9vvisual, raw code replacement via TEMP_FILE (normalization skipped forvisual)