fix(opencode): use session cwd for command substitution#20773
Open
jeevan6996 wants to merge 3 commits intoanomalyco:devfrom
Open
fix(opencode): use session cwd for command substitution#20773jeevan6996 wants to merge 3 commits intoanomalyco:devfrom
jeevan6996 wants to merge 3 commits intoanomalyco:devfrom
Conversation
Signed-off-by: jeevan6996 <jeevanpawar5890@gmail.com>
Signed-off-by: jeevan6996 <jeevanpawar5890@gmail.com>
Signed-off-by: jeevan6996 <jeevanpawar5890@gmail.com>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Related PR Found:
This PR (#20770) is the one that the current PR (#20773) is superseding due to a stale head sync issue. While they address the same fix, PR #20773 is the active version intended to replace it. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
Hi maintainers - this PR is also ready for review from my side. All required checks are green (including linux/windows unit + e2e, typecheck, standards, and compliance).\n\nWould appreciate a review when you get a chance. Thank you! |
Author
|
Friendly ping on this session cwd command-substitution fix. Please let me know if any final changes are needed for merge. |
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.
Issue for this PR
Closes #20735
Type of change
What does this PR do?
This fixes slash-command shell substitutions (for
!backtick expressions) to run in the active session directory instead of the server process working directory. It adds a reusable substitution helper and keeps behavior unchanged when no substitutions exist.It also adds regression tests and makes the assertion shell-agnostic so the test is valid across Windows PowerShell and Unix-like shells.
How did you verify your code works?
bun test test/session/prompt.test.tsinpackages/opencodebun turbo typechecksuccessfullyScreenshots / recordings
N/A (non-UI backend fix)
Checklist