fix(agent): scope @-references to workspace root instead of process CWD#3784
Merged
Merged
Conversation
6402ebe to
63164eb
Compare
63164eb to
0b47d43
Compare
0b47d43 to
b6df49a
Compare
0e4c30c to
d2b8303
Compare
d2b8303 to
a451bcf
Compare
Multi-tab desktop sessions were resolving @file references against the process working directory (os.Getwd()), causing cross-workspace contamination when tabs share the same process. Changes: - controller.go: add WorkspaceRoot() accessor for cpRoot - refs.go: detectRefs/resolveBareNames/readFileRef use cpRoot as base directory - app.go: workspaceRelative renamed to workspaceRelativeIn with explicit root; AttachDropped uses activeWorkspaceRoot() - complete.go: fileItems/searchFileRefs use ctrl.WorkspaceRoot() All paths fall back to os.Getwd() when workspaceRoot is empty, preserving CLI compatibility. Closes: esengine#3776
auto-merge was automatically disabled
June 10, 2026 09:13
Head branch was pushed to by a user without write access
a451bcf to
9424cf2
Compare
Scope @-reference detection and TUI subdirectory completion to the active workspace root when one is configured. Use absolute paths for scoped PDF extraction so external tools work outside the process CWD. Co-authored-by: SuMuxi66 <2728602302@qq.com>
SivanCola
approved these changes
Jun 10, 2026
SivanCola
left a comment
Collaborator
There was a problem hiding this comment.
Approved after tightening the remaining workspace-scope edges: @ref detection no longer falls back to process CWD when a workspace root is set, TUI subdirectory completion resolves under the active workspace, and scoped PDF extraction passes an absolute path to external extractors. Local targeted tests passed.
| } | ||
| statPath = absPath | ||
| } | ||
| if _, err := os.Stat(statPath); err == nil { |
This was referenced Jun 10, 2026
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.
Multi-tab desktop sessions were resolving @file references against the process working directory (os.Getwd()), causing cross-workspace contamination when tabs share the same process.
Changes:
controller.go: add WorkspaceRoot() accessor for cpRoot
refs.go: detectRefs/resolveBareNames/readFileRef use cpRoot as base directory
app.go: workspaceRelative renamed to workspaceRelativeIn with explicit root; AttachDropped uses activeWorkspaceRoot()
complete.go: fileItems/searchFileRefs use ctrl.WorkspaceRoot()
All paths fall back to os.Getwd() when workspaceRoot is empty, preserving CLI compatibility.
Closes: #3776