diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml
index 1591ba2a9a98b8587814d25858f4e0d78d9f7d34..d3688a722aa107efb3dfb95351404f43c9aece65 100644
--- a/.github/workflows/autofix_pr.yml
+++ b/.github/workflows/autofix_pr.yml
@@ -90,7 +90,7 @@ jobs:
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- id: get-app-token
- name: autofix_pr::commit_changes::authenticate_as_zippy
+ name: steps::authenticate_as_zippy
uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
with:
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
diff --git a/.github/workflows/cherry_pick.yml b/.github/workflows/cherry_pick.yml
index bc01aae17e7141a2359b162c3de94c1aec7b765c..d4dee5154f2209521f3e9d183c05c118e8861521 100644
--- a/.github/workflows/cherry_pick.yml
+++ b/.github/workflows/cherry_pick.yml
@@ -30,7 +30,7 @@ jobs:
with:
clean: false
- id: get-app-token
- name: cherry_pick::run_cherry_pick::authenticate_as_zippy
+ name: steps::authenticate_as_zippy
uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
with:
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.yml
index 9f0917e388c74cffed8f342f7504bc111e6f5147..7a7fff9b97d694c1b02dd426f5d59301fe2be81e 100644
--- a/.github/workflows/extension_tests.yml
+++ b/.github/workflows/extension_tests.yml
@@ -61,7 +61,8 @@ jobs:
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- - name: steps::cargo_fmt
+ - id: cargo_fmt
+ name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
- name: extension_tests::run_clippy
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 155b38666f4bd73e68e9ea326db9a6862288a1fe..317d5a8df37a62887ce4ddcdd67c8d77b48d56d6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -26,7 +26,8 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
@@ -71,15 +72,15 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- - name: steps::trigger_autofix
- if: failure() && github.event_name == 'pull_request' && github.actor != 'zed-zippy[bot]'
- run: gh workflow run autofix_pr.yml -f pr_number=${{ github.event.pull_request.number }} -f run_clippy=true
+ - id: record_clippy_failure
+ name: steps::record_clippy_failure
+ if: always()
+ run: echo "failed=${{ steps.clippy.outcome == 'failure' }}" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: steps::cargo_install_nextest
uses: taiki-e/install-action@nextest
- name: steps::clear_target_dir_if_large
@@ -93,6 +94,8 @@ jobs:
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
+ outputs:
+ clippy_failed: ${{ steps.record_clippy_failure.outputs.failed == 'true' }}
timeout-minutes: 60
run_tests_windows:
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
@@ -111,7 +114,8 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::clear_target_dir_if_large
@@ -478,11 +482,17 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
+ - id: get-app-token
+ name: steps::authenticate_as_zippy
+ uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
+ with:
+ app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
+ private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
- name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
shell: bash -euxo pipefail {0}
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
notify_on_failure:
needs:
- upload_release_assets
diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml
index d76244175accc3e816cbd7d5dc322d2529a0a236..b23e4b7518a672c0d586ea5ba437db5cf8f94bb6 100644
--- a/.github/workflows/release_nightly.yml
+++ b/.github/workflows/release_nightly.yml
@@ -20,7 +20,8 @@ jobs:
with:
clean: false
fetch-depth: 0
- - name: steps::cargo_fmt
+ - id: cargo_fmt
+ name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
- name: ./script/clippy
@@ -44,7 +45,8 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::clear_target_dir_if_large
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index a9a46b7a797faae793c87601d306a2aea80e6592..fac3221d63a080fa53b7ba1c5b7249e6a405c73c 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -74,18 +74,19 @@ jobs:
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: '9'
- - name: ./script/prettier
+ - id: prettier
+ name: steps::prettier
run: ./script/prettier
shell: bash -euxo pipefail {0}
- - name: steps::cargo_fmt
+ - id: cargo_fmt
+ name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
- - name: steps::trigger_autofix
- if: failure() && github.event_name == 'pull_request' && github.actor != 'zed-zippy[bot]'
- run: gh workflow run autofix_pr.yml -f pr_number=${{ github.event.pull_request.number }} -f run_clippy=false
+ - id: record_style_failure
+ name: steps::record_style_failure
+ if: always()
+ run: echo "failed=${{ steps.prettier.outcome == 'failure' || steps.cargo_fmt.outcome == 'failure' }}" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ./script/check-todos
run: ./script/check-todos
shell: bash -euxo pipefail {0}
@@ -96,6 +97,8 @@ jobs:
uses: crate-ci/typos@2d0ce569feab1f8752f1dde43cc2f2aa53236e06
with:
config: ./typos.toml
+ outputs:
+ style_failed: ${{ steps.record_style_failure.outputs.failed == 'true' }}
timeout-minutes: 60
run_tests_windows:
needs:
@@ -116,7 +119,8 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::clear_target_dir_if_large
@@ -163,15 +167,15 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- - name: steps::trigger_autofix
- if: failure() && github.event_name == 'pull_request' && github.actor != 'zed-zippy[bot]'
- run: gh workflow run autofix_pr.yml -f pr_number=${{ github.event.pull_request.number }} -f run_clippy=true
+ - id: record_clippy_failure
+ name: steps::record_clippy_failure
+ if: always()
+ run: echo "failed=${{ steps.clippy.outcome == 'failure' }}" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: steps::cargo_install_nextest
uses: taiki-e/install-action@nextest
- name: steps::clear_target_dir_if_large
@@ -185,6 +189,8 @@ jobs:
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
+ outputs:
+ clippy_failed: ${{ steps.record_clippy_failure.outputs.failed == 'true' }}
timeout-minutes: 60
run_tests_mac:
needs:
@@ -205,7 +211,8 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- - name: steps::clippy
+ - id: clippy
+ name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
@@ -585,6 +592,24 @@ jobs:
exit $EXIT_CODE
shell: bash -euxo pipefail {0}
+ call_autofix:
+ needs:
+ - check_style
+ - run_tests_linux
+ if: always() && (needs.check_style.outputs.style_failed == 'true' || needs.run_tests_linux.outputs.clippy_failed == 'true') && github.event_name == 'pull_request' && github.actor != 'zed-zippy[bot]'
+ runs-on: namespace-profile-2x4-ubuntu-2404
+ steps:
+ - id: get-app-token
+ name: steps::authenticate_as_zippy
+ uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
+ with:
+ app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
+ private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
+ - name: run_tests::call_autofix::dispatch_autofix
+ run: gh workflow run autofix_pr.yml -f pr_number=${{ github.event.pull_request.number }} -f run_clippy=${{ needs.run_tests_linux.outputs.clippy_failed == 'true' }}
+ shell: bash -euxo pipefail {0}
+ env:
+ GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
diff --git a/assets/prompts/content_prompt_v2.hbs b/assets/prompts/content_prompt_v2.hbs
index 87376f49f12f0e27cc61e9f9747d9de6bfde43cb..826aada8c04863c21d756cf99beb64e582ed4906 100644
--- a/assets/prompts/content_prompt_v2.hbs
+++ b/assets/prompts/content_prompt_v2.hbs
@@ -14,7 +14,6 @@ The section you'll need to rewrite is marked with
The context around the relevant section has been truncated (possibly in the middle of a line) for brevity.
{{/if}}
-{{#if rewrite_section}}
And here's the section to rewrite based on that prompt again for reference:
@@ -33,8 +32,6 @@ Below are the diagnostic errors visible to the user. If the user requests probl
{{/each}}
{{/if}}
-{{/if}}
-
Only make changes that are necessary to fulfill the prompt, leave everything else as-is. All surrounding {{content_type}} will be preserved.
Start at the indentation level in the original file in the rewritten {{content_type}}.
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 46324130ecfefefab74c26c6b48683015f766d08..d59516f6883afd93abfac6777eb855d569db2ac2 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -1705,7 +1705,12 @@
// }
//
"file_types": {
- "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json", "tsconfig*.json"],
+ "JSONC": [
+ "**/.zed/*.json",
+ "**/.vscode/**/*.json",
+ "**/{zed,Zed}/{settings,keymap,tasks,debug}.json",
+ "tsconfig*.json",
+ ],
"Markdown": [".rules", ".cursorrules", ".windsurfrules", ".clinerules"],
"Shell Script": [".env.*"],
},
diff --git a/crates/acp_thread/src/acp_thread.rs b/crates/acp_thread/src/acp_thread.rs
index 2ec6347fd4aa088d7ae2cc8f5a7b6cef37d3b202..a994cc8e57e4456ec57092b2257269b104af74c7 100644
--- a/crates/acp_thread/src/acp_thread.rs
+++ b/crates/acp_thread/src/acp_thread.rs
@@ -192,6 +192,7 @@ pub struct ToolCall {
pub locations: Vec,
pub resolved_locations: Vec