fix(providers): CursorAgent --workspace, cwd, and tmp path resolution#2
Open
Spencer1O1 wants to merge 2 commits into
Open
fix(providers): CursorAgent --workspace, cwd, and tmp path resolution#2Spencer1O1 wants to merge 2 commits into
Spencer1O1 wants to merge 2 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pass
--workspaceon the cursor-agent command. Resolvecontext.tmp_fileunder Neovim's cwd (and absolute paths as-is) so cursor-agent writes TEMP_FILE where 99 reads it, especially when Neovim cwd is a parent directory (e.g.C:\Devwith project atC:\Dev\test).Depends on #185. Review only commit 1629aec. Do not merge until #185 lands.
Closes #181
Verification
Windows
Repro: Neovim
:pwd->C:\Dev, bufferC:\Dev\test\test.js, search "Find the main entrypoint".Agent targets project tmp, not parent
C:\Dev\tmp:Linux
Repro: Neovim
:pwd->/home, search "Find the main entrypoint".Command includes
--workspace; agent writes the same TEMP_FILE path as in the prompt:Test plan
--workspace--workspacepresent; agent output path matches TEMP_FILE in prompt