-
Notifications
You must be signed in to change notification settings - Fork 265
fix(extension): add workspace extension kind and script fallback patterns #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
3d13eb9
f93adc1
3a01960
c65b0a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,7 @@ All PR review tracking artifacts reside in `.copilot-tracking/pr/review/{{normal | |||||
| review/ | ||||||
| {{normalized_branch_name}}/ | ||||||
| in-progress-review.md # Living PR review document | ||||||
| pr-reference.xml # Generated via scripts/dev-tools/pr-ref-gen.sh | ||||||
| pr-reference.xml # Generated via pr-ref-gen.sh (see script location in Phase 1) | ||||||
| handoff.md # Finalized PR comments and decisions | ||||||
| ``` | ||||||
|
|
||||||
|
|
@@ -148,7 +148,7 @@ Repeat phases as needed when new information or user direction warrants deeper a | |||||
|
|
||||||
| ### Phase 1: Initialize Review | ||||||
|
|
||||||
| Key tools: `git`, `scripts/dev-tools/pr-ref-gen.sh`, workspace file operations | ||||||
| Key tools: `git`, `pr-ref-gen.sh` (with fallback resolution), workspace file operations | ||||||
|
|
||||||
| #### Step 1: Normalize Branch Name | ||||||
|
|
||||||
|
|
@@ -160,7 +160,33 @@ Create the PR tracking directory `.copilot-tracking/pr/review/{{normalized_branc | |||||
|
|
||||||
| #### Step 3: Generate PR Reference | ||||||
|
|
||||||
| Generate `pr-reference.xml` using `./scripts/dev-tools/pr-ref-gen.sh --output "{{tracking_directory}}/pr-reference.xml"`. Pass additional flags such as `--base` when the user specifies one. | ||||||
| Locate and execute the PR reference script using environment-specific fallback patterns. | ||||||
|
|
||||||
| **For Unix-like shells (bash/zsh)**: | ||||||
|
|
||||||
| ```bash | ||||||
| # Try local first, then extension | ||||||
| SCRIPT_PATH="./scripts/dev-tools/pr-ref-gen.sh" | ||||||
| if [ ! -f "$SCRIPT_PATH" ]; then | ||||||
| SCRIPT_PATH=$(find ~/.vscode*/extensions -name "pr-ref-gen.sh" 2>/dev/null | head -1) | ||||||
| fi | ||||||
|
|
||||||
| "$SCRIPT_PATH" --output "{{tracking_directory}}/pr-reference.xml" | ||||||
|
||||||
| "$SCRIPT_PATH" --output "{{tracking_directory}}/pr-reference.xml" | |
| "$SCRIPT_PATH" --output ".copilot-tracking/pr/review/{{normalized_branch_name}}/pr-reference.xml" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -60,6 +60,32 @@ Git operations via `run_in_terminal`: | |||||
|
|
||||||
| Workspace utilities: `list_dir`, `read_file`, `grep_search` | ||||||
|
|
||||||
| **Script path resolution**: Use environment-specific fallback patterns. | ||||||
|
||||||
| **Script path resolution**: Use environment-specific fallback patterns. | |
| **Script path resolution**: Use environment-specific fallback patterns instead of hardcoding `scripts/dev-tools/pr-ref-gen.sh`. If earlier instructions mention running `scripts/dev-tools/pr-ref-gen.sh` directly, treat this section as the authoritative guidance and use the resolved `SCRIPT_PATH` variable instead. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,8 +64,32 @@ Add an **External References** section to work item descriptions when authoritat | |
|
|
||
| **Git context** (when `${input:includeBranchChanges}` is `true` and no documents exist): | ||
|
|
||
| * `run_in_terminal`: Generate diff XML via `scripts/dev-tools/pr-ref-gen.sh --base-branch "${input:baseBranch}" --output "<planning-folder>/git-branch-diff.xml"` | ||
| * Sync remote first: `git fetch <remote> <branch> --prune` | ||
| * `run_in_terminal`: Generate diff XML using environment-specific fallback patterns: | ||
|
|
||
| **For Unix-like shells (bash/zsh)**: | ||
|
|
||
| ```bash | ||
| # Try local first, then extension | ||
| SCRIPT_PATH="./scripts/dev-tools/pr-ref-gen.sh" | ||
| if [ ! -f "$SCRIPT_PATH" ]; then | ||
| SCRIPT_PATH=$(find ~/.vscode*/extensions -name "pr-ref-gen.sh" 2>/dev/null | head -1) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sadly the user could have installed this as a cloned repo (somewhere) on their computer, or a submodule, etc. I think I have a for this but it might seem a little weird. I'll post a PR with the change here in a moment but it will basically take advantage of how instruction files and their descriptions are added to the system message for all conversations. Since any custom agent or prompt that needs to reference anything out of hve-core, will have this problem.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your PR #402 may help us address the fallback correctly in case of any installation method, including Extension. We do however still need to validate the extension file path resolution works because we risk your newest instruction to also not even load if loaded through Windows/WSL install mode. I will do a new dedicated PR for Extension to be set as |
||
| fi | ||
|
|
||
|
katriendg marked this conversation as resolved.
|
||
| "$SCRIPT_PATH" --base-branch "${input:baseBranch}" --output "<planning-folder>/git-branch-diff.xml" | ||
| ``` | ||
|
|
||
| **For Windows PowerShell**: | ||
|
|
||
| ```powershell | ||
| # Try local first, then extension | ||
| $ScriptPath = "./scripts/dev-tools/Generate-PrReference.ps1" | ||
| if (-not (Test-Path $ScriptPath)) { | ||
| $ScriptPath = Get-ChildItem -Path "$HOME/.vscode*/extensions" -Filter "Generate-PrReference.ps1" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName | ||
| } | ||
|
|
||
| pwsh -File $ScriptPath -BaseBranch "${input:baseBranch}" -Output "<planning-folder>/git-branch-diff.xml" | ||
|
katriendg marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| **Workspace utilities**: `list_dir`, `read_file`, `grep_search` for artifact location. | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.