diff --git a/.cargo/ci-config.toml b/.cargo/ci-config.toml
index 09e1af5c18174f5b1024e223f4a0cd5dac256c6e..d5e312c2429ad8a4fa933d4080c8fcde217bd6eb 100644
--- a/.cargo/ci-config.toml
+++ b/.cargo/ci-config.toml
@@ -10,3 +10,15 @@
# Here, we opted to use `[target.'cfg(all())']` instead of `[build]` because `[target.'**']` is guaranteed to be cumulative.
[target.'cfg(all())']
rustflags = ["-D", "warnings"]
+
+# Use Mold on Linux, because it's faster than GNU ld and LLD.
+#
+# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
+# is faster than Mold, in their own ~/.cargo/config.toml.
+[target.x86_64-unknown-linux-gnu]
+linker = "clang"
+rustflags = ["-C", "link-arg=-fuse-ld=mold"]
+
+[target.aarch64-unknown-linux-gnu]
+linker = "clang"
+rustflags = ["-C", "link-arg=-fuse-ld=mold"]
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 717c5e18c8d294bacf65207bc6b8ecb7dba1b152..9b2e6f51c96e3ae98a54bbb11524210911d0e262 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -4,14 +4,9 @@ rustflags = ["-C", "symbol-mangling-version=v0", "--cfg", "tokio_unstable"]
[alias]
xtask = "run --package xtask --"
-
-[target.x86_64-unknown-linux-gnu]
-linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
-
-[target.aarch64-unknown-linux-gnu]
-linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
+perf-test = ["test", "--profile", "release-fast", "--lib", "--bins", "--tests", "--all-features", "--config", "target.'cfg(true)'.runner='cargo run -p perf --release'", "--config", "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]"]
+# Keep similar flags here to share some ccache
+perf-compare = ["run", "--profile", "release-fast", "-p", "perf", "--config", "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]", "--", "compare"]
[target.'cfg(target_os = "windows")']
rustflags = [
diff --git a/.config/hakari.toml b/.config/hakari.toml
index b1e2954743b404f088c71c28aad1d6a699a22aeb..1e8386a14115be2e36b287ace0d47d464df9e620 100644
--- a/.config/hakari.toml
+++ b/.config/hakari.toml
@@ -24,9 +24,9 @@ workspace-members = [
third-party = [
{ name = "reqwest", version = "0.11.27" },
# build of remote_server should not include scap / its x11 dependency
- { name = "scap", git = "https://github.com/zed-industries/scap", rev = "808aa5c45b41e8f44729d02e38fd00a2fe2722e7" },
+ { name = "zed-scap", git = "https://github.com/zed-industries/scap", rev = "4afea48c3b002197176fb19cd0f9b180dd36eaac", version = "0.0.8-zed" },
# build of remote_server should not need to include on libalsa through rodio
- { name = "rodio", git = "https://github.com/RustAudio/rodio", branch = "better_wav_output"},
+ { name = "rodio", git = "https://github.com/RustAudio/rodio" },
]
[final-excludes]
@@ -37,8 +37,6 @@ workspace-members = [
"zed_glsl",
"zed_html",
"zed_proto",
- "zed_ruff",
"slash_commands_example",
- "zed_snippets",
"zed_test_extension",
]
diff --git a/.github/ISSUE_TEMPLATE/07_bug_windows_alpha.yml b/.github/ISSUE_TEMPLATE/06_bug_windows_beta.yml
similarity index 86%
rename from .github/ISSUE_TEMPLATE/07_bug_windows_alpha.yml
rename to .github/ISSUE_TEMPLATE/06_bug_windows_beta.yml
index 826c2b8027144d4b658108e09c79e40490c3005d..b2b2a0f9dfcd5ddaa0dda41650864b053c5bb933 100644
--- a/.github/ISSUE_TEMPLATE/07_bug_windows_alpha.yml
+++ b/.github/ISSUE_TEMPLATE/06_bug_windows_beta.yml
@@ -1,8 +1,8 @@
-name: Bug Report (Windows Alpha)
-description: Zed Windows Alpha Related Bugs
+name: Bug Report (Windows Beta)
+description: Zed Windows Beta Related Bugs
type: "Bug"
labels: ["windows"]
-title: "Windows Alpha: "
+title: "Windows Beta: "
body:
- type: textarea
attributes:
diff --git a/.github/ISSUE_TEMPLATE/07_bug_windows.yml b/.github/ISSUE_TEMPLATE/07_bug_windows.yml
new file mode 100644
index 0000000000000000000000000000000000000000..4e90c15dbde1b2727b9508cee69b5c7fd9304fc3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/07_bug_windows.yml
@@ -0,0 +1,35 @@
+name: Bug Report (Windows)
+description: Zed Windows Related Bugs
+type: "Bug"
+labels: ["windows"]
+title: "Windows: "
+body:
+ - type: textarea
+ attributes:
+ label: Summary
+ description: Describe the bug with a one-line summary, and provide detailed reproduction steps
+ value: |
+
+ SUMMARY_SENTENCE_HERE
+
+ ### Description
+
+ Steps to trigger the problem:
+ 1.
+ 2.
+ 3.
+
+ **Expected Behavior**:
+ **Actual Behavior**:
+
+ validations:
+ required: true
+ - type: textarea
+ id: environment
+ attributes:
+ label: Zed Version and System Specs
+ description: 'Open Zed, and in the command palette select "zed: copy system specs into clipboard"'
+ placeholder: |
+ Output of "zed: copy system specs into clipboard"
+ validations:
+ required: true
diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml
index 7a4d3e948bb4d205412ca93fa5cc0e1351e65ebd..faf94017976f4b06fdaaa80a5db8083405a7950a 100644
--- a/.github/actions/run_tests/action.yml
+++ b/.github/actions/run_tests/action.yml
@@ -20,9 +20,4 @@ runs:
- name: Run tests
shell: bash -euxo pipefail {0}
- run: cargo nextest run --workspace --no-fail-fast
-
- - name: Run doctests
- shell: bash -euxo pipefail {0}
- # Nextest currently doesn't support doctests
- run: cargo test --workspace --doc --no-fail-fast
+ run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
diff --git a/.github/actions/run_tests_windows/action.yml b/.github/actions/run_tests_windows/action.yml
index 8392ca1d375856c7f649e73d2445ce4f873924b1..d85d47cb969e22ca3c73c9ab8caca279a9b5ba88 100644
--- a/.github/actions/run_tests_windows/action.yml
+++ b/.github/actions/run_tests_windows/action.yml
@@ -24,4 +24,4 @@ runs:
shell: powershell
working-directory: ${{ inputs.working-directory }}
run: |
- cargo nextest run --workspace --no-fail-fast
+ cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d416b4af0eedf38da249e39181bd8017b57f752c..f5bf5790e4b7daf02f4713d25b1017b494f88f1a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -373,6 +373,46 @@ jobs:
if: always()
run: rm -rf ./../.cargo
+ doctests:
+ # Nextest currently doesn't support doctests, so run them separately and in parallel.
+ timeout-minutes: 60
+ name: (Linux) Run doctests
+ needs: [job_spec]
+ if: |
+ github.repository_owner == 'zed-industries' &&
+ needs.job_spec.outputs.run_tests == 'true'
+ runs-on:
+ - namespace-profile-16x32-ubuntu-2204
+ steps:
+ - name: Add Rust to the PATH
+ run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
+
+ - name: Checkout repo
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ clean: false
+
+ - name: Cache dependencies
+ uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ with:
+ save-if: ${{ github.ref == 'refs/heads/main' }}
+ # cache-provider: "buildjet"
+
+ - name: Install Linux dependencies
+ run: ./script/linux
+
+ - name: Configure CI
+ run: |
+ mkdir -p ./../.cargo
+ cp ./.cargo/ci-config.toml ./../.cargo/config.toml
+
+ - name: Run doctests
+ run: cargo test --workspace --doc --no-fail-fast
+
+ - name: Clean CI config file
+ if: always()
+ run: rm -rf ./../.cargo
+
build_remote_server:
timeout-minutes: 60
name: (Linux) Build Remote Server
@@ -786,8 +826,9 @@ jobs:
timeout-minutes: 120
name: Create a Windows installer
runs-on: [self-32vcpu-windows-2022]
- if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
- # if: (startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling'))
+ if: |
+ ( startsWith(github.ref, 'refs/tags/v')
+ || contains(github.event.pull_request.labels.*.name, 'run-bundling') )
needs: [windows_tests]
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
@@ -825,13 +866,12 @@ jobs:
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
- name: ZedEditorUserSetup-x64-${{ github.event.pull_request.head.sha || github.sha }}.exe
+ name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.exe
path: ${{ env.SETUP_PATH }}
- name: Upload Artifacts to release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
- # Re-enable when we are ready to publish windows preview releases
- if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) && env.RELEASE_CHANNEL == 'preview' }} # upload only preview
+ if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) }}
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
diff --git a/.github/workflows/community_champion_auto_labeler.yml b/.github/workflows/community_champion_auto_labeler.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c525bf4738f888b5ca84230982ff1f4f5da2db2f
--- /dev/null
+++ b/.github/workflows/community_champion_auto_labeler.yml
@@ -0,0 +1,48 @@
+name: Community Champion Auto Labeler
+
+on:
+ issues:
+ types: [opened]
+ pull_request_target:
+ types: [opened]
+
+jobs:
+ label_community_champion:
+ if: github.repository_owner == 'zed-industries'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check if author is a community champion and apply label
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const communityChampionBody = `${{ secrets.COMMUNITY_CHAMPIONS }}`;
+
+ const communityChampions = communityChampionBody
+ .split('\n')
+ .map(handle => handle.trim().toLowerCase());
+
+ let author;
+ if (context.eventName === 'issues') {
+ author = context.payload.issue.user.login;
+ } else if (context.eventName === 'pull_request_target') {
+ author = context.payload.pull_request.user.login;
+ }
+
+ if (!author || !communityChampions.includes(author.toLowerCase())) {
+ return;
+ }
+
+ const issueNumber = context.payload.issue?.number || context.payload.pull_request?.number;
+
+ try {
+ await github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: issueNumber,
+ labels: ['community champion']
+ });
+
+ console.log(`Applied 'community champion' label to #${issueNumber} by ${author}`);
+ } catch (error) {
+ console.error(`Failed to apply label: ${error.message}`);
+ }
diff --git a/.github/workflows/community_release_actions.yml b/.github/workflows/community_release_actions.yml
index 37ade90574e76cd95755aad6b5601a43946a271c..4a042a5e06b499b1ca278f152798c171971129ee 100644
--- a/.github/workflows/community_release_actions.yml
+++ b/.github/workflows/community_release_actions.yml
@@ -1,3 +1,6 @@
+# IF YOU UPDATE THE NAME OF ANY GITHUB SECRET, YOU MUST CHERRY PICK THE COMMIT
+# TO BOTH STABLE AND PREVIEW CHANNELS
+
name: Release Actions
on:
@@ -13,9 +16,9 @@ jobs:
id: get-release-url
run: |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
- URL="https://zed.dev/releases/preview/latest"
+ URL="https://zed.dev/releases/preview"
else
- URL="https://zed.dev/releases/stable/latest"
+ URL="https://zed.dev/releases/stable"
fi
echo "URL=$URL" >> "$GITHUB_OUTPUT"
@@ -36,7 +39,7 @@ jobs:
content: ${{ steps.get-content.outputs.string }}
send_release_notes_email:
- if: github.repository_owner == 'zed-industries' && !github.event.release.prerelease
+ if: false && github.repository_owner == 'zed-industries' && !github.event.release.prerelease
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
diff --git a/.github/workflows/issue_response.yml b/.github/workflows/issue_response.yml
deleted file mode 100644
index f084b9ba9dfc4aba46a766986bafcffa3e9fd0ce..0000000000000000000000000000000000000000
--- a/.github/workflows/issue_response.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Issue Response
-
-on:
- schedule:
- - cron: "0 12 * * 2"
- workflow_dispatch:
-
-jobs:
- issue-response:
- if: github.repository_owner == 'zed-industries'
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
-
- - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- with:
- version: 9
-
- - name: Setup Node
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
- with:
- node-version: "20"
- cache: "pnpm"
- cache-dependency-path: "script/issue_response/pnpm-lock.yaml"
-
- - run: pnpm install --dir script/issue_response
-
- - name: Run Issue Response
- run: pnpm run --dir script/issue_response start
- env:
- ISSUE_RESPONSE_GITHUB_TOKEN: ${{ secrets.ISSUE_RESPONSE_GITHUB_TOKEN }}
- SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}
diff --git a/.gitignore b/.gitignore
index 7b40c45adf614eb91f1676144e7b70a7b2a373f2..d248b1f7e5adf30cb286a1737c1cd4f72f0f5d20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@
.venv
.vscode
.wrangler
+.perf-runs
/assets/*licenses.*
/crates/collab/seed.json
/crates/theme/schemas/theme.json
diff --git a/.rules b/.rules
index 2f2b9cd705d95775bedf092bc4e6254136da6117..82d15eb9e88299ee7c7fe6c717b2da2646e676a7 100644
--- a/.rules
+++ b/.rules
@@ -59,7 +59,7 @@ Trying to update an entity while it's already being updated must be avoided as t
When `read_with`, `update`, or `update_in` are used with an async context, the closure's return value is wrapped in an `anyhow::Result`.
-`WeakEntity` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to eachother they will never be dropped.
+`WeakEntity` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to each other they will never be dropped.
## Concurrency
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8615ba2c9ad324357792772392c49c7899ffa410..9cbac4af2b57f0350fa9f5665e110e0d6e7f6341 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -63,6 +63,7 @@ Although there are few hard and fast rules, typically we don't merge:
- New file icons. Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner, please don't submit PRs with off-the-shelf SVGs.
- Giant refactorings.
- Non-trivial changes with no tests.
+- Stylistic code changes that do not alter any app logic. Reducing allocations, removing `.unwrap()`s, fixing typos is great; making code "more readable" — maybe not so much.
- Features where (in our subjective opinion) the extra complexity isn't worth it for the number of people who will benefit.
- Anything that seems completely AI generated.
diff --git a/Cargo.lock b/Cargo.lock
index 8252dc5fe867fc0668ea94b41cee502b47e3aa84..14c4ab1fd13d0bcaa877eea987ce9f73a5edfd2d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,6 @@ dependencies = [
"agent_settings",
"anyhow",
"buffer_diff",
- "collections",
"editor",
"env_logger 0.11.8",
"file_icons",
@@ -36,11 +35,11 @@ dependencies = [
"terminal",
"ui",
"url",
- "util",
"uuid",
"watch",
- "which 6.0.3",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -48,7 +47,6 @@ name = "acp_tools"
version = "0.1.0"
dependencies = [
"agent-client-protocol",
- "collections",
"gpui",
"language",
"markdown",
@@ -58,9 +56,10 @@ dependencies = [
"settings",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -70,7 +69,6 @@ dependencies = [
"anyhow",
"buffer_diff",
"clock",
- "collections",
"ctor",
"futures 0.3.31",
"gpui",
@@ -83,9 +81,10 @@ dependencies = [
"serde_json",
"settings",
"text",
- "util",
"watch",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -105,9 +104,9 @@ dependencies = [
"release_channel",
"smallvec",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -150,7 +149,6 @@ dependencies = [
"chrono",
"client",
"cloud_llm_client",
- "collections",
"component",
"context_server",
"convert_case 0.8.0",
@@ -159,7 +157,6 @@ dependencies = [
"git",
"gpui",
"heed",
- "http_client",
"icons",
"indoc",
"itertools 0.14.0",
@@ -175,7 +172,7 @@ dependencies = [
"rand 0.9.1",
"ref-cast",
"rope",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -186,26 +183,29 @@ dependencies = [
"theme",
"thiserror 2.0.12",
"time",
- "util",
"uuid",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_env_vars",
"zstd",
]
[[package]]
name = "agent-client-protocol"
-version = "0.2.1"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "003fb91bf1b8d6e15f72c45fb9171839af8241e81e3839fbb73536af113b7a79"
+checksum = "3aaa2bd05a2401887945f8bfd70026e90bc3cf96c62ab9eba2779835bf21dc60"
dependencies = [
"anyhow",
"async-broadcast",
+ "async-trait",
"futures 0.3.31",
"log",
"parking_lot",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
]
@@ -228,7 +228,6 @@ dependencies = [
"client",
"clock",
"cloud_llm_client",
- "collections",
"context_server",
"ctor",
"db",
@@ -241,7 +240,6 @@ dependencies = [
"gpui_tokio",
"handlebars 4.5.0",
"html_to_markdown",
- "http_client",
"indoc",
"itertools 0.14.0",
"language",
@@ -257,7 +255,7 @@ dependencies = [
"prompt_store",
"reqwest_client",
"rust-embed",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -273,12 +271,14 @@ dependencies = [
"tree-sitter-rust",
"ui",
"unindent",
- "util",
"uuid",
"watch",
"web_search",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_env_vars",
"zlog",
"zstd",
@@ -294,8 +294,8 @@ dependencies = [
"agent-client-protocol",
"agent_settings",
"anyhow",
+ "async-trait",
"client",
- "collections",
"env_logger 0.11.8",
"fs",
"futures 0.3.31",
@@ -316,11 +316,15 @@ dependencies = [
"smol",
"task",
"tempfile",
+ "terminal",
"thiserror 2.0.12",
"ui",
- "util",
+ "uuid",
"watch",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -329,19 +333,20 @@ version = "0.1.0"
dependencies = [
"anyhow",
"cloud_llm_client",
- "collections",
"convert_case 0.8.0",
"fs",
"gpui",
"language_model",
"paths",
- "schemars",
+ "project",
+ "schemars 1.0.1",
"serde",
"serde_json",
"serde_json_lenient",
"settings",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -368,7 +373,6 @@ dependencies = [
"chrono",
"client",
"cloud_llm_client",
- "collections",
"command_palette_hooks",
"component",
"context_server",
@@ -383,7 +387,6 @@ dependencies = [
"fuzzy",
"gpui",
"html_to_markdown",
- "http_client",
"indoc",
"itertools 0.14.0",
"jsonschema",
@@ -410,13 +413,12 @@ dependencies = [
"release_channel",
"rope",
"rules_library",
- "schemars",
+ "schemars 1.0.1",
"search",
"serde",
"serde_json",
"serde_json_lenient",
"settings",
- "shlex",
"smol",
"streaming_diff",
"task",
@@ -434,10 +436,12 @@ dependencies = [
"unindent",
"url",
"urlencoding",
- "util",
"watch",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_actions",
]
@@ -483,7 +487,6 @@ dependencies = [
"client",
"cloud_llm_client",
"component",
- "feature_flags",
"gpui",
"language_model",
"serde",
@@ -496,8 +499,9 @@ dependencies = [
[[package]]
name = "alacritty_terminal"
-version = "0.25.1-dev"
-source = "git+https://github.com/zed-industries/alacritty.git?branch=add-hush-login-flag#828457c9ff1f7ea0a0469337cc8a37ee3a1b0590"
+version = "0.25.1-rc1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3cb5f4f1ef69bdb8b2095ddd14b09dd74ee0303aae8bd5372667a54cff689a1b"
dependencies = [
"base64 0.22.1",
"bitflags 2.9.0",
@@ -509,10 +513,11 @@ dependencies = [
"piper",
"polling",
"regex-automata",
+ "rustix 1.0.7",
"rustix-openpty",
"serde",
"signal-hook",
- "unicode-width 0.1.14",
+ "unicode-width",
"vte",
"windows-sys 0.59.0",
]
@@ -565,12 +570,12 @@ checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b"
[[package]]
name = "ammonia"
-version = "4.1.0"
+version = "4.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ada2ee439075a3e70b6992fce18ac4e407cd05aea9ca3f75d2c0b0c20bbb364"
+checksum = "17e913097e1a2124b46746c980134e8c954bc17a6a59bb3fde96f088d126dde6"
dependencies = [
"cssparser",
- "html5ever 0.31.0",
+ "html5ever 0.35.0",
"maplit",
"tendril",
"url",
@@ -654,13 +659,14 @@ dependencies = [
"anyhow",
"chrono",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"strum 0.27.1",
"thiserror 2.0.12",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -689,12 +695,9 @@ name = "arbitrary"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
-
-[[package]]
-name = "arc-swap"
-version = "1.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
+dependencies = [
+ "derive_arbitrary",
+]
[[package]]
name = "arg_enum_proc_macro"
@@ -775,6 +778,9 @@ dependencies = [
"serde",
"serde_repr",
"url",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols 0.32.6",
"zbus",
]
@@ -803,12 +809,14 @@ dependencies = [
"anyhow",
"futures 0.3.31",
"gpui",
+ "log",
"net",
- "parking_lot",
"smol",
"tempfile",
- "util",
+ "windows 0.61.1",
"workspace-hack",
+ "zed-util",
+ "zeroize",
]
[[package]]
@@ -833,7 +841,6 @@ dependencies = [
"client",
"clock",
"cloud_llm_client",
- "collections",
"context_server",
"fs",
"futures 0.3.31",
@@ -862,10 +869,11 @@ dependencies = [
"text",
"ui",
"unindent",
- "util",
"uuid",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_env_vars",
]
@@ -875,7 +883,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
- "collections",
"derive_more",
"extension",
"futures 0.3.31",
@@ -889,6 +896,8 @@ dependencies = [
"ui",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -897,9 +906,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"assistant_slash_command",
- "cargo_toml",
"chrono",
- "collections",
"context_server",
"editor",
"feature_flags",
@@ -909,7 +916,6 @@ dependencies = [
"globset",
"gpui",
"html_to_markdown",
- "http_client",
"language",
"pretty_assertions",
"project",
@@ -920,12 +926,13 @@ dependencies = [
"settings",
"smol",
"text",
- "toml 0.8.20",
"ui",
- "util",
"workspace",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zlog",
]
@@ -937,7 +944,6 @@ dependencies = [
"anyhow",
"buffer_diff",
"clock",
- "collections",
"ctor",
"derive_more",
"gpui",
@@ -955,9 +961,10 @@ dependencies = [
"serde_json",
"settings",
"text",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -974,7 +981,6 @@ dependencies = [
"client",
"clock",
"cloud_llm_client",
- "collections",
"component",
"derive_more",
"diffy",
@@ -986,7 +992,6 @@ dependencies = [
"gpui_tokio",
"handlebars 4.5.0",
"html_to_markdown",
- "http_client",
"indoc",
"itertools 0.14.0",
"language",
@@ -1005,7 +1010,7 @@ dependencies = [
"regex",
"reqwest_client",
"rust-embed",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -1021,12 +1026,13 @@ dependencies = [
"tree-sitter-rust",
"ui",
"unindent",
- "util",
"watch",
"web_search",
- "which 6.0.3",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zlog",
]
@@ -1401,20 +1407,20 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-tar",
- "collections",
"crossbeam",
+ "denoise",
"gpui",
"libwebrtc",
"log",
"parking_lot",
"rodio",
- "schemars",
"serde",
"settings",
"smol",
"thiserror 2.0.12",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -1437,11 +1443,9 @@ dependencies = [
"client",
"db",
"gpui",
- "http_client",
"log",
"paths",
"release_channel",
- "schemars",
"serde",
"serde_json",
"settings",
@@ -1450,6 +1454,7 @@ dependencies = [
"which 6.0.3",
"workspace",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -1473,15 +1478,15 @@ dependencies = [
"client",
"editor",
"gpui",
- "http_client",
"markdown_preview",
"release_channel",
"serde",
"serde_json",
"smol",
- "util",
"workspace",
"workspace-hack",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -2008,8 +2013,8 @@ version = "0.1.0"
dependencies = [
"aws-smithy-runtime-api",
"aws-smithy-types",
- "http_client",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -2143,7 +2148,7 @@ dependencies = [
"aws-sdk-bedrockruntime",
"aws-smithy-types",
"futures 0.3.31",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"strum 0.27.1",
@@ -2151,12 +2156,6 @@ dependencies = [
"workspace-hack",
]
-[[package]]
-name = "beef"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
-
[[package]]
name = "bigdecimal"
version = "0.4.8"
@@ -2312,14 +2311,15 @@ dependencies = [
[[package]]
name = "blade-graphics"
-version = "0.6.0"
-source = "git+https://github.com/kvark/blade?rev=bfa594ea697d4b6326ea29f747525c85ecf933b9#bfa594ea697d4b6326ea29f747525c85ecf933b9"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4deb8f595ce7f00dee3543ebf6fd9a20ea86fc421ab79600dac30876250bdae"
dependencies = [
"ash",
"ash-window",
"bitflags 2.9.0",
"bytemuck",
- "codespan-reporting 0.11.1",
+ "codespan-reporting",
"glow",
"gpu-alloc",
"gpu-alloc-ash",
@@ -2337,6 +2337,7 @@ dependencies = [
"objc2-metal",
"objc2-quartz-core",
"objc2-ui-kit",
+ "once_cell",
"raw-window-handle",
"slab",
"wasm-bindgen",
@@ -2346,7 +2347,8 @@ dependencies = [
[[package]]
name = "blade-macros"
version = "0.3.0"
-source = "git+https://github.com/kvark/blade?rev=bfa594ea697d4b6326ea29f747525c85ecf933b9#bfa594ea697d4b6326ea29f747525c85ecf933b9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27142319e2f4c264581067eaccb9f80acccdde60d8b4bf57cc50cd3152f109ca"
dependencies = [
"proc-macro2",
"quote",
@@ -2355,8 +2357,9 @@ dependencies = [
[[package]]
name = "blade-util"
-version = "0.2.0"
-source = "git+https://github.com/kvark/blade?rev=bfa594ea697d4b6326ea29f747525c85ecf933b9#bfa594ea697d4b6326ea29f747525c85ecf933b9"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a6be3a82c001ba7a17b6f8e413ede5d1004e6047213f8efaf0ffc15b5c4904c"
dependencies = [
"blade-graphics",
"bytemuck",
@@ -2364,15 +2367,6 @@ dependencies = [
"profiling",
]
-[[package]]
-name = "blake2"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
-dependencies = [
- "digest",
-]
-
[[package]]
name = "block"
version = "0.1.6"
@@ -2419,6 +2413,20 @@ dependencies = [
"piper",
]
+[[package]]
+name = "bm25"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cbd8ffdfb7b4c2ff038726178a780a94f90525ed0ad264c0afaa75dd8c18a64"
+dependencies = [
+ "cached",
+ "deunicode",
+ "fxhash",
+ "rust-stemmers",
+ "stop-words",
+ "unicode-segmentation",
+]
+
[[package]]
name = "borrow-or-share"
version = "0.2.2"
@@ -2490,11 +2498,11 @@ dependencies = [
"rand 0.9.1",
"rope",
"serde_json",
- "sum_tree",
"text",
"unindent",
- "util",
"workspace-hack",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -2625,6 +2633,39 @@ dependencies = [
"pkg-config",
]
+[[package]]
+name = "cached"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "801927ee168e17809ab8901d9f01f700cd7d8d6a6527997fee44e4b0327a253c"
+dependencies = [
+ "ahash 0.8.11",
+ "cached_proc_macro",
+ "cached_proc_macro_types",
+ "hashbrown 0.15.3",
+ "once_cell",
+ "thiserror 2.0.12",
+ "web-time",
+]
+
+[[package]]
+name = "cached_proc_macro"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9225bdcf4e4a9a4c08bf16607908eb2fbf746828d5e0b5e019726dbf6571f201"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
+[[package]]
+name = "cached_proc_macro_types"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0"
+
[[package]]
name = "call"
version = "0.1.0"
@@ -2632,25 +2673,23 @@ dependencies = [
"anyhow",
"audio",
"client",
- "collections",
"feature_flags",
"fs",
"futures 0.3.31",
"gpui",
"gpui_tokio",
- "http_client",
"language",
"livekit_client",
"log",
"postage",
"project",
- "schemars",
"serde",
- "serde_derive",
"settings",
"telemetry",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -2688,6 +2727,53 @@ dependencies = [
"serde",
]
+[[package]]
+name = "candle-core"
+version = "0.9.1"
+source = "git+https://github.com/zed-industries/candle?branch=9.1-patched#724d75eb3deebefe83f2a7381a45d4fac6eda383"
+dependencies = [
+ "byteorder",
+ "float8",
+ "gemm 0.17.1",
+ "half",
+ "memmap2",
+ "num-traits",
+ "num_cpus",
+ "rand 0.9.1",
+ "rand_distr",
+ "rayon",
+ "safetensors",
+ "thiserror 1.0.69",
+ "ug",
+ "yoke",
+ "zip 1.1.4",
+]
+
+[[package]]
+name = "candle-nn"
+version = "0.9.1"
+source = "git+https://github.com/zed-industries/candle?branch=9.1-patched#724d75eb3deebefe83f2a7381a45d4fac6eda383"
+dependencies = [
+ "candle-core",
+ "half",
+ "libc",
+ "num-traits",
+ "rayon",
+ "safetensors",
+ "serde",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "candle-onnx"
+version = "0.9.1"
+source = "git+https://github.com/zed-industries/candle?branch=9.1-patched#724d75eb3deebefe83f2a7381a45d4fac6eda383"
+dependencies = [
+ "candle-core",
+ "candle-nn",
+ "prost 0.12.6",
+]
+
[[package]]
name = "cap-fs-ext"
version = "3.4.4"
@@ -2821,7 +2907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff"
dependencies = [
"heck 0.4.1",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"proc-macro2",
"quote",
@@ -2902,10 +2988,8 @@ dependencies = [
"anyhow",
"client",
"clock",
- "collections",
"futures 0.3.31",
"gpui",
- "http_client",
"language",
"log",
"postage",
@@ -2914,8 +2998,10 @@ dependencies = [
"settings",
"text",
"time",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -2930,7 +3016,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-link",
+ "windows-link 0.1.1",
]
[[package]]
@@ -3049,8 +3135,8 @@ name = "cli"
version = "0.1.0"
dependencies = [
"anyhow",
+ "askpass",
"clap",
- "collections",
"core-foundation 0.10.0",
"core-services",
"exec",
@@ -3062,9 +3148,10 @@ dependencies = [
"release_channel",
"serde",
"tempfile",
- "util",
"windows 0.61.1",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -3078,7 +3165,6 @@ dependencies = [
"clock",
"cloud_api_client",
"cloud_llm_client",
- "collections",
"credentials_provider",
"derive_more",
"feature_flags",
@@ -3086,7 +3172,6 @@ dependencies = [
"futures 0.3.31",
"gpui",
"gpui_tokio",
- "http_client",
"http_client_tls",
"httparse",
"log",
@@ -3099,7 +3184,6 @@ dependencies = [
"release_channel",
"rpc",
"rustls-pki-types",
- "schemars",
"serde",
"serde_json",
"serde_urlencoded",
@@ -3117,10 +3201,12 @@ dependencies = [
"tokio-rustls 0.26.2",
"tokio-socks",
"url",
- "util",
"windows 0.61.1",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -3142,11 +3228,11 @@ dependencies = [
"futures 0.3.31",
"gpui",
"gpui_tokio",
- "http_client",
"parking_lot",
"serde_json",
"workspace-hack",
"yawc",
+ "zed-http-client",
]
[[package]]
@@ -3168,6 +3254,7 @@ name = "cloud_llm_client"
version = "0.1.0"
dependencies = [
"anyhow",
+ "chrono",
"pretty_assertions",
"serde",
"serde_json",
@@ -3177,10 +3264,18 @@ dependencies = [
]
[[package]]
-name = "clru"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59"
+name = "cloud_zeta2_prompt"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "cloud_llm_client",
+ "indoc",
+ "ordered-float 2.10.1",
+ "rustc-hash 2.1.1",
+ "serde",
+ "strum 0.27.1",
+ "workspace-hack",
+]
[[package]]
name = "cmake"
@@ -3259,23 +3354,34 @@ dependencies = [
[[package]]
name = "codespan-reporting"
-version = "0.11.1"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
dependencies = [
+ "serde",
"termcolor",
- "unicode-width 0.1.14",
+ "unicode-width",
]
[[package]]
-name = "codespan-reporting"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
+name = "codestral"
+version = "0.1.0"
dependencies = [
+ "anyhow",
+ "edit_prediction",
+ "edit_prediction_context",
+ "futures 0.3.31",
+ "gpui",
+ "language",
+ "language_models",
+ "log",
+ "mistral",
"serde",
- "termcolor",
- "unicode-width 0.2.0",
+ "serde_json",
+ "smol",
+ "text",
+ "workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -3302,7 +3408,6 @@ dependencies = [
"client",
"clock",
"collab_ui",
- "collections",
"command_palette_hooks",
"context_server",
"ctor",
@@ -3323,7 +3428,6 @@ dependencies = [
"gpui",
"gpui_tokio",
"hex",
- "http_client",
"hyper 0.14.32",
"indoc",
"language",
@@ -3351,13 +3455,10 @@ dependencies = [
"reqwest 0.11.27",
"reqwest_client",
"rpc",
- "rustc-demangle",
"scrypt",
"sea-orm",
- "semantic_version",
"semver",
"serde",
- "serde_derive",
"serde_json",
"session",
"settings",
@@ -3379,11 +3480,14 @@ dependencies = [
"tracing",
"tracing-subscriber",
"unindent",
- "util",
"uuid",
"workspace",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-semantic-version",
+ "zed-util",
"zlog",
]
@@ -3396,13 +3500,11 @@ dependencies = [
"channel",
"chrono",
"client",
- "collections",
"db",
"editor",
"futures 0.3.31",
"fuzzy",
"gpui",
- "http_client",
"log",
"menu",
"notifications",
@@ -3411,9 +3513,7 @@ dependencies = [
"project",
"release_channel",
"rpc",
- "schemars",
"serde",
- "serde_derive",
"serde_json",
"settings",
"smallvec",
@@ -3425,18 +3525,11 @@ dependencies = [
"title_bar",
"tree-sitter-md",
"ui",
- "util",
"workspace",
"workspace-hack",
-]
-
-[[package]]
-name = "collections"
-version = "0.1.0"
-dependencies = [
- "indexmap",
- "rustc-hash 2.1.1",
- "workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -3477,7 +3570,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"command_palette_hooks",
"ctor",
"db",
@@ -3499,9 +3591,10 @@ dependencies = [
"theme",
"time",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -3509,17 +3602,16 @@ dependencies = [
name = "command_palette_hooks"
version = "0.1.0"
dependencies = [
- "collections",
"derive_more",
"gpui",
"workspace-hack",
+ "zed-collections",
]
[[package]]
name = "component"
version = "0.1.0"
dependencies = [
- "collections",
"documented",
"gpui",
"inventory",
@@ -3527,6 +3619,7 @@ dependencies = [
"strum 0.27.1",
"theme",
"workspace-hack",
+ "zed-collections",
]
[[package]]
@@ -3547,7 +3640,7 @@ dependencies = [
"encode_unicode",
"libc",
"once_cell",
- "unicode-width 0.2.0",
+ "unicode-width",
"windows-sys 0.59.0",
]
@@ -3589,21 +3682,22 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
- "collections",
"futures 0.3.31",
"gpui",
"log",
"net",
"parking_lot",
"postage",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"smol",
"tempfile",
"url",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -3639,7 +3733,6 @@ dependencies = [
"chrono",
"client",
"clock",
- "collections",
"command_palette_hooks",
"ctor",
"dirs 4.0.0",
@@ -3648,7 +3741,6 @@ dependencies = [
"fs",
"futures 0.3.31",
"gpui",
- "http_client",
"indoc",
"itertools 0.14.0",
"language",
@@ -3660,16 +3752,19 @@ dependencies = [
"paths",
"project",
"rpc",
+ "semver",
"serde",
"serde_json",
"settings",
- "sum_tree",
"task",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -4074,9 +4169,9 @@ dependencies = [
[[package]]
name = "crc"
-version = "3.2.1"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
dependencies = [
"crc-catalog",
]
@@ -4335,7 +4430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b4400e26ea4b99417e4263b1ce2d8452404d750ba0809a7bd043072593d430d"
dependencies = [
"cc",
- "codespan-reporting 0.12.0",
+ "codespan-reporting",
"proc-macro2",
"quote",
"scratch",
@@ -4349,7 +4444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31860c98f69fc14da5742c5deaf78983e846c7b27804ca8c8319e32eef421bde"
dependencies = [
"clap",
- "codespan-reporting 0.12.0",
+ "codespan-reporting",
"proc-macro2",
"quote",
"syn 2.0.101",
@@ -4383,12 +4478,10 @@ dependencies = [
"async-tar",
"async-trait",
"client",
- "collections",
"dap-types",
"fs",
"futures 0.3.31",
"gpui",
- "http_client",
"language",
"libc",
"log",
@@ -4396,7 +4489,7 @@ dependencies = [
"parking_lot",
"paths",
"proto",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -4406,8 +4499,10 @@ dependencies = [
"telemetry",
"tree-sitter",
"tree-sitter-go",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zlog",
]
@@ -4416,7 +4511,7 @@ name = "dap-types"
version = "0.0.1"
source = "git+https://github.com/zed-industries/dap-types?rev=1b461b310481d01e02b2603c16d7144b926339f8#1b461b310481d01e02b2603c16d7144b926339f8"
dependencies = [
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
]
@@ -4427,7 +4522,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
- "collections",
"dap",
"dotenvy",
"fs",
@@ -4442,8 +4536,44 @@ dependencies = [
"shlex",
"smol",
"task",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
+]
+
+[[package]]
+name = "darling"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.101",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.101",
]
[[package]]
@@ -4505,8 +4635,8 @@ dependencies = [
"sqlez",
"sqlez_macros",
"tempfile",
- "util",
"workspace-hack",
+ "zed-util",
"zed_env_vars",
]
@@ -4532,8 +4662,8 @@ dependencies = [
"gpui",
"serde_json",
"task",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -4549,9 +4679,9 @@ dependencies = [
"serde_json",
"settings",
"smol",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -4562,7 +4692,6 @@ dependencies = [
"anyhow",
"bitflags 2.9.0",
"client",
- "collections",
"command_palette_hooks",
"dap",
"dap_adapters",
@@ -4587,7 +4716,7 @@ dependencies = [
"pretty_assertions",
"project",
"rpc",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"serde_json_lenient",
@@ -4605,9 +4734,10 @@ dependencies = [
"tree-sitter-json",
"ui",
"unindent",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
"zlog",
]
@@ -4627,11 +4757,11 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -4640,6 +4770,20 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
+[[package]]
+name = "denoise"
+version = "0.1.0"
+dependencies = [
+ "candle-core",
+ "candle-onnx",
+ "log",
+ "realfft",
+ "rodio",
+ "rustfft",
+ "thiserror 2.0.12",
+ "workspace-hack",
+]
+
[[package]]
name = "der"
version = "0.6.1"
@@ -4672,35 +4816,41 @@ dependencies = [
]
[[package]]
-name = "derive_more"
-version = "0.99.19"
+name = "derive_arbitrary"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f"
+checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
dependencies = [
- "convert_case 0.4.0",
"proc-macro2",
"quote",
- "rustc_version",
"syn 2.0.101",
]
[[package]]
-name = "derive_refineable"
-version = "0.1.0"
+name = "derive_more"
+version = "0.99.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f"
dependencies = [
+ "convert_case 0.4.0",
"proc-macro2",
"quote",
+ "rustc_version",
"syn 2.0.101",
- "workspace-hack",
]
+[[package]]
+name = "deunicode"
+version = "1.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04"
+
[[package]]
name = "diagnostics"
version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"component",
"ctor",
"editor",
@@ -4720,9 +4870,10 @@ dependencies = [
"theme",
"ui",
"unindent",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -4826,7 +4977,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.0",
- "windows-sys 0.59.0",
+ "windows-sys 0.61.0",
]
[[package]]
@@ -4877,9 +5028,11 @@ dependencies = [
"serde",
"serde_json",
"settings",
- "util",
+ "task",
+ "theme",
"workspace-hack",
"zed",
+ "zed-util",
"zlog",
]
@@ -4984,6 +5137,25 @@ version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005"
+[[package]]
+name = "dyn-stack"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56e53799688f5632f364f8fb387488dd05db9fe45db7011be066fc20e7027f8b"
+dependencies = [
+ "bytemuck",
+ "reborrow",
+]
+
+[[package]]
+name = "dyn-stack"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "490bd48eb68fffcfed519b4edbfd82c69cbe741d175b84f0e0cbe8c57cbe0bdd"
+dependencies = [
+ "bytemuck",
+]
+
[[package]]
name = "ec4rs"
version = "1.2.0"
@@ -5009,7 +5181,6 @@ dependencies = [
"client",
"gpui",
"language",
- "project",
"workspace-hack",
]
@@ -5020,6 +5191,7 @@ dependencies = [
"anyhow",
"client",
"cloud_llm_client",
+ "codestral",
"copilot",
"edit_prediction",
"editor",
@@ -5046,56 +5218,89 @@ dependencies = [
]
[[package]]
-name = "editor"
+name = "edit_prediction_context"
version = "0.1.0"
dependencies = [
- "aho-corasick",
"anyhow",
- "assets",
- "buffer_diff",
- "client",
- "clock",
- "collections",
- "convert_case 0.8.0",
- "criterion",
- "ctor",
- "dap",
- "db",
- "edit_prediction",
- "emojis",
- "file_icons",
- "fs",
+ "arrayvec",
+ "clap",
+ "cloud_llm_client",
"futures 0.3.31",
- "fuzzy",
- "git",
"gpui",
- "http_client",
+ "hashbrown 0.15.3",
"indoc",
"itertools 0.14.0",
"language",
- "languages",
- "linkify",
"log",
- "lsp",
- "markdown",
- "menu",
- "multi_buffer",
"ordered-float 2.10.1",
- "parking_lot",
+ "postage",
"pretty_assertions",
"project",
- "rand 0.9.1",
"regex",
- "release_channel",
+ "serde",
+ "serde_json",
+ "settings",
+ "slotmap",
+ "strum 0.27.1",
+ "text",
+ "tree-sitter",
+ "tree-sitter-c",
+ "tree-sitter-cpp",
+ "tree-sitter-go",
+ "workspace-hack",
+ "zed-collections",
+ "zed-util",
+ "zlog",
+]
+
+[[package]]
+name = "editor"
+version = "0.1.0"
+dependencies = [
+ "aho-corasick",
+ "anyhow",
+ "assets",
+ "buffer_diff",
+ "client",
+ "clock",
+ "convert_case 0.8.0",
+ "criterion",
+ "ctor",
+ "dap",
+ "db",
+ "edit_prediction",
+ "emojis",
+ "file_icons",
+ "fs",
+ "futures 0.3.31",
+ "fuzzy",
+ "git",
+ "gpui",
+ "indoc",
+ "itertools 0.14.0",
+ "language",
+ "languages",
+ "linkify",
+ "log",
+ "lsp",
+ "markdown",
+ "menu",
+ "multi_buffer",
+ "ordered-float 2.10.1",
+ "parking_lot",
+ "pretty_assertions",
+ "project",
+ "rand 0.9.1",
+ "regex",
+ "release_channel",
"rpc",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
"snippet",
- "sum_tree",
"task",
"telemetry",
"tempfile",
@@ -5114,10 +5319,14 @@ dependencies = [
"unicode-segmentation",
"unindent",
"url",
- "util",
"uuid",
+ "vim_mode_setting",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
"zed_actions",
"zlog",
]
@@ -5228,6 +5437,18 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
+[[package]]
+name = "enum-as-inner"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "enumflags2"
version = "0.7.11"
@@ -5387,7 +5608,6 @@ dependencies = [
"clap",
"client",
"cloud_llm_client",
- "collections",
"debug_adapter_extension",
"dirs 4.0.0",
"dotenvy",
@@ -5422,10 +5642,11 @@ dependencies = [
"terminal_view",
"toml 0.8.20",
"unindent",
- "util",
"uuid",
"watch",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -5504,28 +5725,28 @@ dependencies = [
"async-compression",
"async-tar",
"async-trait",
- "collections",
"dap",
"fs",
"futures 0.3.31",
"gpui",
"heck 0.5.0",
- "http_client",
"language",
"log",
"lsp",
"parking_lot",
"pretty_assertions",
- "semantic_version",
"serde",
"serde_json",
"task",
"toml 0.8.20",
"url",
- "util",
"wasm-encoder 0.221.3",
"wasmparser 0.221.3",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-semantic-version",
+ "zed-util",
]
[[package]]
@@ -5561,7 +5782,6 @@ dependencies = [
"async-tar",
"async-trait",
"client",
- "collections",
"criterion",
"ctor",
"dap",
@@ -5569,7 +5789,6 @@ dependencies = [
"fs",
"futures 0.3.31",
"gpui",
- "http_client",
"language",
"language_extension",
"log",
@@ -5583,8 +5802,6 @@ dependencies = [
"release_channel",
"remote",
"reqwest_client",
- "schemars",
- "semantic_version",
"serde",
"serde_json",
"serde_json_lenient",
@@ -5596,11 +5813,14 @@ dependencies = [
"theme_extension",
"toml 0.8.20",
"url",
- "util",
"wasmparser 0.221.3",
"wasmtime",
"wasmtime-wasi",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-semantic-version",
+ "zed-util",
"zlog",
]
@@ -5610,7 +5830,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"db",
"editor",
"extension",
@@ -5624,7 +5843,6 @@ dependencies = [
"picker",
"project",
"release_channel",
- "semantic_version",
"serde",
"settings",
"smallvec",
@@ -5632,10 +5850,12 @@ dependencies = [
"telemetry",
"theme",
"ui",
- "util",
"vim_mode_setting",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-semantic-version",
+ "zed-util",
"zed_actions",
]
@@ -5673,25 +5893,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
-[[package]]
-name = "faster-hex"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "faster-hex"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7223ae2d2f179b803433d9c830478527e92b8117eab39460edae7f1614d9fb73"
-dependencies = [
- "heapless",
- "serde",
-]
-
[[package]]
name = "fastrand"
version = "1.9.0"
@@ -5743,13 +5944,11 @@ version = "0.1.0"
dependencies = [
"editor",
"gpui",
- "menu",
"system_specs",
- "ui",
"urlencoding",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
"zed_actions",
]
@@ -5768,7 +5967,6 @@ name = "file_finder"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"ctor",
"editor",
"file_icons",
@@ -5780,18 +5978,18 @@ dependencies = [
"picker",
"pretty_assertions",
"project",
- "schemars",
+ "schemars 1.0.1",
"search",
"serde",
- "serde_derive",
"serde_json",
"settings",
"text",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -5801,10 +5999,9 @@ version = "0.1.0"
dependencies = [
"gpui",
"serde",
- "settings",
"theme",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -5843,7 +6040,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
dependencies = [
"crc32fast",
- "libz-rs-sys",
"miniz_oxide",
]
@@ -5859,6 +6055,18 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d"
+[[package]]
+name = "float8"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4203231de188ebbdfb85c11f3c20ca2b063945710de04e7b59268731e728b462"
+dependencies = [
+ "half",
+ "num-traits",
+ "rand 0.9.1",
+ "rand_distr",
+]
+
[[package]]
name = "float_next_after"
version = "1.0.0"
@@ -5900,30 +6108,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
-[[package]]
-name = "font-kit"
-version = "0.14.1"
-source = "git+https://github.com/zed-industries/font-kit?rev=5474cfad4b719a72ec8ed2cb7327b2b01fd10568#5474cfad4b719a72ec8ed2cb7327b2b01fd10568"
-dependencies = [
- "bitflags 2.9.0",
- "byteorder",
- "core-foundation 0.10.0",
- "core-graphics 0.24.0",
- "core-text",
- "dirs 5.0.1",
- "dwrote",
- "float-ord",
- "freetype-sys",
- "lazy_static",
- "libc",
- "log",
- "pathfinder_geometry",
- "pathfinder_simd",
- "walkdir",
- "winapi",
- "yeslogic-fontconfig-sys",
-]
-
[[package]]
name = "font-types"
version = "0.8.4"
@@ -6060,7 +6244,6 @@ dependencies = [
"async-tar",
"async-trait",
"cocoa 0.26.0",
- "collections",
"fsevent",
"futures 0.3.31",
"git",
@@ -6080,9 +6263,10 @@ dependencies = [
"tempfile",
"text",
"time",
- "util",
"windows 0.61.1",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -6119,6 +6303,7 @@ dependencies = [
"bitflags 2.9.0",
"core-foundation 0.10.0",
"fsevent-sys 3.1.0",
+ "log",
"parking_lot",
"tempfile",
"workspace-hack",
@@ -6300,8 +6485,8 @@ version = "0.1.0"
dependencies = [
"gpui",
"log",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -6313,6 +6498,252 @@ dependencies = [
"thread_local",
]
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "gemm"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ab24cc62135b40090e31a76a9b2766a501979f3070fa27f689c27ec04377d32"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-c32 0.17.1",
+ "gemm-c64 0.17.1",
+ "gemm-common 0.17.1",
+ "gemm-f16 0.17.1",
+ "gemm-f32 0.17.1",
+ "gemm-f64 0.17.1",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab96b703d31950f1aeddded248bc95543c9efc7ac9c4a21fda8703a83ee35451"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-c32 0.18.2",
+ "gemm-c64 0.18.2",
+ "gemm-common 0.18.2",
+ "gemm-f16 0.18.2",
+ "gemm-f32 0.18.2",
+ "gemm-f64 0.18.2",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-c32"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9c030d0b983d1e34a546b86e08f600c11696fde16199f971cd46c12e67512c0"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-common 0.17.1",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-c32"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6db9fd9f40421d00eea9dd0770045a5603b8d684654816637732463f4073847"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-common 0.18.2",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-c64"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbb5f2e79fefb9693d18e1066a557b4546cd334b226beadc68b11a8f9431852a"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-common 0.17.1",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-c64"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfcad8a3d35a43758330b635d02edad980c1e143dc2f21e6fd25f9e4eada8edf"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-common 0.18.2",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-common"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2e7ea062c987abcd8db95db917b4ffb4ecdfd0668471d8dc54734fdff2354e8"
+dependencies = [
+ "bytemuck",
+ "dyn-stack 0.10.0",
+ "half",
+ "num-complex",
+ "num-traits",
+ "once_cell",
+ "paste",
+ "pulp 0.18.22",
+ "raw-cpuid 10.7.0",
+ "rayon",
+ "seq-macro",
+ "sysctl 0.5.5",
+]
+
+[[package]]
+name = "gemm-common"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a352d4a69cbe938b9e2a9cb7a3a63b7e72f9349174a2752a558a8a563510d0f3"
+dependencies = [
+ "bytemuck",
+ "dyn-stack 0.13.0",
+ "half",
+ "libm",
+ "num-complex",
+ "num-traits",
+ "once_cell",
+ "paste",
+ "pulp 0.21.5",
+ "raw-cpuid 11.6.0",
+ "rayon",
+ "seq-macro",
+ "sysctl 0.6.0",
+]
+
+[[package]]
+name = "gemm-f16"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ca4c06b9b11952071d317604acb332e924e817bd891bec8dfb494168c7cedd4"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-common 0.17.1",
+ "gemm-f32 0.17.1",
+ "half",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "rayon",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-f16"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff95ae3259432f3c3410eaa919033cd03791d81cebd18018393dc147952e109"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-common 0.18.2",
+ "gemm-f32 0.18.2",
+ "half",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "rayon",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-f32"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9a69f51aaefbd9cf12d18faf273d3e982d9d711f60775645ed5c8047b4ae113"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-common 0.17.1",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-f32"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc8d3d4385393304f407392f754cd2dc4b315d05063f62cf09f47b58de276864"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-common 0.18.2",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-f64"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa397a48544fadf0b81ec8741e5c0fba0043008113f71f2034def1935645d2b0"
+dependencies = [
+ "dyn-stack 0.10.0",
+ "gemm-common 0.17.1",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 10.7.0",
+ "seq-macro",
+]
+
+[[package]]
+name = "gemm-f64"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35b2a4f76ce4b8b16eadc11ccf2e083252d8237c1b589558a49b0183545015bd"
+dependencies = [
+ "dyn-stack 0.13.0",
+ "gemm-common 0.18.2",
+ "num-complex",
+ "num-traits",
+ "paste",
+ "raw-cpuid 11.6.0",
+ "seq-macro",
+]
+
[[package]]
name = "generator"
version = "0.8.5"
@@ -6391,7 +6822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
dependencies = [
"fallible-iterator",
- "indexmap",
+ "indexmap 2.9.0",
"stable_deref_trait",
]
@@ -6402,32 +6833,34 @@ dependencies = [
"anyhow",
"askpass",
"async-trait",
- "collections",
"derive_more",
"futures 0.3.31",
"git2",
"gpui",
- "http_client",
+ "itertools 0.14.0",
"log",
"parking_lot",
"pretty_assertions",
"rand 0.9.1",
"regex",
"rope",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"smol",
- "sum_tree",
"tempfile",
"text",
"thiserror 2.0.12",
"time",
"unindent",
"url",
- "util",
+ "urlencoding",
"uuid",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
]
[[package]]
@@ -6452,17 +6885,16 @@ dependencies = [
"futures 0.3.31",
"git",
"gpui",
- "http_client",
"indoc",
"pretty_assertions",
"regex",
- "schemars",
"serde",
"serde_json",
"settings",
"url",
- "util",
"workspace-hack",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -6476,7 +6908,6 @@ dependencies = [
"call",
"chrono",
"cloud_llm_client",
- "collections",
"command_palette_hooks",
"component",
"ctor",
@@ -6501,9 +6932,8 @@ dependencies = [
"postage",
"pretty_assertions",
"project",
- "schemars",
+ "schemars 1.0.1",
"serde",
- "serde_derive",
"serde_json",
"settings",
"strum 0.27.1",
@@ -6513,775 +6943,17 @@ dependencies = [
"time_format",
"ui",
"unindent",
- "util",
"watch",
"windows 0.61.1",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
+ "zeroize",
"zlog",
]
-[[package]]
-name = "gix"
-version = "0.71.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a61e71ec6817fc3c9f12f812682cfe51ee6ea0d2e27e02fc3849c35524617435"
-dependencies = [
- "gix-actor",
- "gix-attributes",
- "gix-command",
- "gix-commitgraph",
- "gix-config",
- "gix-date",
- "gix-diff",
- "gix-discover",
- "gix-features 0.41.1",
- "gix-filter",
- "gix-fs 0.14.0",
- "gix-glob",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-ignore",
- "gix-index",
- "gix-lock",
- "gix-object",
- "gix-odb",
- "gix-pack",
- "gix-path",
- "gix-pathspec",
- "gix-protocol",
- "gix-ref",
- "gix-refspec",
- "gix-revision",
- "gix-revwalk",
- "gix-sec",
- "gix-shallow",
- "gix-submodule",
- "gix-tempfile",
- "gix-trace",
- "gix-traverse",
- "gix-url",
- "gix-utils 0.2.0",
- "gix-validate 0.9.4",
- "gix-worktree",
- "once_cell",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-actor"
-version = "0.34.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f438c87d4028aca4b82f82ba8d8ab1569823cfb3e5bc5fa8456a71678b2a20e7"
-dependencies = [
- "bstr",
- "gix-date",
- "gix-utils 0.2.0",
- "itoa",
- "thiserror 2.0.12",
- "winnow",
-]
-
-[[package]]
-name = "gix-attributes"
-version = "0.25.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4e25825e0430aa11096f8b65ced6780d4a96a133f81904edceebb5344c8dd7f"
-dependencies = [
- "bstr",
- "gix-glob",
- "gix-path",
- "gix-quote",
- "gix-trace",
- "kstring",
- "smallvec",
- "thiserror 2.0.12",
- "unicode-bom",
-]
-
-[[package]]
-name = "gix-bitmap"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540"
-dependencies = [
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-chunk"
-version = "0.4.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f"
-dependencies = [
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-command"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0378995847773a697f8e157fe2963ecf3462fe64be05b7b3da000b3b472def8"
-dependencies = [
- "bstr",
- "gix-path",
- "gix-quote",
- "gix-trace",
- "shell-words",
-]
-
-[[package]]
-name = "gix-commitgraph"
-version = "0.27.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "043cbe49b7a7505150db975f3cb7c15833335ac1e26781f615454d9d640a28fe"
-dependencies = [
- "bstr",
- "gix-chunk",
- "gix-hash 0.17.0",
- "memmap2",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-config"
-version = "0.44.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c6f830bf746604940261b49abf7f655d2c19cadc9f4142ae9379e3a316e8cfa"
-dependencies = [
- "bstr",
- "gix-config-value",
- "gix-features 0.41.1",
- "gix-glob",
- "gix-path",
- "gix-ref",
- "gix-sec",
- "memchr",
- "once_cell",
- "smallvec",
- "thiserror 2.0.12",
- "unicode-bom",
- "winnow",
-]
-
-[[package]]
-name = "gix-config-value"
-version = "0.14.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8dc2c844c4cf141884678cabef736fd91dd73068b9146e6f004ba1a0457944b6"
-dependencies = [
- "bitflags 2.9.0",
- "bstr",
- "gix-path",
- "libc",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-date"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daa30058ec7d3511fbc229e4f9e696a35abd07ec5b82e635eff864a2726217e4"
-dependencies = [
- "bstr",
- "itoa",
- "jiff",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-diff"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2c975dad2afc85e4e233f444d1efbe436c3cdcf3a07173984509c436d00a3f8"
-dependencies = [
- "bstr",
- "gix-command",
- "gix-filter",
- "gix-fs 0.14.0",
- "gix-hash 0.17.0",
- "gix-object",
- "gix-path",
- "gix-tempfile",
- "gix-trace",
- "gix-traverse",
- "gix-worktree",
- "imara-diff",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-discover"
-version = "0.39.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7fb8a4349b854506a3915de18d3341e5f1daa6b489c8affc9ca0d69efe86781"
-dependencies = [
- "bstr",
- "dunce",
- "gix-fs 0.14.0",
- "gix-hash 0.17.0",
- "gix-path",
- "gix-ref",
- "gix-sec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-features"
-version = "0.41.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "016d6050219458d14520fe22bdfdeb9cb71631dec9bc2724767c983f60109634"
-dependencies = [
- "crc32fast",
- "crossbeam-channel",
- "flate2",
- "gix-path",
- "gix-trace",
- "gix-utils 0.2.0",
- "libc",
- "once_cell",
- "parking_lot",
- "prodash",
- "thiserror 2.0.12",
- "walkdir",
-]
-
-[[package]]
-name = "gix-features"
-version = "0.42.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56f4399af6ec4fd9db84dd4cf9656c5c785ab492ab40a7c27ea92b4241923fed"
-dependencies = [
- "gix-trace",
- "gix-utils 0.3.0",
- "libc",
- "prodash",
-]
-
-[[package]]
-name = "gix-filter"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb2b2bbffdc5cc9b2b82fc82da1b98163c9b423ac2b45348baa83a947ac9ab89"
-dependencies = [
- "bstr",
- "encoding_rs",
- "gix-attributes",
- "gix-command",
- "gix-hash 0.17.0",
- "gix-object",
- "gix-packetline-blocking",
- "gix-path",
- "gix-quote",
- "gix-trace",
- "gix-utils 0.2.0",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-fs"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "951e886120dc5fa8cac053e5e5c89443f12368ca36811b2e43d1539081f9c111"
-dependencies = [
- "bstr",
- "fastrand 2.3.0",
- "gix-features 0.41.1",
- "gix-path",
- "gix-utils 0.2.0",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-fs"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a0637149b4ef24d3ea55f81f77231401c8463fae6da27331c987957eb597c7"
-dependencies = [
- "bstr",
- "fastrand 2.3.0",
- "gix-features 0.42.1",
- "gix-path",
- "gix-utils 0.3.0",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-glob"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20972499c03473e773a2099e5fd0c695b9b72465837797a51a43391a1635a030"
-dependencies = [
- "bitflags 2.9.0",
- "bstr",
- "gix-features 0.41.1",
- "gix-path",
-]
-
-[[package]]
-name = "gix-hash"
-version = "0.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "834e79722063958b03342edaa1e17595cd2939bb2b3306b3225d0815566dcb49"
-dependencies = [
- "faster-hex 0.9.0",
- "gix-features 0.41.1",
- "sha1-checked",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-hash"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d4900562c662852a6b42e2ef03442eccebf24f047d8eab4f23bc12ef0d785d8"
-dependencies = [
- "faster-hex 0.10.0",
- "gix-features 0.42.1",
- "sha1-checked",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-hashtable"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b5cb3c308b4144f2612ff64e32130e641279fcf1a84d8d40dad843b4f64904"
-dependencies = [
- "gix-hash 0.18.0",
- "hashbrown 0.14.5",
- "parking_lot",
-]
-
-[[package]]
-name = "gix-ignore"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a27c8380f493a10d1457f756a3f81924d578fc08d6535e304dfcafbf0261d18"
-dependencies = [
- "bstr",
- "gix-glob",
- "gix-path",
- "gix-trace",
- "unicode-bom",
-]
-
-[[package]]
-name = "gix-index"
-version = "0.39.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "855bece2d4153453aa5d0a80d51deea1ce8cd6a3b4cf213da85ac344ccb908a7"
-dependencies = [
- "bitflags 2.9.0",
- "bstr",
- "filetime",
- "fnv",
- "gix-bitmap",
- "gix-features 0.41.1",
- "gix-fs 0.14.0",
- "gix-hash 0.17.0",
- "gix-lock",
- "gix-object",
- "gix-traverse",
- "gix-utils 0.2.0",
- "gix-validate 0.9.4",
- "hashbrown 0.14.5",
- "itoa",
- "libc",
- "memmap2",
- "rustix 0.38.44",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-lock"
-version = "17.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "570f8b034659f256366dc90f1a24924902f20acccd6a15be96d44d1269e7a796"
-dependencies = [
- "gix-tempfile",
- "gix-utils 0.3.0",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-object"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4943fcdae6ffc135920c9ea71e0362ed539182924ab7a85dd9dac8d89b0dd69a"
-dependencies = [
- "bstr",
- "gix-actor",
- "gix-date",
- "gix-features 0.41.1",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-path",
- "gix-utils 0.2.0",
- "gix-validate 0.9.4",
- "itoa",
- "smallvec",
- "thiserror 2.0.12",
- "winnow",
-]
-
-[[package]]
-name = "gix-odb"
-version = "0.68.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50306d40dcc982eb6b7593103f066ea6289c7b094cb9db14f3cd2be0b9f5e610"
-dependencies = [
- "arc-swap",
- "gix-date",
- "gix-features 0.41.1",
- "gix-fs 0.14.0",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-object",
- "gix-pack",
- "gix-path",
- "gix-quote",
- "parking_lot",
- "tempfile",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-pack"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b65fffb09393c26624ca408d32cfe8776fb94cd0a5cdf984905e1d2f39779cb"
-dependencies = [
- "clru",
- "gix-chunk",
- "gix-features 0.41.1",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-object",
- "gix-path",
- "memmap2",
- "smallvec",
- "thiserror 2.0.12",
- "uluru",
-]
-
-[[package]]
-name = "gix-packetline"
-version = "0.18.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "123844a70cf4d5352441dc06bab0da8aef61be94ec239cb631e0ba01dc6d3a04"
-dependencies = [
- "bstr",
- "faster-hex 0.9.0",
- "gix-trace",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-packetline-blocking"
-version = "0.18.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ecf3ea2e105c7e45587bac04099824301262a6c43357fad5205da36dbb233b3"
-dependencies = [
- "bstr",
- "faster-hex 0.9.0",
- "gix-trace",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-path"
-version = "0.10.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "567f65fec4ef10dfab97ae71f26a27fd4d7fe7b8e3f90c8a58551c41ff3fb65b"
-dependencies = [
- "bstr",
- "gix-trace",
- "gix-validate 0.10.0",
- "home",
- "once_cell",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-pathspec"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fef8422c3c9066d649074b24025125963f85232bfad32d6d16aea9453b82ec14"
-dependencies = [
- "bitflags 2.9.0",
- "bstr",
- "gix-attributes",
- "gix-config-value",
- "gix-glob",
- "gix-path",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-protocol"
-version = "0.49.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5678ddae1d62880bc30e2200be1b9387af3372e0e88e21f81b4e7f8367355b5a"
-dependencies = [
- "bstr",
- "gix-date",
- "gix-features 0.41.1",
- "gix-hash 0.17.0",
- "gix-ref",
- "gix-shallow",
- "gix-transport",
- "gix-utils 0.2.0",
- "maybe-async",
- "thiserror 2.0.12",
- "winnow",
-]
-
-[[package]]
-name = "gix-quote"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b005c550bf84de3b24aa5e540a23e6146a1c01c7d30470e35d75a12f827f969"
-dependencies = [
- "bstr",
- "gix-utils 0.2.0",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-ref"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2e1f7eb6b7ce82d2d19961f74bd637bab3ea79b1bc7bfb23dbefc67b0415d8b"
-dependencies = [
- "gix-actor",
- "gix-features 0.41.1",
- "gix-fs 0.14.0",
- "gix-hash 0.17.0",
- "gix-lock",
- "gix-object",
- "gix-path",
- "gix-tempfile",
- "gix-utils 0.2.0",
- "gix-validate 0.9.4",
- "memmap2",
- "thiserror 2.0.12",
- "winnow",
-]
-
-[[package]]
-name = "gix-refspec"
-version = "0.29.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d8587b21e2264a6e8938d940c5c99662779c13a10741a5737b15fc85c252ffc"
-dependencies = [
- "bstr",
- "gix-hash 0.17.0",
- "gix-revision",
- "gix-validate 0.9.4",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-revision"
-version = "0.33.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "342caa4e158df3020cadf62f656307c3948fe4eacfdf67171d7212811860c3e9"
-dependencies = [
- "bstr",
- "gix-commitgraph",
- "gix-date",
- "gix-hash 0.17.0",
- "gix-object",
- "gix-revwalk",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-revwalk"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dc7c3d7e5cdc1ab8d35130106e4af0a4f9f9eca0c81f4312b690780e92bde0d"
-dependencies = [
- "gix-commitgraph",
- "gix-date",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-object",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-sec"
-version = "0.10.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47aeb0f13de9ef2f3033f5ff218de30f44db827ac9f1286f9ef050aacddd5888"
-dependencies = [
- "bitflags 2.9.0",
- "gix-path",
- "libc",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "gix-shallow"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc0598aacfe1d52575a21c9492fee086edbb21e228ec36c819c42ab923f434c3"
-dependencies = [
- "bstr",
- "gix-hash 0.17.0",
- "gix-lock",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-submodule"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78c7390c2059505c365e9548016d4edc9f35749c6a9112b7b1214400bbc68da2"
-dependencies = [
- "bstr",
- "gix-config",
- "gix-path",
- "gix-pathspec",
- "gix-refspec",
- "gix-url",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-tempfile"
-version = "17.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c750e8c008453a2dba67a2b0d928b7716e05da31173a3f5e351d5457ad4470aa"
-dependencies = [
- "dashmap 6.1.0",
- "gix-fs 0.15.0",
- "libc",
- "once_cell",
- "parking_lot",
- "tempfile",
-]
-
-[[package]]
-name = "gix-trace"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7"
-
-[[package]]
-name = "gix-transport"
-version = "0.46.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3f68c2870bfca8278389d2484a7f2215b67d0b0cc5277d3c72ad72acf41787e"
-dependencies = [
- "bstr",
- "gix-command",
- "gix-features 0.41.1",
- "gix-packetline",
- "gix-quote",
- "gix-sec",
- "gix-url",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-traverse"
-version = "0.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36c0b049f8bdb61b20016694102f7b507f2e1727e83e9c5e6dad4f7d84ff7384"
-dependencies = [
- "bitflags 2.9.0",
- "gix-commitgraph",
- "gix-date",
- "gix-hash 0.17.0",
- "gix-hashtable",
- "gix-object",
- "gix-revwalk",
- "smallvec",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-url"
-version = "0.30.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48dfe23f93f1ddb84977d80bb0dd7aa09d1bf5d5afc0c9b6820cccacc25ae860"
-dependencies = [
- "bstr",
- "gix-features 0.41.1",
- "gix-path",
- "percent-encoding",
- "thiserror 2.0.12",
- "url",
-]
-
-[[package]]
-name = "gix-utils"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "189f8724cf903e7fd57cfe0b7bc209db255cacdcb22c781a022f52c3a774f8d0"
-dependencies = [
- "fastrand 2.3.0",
- "unicode-normalization",
-]
-
-[[package]]
-name = "gix-utils"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5351af2b172caf41a3728eb4455326d84e0d70fe26fc4de74ab0bd37df4191c5"
-dependencies = [
- "fastrand 2.3.0",
- "unicode-normalization",
-]
-
-[[package]]
-name = "gix-validate"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34b5f1253109da6c79ed7cf6e1e38437080bb6d704c76af14c93e2f255234084"
-dependencies = [
- "bstr",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-validate"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77b9e00cacde5b51388d28ed746c493b18a6add1f19b5e01d686b3b9ece66d4d"
-dependencies = [
- "bstr",
- "thiserror 2.0.12",
-]
-
-[[package]]
-name = "gix-worktree"
-version = "0.40.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7760dbc4b79aa274fed30adc0d41dca6b917641f26e7867c4071b1fb4dc727b"
-dependencies = [
- "bstr",
- "gix-attributes",
- "gix-features 0.41.1",
- "gix-fs 0.14.0",
- "gix-glob",
- "gix-hash 0.17.0",
- "gix-ignore",
- "gix-index",
- "gix-object",
- "gix-path",
- "gix-validate 0.9.4",
-]
-
[[package]]
name = "glob"
version = "0.3.2"
@@ -7315,9 +6987,9 @@ dependencies = [
[[package]]
name = "glow"
-version = "0.14.2"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483"
+checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08"
dependencies = [
"js-sys",
"slotmap",
@@ -7329,7 +7001,6 @@ dependencies = [
name = "go_to_line"
version = "0.1.0"
dependencies = [
- "anyhow",
"editor",
"gpui",
"indoc",
@@ -7337,7 +7008,6 @@ dependencies = [
"menu",
"project",
"rope",
- "schemars",
"serde",
"serde_json",
"settings",
@@ -7346,9 +7016,9 @@ dependencies = [
"tree-sitter-rust",
"tree-sitter-typescript",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -7368,12 +7038,13 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"strum 0.27.1",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -7408,7 +7079,7 @@ dependencies = [
[[package]]
name = "gpui"
-version = "0.1.0"
+version = "0.2.0"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
@@ -7425,7 +7096,6 @@ dependencies = [
"calloop-wayland-source",
"cbindgen",
"cocoa 0.26.0",
- "collections",
"core-foundation 0.10.0",
"core-foundation-sys",
"core-graphics 0.24.0",
@@ -7439,18 +7109,15 @@ dependencies = [
"etagere",
"filedescriptor",
"flume",
- "font-kit",
"foreign-types 0.5.0",
"futures 0.3.31",
- "gpui_macros",
- "http_client",
+ "gpui-macros",
"image",
"inventory",
"itertools 0.14.0",
"libc",
"log",
"lyon",
- "media",
"metal",
"naga",
"num_cpus",
@@ -7463,36 +7130,31 @@ dependencies = [
"parking_lot",
"pathfinder_geometry",
"postage",
+ "pretty_assertions",
"profiling",
"rand 0.9.1",
"raw-window-handle",
- "refineable",
"reqwest_client",
"resvg",
- "scap",
- "schemars",
+ "schemars 1.0.1",
"seahash",
- "semantic_version",
"serde",
- "serde_derive",
"serde_json",
"slotmap",
"smallvec",
"smol",
"stacksafe",
"strum 0.27.1",
- "sum_tree",
"taffy",
"thiserror 2.0.12",
"unicode-segmentation",
"usvg",
- "util",
"uuid",
"waker-fn",
"wayland-backend",
"wayland-client",
"wayland-cursor",
- "wayland-protocols",
+ "wayland-protocols 0.31.2",
"wayland-protocols-plasma",
"windows 0.61.1",
"windows-core 0.61.0",
@@ -7501,12 +7163,22 @@ dependencies = [
"workspace-hack",
"x11-clipboard",
"x11rb",
- "xim",
"xkbcommon",
+ "zed-collections",
+ "zed-font-kit",
+ "zed-http-client",
+ "zed-media",
+ "zed-refineable",
+ "zed-scap",
+ "zed-semantic-version",
+ "zed-sum-tree",
+ "zed-util",
+ "zed-util-macros",
+ "zed-xim",
]
[[package]]
-name = "gpui_macros"
+name = "gpui-macros"
version = "0.1.0"
dependencies = [
"gpui",
@@ -7524,8 +7196,8 @@ dependencies = [
"anyhow",
"gpui",
"tokio",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -7557,7 +7229,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http 0.2.12",
- "indexmap",
+ "indexmap 2.9.0",
"slab",
"tokio",
"tokio-util",
@@ -7576,7 +7248,7 @@ dependencies = [
"futures-core",
"futures-sink",
"http 1.3.1",
- "indexmap",
+ "indexmap 2.9.0",
"slab",
"tokio",
"tokio-util",
@@ -7589,9 +7261,12 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9"
dependencies = [
+ "bytemuck",
"cfg-if",
"crunchy",
"num-traits",
+ "rand 0.9.1",
+ "rand_distr",
]
[[package]]
@@ -7623,15 +7298,6 @@ dependencies = [
"thiserror 1.0.69",
]
-[[package]]
-name = "hash32"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"
-dependencies = [
- "byteorder",
-]
-
[[package]]
name = "hashbrown"
version = "0.12.3"
@@ -7705,16 +7371,6 @@ dependencies = [
"http 0.2.12",
]
-[[package]]
-name = "heapless"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
-dependencies = [
- "hash32",
- "stable_deref_trait",
-]
-
[[package]]
name = "heck"
version = "0.3.3"
@@ -7783,12 +7439,6 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-[[package]]
-name = "hermit-abi"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
-
[[package]]
name = "hermit-abi"
version = "0.5.0"
@@ -7867,13 +7517,12 @@ dependencies = [
[[package]]
name = "html5ever"
-version = "0.31.0"
+version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "953cbbe631aae7fc0a112702ad5d3aaf09da38beaf45ea84610d6e1c358f569c"
+checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4"
dependencies = [
"log",
- "mac",
- "markup5ever 0.16.1",
+ "markup5ever 0.35.0",
"match_token",
]
@@ -7952,25 +7601,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
-[[package]]
-name = "http_client"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "bytes 1.10.1",
- "derive_more",
- "futures 0.3.31",
- "http 1.3.1",
- "http-body 1.0.1",
- "log",
- "parking_lot",
- "reqwest 0.12.15 (git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415)",
- "serde",
- "serde_json",
- "url",
- "workspace-hack",
-]
-
[[package]]
name = "http_client_tls"
version = "0.1.0"
@@ -8272,6 +7902,12 @@ version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
[[package]]
name = "idna"
version = "1.0.3"
@@ -8354,14 +7990,13 @@ dependencies = [
"language",
"log",
"project",
- "schemars",
"serde",
"settings",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -8385,6 +8020,17 @@ version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
[[package]]
name = "indexmap"
version = "2.9.0"
@@ -8468,11 +8114,12 @@ dependencies = [
"serde_json",
"serde_json_lenient",
"theme",
+ "title_bar",
"ui",
- "util",
- "util_macros",
"workspace",
"workspace-hack",
+ "zed-util",
+ "zed-util-macros",
"zed_actions",
]
@@ -8485,9 +8132,9 @@ dependencies = [
"gpui",
"release_channel",
"smol",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -8499,16 +8146,6 @@ dependencies = [
"cfg-if",
]
-[[package]]
-name = "interim"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9ce9099a85f468663d3225bf87e85d0548968441e1db12248b996b24f0f5b5a"
-dependencies = [
- "chrono",
- "logos",
-]
-
[[package]]
name = "interpolate_name"
version = "0.2.4"
@@ -8686,12 +8323,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a064218214dc6a10fbae5ec5fa888d80c45d611aba169222fc272072bf7aef6"
dependencies = [
"jiff-static",
- "jiff-tzdb-platform",
"log",
"portable-atomic",
"portable-atomic-util",
"serde",
- "windows-sys 0.59.0",
]
[[package]]
@@ -8705,106 +8340,6 @@ dependencies = [
"syn 2.0.101",
]
-[[package]]
-name = "jiff-tzdb"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524"
-
-[[package]]
-name = "jiff-tzdb-platform"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8"
-dependencies = [
- "jiff-tzdb",
-]
-
-[[package]]
-name = "jj"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "gpui",
- "jj-lib",
- "workspace-hack",
-]
-
-[[package]]
-name = "jj-lib"
-version = "0.29.0"
-source = "git+https://github.com/jj-vcs/jj?rev=e18eb8e05efaa153fad5ef46576af145bba1807f#e18eb8e05efaa153fad5ef46576af145bba1807f"
-dependencies = [
- "async-trait",
- "blake2",
- "bstr",
- "chrono",
- "clru",
- "digest",
- "dunce",
- "either",
- "futures 0.3.31",
- "gix",
- "glob",
- "hashbrown 0.15.3",
- "hex",
- "ignore",
- "indexmap",
- "interim",
- "itertools 0.14.0",
- "jj-lib-proc-macros",
- "maplit",
- "once_cell",
- "pest",
- "pest_derive",
- "pollster 0.4.0",
- "prost 0.13.5",
- "rand 0.8.5",
- "rand_chacha 0.3.1",
- "rayon",
- "ref-cast",
- "regex",
- "rustix 1.0.7",
- "same-file",
- "serde",
- "serde_json",
- "smallvec",
- "strsim",
- "tempfile",
- "thiserror 2.0.12",
- "toml_edit",
- "tracing",
- "version_check",
- "winreg 0.52.0",
-]
-
-[[package]]
-name = "jj-lib-proc-macros"
-version = "0.29.0"
-source = "git+https://github.com/jj-vcs/jj?rev=e18eb8e05efaa153fad5ef46576af145bba1807f#e18eb8e05efaa153fad5ef46576af145bba1807f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
-[[package]]
-name = "jj_ui"
-version = "0.1.0"
-dependencies = [
- "command_palette_hooks",
- "feature_flags",
- "fuzzy",
- "gpui",
- "jj",
- "picker",
- "ui",
- "util",
- "workspace",
- "workspace-hack",
- "zed_actions",
-]
-
[[package]]
name = "jni"
version = "0.21.1"
@@ -8846,7 +8381,6 @@ dependencies = [
"editor",
"gpui",
"log",
- "schemars",
"serde",
"settings",
"shellexpand 2.1.2",
@@ -8882,6 +8416,28 @@ dependencies = [
"thiserror 1.0.69",
]
+[[package]]
+name = "json_schema_store"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dap",
+ "extension",
+ "gpui",
+ "language",
+ "paths",
+ "project",
+ "schemars 1.0.1",
+ "serde",
+ "serde_json",
+ "settings",
+ "snippet_provider",
+ "task",
+ "theme",
+ "workspace-hack",
+ "zed-util",
+]
+
[[package]]
name = "jsonschema"
version = "0.30.0"
@@ -8903,7 +8459,7 @@ dependencies = [
"referencing",
"regex",
"regex-syntax",
- "reqwest 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "reqwest 0.12.15",
"serde",
"serde_json",
"uuid-simd",
@@ -8960,7 +8516,6 @@ name = "keymap_editor"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"command_palette",
"component",
"db",
@@ -8969,6 +8524,7 @@ dependencies = [
"fuzzy",
"gpui",
"itertools 0.14.0",
+ "json_schema_store",
"language",
"log",
"menu",
@@ -8986,10 +8542,11 @@ dependencies = [
"tree-sitter-rust",
"ui",
"ui_input",
- "util",
"vim",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -9023,15 +8580,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "kstring"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1"
-dependencies = [
- "static_assertions",
-]
-
[[package]]
name = "kurbo"
version = "0.11.1"
@@ -9058,7 +8606,6 @@ dependencies = [
"anyhow",
"async-trait",
"clock",
- "collections",
"ctor",
"diffy",
"ec4rs",
@@ -9067,10 +8614,8 @@ dependencies = [
"fuzzy",
"globset",
"gpui",
- "http_client",
"imara-diff",
"indoc",
- "inventory",
"itertools 0.14.0",
"log",
"lsp",
@@ -9080,7 +8625,7 @@ dependencies = [
"rand 0.9.1",
"regex",
"rpc",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -9089,7 +8634,6 @@ dependencies = [
"smol",
"streaming-iterator",
"strsim",
- "sum_tree",
"task",
"text",
"theme",
@@ -9107,9 +8651,12 @@ dependencies = [
"tree-sitter-typescript",
"unicase",
"unindent",
- "util",
"watch",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -9119,7 +8666,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
- "collections",
"extension",
"fs",
"futures 0.3.31",
@@ -9130,8 +8676,9 @@ dependencies = [
"project",
"serde",
"serde_json",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -9144,24 +8691,25 @@ dependencies = [
"client",
"cloud_api_types",
"cloud_llm_client",
- "collections",
"futures 0.3.31",
"gpui",
- "http_client",
"icons",
"image",
"log",
"open_router",
"parking_lot",
"proto",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"smol",
"telemetry_events",
"thiserror 2.0.12",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -9178,18 +8726,17 @@ dependencies = [
"chrono",
"client",
"cloud_llm_client",
- "collections",
"component",
"convert_case 0.8.0",
"copilot",
"credentials_provider",
"deepseek",
"editor",
+ "fs",
"futures 0.3.31",
"google_ai",
"gpui",
"gpui_tokio",
- "http_client",
"language",
"language_model",
"lmstudio",
@@ -9202,22 +8749,24 @@ dependencies = [
"partial-json-fixer",
"project",
"release_channel",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
"smol",
"strum 0.27.1",
- "theme",
"thiserror 2.0.12",
"tiktoken-rs",
"tokio",
"ui",
"ui_input",
- "util",
"vercel",
"workspace-hack",
"x_ai",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
+ "zed_env_vars",
]
[[package]]
@@ -9248,9 +8797,9 @@ dependencies = [
"project",
"settings",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -9259,7 +8808,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"command_palette_hooks",
"copilot",
"editor",
@@ -9276,9 +8824,10 @@ dependencies = [
"theme",
"tree-sitter",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
"zlog",
]
@@ -9293,39 +8842,33 @@ dependencies = [
"async-tar",
"async-trait",
"chrono",
- "collections",
- "dap",
"futures 0.3.31",
"gpui",
- "http_client",
+ "itertools 0.14.0",
+ "json_schema_store",
"language",
"log",
"lsp",
"node_runtime",
"parking_lot",
- "paths",
"pet",
"pet-conda",
"pet-core",
"pet-fs",
"pet-poetry",
"pet-reporter",
+ "pet-virtualenv",
"pretty_assertions",
"project",
"regex",
"rope",
"rust-embed",
- "schemars",
"serde",
"serde_json",
"serde_json_lenient",
"settings",
- "sha2",
- "shlex",
"smol",
- "snippet_provider",
"task",
- "tempfile",
"text",
"theme",
"toml 0.8.20",
@@ -9349,9 +8892,11 @@ dependencies = [
"tree-sitter-yaml",
"unindent",
"url",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -9447,7 +8992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
- "windows-targets 0.52.6",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -9511,15 +9056,6 @@ dependencies = [
"webrtc-sys",
]
-[[package]]
-name = "libz-rs-sys"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a"
-dependencies = [
- "zlib-rs",
-]
-
[[package]]
name = "libz-sys"
version = "1.1.22"
@@ -9542,9 +9078,9 @@ dependencies = [
"picker",
"project",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -9667,9 +9203,9 @@ dependencies = [
"prost 0.9.0",
"prost-build 0.9.0",
"prost-types 0.9.0",
- "reqwest 0.12.15 (git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415)",
"serde",
"workspace-hack",
+ "zed-reqwest",
]
[[package]]
@@ -9679,7 +9215,6 @@ dependencies = [
"anyhow",
"async-trait",
"audio",
- "collections",
"core-foundation 0.10.0",
"core-video",
"coreaudio-rs 0.12.1",
@@ -9698,7 +9233,6 @@ dependencies = [
"parking_lot",
"postage",
"rodio",
- "scap",
"serde",
"serde_json",
"serde_urlencoded",
@@ -9707,8 +9241,11 @@ dependencies = [
"simplelog",
"smallvec",
"tokio-tungstenite 0.26.2",
- "util",
+ "ui",
"workspace-hack",
+ "zed-collections",
+ "zed-scap",
+ "zed-util",
]
[[package]]
@@ -9728,11 +9265,11 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -9755,40 +9292,6 @@ dependencies = [
"value-bag",
]
-[[package]]
-name = "logos"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab6f536c1af4c7cc81edf73da1f8029896e7e1e16a219ef09b184e76a296f3db"
-dependencies = [
- "logos-derive",
-]
-
-[[package]]
-name = "logos-codegen"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "189bbfd0b61330abea797e5e9276408f2edbe4f822d7ad08685d67419aafb34e"
-dependencies = [
- "beef",
- "fnv",
- "lazy_static",
- "proc-macro2",
- "quote",
- "regex-syntax",
- "rustc_version",
- "syn 2.0.101",
-]
-
-[[package]]
-name = "logos-derive"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebfe8e1a19049ddbfccbd14ac834b215e11b85b90bab0c2dba7c7b92fb5d5cba"
-dependencies = [
- "logos-codegen",
-]
-
[[package]]
name = "loom"
version = "0.7.2"
@@ -9826,7 +9329,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-pipe",
- "collections",
"ctor",
"futures 0.3.31",
"gpui",
@@ -9835,12 +9337,13 @@ dependencies = [
"parking_lot",
"postage",
"release_channel",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"smol",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -9974,11 +9477,12 @@ dependencies = [
"node_runtime",
"pulldown-cmark 0.12.2",
"settings",
- "sum_tree",
"theme",
"ui",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-sum-tree",
+ "zed-util",
]
[[package]]
@@ -9987,7 +9491,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"async-recursion",
- "collections",
"editor",
"fs",
"gpui",
@@ -10001,9 +9504,10 @@ dependencies = [
"settings",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -10022,9 +9526,9 @@ dependencies = [
[[package]]
name = "markup5ever"
-version = "0.16.1"
+version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0a8096766c229e8c88a3900c9b44b7e06aa7f7343cc229158c3e58ef8f9973a"
+checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3"
dependencies = [
"log",
"tendril",
@@ -10045,9 +9549,9 @@ dependencies = [
[[package]]
name = "match_token"
-version = "0.1.0"
+version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b"
+checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf"
dependencies = [
"proc-macro2",
"quote",
@@ -10069,17 +9573,6 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
-[[package]]
-name = "maybe-async"
-version = "0.2.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
[[package]]
name = "maybe-owned"
version = "0.3.4"
@@ -10142,21 +9635,6 @@ dependencies = [
"warp",
]
-[[package]]
-name = "media"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "bindgen 0.71.1",
- "core-foundation 0.10.0",
- "core-video",
- "ctor",
- "foreign-types 0.5.0",
- "metal",
- "objc",
- "workspace-hack",
-]
-
[[package]]
name = "memchr"
version = "2.7.4"
@@ -10179,6 +9657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
dependencies = [
"libc",
+ "stable_deref_trait",
]
[[package]]
@@ -10218,14 +9697,18 @@ name = "migrator"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"convert_case 0.8.0",
"log",
"pretty_assertions",
+ "serde_json",
+ "serde_json_lenient",
+ "settings",
"streaming-iterator",
"tree-sitter",
"tree-sitter-json",
+ "unindent",
"workspace-hack",
+ "zed-collections",
]
[[package]]
@@ -10371,12 +9854,12 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"strum 0.27.1",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -10414,7 +9897,6 @@ dependencies = [
"anyhow",
"buffer_diff",
"clock",
- "collections",
"ctor",
"gpui",
"indoc",
@@ -10430,12 +9912,13 @@ dependencies = [
"settings",
"smallvec",
"smol",
- "sum_tree",
"text",
"theme",
"tree-sitter",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -10445,12 +9928,6 @@ version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
-[[package]]
-name = "multimap"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03"
-
[[package]]
name = "naga"
version = "25.0.1"
@@ -10461,11 +9938,11 @@ dependencies = [
"bit-set 0.8.0",
"bitflags 2.9.0",
"cfg_aliases 0.2.1",
- "codespan-reporting 0.12.0",
+ "codespan-reporting",
"half",
"hashbrown 0.15.3",
"hexf-parse",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"num-traits",
"once_cell",
@@ -10630,17 +10107,17 @@ dependencies = [
"async-tar",
"async-trait",
"futures 0.3.31",
- "http_client",
"log",
"paths",
"semver",
"serde",
"serde_json",
"smol",
- "util",
"watch",
"which 6.0.3",
"workspace-hack",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -10684,18 +10161,18 @@ dependencies = [
"anyhow",
"channel",
"client",
- "collections",
"component",
"db",
"gpui",
"rpc",
"settings",
- "sum_tree",
"time",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-sum-tree",
+ "zed-util",
"zed_actions",
]
@@ -10824,6 +10301,7 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
dependencies = [
+ "bytemuck",
"num-traits",
]
@@ -11123,7 +10601,7 @@ checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
"crc32fast",
"hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
"memchr",
]
@@ -11133,45 +10611,42 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
name = "onboarding"
version = "0.1.0"
dependencies = [
- "ai_onboarding",
"anyhow",
"client",
"component",
"db",
"documented",
- "editor",
"fs",
"fuzzy",
"git",
"gpui",
- "itertools 0.14.0",
- "language",
- "language_model",
"menu",
"notifications",
"picker",
"project",
- "schemars",
+ "schemars 1.0.1",
"serde",
"settings",
"telemetry",
"theme",
"ui",
- "util",
+ "ui_input",
"vim_mode_setting",
"workspace",
"workspace-hack",
+ "zed-util",
"zed_actions",
"zlog",
]
@@ -11240,13 +10715,14 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
"log",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"strum 0.27.1",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -11255,14 +10731,14 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "settings",
"strum 0.27.1",
"thiserror 2.0.12",
- "util",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -11411,9 +10887,9 @@ dependencies = [
"tree-sitter-rust",
"tree-sitter-typescript",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
"zed_actions",
]
@@ -11422,7 +10898,6 @@ name = "outline_panel"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"db",
"editor",
"file_icons",
@@ -11435,7 +10910,6 @@ dependencies = [
"outline",
"pretty_assertions",
"project",
- "schemars",
"search",
"serde",
"serde_json",
@@ -11444,10 +10918,11 @@ dependencies = [
"smol",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -11617,8 +11092,8 @@ version = "0.1.0"
dependencies = [
"dirs 4.0.0",
"ignore",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -12136,7 +11611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
dependencies = [
"fixedbitset",
- "indexmap",
+ "indexmap 2.9.0",
]
[[package]]
@@ -12210,9 +11685,10 @@ dependencies = [
"env_logger 0.11.8",
"gpui",
"menu",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
+ "theme",
"ui",
"workspace",
"workspace-hack",
@@ -12317,7 +11793,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d"
dependencies = [
"base64 0.22.1",
- "indexmap",
+ "indexmap 2.9.0",
"quick-xml 0.32.0",
"serde",
"time",
@@ -12366,30 +11842,23 @@ dependencies = [
[[package]]
name = "polling"
-version = "3.7.4"
+version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
+checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"
dependencies = [
"cfg-if",
"concurrent-queue",
- "hermit-abi 0.4.0",
+ "hermit-abi 0.5.0",
"pin-project-lite",
- "rustix 0.38.44",
- "tracing",
- "windows-sys 0.59.0",
+ "rustix 1.0.7",
+ "windows-sys 0.61.0",
]
[[package]]
name = "pollster"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7"
-
-[[package]]
-name = "pollster"
-version = "0.4.0"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
+checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7"
[[package]]
name = "portable-atomic"
@@ -12439,7 +11908,7 @@ dependencies = [
"log",
"parking_lot",
"pin-project",
- "pollster 0.2.5",
+ "pollster",
"static_assertions",
"thiserror 1.0.69",
]
@@ -12482,7 +11951,6 @@ name = "prettier"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"fs",
"gpui",
"language",
@@ -12493,8 +11961,9 @@ dependencies = [
"paths",
"serde",
"serde_json",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -12517,6 +11986,15 @@ dependencies = [
"syn 2.0.101",
]
+[[package]]
+name = "primal-check"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08"
+dependencies = [
+ "num-integer",
+]
+
[[package]]
name = "proc-macro-crate"
version = "3.3.0"
@@ -12580,16 +12058,6 @@ dependencies = [
"hex",
]
-[[package]]
-name = "prodash"
-version = "29.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04bb108f648884c23b98a0e940ebc2c93c0c3b89f04dbaf7eb8256ce617d1bc"
-dependencies = [
- "log",
- "parking_lot",
-]
-
[[package]]
name = "profiling"
version = "1.0.16"
@@ -12622,7 +12090,6 @@ dependencies = [
"circular-buffer",
"client",
"clock",
- "collections",
"context_server",
"dap",
"dap_adapters",
@@ -12636,9 +12103,8 @@ dependencies = [
"git_hosting_providers",
"globset",
"gpui",
- "http_client",
"image",
- "indexmap",
+ "indexmap 2.9.0",
"itertools 0.14.0",
"language",
"log",
@@ -12646,7 +12112,6 @@ dependencies = [
"markdown",
"node_runtime",
"parking_lot",
- "pathdiff",
"paths",
"postage",
"prettier",
@@ -12656,7 +12121,7 @@ dependencies = [
"release_channel",
"remote",
"rpc",
- "schemars",
+ "schemars 1.0.1",
"semver",
"serde",
"serde_json",
@@ -12668,7 +12133,6 @@ dependencies = [
"smol",
"snippet",
"snippet_provider",
- "sum_tree",
"task",
"tempfile",
"terminal",
@@ -12676,11 +12140,15 @@ dependencies = [
"toml 0.8.20",
"unindent",
"url",
- "util",
"watch",
"which 6.0.3",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
+ "zeroize",
"zlog",
]
@@ -12690,33 +12158,33 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"command_palette_hooks",
+ "criterion",
"db",
"editor",
"file_icons",
"git",
"git_ui",
"gpui",
- "indexmap",
"language",
"menu",
"pretty_assertions",
"project",
- "schemars",
+ "rayon",
+ "schemars 1.0.1",
"search",
"serde",
- "serde_derive",
"serde_json",
"settings",
"smallvec",
"telemetry",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -12738,9 +12206,9 @@ dependencies = [
"serde_json",
"settings",
"theme",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -12765,7 +12233,6 @@ dependencies = [
"anyhow",
"assets",
"chrono",
- "collections",
"fs",
"futures 0.3.31",
"fuzzy",
@@ -12780,9 +12247,10 @@ dependencies = [
"serde",
"serde_json",
"text",
- "util",
"uuid",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -12805,16 +12273,6 @@ dependencies = [
"prost-derive 0.12.6",
]
-[[package]]
-name = "prost"
-version = "0.13.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5"
-dependencies = [
- "bytes 1.10.1",
- "prost-derive 0.13.5",
-]
-
[[package]]
name = "prost-build"
version = "0.9.0"
@@ -12826,7 +12284,7 @@ dependencies = [
"itertools 0.10.5",
"lazy_static",
"log",
- "multimap 0.8.3",
+ "multimap",
"petgraph",
"prost 0.9.0",
"prost-types 0.9.0",
@@ -12845,7 +12303,7 @@ dependencies = [
"heck 0.5.0",
"itertools 0.12.1",
"log",
- "multimap 0.10.0",
+ "multimap",
"once_cell",
"petgraph",
"prettyplease",
@@ -12882,19 +12340,6 @@ dependencies = [
"syn 2.0.101",
]
-[[package]]
-name = "prost-derive"
-version = "0.13.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"
-dependencies = [
- "anyhow",
- "itertools 0.14.0",
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
[[package]]
name = "prost-types"
version = "0.9.0"
@@ -12919,12 +12364,12 @@ name = "proto"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"prost 0.9.0",
"prost-build 0.9.0",
"serde",
"typed-path",
"workspace-hack",
+ "zed-collections",
]
[[package]]
@@ -13017,6 +12462,32 @@ dependencies = [
"wasmtime-math",
]
+[[package]]
+name = "pulp"
+version = "0.18.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0a01a0dc67cf4558d279f0c25b0962bd08fc6dec0137699eae304103e882fe6"
+dependencies = [
+ "bytemuck",
+ "libm",
+ "num-complex",
+ "reborrow",
+]
+
+[[package]]
+name = "pulp"
+version = "0.21.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96b86df24f0a7ddd5e4b95c94fc9ed8a98f1ca94d3b01bdce2824097e7835907"
+dependencies = [
+ "bytemuck",
+ "cfg-if",
+ "libm",
+ "num-complex",
+ "reborrow",
+ "version_check",
+]
+
[[package]]
name = "qoi"
version = "0.4.1"
@@ -13193,6 +12664,16 @@ dependencies = [
"getrandom 0.3.2",
]
+[[package]]
+name = "rand_distr"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463"
+dependencies = [
+ "num-traits",
+ "rand 0.9.1",
+]
+
[[package]]
name = "range-map"
version = "0.2.0"
@@ -13258,6 +12739,24 @@ dependencies = [
"rgb",
]
+[[package]]
+name = "raw-cpuid"
+version = "10.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "raw-cpuid"
+version = "11.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
+dependencies = [
+ "bitflags 2.9.0",
+]
+
[[package]]
name = "raw-window-handle"
version = "0.6.2"
@@ -13306,11 +12805,27 @@ dependencies = [
"font-types",
]
+[[package]]
+name = "realfft"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f821338fddb99d089116342c46e9f1fbf3828dba077674613e734e01d6ea8677"
+dependencies = [
+ "rustfft",
+]
+
+[[package]]
+name = "reborrow"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430"
+
[[package]]
name = "recent_projects"
version = "0.1.0"
dependencies = [
"anyhow",
+ "askpass",
"auto_update",
"dap",
"editor",
@@ -13319,6 +12834,7 @@ dependencies = [
"futures 0.3.31",
"fuzzy",
"gpui",
+ "indoc",
"language",
"log",
"markdown",
@@ -13329,7 +12845,6 @@ dependencies = [
"project",
"release_channel",
"remote",
- "schemars",
"serde",
"serde_json",
"settings",
@@ -13338,9 +12853,10 @@ dependencies = [
"telemetry",
"theme",
"ui",
- "util",
+ "windows-registry 0.6.0",
"workspace",
"workspace-hack",
+ "zed-util",
"zed_actions",
]
@@ -13418,14 +12934,6 @@ dependencies = [
"serde_json",
]
-[[package]]
-name = "refineable"
-version = "0.1.0"
-dependencies = [
- "derive_refineable",
- "workspace-hack",
-]
-
[[package]]
name = "regalloc2"
version = "0.11.2"
@@ -13491,28 +12999,27 @@ dependencies = [
"anyhow",
"askpass",
"async-trait",
- "collections",
"fs",
"futures 0.3.31",
"gpui",
- "itertools 0.14.0",
"log",
"parking_lot",
"paths",
"prost 0.9.0",
"release_channel",
"rpc",
- "schemars",
"serde",
"serde_json",
+ "settings",
"shlex",
"smol",
"tempfile",
"thiserror 2.0.12",
"urlencoding",
- "util",
"which 6.0.3",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -13545,7 +13052,7 @@ dependencies = [
"git_hosting_providers",
"gpui",
"gpui_tokio",
- "http_client",
+ "json_schema_store",
"language",
"language_extension",
"language_model",
@@ -13556,6 +13063,7 @@ dependencies = [
"minidumper",
"node_runtime",
"paths",
+ "pretty_assertions",
"project",
"proto",
"release_channel",
@@ -13572,10 +13080,12 @@ dependencies = [
"thiserror 2.0.12",
"toml 0.8.20",
"unindent",
- "util",
"watch",
"workspace",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zlog",
]
@@ -13598,7 +13108,6 @@ dependencies = [
"async-tungstenite",
"base64 0.22.1",
"client",
- "collections",
"command_palette_hooks",
"editor",
"env_logger 0.11.8",
@@ -13606,7 +13115,6 @@ dependencies = [
"file_icons",
"futures 0.3.31",
"gpui",
- "http_client",
"image",
"indoc",
"jupyter-protocol",
@@ -13621,7 +13129,6 @@ dependencies = [
"picker",
"project",
"runtimelib",
- "schemars",
"serde",
"serde_json",
"settings",
@@ -13634,10 +13141,12 @@ dependencies = [
"tree-sitter-python",
"tree-sitter-typescript",
"ui",
- "util",
"uuid",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -13721,55 +13230,6 @@ dependencies = [
"windows-registry 0.4.0",
]
-[[package]]
-name = "reqwest"
-version = "0.12.15"
-source = "git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415#951c770a32f1998d6e999cef3e59e0013e6c4415"
-dependencies = [
- "base64 0.22.1",
- "bytes 1.10.1",
- "encoding_rs",
- "futures-core",
- "futures-util",
- "h2 0.4.9",
- "http 1.3.1",
- "http-body 1.0.1",
- "http-body-util",
- "hyper 1.6.0",
- "hyper-rustls 0.27.5",
- "hyper-util",
- "ipnet",
- "js-sys",
- "log",
- "mime",
- "mime_guess",
- "once_cell",
- "percent-encoding",
- "pin-project-lite",
- "quinn",
- "rustls 0.23.26",
- "rustls-native-certs 0.8.1",
- "rustls-pemfile 2.2.0",
- "rustls-pki-types",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "sync_wrapper 1.0.2",
- "system-configuration 0.6.1",
- "tokio",
- "tokio-rustls 0.26.2",
- "tokio-socks",
- "tokio-util",
- "tower 0.5.2",
- "tower-service",
- "url",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "wasm-streams",
- "web-sys",
- "windows-registry 0.4.0",
-]
-
[[package]]
name = "reqwest_client"
version = "0.1.0"
@@ -13778,14 +13238,14 @@ dependencies = [
"bytes 1.10.1",
"futures 0.3.31",
"gpui",
- "http_client",
"http_client_tls",
"log",
"regex",
- "reqwest 0.12.15 (git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415)",
"serde",
"tokio",
"workspace-hack",
+ "zed-http-client",
+ "zed-reqwest",
]
[[package]]
@@ -13833,8 +13293,8 @@ dependencies = [
"pulldown-cmark 0.12.2",
"theme",
"ui",
- "util",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -13904,7 +13364,7 @@ dependencies = [
[[package]]
name = "rodio"
version = "0.21.1"
-source = "git+https://github.com/RustAudio/rodio?branch=better_wav_output#82514bd1f2c6cfd9a1a885019b26a8ffea75bc5c"
+source = "git+https://github.com/RustAudio/rodio#e2074c6c2acf07b57cf717e076bdda7a9ac6e70b"
dependencies = [
"cpal",
"dasp_sample",
@@ -13927,10 +13387,10 @@ dependencies = [
"rand 0.9.1",
"rayon",
"smallvec",
- "sum_tree",
"unicode-segmentation",
- "util",
"workspace-hack",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -13948,7 +13408,6 @@ dependencies = [
"async-tungstenite",
"base64 0.22.1",
"chrono",
- "collections",
"futures 0.3.31",
"gpui",
"parking_lot",
@@ -13960,8 +13419,9 @@ dependencies = [
"sha2",
"strum 0.27.1",
"tracing",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
"zstd",
]
@@ -13997,7 +13457,6 @@ name = "rules_library"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"editor",
"gpui",
"language",
@@ -14013,9 +13472,10 @@ dependencies = [
"theme",
"title_bar",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -14079,11 +13539,21 @@ dependencies = [
"walkdir",
]
+[[package]]
+name = "rust-stemmers"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54"
+dependencies = [
+ "serde",
+ "serde_derive",
+]
+
[[package]]
name = "rust_decimal"
-version = "1.37.1"
+version = "1.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50"
+checksum = "c8975fc98059f365204d635119cf9c5a60ae67b841ed49b5422a9a7e56cdfac0"
dependencies = [
"arrayvec",
"borsh",
@@ -14122,6 +13592,20 @@ dependencies = [
"semver",
]
+[[package]]
+name = "rustfft"
+version = "6.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6f140db74548f7c9d7cce60912c9ac414e74df5e718dc947d514b051b42f3f4"
+dependencies = [
+ "num-complex",
+ "num-integer",
+ "num-traits",
+ "primal-check",
+ "strength_reduce",
+ "transpose",
+]
+
[[package]]
name = "rustix"
version = "0.38.44"
@@ -14130,7 +13614,6 @@ checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
"bitflags 2.9.0",
"errno 0.3.11",
- "itoa",
"libc",
"linux-raw-sys 0.4.15",
"windows-sys 0.59.0",
@@ -14161,13 +13644,13 @@ dependencies = [
[[package]]
name = "rustix-openpty"
-version = "0.1.1"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a25c3aad9fc1424eb82c88087789a7d938e1829724f3e4043163baf0d13cfc12"
+checksum = "1de16c7c59892b870a6336f185dc10943517f1327447096bbb7bb32cd85e2393"
dependencies = [
"errno 0.3.11",
"libc",
- "rustix 0.38.44",
+ "rustix 1.0.7",
]
[[package]]
@@ -14346,6 +13829,16 @@ version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+[[package]]
+name = "safetensors"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44560c11236a6130a46ce36c836a62936dc81ebf8c36a37947423571be0e55b6"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "salsa20"
version = "0.10.2"
@@ -14364,27 +13857,6 @@ dependencies = [
"winapi-util",
]
-[[package]]
-name = "scap"
-version = "0.0.8"
-source = "git+https://github.com/zed-industries/scap?rev=808aa5c45b41e8f44729d02e38fd00a2fe2722e7#808aa5c45b41e8f44729d02e38fd00a2fe2722e7"
-dependencies = [
- "anyhow",
- "cocoa 0.25.0",
- "core-graphics-helmer-fork",
- "log",
- "objc",
- "rand 0.8.5",
- "screencapturekit",
- "screencapturekit-sys",
- "sysinfo",
- "tao-core-video-sys",
- "windows 0.61.1",
- "windows-capture",
- "x11",
- "xcb",
-]
-
[[package]]
name = "schannel"
version = "0.1.27"
@@ -14414,13 +13886,25 @@ dependencies = [
"anyhow",
"clap",
"env_logger 0.11.8",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"theme",
"workspace-hack",
]
+[[package]]
+name = "schemars"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
+dependencies = [
+ "dyn-clone",
+ "ref-cast",
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "schemars"
version = "1.0.1"
@@ -14428,7 +13912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe8c9d1c68d67dd9f97ecbc6f932b60eb289c5dbddd8aa1405484a8fd2fcd984"
dependencies = [
"dyn-clone",
- "indexmap",
+ "indexmap 2.9.0",
"ref-cast",
"schemars_derive",
"serde",
@@ -14632,14 +14116,13 @@ dependencies = [
"anyhow",
"bitflags 2.9.0",
"client",
- "collections",
"editor",
"futures 0.3.31",
"gpui",
"language",
"menu",
"project",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
@@ -14647,9 +14130,10 @@ dependencies = [
"theme",
"ui",
"unindent",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -14709,15 +14193,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"
-[[package]]
-name = "semantic_version"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "serde",
- "workspace-hack",
-]
-
[[package]]
name = "semver"
version = "1.0.26"
@@ -14727,20 +14202,36 @@ dependencies = [
"serde",
]
+[[package]]
+name = "seq-macro"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
+
[[package]]
name = "serde"
-version = "1.0.219"
+version = "1.0.221"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "341877e04a22458705eb4e131a1508483c877dca2792b3781d4e5d8a6019ec43"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.221"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c459bc0a14c840cb403fc14b148620de1e0778c96ecd6e0c8c3cacb6d8d00fe"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.219"
+version = "1.0.221"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d6185cf75117e20e62b1ff867b9518577271e58abe0037c40bb4794969355ab0"
dependencies = [
"proc-macro2",
"quote",
@@ -14769,15 +14260,15 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.140"
+version = "1.0.144"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "56177480b00303e689183f110b4e727bb4211d692c62d4fcd16d02be93077d40"
dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
"itoa",
"memchr",
"ryu",
- "serde",
+ "serde_core",
]
[[package]]
@@ -14786,7 +14277,7 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e033097bf0d2b59a62b42c18ebbb797503839b26afdda2c4e1415cb6c813540"
dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
"itoa",
"memchr",
"ryu",
@@ -14835,6 +14326,37 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_with"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf65a400f8f66fb7b0552869ad70157166676db75ed8181f8104ea91cf9d0b42"
+dependencies = [
+ "base64 0.22.1",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.9.0",
+ "schemars 0.9.0",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_with_macros",
+ "time",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81679d9ed988d5e9a5e6531dc3f2c28efbd639cbd1dfb628df08edea6004da77"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "serial2"
version = "0.2.29"
@@ -14853,9 +14375,9 @@ dependencies = [
"db",
"gpui",
"serde_json",
- "util",
"uuid",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -14863,7 +14385,7 @@ name = "settings"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
+ "derive_more",
"ec4rs",
"fs",
"futures 0.3.31",
@@ -14875,22 +14397,35 @@ dependencies = [
"pretty_assertions",
"release_channel",
"rust-embed",
- "schemars",
+ "schemars 1.0.1",
"serde",
- "serde_derive",
"serde_json",
"serde_json_lenient",
"serde_path_to_error",
- "settings_ui_macros",
+ "serde_repr",
+ "serde_with",
+ "settings_macros",
"smallvec",
+ "strum 0.27.1",
"tree-sitter",
"tree-sitter-json",
"unindent",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
+[[package]]
+name = "settings_macros"
+version = "0.1.0"
+dependencies = [
+ "quote",
+ "settings",
+ "syn 2.0.101",
+ "workspace-hack",
+]
+
[[package]]
name = "settings_profile_selector"
version = "0.1.0"
@@ -14917,32 +14452,38 @@ name = "settings_ui"
version = "0.1.0"
dependencies = [
"anyhow",
- "command_palette_hooks",
- "debugger_ui",
+ "assets",
+ "bm25",
+ "client",
"editor",
"feature_flags",
+ "fs",
+ "futures 0.3.31",
+ "fuzzy",
"gpui",
+ "heck 0.5.0",
+ "language",
+ "log",
"menu",
+ "node_runtime",
+ "paths",
+ "pretty_assertions",
+ "project",
+ "schemars 1.0.1",
+ "search",
"serde",
- "serde_json",
+ "session",
"settings",
- "smallvec",
+ "strum 0.27.1",
"theme",
+ "title_bar",
"ui",
+ "ui_input",
"workspace",
"workspace-hack",
-]
-
-[[package]]
-name = "settings_ui_macros"
-version = "0.1.0"
-dependencies = [
- "heck 0.5.0",
- "proc-macro2",
- "quote",
- "settings",
- "syn 2.0.101",
- "workspace-hack",
+ "zed-util",
+ "zed_actions",
+ "zlog",
]
[[package]]
@@ -14956,16 +14497,6 @@ dependencies = [
"digest",
]
-[[package]]
-name = "sha1-checked"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89f599ac0c323ebb1c6082821a54962b839832b03984598375bff3975b804423"
-dependencies = [
- "digest",
- "sha1",
-]
-
[[package]]
name = "sha1_smol"
version = "1.0.1"
@@ -14974,9 +14505,9 @@ checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
[[package]]
name = "sha2"
-version = "0.10.8"
+version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -15222,7 +14753,6 @@ name = "snippet_provider"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"extension",
"fs",
"futures 0.3.31",
@@ -15230,12 +14760,14 @@ dependencies = [
"indoc",
"parking_lot",
"paths",
- "schemars",
+ "schemars 1.0.1",
"serde",
+ "serde_json",
"serde_json_lenient",
"snippet",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -15251,9 +14783,9 @@ dependencies = [
"picker",
"settings",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -15324,7 +14856,6 @@ name = "sqlez"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"futures 0.3.31",
"indoc",
"libsqlite3-sys",
@@ -15333,9 +14864,10 @@ dependencies = [
"smol",
"sqlformat",
"thread_local",
- "util",
"uuid",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -15391,7 +14923,7 @@ dependencies = [
"futures-util",
"hashbrown 0.15.3",
"hashlink 0.10.0",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"memchr",
"once_cell",
@@ -15614,6 +15146,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+[[package]]
+name = "stop-words"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "645a3d441ccf4bf47f2e4b7681461986681a6eeea9937d4c3bc9febd61d17c71"
+dependencies = [
+ "serde_json",
+]
+
[[package]]
name = "story"
version = "0.1.0"
@@ -15668,10 +15209,16 @@ dependencies = [
"ordered-float 2.10.1",
"rand 0.9.1",
"rope",
- "util",
"workspace-hack",
+ "zed-util",
]
+[[package]]
+name = "strength_reduce"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
+
[[package]]
name = "strict-num"
version = "0.1.1"
@@ -15773,32 +15320,17 @@ version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
-[[package]]
-name = "sum_tree"
-version = "0.1.0"
-dependencies = [
- "arrayvec",
- "ctor",
- "log",
- "rand 0.9.1",
- "rayon",
- "workspace-hack",
- "zlog",
-]
-
[[package]]
name = "supermaven"
version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"edit_prediction",
"editor",
"env_logger 0.11.8",
"futures 0.3.31",
"gpui",
- "http_client",
"language",
"log",
"postage",
@@ -15812,8 +15344,10 @@ dependencies = [
"theme",
"ui",
"unicode-segmentation",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -15822,13 +15356,13 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.31",
- "http_client",
"paths",
"serde",
"serde_json",
"smol",
- "util",
"workspace-hack",
+ "zed-http-client",
+ "zed-util",
]
[[package]]
@@ -16162,6 +15696,34 @@ dependencies = [
"libc",
]
+[[package]]
+name = "sysctl"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec7dddc5f0fee506baf8b9fdb989e242f17e4b11c61dfbb0635b705217199eea"
+dependencies = [
+ "bitflags 2.9.0",
+ "byteorder",
+ "enum-as-inner",
+ "libc",
+ "thiserror 1.0.69",
+ "walkdir",
+]
+
+[[package]]
+name = "sysctl"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc"
+dependencies = [
+ "bitflags 2.9.0",
+ "byteorder",
+ "enum-as-inner",
+ "libc",
+ "thiserror 1.0.69",
+ "walkdir",
+]
+
[[package]]
name = "sysinfo"
version = "0.31.4"
@@ -16267,7 +15829,6 @@ name = "tab_switcher"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"ctor",
"editor",
"fuzzy",
@@ -16276,16 +15837,17 @@ dependencies = [
"menu",
"picker",
"project",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"settings",
"smol",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zlog",
]
@@ -16348,7 +15910,6 @@ name = "task"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"futures 0.3.31",
"gpui",
"hex",
@@ -16356,14 +15917,15 @@ dependencies = [
"parking_lot",
"pretty_assertions",
"proto",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"serde_json_lenient",
"sha2",
"shellexpand 2.1.2",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -16372,7 +15934,6 @@ name = "tasks_ui"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"editor",
"file_icons",
"fuzzy",
@@ -16388,9 +15949,10 @@ dependencies = [
"tree-sitter-rust",
"tree-sitter-typescript",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -16409,10 +15971,10 @@ dependencies = [
name = "telemetry_events"
version = "0.1.0"
dependencies = [
- "semantic_version",
"serde",
"serde_json",
"workspace-hack",
+ "zed-semantic-version",
]
[[package]]
@@ -16454,17 +16016,16 @@ version = "0.1.0"
dependencies = [
"alacritty_terminal",
"anyhow",
- "collections",
"futures 0.3.31",
"gpui",
"itertools 0.14.0",
"libc",
+ "log",
"rand 0.9.1",
"regex",
"release_channel",
- "schemars",
+ "schemars 1.0.1",
"serde",
- "serde_derive",
"settings",
"smol",
"sysinfo",
@@ -16473,9 +16034,10 @@ dependencies = [
"thiserror 2.0.12",
"url",
"urlencoding",
- "util",
"windows 0.61.1",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
]
[[package]]
@@ -16497,7 +16059,6 @@ dependencies = [
"async-recursion",
"breadcrumbs",
"client",
- "collections",
"db",
"dirs 4.0.0",
"editor",
@@ -16506,10 +16067,11 @@ dependencies = [
"itertools 0.14.0",
"language",
"log",
+ "pretty_assertions",
"project",
"rand 0.9.1",
"regex",
- "schemars",
+ "schemars 1.0.1",
"search",
"serde",
"serde_json",
@@ -16520,9 +16082,10 @@ dependencies = [
"terminal",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zed_actions",
]
@@ -16532,10 +16095,8 @@ version = "0.1.0"
dependencies = [
"anyhow",
"clock",
- "collections",
"ctor",
"gpui",
- "http_client",
"log",
"parking_lot",
"postage",
@@ -16543,9 +16104,11 @@ dependencies = [
"regex",
"rope",
"smallvec",
- "sum_tree",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -16554,29 +16117,25 @@ name = "theme"
version = "0.1.0"
dependencies = [
"anyhow",
- "collections",
"derive_more",
"fs",
"futures 0.3.31",
"gpui",
- "indexmap",
- "inventory",
"log",
"palette",
"parking_lot",
- "refineable",
- "schemars",
+ "schemars 1.0.1",
"serde",
- "serde_derive",
"serde_json",
"serde_json_lenient",
- "serde_repr",
"settings",
"strum 0.27.1",
"thiserror 2.0.12",
- "util",
"uuid",
"workspace-hack",
+ "zed-collections",
+ "zed-refineable",
+ "zed-util",
]
[[package]]
@@ -16598,7 +16157,7 @@ dependencies = [
"anyhow",
"clap",
"gpui",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"palette",
"serde",
@@ -16609,6 +16168,7 @@ dependencies = [
"theme",
"vscode_theme",
"workspace-hack",
+ "zed-collections",
]
[[package]]
@@ -16625,9 +16185,9 @@ dependencies = [
"telemetry",
"theme",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
"zed_actions",
]
@@ -16843,16 +16403,14 @@ dependencies = [
"chrono",
"client",
"cloud_llm_client",
- "collections",
"db",
"gpui",
- "http_client",
"notifications",
"pretty_assertions",
"project",
"remote",
"rpc",
- "schemars",
+ "schemars 1.0.1",
"serde",
"settings",
"smallvec",
@@ -16861,10 +16419,12 @@ dependencies = [
"theme",
"tree-sitter-md",
"ui",
- "util",
"windows 0.61.1",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_actions",
]
@@ -17051,7 +16611,7 @@ version = "0.22.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
"serde",
"serde_spanned",
"toml_datetime",
@@ -17081,9 +16641,9 @@ dependencies = [
"picker",
"project",
"ui",
- "util",
"workspace",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -17258,11 +16818,21 @@ dependencies = [
"syn 2.0.101",
]
+[[package]]
+name = "transpose"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e"
+dependencies = [
+ "num-integer",
+ "strength_reduce",
+]
+
[[package]]
name = "tree-sitter"
-version = "0.25.6"
+version = "0.25.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7cf18d43cbf0bfca51f657132cc616a5097edc4424d538bae6fa60142eaf9f0"
+checksum = "78f873475d258561b06f1c595d93308a7ed124d9977cb26b148c2084a4a3cc87"
dependencies = [
"cc",
"regex",
@@ -17435,8 +17005,9 @@ dependencies = [
[[package]]
name = "tree-sitter-python"
-version = "0.23.6"
-source = "git+https://github.com/zed-industries/tree-sitter-python?rev=218fcbf3fda3d029225f3dec005cb497d111b35e#218fcbf3fda3d029225f3dec005cb497d111b35e"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bf85fd39652e740bf60f46f4cda9492c3a9ad75880575bf14960f775cb74a1c"
dependencies = [
"cc",
"tree-sitter-language",
@@ -17475,8 +17046,7 @@ dependencies = [
[[package]]
name = "tree-sitter-typescript"
version = "0.23.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c5f76ed8d947a75cc446d5fccd8b602ebf0cde64ccf2ffa434d873d7a575eff"
+source = "git+https://github.com/zed-industries/tree-sitter-typescript?rev=e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899#e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899"
dependencies = [
"cc",
"tree-sitter-language",
@@ -17619,6 +17189,27 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "ug"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90b70b37e9074642bc5f60bb23247fd072a84314ca9e71cdf8527593406a0dd3"
+dependencies = [
+ "gemm 0.18.2",
+ "half",
+ "libloading",
+ "memmap2",
+ "num",
+ "num-traits",
+ "num_cpus",
+ "rayon",
+ "safetensors",
+ "serde",
+ "thiserror 1.0.69",
+ "tracing",
+ "yoke",
+]
+
[[package]]
name = "ui"
version = "0.1.0"
@@ -17627,11 +17218,11 @@ dependencies = [
"component",
"documented",
"gpui",
- "gpui_macros",
+ "gpui-macros",
"icons",
"itertools 0.14.0",
"menu",
- "schemars",
+ "schemars 1.0.1",
"serde",
"settings",
"smallvec",
@@ -17639,9 +17230,9 @@ dependencies = [
"strum 0.27.1",
"theme",
"ui_macros",
- "util",
"windows 0.61.1",
"workspace-hack",
+ "zed-util",
]
[[package]]
@@ -17650,7 +17241,10 @@ version = "0.1.0"
dependencies = [
"component",
"editor",
+ "fuzzy",
"gpui",
+ "menu",
+ "picker",
"settings",
"theme",
"ui",
@@ -17682,15 +17276,6 @@ dependencies = [
"workspace-hack",
]
-[[package]]
-name = "uluru"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da"
-dependencies = [
- "arrayvec",
-]
-
[[package]]
name = "unicase"
version = "2.8.1"
@@ -17715,12 +17300,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe"
-[[package]]
-name = "unicode-bom"
-version = "2.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217"
-
[[package]]
name = "unicode-ccc"
version = "0.2.0"
@@ -17778,12 +17357,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94"
-[[package]]
-name = "unicode-width"
-version = "0.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
-
[[package]]
name = "unicode-width"
version = "0.2.0"
@@ -17883,53 +17456,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
-[[package]]
-name = "util"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "async-fs",
- "async_zip",
- "collections",
- "command-fds",
- "dirs 4.0.0",
- "dunce",
- "futures 0.3.31",
- "futures-lite 1.13.0",
- "git2",
- "globset",
- "indoc",
- "itertools 0.14.0",
- "libc",
- "log",
- "nix 0.29.0",
- "rand 0.9.1",
- "regex",
- "rust-embed",
- "schemars",
- "serde",
- "serde_json",
- "serde_json_lenient",
- "shlex",
- "smol",
- "take-until",
- "tempfile",
- "tendril",
- "unicase",
- "util_macros",
- "walkdir",
- "workspace-hack",
-]
-
-[[package]]
-name = "util_macros"
-version = "0.1.0"
-dependencies = [
- "quote",
- "syn 2.0.101",
- "workspace-hack",
-]
-
[[package]]
name = "uuid"
version = "1.16.0"
@@ -18016,7 +17542,7 @@ name = "vercel"
version = "0.1.0"
dependencies = [
"anyhow",
- "schemars",
+ "schemars 1.0.1",
"serde",
"strum 0.27.1",
"workspace-hack",
@@ -18042,7 +17568,6 @@ dependencies = [
"assets",
"async-compat",
"async-trait",
- "collections",
"command_palette",
"command_palette_hooks",
"db",
@@ -18056,6 +17581,7 @@ dependencies = [
"language",
"log",
"lsp",
+ "menu",
"multi_buffer",
"nvim-rs",
"parking_lot",
@@ -18064,10 +17590,9 @@ dependencies = [
"project_panel",
"regex",
"release_channel",
- "schemars",
+ "schemars 1.0.1",
"search",
"serde",
- "serde_derive",
"serde_json",
"settings",
"task",
@@ -18075,10 +17600,13 @@ dependencies = [
"theme",
"tokio",
"ui",
- "util",
"vim_mode_setting",
"workspace",
"workspace-hack",
+ "zed-collections",
+ "zed-perf",
+ "zed-util",
+ "zed-util-macros",
"zed_actions",
]
@@ -18086,10 +17614,7 @@ dependencies = [
name = "vim_mode_setting"
version = "0.1.0"
dependencies = [
- "anyhow",
"gpui",
- "schemars",
- "serde",
"settings",
"workspace-hack",
]
@@ -18324,7 +17849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fd83062c17b9f4985d438603cde0a5e8c5c8198201a6937f778b607924c7da2"
dependencies = [
"anyhow",
- "indexmap",
+ "indexmap 2.9.0",
"serde",
"serde_derive",
"serde_json",
@@ -18342,7 +17867,7 @@ dependencies = [
"anyhow",
"auditable-serde",
"flate2",
- "indexmap",
+ "indexmap 2.9.0",
"serde",
"serde_derive",
"serde_json",
@@ -18372,7 +17897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708"
dependencies = [
"bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
"semver",
]
@@ -18384,7 +17909,7 @@ checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185"
dependencies = [
"bitflags 2.9.0",
"hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
"semver",
"serde",
]
@@ -18397,7 +17922,7 @@ checksum = "0f51cad774fb3c9461ab9bccc9c62dfb7388397b5deda31bf40e8108ccd678b2"
dependencies = [
"bitflags 2.9.0",
"hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
"semver",
]
@@ -18426,7 +17951,7 @@ dependencies = [
"cfg-if",
"encoding_rs",
"hashbrown 0.14.5",
- "indexmap",
+ "indexmap 2.9.0",
"libc",
"log",
"mach2 0.4.2",
@@ -18550,7 +18075,7 @@ dependencies = [
"cranelift-bitset",
"cranelift-entity",
"gimli",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"object",
"postcard",
@@ -18675,7 +18200,7 @@ checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6"
dependencies = [
"anyhow",
"heck 0.5.0",
- "indexmap",
+ "indexmap 2.9.0",
"wit-parser 0.221.3",
]
@@ -18750,6 +18275,18 @@ dependencies = [
"wayland-scanner",
]
+[[package]]
+name = "wayland-protocols"
+version = "0.32.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc"
+dependencies = [
+ "bitflags 2.9.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-scanner",
+]
+
[[package]]
name = "wayland-protocols-plasma"
version = "0.2.0"
@@ -18759,7 +18296,7 @@ dependencies = [
"bitflags 2.9.0",
"wayland-backend",
"wayland-client",
- "wayland-protocols",
+ "wayland-protocols 0.31.2",
"wayland-scanner",
]
@@ -18824,10 +18361,10 @@ version = "0.1.0"
dependencies = [
"anyhow",
"cloud_llm_client",
- "collections",
"gpui",
"serde",
"workspace-hack",
+ "zed-collections",
]
[[package]]
@@ -18839,12 +18376,12 @@ dependencies = [
"cloud_llm_client",
"futures 0.3.31",
"gpui",
- "http_client",
"language_model",
"serde",
"serde_json",
"web_search",
"workspace-hack",
+ "zed-http-client",
]
[[package]]
@@ -18888,7 +18425,7 @@ dependencies = [
"reqwest 0.11.27",
"scratch",
"semver",
- "zip",
+ "zip 0.6.6",
]
[[package]]
@@ -19061,7 +18598,7 @@ dependencies = [
"windows-collections",
"windows-core 0.61.0",
"windows-future",
- "windows-link",
+ "windows-link 0.1.1",
"windows-numerics",
]
@@ -19131,7 +18668,7 @@ checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [
"windows-implement 0.60.0",
"windows-interface 0.59.1",
- "windows-link",
+ "windows-link 0.1.1",
"windows-result 0.3.2",
"windows-strings 0.4.0",
]
@@ -19143,7 +18680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
dependencies = [
"windows-core 0.61.0",
- "windows-link",
+ "windows-link 0.1.1",
]
[[package]]
@@ -19218,6 +18755,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
+[[package]]
+name = "windows-link"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
+
[[package]]
name = "windows-numerics"
version = "0.2.0"
@@ -19225,7 +18768,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [
"windows-core 0.61.0",
- "windows-link",
+ "windows-link 0.1.1",
]
[[package]]
@@ -19245,11 +18788,22 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1da3e436dc7653dfdf3da67332e22bff09bb0e28b0239e1624499c7830842e"
dependencies = [
- "windows-link",
+ "windows-link 0.1.1",
"windows-result 0.3.2",
"windows-strings 0.4.0",
]
+[[package]]
+name = "windows-registry"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f91f87ce112ffb7275000ea98eb1940912c21c1567c9312fde20261f3eadd29"
+dependencies = [
+ "windows-link 0.2.0",
+ "windows-result 0.4.0",
+ "windows-strings 0.5.0",
+]
+
[[package]]
name = "windows-result"
version = "0.1.2"
@@ -19274,7 +18828,16 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
dependencies = [
- "windows-link",
+ "windows-link 0.1.1",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f"
+dependencies = [
+ "windows-link 0.2.0",
]
[[package]]
@@ -19293,7 +18856,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
dependencies = [
- "windows-link",
+ "windows-link 0.1.1",
]
[[package]]
@@ -19302,7 +18865,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
dependencies = [
- "windows-link",
+ "windows-link 0.1.1",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda"
+dependencies = [
+ "windows-link 0.2.0",
]
[[package]]
@@ -19350,6 +18922,15 @@ dependencies = [
"windows-targets 0.53.2",
]
+[[package]]
+name = "windows-sys"
+version = "0.61.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa"
+dependencies = [
+ "windows-link 0.2.0",
+]
+
[[package]]
name = "windows-targets"
version = "0.42.2"
@@ -19751,7 +19332,7 @@ checksum = "d8a39a15d1ae2077688213611209849cad40e9e5cccf6e61951a425850677ff3"
dependencies = [
"anyhow",
"heck 0.4.1",
- "indexmap",
+ "indexmap 2.9.0",
"wasm-metadata 0.201.0",
"wit-bindgen-core 0.22.0",
"wit-component 0.201.0",
@@ -19765,7 +19346,7 @@ checksum = "9d0809dc5ba19e2e98661bf32fc0addc5a3ca5bf3a6a7083aa6ba484085ff3ce"
dependencies = [
"anyhow",
"heck 0.5.0",
- "indexmap",
+ "indexmap 2.9.0",
"prettyplease",
"syn 2.0.101",
"wasm-metadata 0.227.1",
@@ -19810,7 +19391,7 @@ checksum = "421c0c848a0660a8c22e2fd217929a0191f14476b68962afd2af89fd22e39825"
dependencies = [
"anyhow",
"bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"serde",
"serde_derive",
@@ -19829,7 +19410,7 @@ checksum = "635c3adc595422cbf2341a17fb73a319669cc8d33deed3a48368a841df86b676"
dependencies = [
"anyhow",
"bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"serde",
"serde_derive",
@@ -19848,7 +19429,7 @@ checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6"
dependencies = [
"anyhow",
"id-arena",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"semver",
"serde",
@@ -19866,7 +19447,7 @@ checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac"
dependencies = [
"anyhow",
"id-arena",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"semver",
"serde",
@@ -19884,7 +19465,7 @@ checksum = "ddf445ed5157046e4baf56f9138c124a0824d4d1657e7204d71886ad8ce2fc11"
dependencies = [
"anyhow",
"id-arena",
- "indexmap",
+ "indexmap 2.9.0",
"log",
"semver",
"serde",
@@ -19916,14 +19497,12 @@ dependencies = [
"call",
"client",
"clock",
- "collections",
"component",
"dap",
"db",
"fs",
"futures 0.3.31",
"gpui",
- "http_client",
"itertools 0.14.0",
"language",
"log",
@@ -19934,7 +19513,7 @@ dependencies = [
"pretty_assertions",
"project",
"remote",
- "schemars",
+ "schemars 1.0.1",
"serde",
"serde_json",
"session",
@@ -19947,10 +19526,12 @@ dependencies = [
"tempfile",
"theme",
"ui",
- "util",
"uuid",
"windows 0.61.1",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_actions",
"zlog",
]
@@ -19964,6 +19545,7 @@ dependencies = [
"aho-corasick",
"anstream",
"arrayvec",
+ "ashpd 0.11.0",
"async-compression",
"async-std",
"async-tungstenite",
@@ -19991,12 +19573,11 @@ dependencies = [
"cipher",
"clap",
"clap_builder",
- "codespan-reporting 0.12.0",
+ "codespan-reporting",
"concurrent-queue",
"core-foundation 0.9.4",
"core-foundation-sys",
"cranelift-codegen",
- "crc32fast",
"crossbeam-channel",
"crossbeam-epoch",
"crossbeam-utils",
@@ -20031,11 +19612,10 @@ dependencies = [
"hyper 0.14.32",
"hyper-rustls 0.27.5",
"idna",
- "indexmap",
+ "indexmap 2.9.0",
"inout",
"itertools 0.12.1",
"itertools 0.13.0",
- "jiff",
"lazy_static",
"libc",
"libsqlite3-sys",
@@ -20047,6 +19627,7 @@ dependencies = [
"lyon_path",
"md-5",
"memchr",
+ "memmap2",
"mime_guess",
"miniz_oxide",
"mio 1.0.3",
@@ -20057,6 +19638,7 @@ dependencies = [
"nom 7.1.3",
"num-bigint",
"num-bigint-dig",
+ "num-complex",
"num-integer",
"num-iter",
"num-rational",
@@ -20072,6 +19654,7 @@ dependencies = [
"phf_shared",
"prettyplease",
"proc-macro2",
+ "prost 0.12.6",
"prost 0.9.0",
"prost-types 0.9.0",
"quote",
@@ -20079,6 +19662,7 @@ dependencies = [
"rand 0.9.1",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
+ "rand_distr",
"regalloc2",
"regex",
"regex-automata",
@@ -20097,9 +19681,8 @@ dependencies = [
"security-framework-sys",
"semver",
"serde",
- "serde_derive",
+ "serde_core",
"serde_json",
- "sha1",
"simd-adler32",
"smallvec",
"spin",
@@ -20108,6 +19691,7 @@ dependencies = [
"sqlx-macros-core",
"sqlx-postgres",
"sqlx-sqlite",
+ "stable_deref_trait",
"strum 0.26.3",
"subtle",
"syn 1.0.109",
@@ -20127,7 +19711,6 @@ dependencies = [
"tracing",
"tracing-core",
"tungstenite 0.26.2",
- "unicode-normalization",
"unicode-properties",
"url",
"uuid",
@@ -20135,13 +19718,16 @@ dependencies = [
"wasmtime",
"wasmtime-cranelift",
"wasmtime-environ",
+ "wayland-backend",
+ "wayland-sys",
"winapi",
"windows-core 0.61.0",
"windows-numerics",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
- "winnow",
+ "windows-sys 0.61.0",
+ "zbus_macros",
"zeroize",
"zvariant",
]
@@ -20152,14 +19738,12 @@ version = "0.1.0"
dependencies = [
"anyhow",
"clock",
- "collections",
"fs",
"futures 0.3.31",
"fuzzy",
"git",
"git2",
"gpui",
- "http_client",
"ignore",
"language",
"log",
@@ -20169,16 +19753,17 @@ dependencies = [
"pretty_assertions",
"rand 0.9.1",
"rpc",
- "schemars",
"serde",
"serde_json",
"settings",
"smallvec",
"smol",
- "sum_tree",
"text",
- "util",
"workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-sum-tree",
+ "zed-util",
"zlog",
]
@@ -20247,7 +19832,7 @@ name = "x_ai"
version = "0.1.0"
dependencies = [
"anyhow",
- "schemars",
+ "schemars 1.0.1",
"serde",
"strum 0.27.1",
"workspace-hack",
@@ -20277,26 +19862,13 @@ dependencies = [
[[package]]
name = "xcursor"
version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61"
-
-[[package]]
-name = "xim"
-version = "0.4.0"
-source = "git+https://github.com/zed-industries/xim-rs?rev=c0a70c1bd2ce197364216e5e818a2cb3adb99a8d#c0a70c1bd2ce197364216e5e818a2cb3adb99a8d"
-dependencies = [
- "ahash 0.8.11",
- "hashbrown 0.14.5",
- "log",
- "x11rb",
- "xim-ctext",
- "xim-parser",
-]
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61"
[[package]]
name = "xim-ctext"
version = "0.3.0"
-source = "git+https://github.com/zed-industries/xim-rs?rev=c0a70c1bd2ce197364216e5e818a2cb3adb99a8d#c0a70c1bd2ce197364216e5e818a2cb3adb99a8d"
+source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
dependencies = [
"encoding_rs",
]
@@ -20304,7 +19876,7 @@ dependencies = [
[[package]]
name = "xim-parser"
version = "0.2.1"
-source = "git+https://github.com/zed-industries/xim-rs?rev=c0a70c1bd2ce197364216e5e818a2cb3adb99a8d#c0a70c1bd2ce197364216e5e818a2cb3adb99a8d"
+source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
dependencies = [
"bitflags 2.9.0",
]
@@ -20358,6 +19930,9 @@ dependencies = [
"cargo_metadata",
"cargo_toml",
"clap",
+ "indoc",
+ "toml 0.8.20",
+ "toml_edit",
"workspace-hack",
]
@@ -20510,7 +20085,7 @@ dependencies = [
[[package]]
name = "zed"
-version = "0.205.0"
+version = "0.209.0"
dependencies = [
"acp_tools",
"activity_indicator",
@@ -20533,8 +20108,8 @@ dependencies = [
"clap",
"cli",
"client",
+ "codestral",
"collab_ui",
- "collections",
"command_palette",
"component",
"copilot",
@@ -20557,109 +20132,368 @@ dependencies = [
"file_finder",
"fs",
"futures 0.3.31",
- "git",
- "git_hosting_providers",
- "git_ui",
- "go_to_line",
- "gpui",
- "gpui_tokio",
- "http_client",
- "image_viewer",
- "inspector_ui",
- "install_cli",
+ "git",
+ "git_hosting_providers",
+ "git_ui",
+ "go_to_line",
+ "gpui",
+ "gpui_tokio",
+ "image_viewer",
+ "inspector_ui",
+ "install_cli",
+ "itertools 0.14.0",
+ "journal",
+ "json_schema_store",
+ "keymap_editor",
+ "language",
+ "language_extension",
+ "language_model",
+ "language_models",
+ "language_onboarding",
+ "language_selector",
+ "language_tools",
+ "languages",
+ "line_ending_selector",
+ "log",
+ "markdown",
+ "markdown_preview",
+ "menu",
+ "migrator",
+ "mimalloc",
+ "nc",
+ "nix 0.29.0",
+ "node_runtime",
+ "notifications",
+ "onboarding",
+ "outline",
+ "outline_panel",
+ "parking_lot",
+ "paths",
+ "picker",
+ "pretty_assertions",
+ "profiling",
+ "project",
+ "project_panel",
+ "project_symbols",
+ "prompt_store",
+ "proto",
+ "recent_projects",
+ "release_channel",
+ "remote",
+ "repl",
+ "reqwest_client",
+ "rope",
+ "search",
+ "serde",
+ "serde_json",
+ "session",
+ "settings",
+ "settings_profile_selector",
+ "settings_ui",
+ "shellexpand 2.1.2",
+ "smol",
+ "snippet_provider",
+ "snippets_ui",
+ "supermaven",
+ "svg_preview",
+ "sysinfo",
+ "system_specs",
+ "tab_switcher",
+ "task",
+ "tasks_ui",
+ "telemetry",
+ "telemetry_events",
+ "terminal_view",
+ "theme",
+ "theme_extension",
+ "theme_selector",
+ "time",
+ "title_bar",
+ "toolchain_selector",
+ "tree-sitter-md",
+ "tree-sitter-rust",
+ "ui",
+ "ui_input",
+ "ui_prompt",
+ "url",
+ "urlencoding",
+ "uuid",
+ "vim",
+ "vim_mode_setting",
+ "watch",
+ "web_search",
+ "web_search_providers",
+ "windows 0.61.1",
+ "winresource",
+ "workspace",
+ "workspace-hack",
+ "zed-collections",
+ "zed-http-client",
+ "zed-reqwest",
+ "zed-util",
+ "zed_actions",
+ "zed_env_vars",
+ "zeta",
+ "zeta2",
+ "zeta2_tools",
+ "zlog",
+ "zlog_settings",
+]
+
+[[package]]
+name = "zed-collections"
+version = "0.1.0"
+dependencies = [
+ "indexmap 2.9.0",
+ "rustc-hash 2.1.1",
+ "workspace-hack",
+]
+
+[[package]]
+name = "zed-derive-refineable"
+version = "0.1.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+ "workspace-hack",
+]
+
+[[package]]
+name = "zed-font-kit"
+version = "0.14.1-zed"
+source = "git+https://github.com/zed-industries/font-kit?rev=110523127440aefb11ce0cf280ae7c5071337ec5#110523127440aefb11ce0cf280ae7c5071337ec5"
+dependencies = [
+ "bitflags 2.9.0",
+ "byteorder",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "core-text",
+ "dirs 5.0.1",
+ "dwrote",
+ "float-ord",
+ "freetype-sys",
+ "lazy_static",
+ "libc",
+ "log",
+ "pathfinder_geometry",
+ "pathfinder_simd",
+ "walkdir",
+ "winapi",
+ "yeslogic-fontconfig-sys",
+]
+
+[[package]]
+name = "zed-http-client"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "async-compression",
+ "async-fs",
+ "async-tar",
+ "bytes 1.10.1",
+ "derive_more",
+ "futures 0.3.31",
+ "http 1.3.1",
+ "http-body 1.0.1",
+ "log",
+ "parking_lot",
+ "serde",
+ "serde_json",
+ "sha2",
+ "tempfile",
+ "url",
+ "workspace-hack",
+ "zed-reqwest",
+ "zed-util",
+]
+
+[[package]]
+name = "zed-media"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "bindgen 0.71.1",
+ "core-foundation 0.10.0",
+ "core-video",
+ "ctor",
+ "foreign-types 0.5.0",
+ "metal",
+ "objc",
+ "workspace-hack",
+]
+
+[[package]]
+name = "zed-perf"
+version = "0.1.0"
+dependencies = [
+ "serde",
+ "serde_json",
+ "workspace-hack",
+ "zed-collections",
+]
+
+[[package]]
+name = "zed-refineable"
+version = "0.1.0"
+dependencies = [
+ "workspace-hack",
+ "zed-derive-refineable",
+]
+
+[[package]]
+name = "zed-reqwest"
+version = "0.12.15-zed"
+source = "git+https://github.com/zed-industries/reqwest.git?rev=c15662463bda39148ba154100dd44d3fba5873a4#c15662463bda39148ba154100dd44d3fba5873a4"
+dependencies = [
+ "base64 0.22.1",
+ "bytes 1.10.1",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2 0.4.9",
+ "http 1.3.1",
+ "http-body 1.0.1",
+ "http-body-util",
+ "hyper 1.6.0",
+ "hyper-rustls 0.27.5",
+ "hyper-util",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "mime_guess",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "quinn",
+ "rustls 0.23.26",
+ "rustls-native-certs 0.8.1",
+ "rustls-pemfile 2.2.0",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.2",
+ "system-configuration 0.6.1",
+ "tokio",
+ "tokio-rustls 0.26.2",
+ "tokio-socks",
+ "tokio-util",
+ "tower 0.5.2",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams",
+ "web-sys",
+ "windows-registry 0.4.0",
+]
+
+[[package]]
+name = "zed-scap"
+version = "0.0.8-zed"
+source = "git+https://github.com/zed-industries/scap?rev=4afea48c3b002197176fb19cd0f9b180dd36eaac#4afea48c3b002197176fb19cd0f9b180dd36eaac"
+dependencies = [
+ "anyhow",
+ "cocoa 0.25.0",
+ "core-graphics-helmer-fork",
+ "log",
+ "objc",
+ "rand 0.8.5",
+ "screencapturekit",
+ "screencapturekit-sys",
+ "sysinfo",
+ "tao-core-video-sys",
+ "windows 0.61.1",
+ "windows-capture",
+ "x11",
+ "xcb",
+]
+
+[[package]]
+name = "zed-semantic-version"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "serde",
+ "workspace-hack",
+]
+
+[[package]]
+name = "zed-sum-tree"
+version = "0.1.0"
+dependencies = [
+ "arrayvec",
+ "ctor",
+ "log",
+ "rand 0.9.1",
+ "rayon",
+ "workspace-hack",
+ "zlog",
+]
+
+[[package]]
+name = "zed-util"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "async-fs",
+ "async_zip",
+ "command-fds",
+ "dirs 4.0.0",
+ "dunce",
+ "futures 0.3.31",
+ "futures-lite 1.13.0",
+ "git2",
+ "globset",
+ "indoc",
"itertools 0.14.0",
- "jj_ui",
- "journal",
- "keymap_editor",
- "language",
- "language_extension",
- "language_model",
- "language_models",
- "language_onboarding",
- "language_selector",
- "language_tools",
- "languages",
- "line_ending_selector",
+ "libc",
"log",
- "markdown",
- "markdown_preview",
- "menu",
- "migrator",
- "mimalloc",
- "nc",
"nix 0.29.0",
- "node_runtime",
- "notifications",
- "onboarding",
- "outline",
- "outline_panel",
- "parking_lot",
- "paths",
- "picker",
"pretty_assertions",
- "profiling",
- "project",
- "project_panel",
- "project_symbols",
- "prompt_store",
- "proto",
- "recent_projects",
- "release_channel",
- "remote",
- "repl",
- "reqwest 0.12.15 (git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415)",
- "reqwest_client",
- "rope",
- "search",
+ "rand 0.9.1",
+ "regex",
+ "rust-embed",
+ "schemars 1.0.1",
"serde",
"serde_json",
- "session",
- "settings",
- "settings_profile_selector",
- "settings_ui",
- "shellexpand 2.1.2",
+ "serde_json_lenient",
+ "shlex",
"smol",
- "snippet_provider",
- "snippets_ui",
- "supermaven",
- "svg_preview",
- "sysinfo",
- "system_specs",
- "tab_switcher",
- "task",
- "tasks_ui",
- "telemetry",
- "telemetry_events",
- "terminal_view",
- "theme",
- "theme_extension",
- "theme_selector",
- "time",
- "title_bar",
- "toolchain_selector",
- "tree-sitter-md",
- "tree-sitter-rust",
- "ui",
- "ui_input",
- "ui_prompt",
- "url",
- "urlencoding",
- "util",
- "uuid",
- "vim",
- "vim_mode_setting",
- "watch",
- "web_search",
- "web_search_providers",
- "windows 0.61.1",
- "winresource",
- "workspace",
+ "take-until",
+ "tempfile",
+ "tendril",
+ "unicase",
+ "walkdir",
+ "which 6.0.3",
"workspace-hack",
- "zed_actions",
- "zed_env_vars",
- "zeta",
- "zlog",
- "zlog_settings",
+ "zed-collections",
+ "zed-util-macros",
+]
+
+[[package]]
+name = "zed-util-macros"
+version = "0.1.0"
+dependencies = [
+ "quote",
+ "syn 2.0.101",
+ "workspace-hack",
+ "zed-perf",
+]
+
+[[package]]
+name = "zed-xim"
+version = "0.4.0-zed"
+source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
+dependencies = [
+ "ahash 0.8.11",
+ "hashbrown 0.14.5",
+ "log",
+ "x11rb",
+ "xim-ctext",
+ "xim-parser",
]
[[package]]
@@ -20667,7 +20501,7 @@ name = "zed_actions"
version = "0.1.0"
dependencies = [
"gpui",
- "schemars",
+ "schemars 1.0.1",
"serde",
"uuid",
"workspace-hack",
@@ -20677,6 +20511,7 @@ dependencies = [
name = "zed_env_vars"
version = "0.1.0"
dependencies = [
+ "gpui",
"workspace-hack",
]
@@ -20700,6 +20535,17 @@ dependencies = [
"wit-bindgen 0.41.0",
]
+[[package]]
+name = "zed_extension_api"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0729d50b4ca0a7e28e590bbe32e3ca0194d97ef654961451a424c661a366fca0"
+dependencies = [
+ "serde",
+ "serde_json",
+ "wit-bindgen 0.41.0",
+]
+
[[package]]
name = "zed_glsl"
version = "0.1.0"
@@ -20709,9 +20555,9 @@ dependencies = [
[[package]]
name = "zed_html"
-version = "0.2.2"
+version = "0.2.3"
dependencies = [
- "zed_extension_api 0.1.0",
+ "zed_extension_api 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -20721,21 +20567,6 @@ dependencies = [
"zed_extension_api 0.1.0",
]
-[[package]]
-name = "zed_ruff"
-version = "0.1.1"
-dependencies = [
- "zed_extension_api 0.1.0",
-]
-
-[[package]]
-name = "zed_snippets"
-version = "0.0.6"
-dependencies = [
- "serde_json",
- "zed_extension_api 0.1.0",
-]
-
[[package]]
name = "zed_test_extension"
version = "0.1.0"
@@ -20888,7 +20719,6 @@ dependencies = [
"clock",
"cloud_api_types",
"cloud_llm_client",
- "collections",
"command_palette_hooks",
"copilot",
"ctor",
@@ -20899,7 +20729,6 @@ dependencies = [
"fs",
"futures 0.3.31",
"gpui",
- "http_client",
"indoc",
"itertools 0.14.0",
"language",
@@ -20925,15 +20754,83 @@ dependencies = [
"tree-sitter-go",
"tree-sitter-rust",
"ui",
- "util",
"uuid",
"workspace",
"workspace-hack",
"worktree",
+ "zed-collections",
+ "zed-http-client",
+ "zed-util",
"zed_actions",
"zlog",
]
+[[package]]
+name = "zeta2"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "arrayvec",
+ "chrono",
+ "client",
+ "clock",
+ "cloud_llm_client",
+ "cloud_zeta2_prompt",
+ "edit_prediction",
+ "edit_prediction_context",
+ "futures 0.3.31",
+ "gpui",
+ "indoc",
+ "language",
+ "language_model",
+ "log",
+ "lsp",
+ "pretty_assertions",
+ "project",
+ "release_channel",
+ "serde_json",
+ "settings",
+ "thiserror 2.0.12",
+ "uuid",
+ "workspace",
+ "workspace-hack",
+ "worktree",
+ "zed-util",
+]
+
+[[package]]
+name = "zeta2_tools"
+version = "0.1.0"
+dependencies = [
+ "chrono",
+ "clap",
+ "client",
+ "cloud_llm_client",
+ "edit_prediction_context",
+ "editor",
+ "futures 0.3.31",
+ "gpui",
+ "indoc",
+ "language",
+ "log",
+ "multi_buffer",
+ "ordered-float 2.10.1",
+ "pretty_assertions",
+ "project",
+ "serde",
+ "serde_json",
+ "settings",
+ "text",
+ "ui",
+ "ui_input",
+ "workspace",
+ "workspace-hack",
+ "zed-collections",
+ "zed-util",
+ "zeta2",
+ "zlog",
+]
+
[[package]]
name = "zeta_cli"
version = "0.1.0"
@@ -20941,7 +20838,10 @@ dependencies = [
"anyhow",
"clap",
"client",
+ "cloud_llm_client",
+ "cloud_zeta2_prompt",
"debug_adapter_extension",
+ "edit_prediction_context",
"extension",
"fs",
"futures 0.3.31",
@@ -20952,7 +20852,9 @@ dependencies = [
"language_model",
"language_models",
"languages",
+ "log",
"node_runtime",
+ "ordered-float 2.10.1",
"paths",
"project",
"prompt_store",
@@ -20964,10 +20866,13 @@ dependencies = [
"shellexpand 2.1.2",
"smol",
"terminal_view",
- "util",
"watch",
"workspace-hack",
+ "zed-collections",
+ "zed-util",
"zeta",
+ "zeta2",
+ "zlog",
]
[[package]]
@@ -20991,10 +20896,19 @@ dependencies = [
]
[[package]]
-name = "zlib-rs"
-version = "0.5.0"
+name = "zip"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8"
+checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164"
+dependencies = [
+ "arbitrary",
+ "crc32fast",
+ "crossbeam-utils",
+ "displaydoc",
+ "indexmap 2.9.0",
+ "num_enum",
+ "thiserror 1.0.69",
+]
[[package]]
name = "zlog"
@@ -21005,18 +20919,17 @@ dependencies = [
"log",
"tempfile",
"workspace-hack",
+ "zed-collections",
]
[[package]]
name = "zlog_settings"
version = "0.1.0"
dependencies = [
- "anyhow",
"gpui",
- "schemars",
- "serde",
"settings",
"workspace-hack",
+ "zed-collections",
"zlog",
]
diff --git a/Cargo.toml b/Cargo.toml
index 042bd8cf421b737130344242c2a58ad4cfb2a7f2..34214772f5f33f9b3521e6d1ae2744857cf1c2fa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,6 +35,7 @@ members = [
"crates/cloud_api_client",
"crates/cloud_api_types",
"crates/cloud_llm_client",
+ "crates/cloud_zeta2_prompt",
"crates/collab",
"crates/collab_ui",
"crates/collections",
@@ -52,10 +53,13 @@ members = [
"crates/debugger_tools",
"crates/debugger_ui",
"crates/deepseek",
+ "crates/denoise",
"crates/diagnostics",
"crates/docs_preprocessor",
"crates/edit_prediction",
"crates/edit_prediction_button",
+ "crates/edit_prediction_context",
+ "crates/zeta2_tools",
"crates/editor",
"crates/eval",
"crates/explorer_command_injector",
@@ -86,9 +90,8 @@ members = [
"crates/image_viewer",
"crates/inspector_ui",
"crates/install_cli",
- "crates/jj",
- "crates/jj_ui",
"crates/journal",
+ "crates/json_schema_store",
"crates/keymap_editor",
"crates/language",
"crates/language_extension",
@@ -147,9 +150,9 @@ members = [
"crates/semantic_version",
"crates/session",
"crates/settings",
+ "crates/settings_macros",
"crates/settings_profile_selector",
"crates/settings_ui",
- "crates/settings_ui_macros",
"crates/snippet",
"crates/snippet_provider",
"crates/snippets_ui",
@@ -161,6 +164,7 @@ members = [
"crates/sum_tree",
"crates/supermaven",
"crates/supermaven_api",
+ "crates/codestral",
"crates/svg_preview",
"crates/system_specs",
"crates/tab_switcher",
@@ -197,6 +201,7 @@ members = [
"crates/zed_actions",
"crates/zed_env_vars",
"crates/zeta",
+ "crates/zeta2",
"crates/zeta_cli",
"crates/zlog",
"crates/zlog_settings",
@@ -208,15 +213,14 @@ members = [
"extensions/glsl",
"extensions/html",
"extensions/proto",
- "extensions/ruff",
"extensions/slash-commands-example",
- "extensions/snippets",
"extensions/test-extension",
#
# Tooling
#
+ "tooling/perf",
"tooling/workspace-hack",
"tooling/xtask",
]
@@ -267,9 +271,10 @@ clock = { path = "crates/clock" }
cloud_api_client = { path = "crates/cloud_api_client" }
cloud_api_types = { path = "crates/cloud_api_types" }
cloud_llm_client = { path = "crates/cloud_llm_client" }
+cloud_zeta2_prompt = { path = "crates/cloud_zeta2_prompt" }
collab = { path = "crates/collab" }
collab_ui = { path = "crates/collab_ui" }
-collections = { path = "crates/collections" }
+collections = { path = "crates/collections", package = "zed-collections", version = "0.1.0" }
command_palette = { path = "crates/command_palette" }
command_palette_hooks = { path = "crates/command_palette_hooks" }
component = { path = "crates/component" }
@@ -285,6 +290,7 @@ debug_adapter_extension = { path = "crates/debug_adapter_extension" }
debugger_tools = { path = "crates/debugger_tools" }
debugger_ui = { path = "crates/debugger_ui" }
deepseek = { path = "crates/deepseek" }
+derive_refineable = { path = "crates/refineable/derive_refineable", package = "zed-derive-refineable", version = "0.1.0" }
diagnostics = { path = "crates/diagnostics" }
editor = { path = "crates/editor" }
extension = { path = "crates/extension" }
@@ -303,20 +309,21 @@ git_ui = { path = "crates/git_ui" }
go_to_line = { path = "crates/go_to_line" }
google_ai = { path = "crates/google_ai" }
gpui = { path = "crates/gpui", default-features = false }
-gpui_macros = { path = "crates/gpui_macros" }
+gpui_macros = { path = "crates/gpui_macros", package = "gpui-macros", version = "0.1.0" }
gpui_tokio = { path = "crates/gpui_tokio" }
html_to_markdown = { path = "crates/html_to_markdown" }
-http_client = { path = "crates/http_client" }
+http_client = { path = "crates/http_client", package = "zed-http-client", version = "0.1.0" }
http_client_tls = { path = "crates/http_client_tls" }
icons = { path = "crates/icons" }
image_viewer = { path = "crates/image_viewer" }
edit_prediction = { path = "crates/edit_prediction" }
edit_prediction_button = { path = "crates/edit_prediction_button" }
+edit_prediction_context = { path = "crates/edit_prediction_context" }
+zeta2_tools = { path = "crates/zeta2_tools" }
inspector_ui = { path = "crates/inspector_ui" }
install_cli = { path = "crates/install_cli" }
-jj = { path = "crates/jj" }
-jj_ui = { path = "crates/jj_ui" }
journal = { path = "crates/journal" }
+json_schema_store = { path = "crates/json_schema_store" }
keymap_editor = { path = "crates/keymap_editor" }
language = { path = "crates/language" }
language_extension = { path = "crates/language_extension" }
@@ -334,7 +341,7 @@ lsp = { path = "crates/lsp" }
markdown = { path = "crates/markdown" }
markdown_preview = { path = "crates/markdown_preview" }
svg_preview = { path = "crates/svg_preview" }
-media = { path = "crates/media" }
+media = { path = "crates/media", package = "zed-media", version = "0.1.0" }
menu = { path = "crates/menu" }
migrator = { path = "crates/migrator" }
mistral = { path = "crates/mistral" }
@@ -351,6 +358,7 @@ outline = { path = "crates/outline" }
outline_panel = { path = "crates/outline_panel" }
panel = { path = "crates/panel" }
paths = { path = "crates/paths" }
+perf = { path = "tooling/perf", package = "zed-perf", version = "0.1.0" }
picker = { path = "crates/picker" }
plugin = { path = "crates/plugin" }
plugin_macros = { path = "crates/plugin_macros" }
@@ -362,7 +370,7 @@ project_symbols = { path = "crates/project_symbols" }
prompt_store = { path = "crates/prompt_store" }
proto = { path = "crates/proto" }
recent_projects = { path = "crates/recent_projects" }
-refineable = { path = "crates/refineable" }
+refineable = { path = "crates/refineable", package = "zed-refineable", version = "0.1.0" }
release_channel = { path = "crates/release_channel" }
scheduler = { path = "crates/scheduler" }
remote = { path = "crates/remote" }
@@ -370,16 +378,16 @@ remote_server = { path = "crates/remote_server" }
repl = { path = "crates/repl" }
reqwest_client = { path = "crates/reqwest_client" }
rich_text = { path = "crates/rich_text" }
-rodio = { git = "https://github.com/RustAudio/rodio", branch = "better_wav_output"}
+rodio = { git = "https://github.com/RustAudio/rodio" }
rope = { path = "crates/rope" }
rpc = { path = "crates/rpc" }
rules_library = { path = "crates/rules_library" }
search = { path = "crates/search" }
-semantic_version = { path = "crates/semantic_version" }
+semantic_version = { path = "crates/semantic_version", package = "zed-semantic-version", version = "0.1.0" }
session = { path = "crates/session" }
settings = { path = "crates/settings" }
+settings_macros = { path = "crates/settings_macros" }
settings_ui = { path = "crates/settings_ui" }
-settings_ui_macros = { path = "crates/settings_ui_macros" }
snippet = { path = "crates/snippet" }
snippet_provider = { path = "crates/snippet_provider" }
snippets_ui = { path = "crates/snippets_ui" }
@@ -388,9 +396,10 @@ sqlez_macros = { path = "crates/sqlez_macros" }
story = { path = "crates/story" }
storybook = { path = "crates/storybook" }
streaming_diff = { path = "crates/streaming_diff" }
-sum_tree = { path = "crates/sum_tree" }
+sum_tree = { path = "crates/sum_tree", package = "zed-sum-tree", version = "0.1.0" }
supermaven = { path = "crates/supermaven" }
supermaven_api = { path = "crates/supermaven_api" }
+codestral = { path = "crates/codestral" }
system_specs = { path = "crates/system_specs" }
tab_switcher = { path = "crates/tab_switcher" }
task = { path = "crates/task" }
@@ -411,8 +420,8 @@ ui = { path = "crates/ui" }
ui_input = { path = "crates/ui_input" }
ui_macros = { path = "crates/ui_macros" }
ui_prompt = { path = "crates/ui_prompt" }
-util = { path = "crates/util" }
-util_macros = { path = "crates/util_macros" }
+util = { path = "crates/util", package = "zed-util", version = "0.1.0" }
+util_macros = { path = "crates/util_macros", package = "zed-util-macros", version = "0.1.0" }
vercel = { path = "crates/vercel" }
vim = { path = "crates/vim" }
vim_mode_setting = { path = "crates/vim_mode_setting" }
@@ -427,6 +436,7 @@ zed = { path = "crates/zed" }
zed_actions = { path = "crates/zed_actions" }
zed_env_vars = { path = "crates/zed_env_vars" }
zeta = { path = "crates/zeta" }
+zeta2 = { path = "crates/zeta2" }
zlog = { path = "crates/zlog" }
zlog_settings = { path = "crates/zlog_settings" }
@@ -434,9 +444,9 @@ zlog_settings = { path = "crates/zlog_settings" }
# External crates
#
-agent-client-protocol = { version = "0.2.1", features = ["unstable"] }
+agent-client-protocol = { version = "0.4.3", features = ["unstable"] }
aho-corasick = "1.1"
-alacritty_terminal = { git = "https://github.com/zed-industries/alacritty.git", branch = "add-hush-login-flag" }
+alacritty_terminal = "0.25.1-rc1"
any_vec = "0.14"
anyhow = "1.0.86"
arrayvec = { version = "0.7.4", features = ["serde"] }
@@ -465,10 +475,9 @@ backtrace = "0.3"
base64 = "0.22"
bincode = "1.2.1"
bitflags = "2.6.0"
-blade-graphics = { git = "https://github.com/kvark/blade", rev = "bfa594ea697d4b6326ea29f747525c85ecf933b9" }
-blade-macros = { git = "https://github.com/kvark/blade", rev = "bfa594ea697d4b6326ea29f747525c85ecf933b9" }
-blade-util = { git = "https://github.com/kvark/blade", rev = "bfa594ea697d4b6326ea29f747525c85ecf933b9" }
-blake3 = "1.5.3"
+blade-graphics = { version = "0.7.0" }
+blade-macros = { version = "0.3.0" }
+blade-util = { version = "0.3.0" }
bytes = "1.0"
cargo_metadata = "0.19"
cargo_toml = "0.21"
@@ -505,6 +514,7 @@ futures-lite = "1.13"
git2 = { version = "0.20.1", default-features = false }
globset = "0.4"
handlebars = "4.3"
+hashbrown = "0.15.3"
heck = "0.5"
heed = { version = "0.21.0", features = ["read-txn-no-tls"] }
hex = "0.4.3"
@@ -520,7 +530,6 @@ indexmap = { version = "2.7.0", features = ["serde"] }
indoc = "2"
inventory = "0.3.19"
itertools = "0.14.0"
-jj-lib = { git = "https://github.com/jj-vcs/jj", rev = "e18eb8e05efaa153fad5ef46576af145bba1807f" }
json_dotpath = "1.1"
jsonschema = "0.30.0"
jsonwebtoken = "9.3"
@@ -541,6 +550,7 @@ nanoid = "0.4"
nbformat = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734" }
nix = "0.29"
num-format = "0.4.4"
+num-traits = "0.2"
objc = "0.2"
objc2-foundation = { version = "0.3", default-features = false, features = [
"NSArray",
@@ -582,6 +592,7 @@ pet-fs = { git = "https://github.com/microsoft/python-environment-tools.git", re
pet-pixi = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
+pet-virtualenv = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
portable-pty = "0.9.0"
postage = { version = "0.5", features = ["futures-traits"] }
pretty_assertions = { version = "1.3.0", features = ["unstable"] }
@@ -596,7 +607,8 @@ rand = "0.9"
rayon = "1.8"
ref-cast = "1.0.24"
regex = "1.5"
-reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "951c770a32f1998d6e999cef3e59e0013e6c4415", default-features = false, features = [
+# WARNING: If you change this, you must also publish a new version of zed-reqwest to crates.io
+reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "c15662463bda39148ba154100dd44d3fba5873a4", default-features = false, features = [
"charset",
"http2",
"macos-system-configuration",
@@ -604,22 +616,21 @@ reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "951c77
"rustls-tls-native-roots",
"socks",
"stream",
-] }
+], package = "zed-reqwest", version = "0.12.15-zed" }
rsa = "0.9.6"
runtimelib = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734", default-features = false, features = [
"async-dispatcher-runtime",
] }
rust-embed = { version = "8.4", features = ["include-exclude"] }
-rustc-demangle = "0.1.23"
rustc-hash = "2.1.0"
rustls = { version = "0.23.26" }
rustls-platform-verifier = "0.5.0"
-scap = { git = "https://github.com/zed-industries/scap", rev = "808aa5c45b41e8f44729d02e38fd00a2fe2722e7", default-features = false }
+# WARNING: If you change this, you must also publish a new version of zed-scap to crates.io
+scap = { git = "https://github.com/zed-industries/scap", rev = "4afea48c3b002197176fb19cd0f9b180dd36eaac", default-features = false, package = "zed-scap", version = "0.0.8-zed" }
schemars = { version = "1.0", features = ["indexmap2"] }
semver = "1.0"
-serde = { version = "1.0", features = ["derive", "rc"] }
-serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
-serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
+serde = { version = "1.0.221", features = ["derive", "rc"] }
+serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] }
serde_json_lenient = { version = "0.2", features = [
"preserve_order",
"raw_value",
@@ -627,10 +638,12 @@ serde_json_lenient = { version = "0.2", features = [
serde_path_to_error = "0.1.17"
serde_repr = "0.1"
serde_urlencoded = "0.7"
+serde_with = "3.4.0"
sha2 = "0.10"
shellexpand = "2.1.0"
shlex = "1.3.0"
simplelog = "0.12.2"
+slotmap = "1.0.6"
smallvec = { version = "1.6", features = ["union"] }
smol = "2.0"
sqlformat = "0.2"
@@ -639,7 +652,7 @@ streaming-iterator = "0.1"
strsim = "0.11"
strum = { version = "0.27.0", features = ["derive"] }
subtle = "2.5.0"
-syn = { version = "2.0.101", features = ["full", "extra-traits"] }
+syn = { version = "2.0.101", features = ["full", "extra-traits", "visit-mut"] }
sys-locale = "0.3.1"
sysinfo = "0.31.0"
take-until = "0.2.0"
@@ -657,8 +670,9 @@ tiny_http = "0.8"
tokio = { version = "1" }
tokio-tungstenite = { version = "0.26", features = ["__rustls-tls"] }
toml = "0.8"
+toml_edit = { version = "0.22", default-features = false, features = ["display", "parse", "serde"] }
tower-http = "0.4.4"
-tree-sitter = { version = "0.25.6", features = ["wasm"] }
+tree-sitter = { version = "0.25.10", features = ["wasm"] }
tree-sitter-bash = "0.25.0"
tree-sitter-c = "0.23"
tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "5cb9b693cfd7bfacab1d9ff4acac1a4150700609" }
@@ -675,11 +689,11 @@ tree-sitter-html = "0.23"
tree-sitter-jsdoc = "0.23"
tree-sitter-json = "0.24"
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
-tree-sitter-python = { git = "https://github.com/zed-industries/tree-sitter-python", rev = "218fcbf3fda3d029225f3dec005cb497d111b35e" }
+tree-sitter-python = "0.25"
tree-sitter-regex = "0.24"
tree-sitter-ruby = "0.23"
tree-sitter-rust = "0.24"
-tree-sitter-typescript = "0.23"
+tree-sitter-typescript = { git = "https://github.com/zed-industries/tree-sitter-typescript", rev = "e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899" } # https://github.com/tree-sitter/tree-sitter-typescript/pull/347
tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a" }
unicase = "2.6"
unicode-script = "0.5.7"
@@ -706,6 +720,7 @@ windows-core = "0.61"
wit-component = "0.221"
workspace-hack = "0.1.0"
yawc = "0.2.5"
+zeroize = "1.8"
zstd = "0.11"
[workspace.dependencies.windows]
@@ -732,6 +747,7 @@ features = [
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Security_Credentials",
+ "Win32_Security_Cryptography",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
@@ -789,7 +805,7 @@ wasmtime = { opt-level = 3 }
activity_indicator = { codegen-units = 1 }
assets = { codegen-units = 1 }
breadcrumbs = { codegen-units = 1 }
-collections = { codegen-units = 1 }
+zed-collections = { codegen-units = 1 }
command_palette = { codegen-units = 1 }
command_palette_hooks = { codegen-units = 1 }
extension_cli = { codegen-units = 1 }
@@ -800,6 +816,7 @@ image_viewer = { codegen-units = 1 }
edit_prediction_button = { codegen-units = 1 }
install_cli = { codegen-units = 1 }
journal = { codegen-units = 1 }
+json_schema_store = { codegen-units = 1 }
lmstudio = { codegen-units = 1 }
menu = { codegen-units = 1 }
notifications = { codegen-units = 1 }
@@ -808,11 +825,11 @@ outline = { codegen-units = 1 }
paths = { codegen-units = 1 }
prettier = { codegen-units = 1 }
project_symbols = { codegen-units = 1 }
-refineable = { codegen-units = 1 }
+zed-refineable = { codegen-units = 1 }
release_channel = { codegen-units = 1 }
reqwest_client = { codegen-units = 1 }
rich_text = { codegen-units = 1 }
-semantic_version = { codegen-units = 1 }
+zed-semantic-version = { codegen-units = 1 }
session = { codegen-units = 1 }
snippet = { codegen-units = 1 }
snippets_ui = { codegen-units = 1 }
@@ -851,6 +868,7 @@ todo = "deny"
declare_interior_mutable_const = "deny"
redundant_clone = "deny"
+disallowed_methods = "deny"
# We currently do not restrict any style rules
# as it slows down shipping code to Zed.
diff --git a/Dockerfile-collab b/Dockerfile-collab
index c1621d6ee67e42117315ea49eac99f6f6260f4b7..a85fe93f198475534cb7396abe594f9d02eeb57b 100644
--- a/Dockerfile-collab
+++ b/Dockerfile-collab
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
-FROM rust:1.89-bookworm as builder
+FROM rust:1.90-bookworm as builder
WORKDIR app
COPY . .
diff --git a/GEMINI.md b/GEMINI.md
new file mode 120000
index 0000000000000000000000000000000000000000..8a63b64bdb0afcda986ba715cb39849ac574e096
--- /dev/null
+++ b/GEMINI.md
@@ -0,0 +1 @@
+.rules
\ No newline at end of file
diff --git a/assets/icons/editor_cursor.svg b/assets/icons/editor_cursor.svg
index 338697be8a621e80099c308b3dda0a4e11fcfd61..e20013917d3c8b9d28f4fab631ae2fbd99b9297f 100644
--- a/assets/icons/editor_cursor.svg
+++ b/assets/icons/editor_cursor.svg
@@ -1,9 +1,3 @@
diff --git a/assets/icons/linux.svg b/assets/icons/linux.svg
new file mode 100644
index 0000000000000000000000000000000000000000..fc76742a3f236650cb8c514c8263ec2c3b2d4521
--- /dev/null
+++ b/assets/icons/linux.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/icons/paperclip.svg b/assets/icons/paperclip.svg
new file mode 100644
index 0000000000000000000000000000000000000000..7a864103c013823096b523f3e0f56db2d7e76009
--- /dev/null
+++ b/assets/icons/paperclip.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json
index 6b4c4e0fac95cf751c21cfaa0770d1279a35adcc..ae15492b804274bc3ceacaae156a19093344a9b7 100644
--- a/assets/keymaps/default-linux.json
+++ b/assets/keymaps/default-linux.json
@@ -31,6 +31,7 @@
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
"ctrl-,": "zed::OpenSettings",
+ "ctrl-alt-,": "zed::OpenSettingsFile",
"ctrl-q": "zed::Quit",
"f4": "debugger::Start",
"shift-f5": "debugger::Stop",
@@ -250,7 +251,7 @@
"alt-enter": "agent::ContinueWithBurnMode",
"ctrl-y": "agent::AllowOnce",
"ctrl-alt-y": "agent::AllowAlways",
- "ctrl-d": "agent::RejectOnce"
+ "ctrl-alt-z": "agent::RejectOnce"
}
},
{
@@ -369,7 +370,8 @@
"bindings": {
"new": "rules_library::NewRule",
"ctrl-n": "rules_library::NewRule",
- "ctrl-shift-s": "rules_library::ToggleDefaultRule"
+ "ctrl-shift-s": "rules_library::ToggleDefaultRule",
+ "ctrl-w": "workspace::CloseWindow"
}
},
{
@@ -462,8 +464,8 @@
"ctrl-k ctrl-w": "workspace::CloseAllItemsAndPanes",
"back": "pane::GoBack",
"ctrl-alt--": "pane::GoBack",
- "ctrl-alt-_": "pane::GoForward",
"forward": "pane::GoForward",
+ "ctrl-alt-_": "pane::GoForward",
"ctrl-alt-g": "search::SelectNextMatch",
"f3": "search::SelectNextMatch",
"ctrl-alt-shift-g": "search::SelectPreviousMatch",
@@ -525,15 +527,15 @@
"ctrl-k ctrl-l": "editor::ToggleFold",
"ctrl-k ctrl-[": "editor::FoldRecursive",
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
- "ctrl-k ctrl-1": ["editor::FoldAtLevel", 1],
- "ctrl-k ctrl-2": ["editor::FoldAtLevel", 2],
- "ctrl-k ctrl-3": ["editor::FoldAtLevel", 3],
- "ctrl-k ctrl-4": ["editor::FoldAtLevel", 4],
- "ctrl-k ctrl-5": ["editor::FoldAtLevel", 5],
- "ctrl-k ctrl-6": ["editor::FoldAtLevel", 6],
- "ctrl-k ctrl-7": ["editor::FoldAtLevel", 7],
- "ctrl-k ctrl-8": ["editor::FoldAtLevel", 8],
- "ctrl-k ctrl-9": ["editor::FoldAtLevel", 9],
+ "ctrl-k ctrl-1": "editor::FoldAtLevel_1",
+ "ctrl-k ctrl-2": "editor::FoldAtLevel_2",
+ "ctrl-k ctrl-3": "editor::FoldAtLevel_3",
+ "ctrl-k ctrl-4": "editor::FoldAtLevel_4",
+ "ctrl-k ctrl-5": "editor::FoldAtLevel_5",
+ "ctrl-k ctrl-6": "editor::FoldAtLevel_6",
+ "ctrl-k ctrl-7": "editor::FoldAtLevel_7",
+ "ctrl-k ctrl-8": "editor::FoldAtLevel_8",
+ "ctrl-k ctrl-9": "editor::FoldAtLevel_9",
"ctrl-k ctrl-0": "editor::FoldAll",
"ctrl-k ctrl-j": "editor::UnfoldAll",
"ctrl-space": "editor::ShowCompletions",
@@ -619,7 +621,7 @@
"ctrl-shift-f": "pane::DeploySearch",
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"ctrl-shift-t": "pane::ReopenClosedItem",
- "ctrl-k ctrl-s": "zed::OpenKeymapEditor",
+ "ctrl-k ctrl-s": "zed::OpenKeymap",
"ctrl-k ctrl-t": "theme_selector::Toggle",
"ctrl-alt-super-p": "settings_profile_selector::Toggle",
"ctrl-t": "project_symbols::Toggle",
@@ -1140,6 +1142,13 @@
"ctrl-enter": "menu::Confirm"
}
},
+ {
+ "context": "ContextServerToolsModal",
+ "use_key_equivalents": true,
+ "bindings": {
+ "escape": "menu::Cancel"
+ }
+ },
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1220,9 +1229,6 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
- "ctrl-1": "onboarding::ActivateBasicsPage",
- "ctrl-2": "onboarding::ActivateEditingPage",
- "ctrl-3": "onboarding::ActivateAISetupPage",
"ctrl-enter": "onboarding::Finish",
"alt-shift-l": "onboarding::SignIn",
"alt-shift-a": "onboarding::OpenAccount"
@@ -1234,5 +1240,41 @@
"bindings": {
"ctrl-shift-enter": "workspace::OpenWithSystem"
}
+ },
+ {
+ "context": "SettingsWindow",
+ "use_key_equivalents": true,
+ "bindings": {
+ "ctrl-w": "workspace::CloseWindow",
+ "escape": "workspace::CloseWindow",
+ "ctrl-m": "settings_editor::Minimize",
+ "ctrl-f": "search::FocusSearch",
+ "ctrl-shift-e": "settings_editor::ToggleFocusNav",
+ // todo(settings_ui): cut this down based on the max files and overflow UI
+ "ctrl-1": ["settings_editor::FocusFile", 0],
+ "ctrl-2": ["settings_editor::FocusFile", 1],
+ "ctrl-3": ["settings_editor::FocusFile", 2],
+ "ctrl-4": ["settings_editor::FocusFile", 3],
+ "ctrl-5": ["settings_editor::FocusFile", 4],
+ "ctrl-6": ["settings_editor::FocusFile", 5],
+ "ctrl-7": ["settings_editor::FocusFile", 6],
+ "ctrl-8": ["settings_editor::FocusFile", 7],
+ "ctrl-9": ["settings_editor::FocusFile", 8],
+ "ctrl-0": ["settings_editor::FocusFile", 9],
+ "ctrl-pageup": "settings_editor::FocusPreviousFile",
+ "ctrl-pagedown": "settings_editor::FocusNextFile"
+ }
+ },
+ {
+ "context": "SettingsWindow > NavigationMenu",
+ "use_key_equivalents": true,
+ "bindings": {
+ "right": "settings_editor::ExpandNavEntry",
+ "left": "settings_editor::CollapseNavEntry",
+ "pageup": "settings_editor::FocusPreviousRootNavEntry",
+ "pagedown": "settings_editor::FocusNextRootNavEntry",
+ "home": "settings_editor::FocusFirstNavEntry",
+ "end": "settings_editor::FocusLastNavEntry"
+ }
}
]
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index 0ef4757fc523c9ae145175da07a52ced322efa0c..50528dca6f97e8b287333d4011ebc97bb1ed27a2 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -40,6 +40,7 @@
"cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"cmd-0": ["zed::ResetBufferFontSize", { "persist": false }],
"cmd-,": "zed::OpenSettings",
+ "cmd-alt-,": "zed::OpenSettingsFile",
"cmd-q": "zed::Quit",
"cmd-h": "zed::Hide",
"alt-cmd-h": "zed::HideOthers",
@@ -289,7 +290,7 @@
"alt-enter": "agent::ContinueWithBurnMode",
"cmd-y": "agent::AllowOnce",
"cmd-alt-y": "agent::AllowAlways",
- "cmd-d": "agent::RejectOnce"
+ "cmd-alt-z": "agent::RejectOnce"
}
},
{
@@ -550,6 +551,8 @@
"cmd-ctrl-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"cmd-ctrl-right": "editor::SelectLargerSyntaxNode", // Expand selection
"cmd-ctrl-up": "editor::SelectPreviousSyntaxNode", // Move selection up
+ "ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand selection (VSCode version)
+ "ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink selection (VSCode version)
"cmd-ctrl-down": "editor::SelectNextSyntaxNode", // Move selection down
"cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
"cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
@@ -579,15 +582,15 @@
"cmd-k cmd-l": "editor::ToggleFold",
"cmd-k cmd-[": "editor::FoldRecursive",
"cmd-k cmd-]": "editor::UnfoldRecursive",
- "cmd-k cmd-1": ["editor::FoldAtLevel", 1],
- "cmd-k cmd-2": ["editor::FoldAtLevel", 2],
- "cmd-k cmd-3": ["editor::FoldAtLevel", 3],
- "cmd-k cmd-4": ["editor::FoldAtLevel", 4],
- "cmd-k cmd-5": ["editor::FoldAtLevel", 5],
- "cmd-k cmd-6": ["editor::FoldAtLevel", 6],
- "cmd-k cmd-7": ["editor::FoldAtLevel", 7],
- "cmd-k cmd-8": ["editor::FoldAtLevel", 8],
- "cmd-k cmd-9": ["editor::FoldAtLevel", 9],
+ "cmd-k cmd-1": "editor::FoldAtLevel_1",
+ "cmd-k cmd-2": "editor::FoldAtLevel_2",
+ "cmd-k cmd-3": "editor::FoldAtLevel_3",
+ "cmd-k cmd-4": "editor::FoldAtLevel_4",
+ "cmd-k cmd-5": "editor::FoldAtLevel_5",
+ "cmd-k cmd-6": "editor::FoldAtLevel_6",
+ "cmd-k cmd-7": "editor::FoldAtLevel_7",
+ "cmd-k cmd-8": "editor::FoldAtLevel_8",
+ "cmd-k cmd-9": "editor::FoldAtLevel_9",
"cmd-k cmd-0": "editor::FoldAll",
"cmd-k cmd-j": "editor::UnfoldAll",
// Using `ctrl-space` / `ctrl-shift-space` in Zed requires disabling the macOS global shortcut.
@@ -687,7 +690,7 @@
"cmd-shift-f": "pane::DeploySearch",
"cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"cmd-shift-t": "pane::ReopenClosedItem",
- "cmd-k cmd-s": "zed::OpenKeymapEditor",
+ "cmd-k cmd-s": "zed::OpenKeymap",
"cmd-k cmd-t": "theme_selector::Toggle",
"ctrl-alt-cmd-p": "settings_profile_selector::Toggle",
"cmd-t": "project_symbols::Toggle",
@@ -1244,6 +1247,13 @@
"cmd-enter": "menu::Confirm"
}
},
+ {
+ "context": "ContextServerToolsModal",
+ "use_key_equivalents": true,
+ "bindings": {
+ "escape": "menu::Cancel"
+ }
+ },
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1324,10 +1334,7 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
- "cmd-1": "onboarding::ActivateBasicsPage",
- "cmd-2": "onboarding::ActivateEditingPage",
- "cmd-3": "onboarding::ActivateAISetupPage",
- "cmd-escape": "onboarding::Finish",
+ "cmd-enter": "onboarding::Finish",
"alt-tab": "onboarding::SignIn",
"alt-shift-a": "onboarding::OpenAccount"
}
@@ -1338,5 +1345,41 @@
"bindings": {
"ctrl-shift-enter": "workspace::OpenWithSystem"
}
+ },
+ {
+ "context": "SettingsWindow",
+ "use_key_equivalents": true,
+ "bindings": {
+ "cmd-w": "workspace::CloseWindow",
+ "escape": "workspace::CloseWindow",
+ "cmd-m": "settings_editor::Minimize",
+ "cmd-f": "search::FocusSearch",
+ "cmd-shift-e": "settings_editor::ToggleFocusNav",
+ // todo(settings_ui): cut this down based on the max files and overflow UI
+ "ctrl-1": ["settings_editor::FocusFile", 0],
+ "ctrl-2": ["settings_editor::FocusFile", 1],
+ "ctrl-3": ["settings_editor::FocusFile", 2],
+ "ctrl-4": ["settings_editor::FocusFile", 3],
+ "ctrl-5": ["settings_editor::FocusFile", 4],
+ "ctrl-6": ["settings_editor::FocusFile", 5],
+ "ctrl-7": ["settings_editor::FocusFile", 6],
+ "ctrl-8": ["settings_editor::FocusFile", 7],
+ "ctrl-9": ["settings_editor::FocusFile", 8],
+ "ctrl-0": ["settings_editor::FocusFile", 9],
+ "cmd-{": "settings_editor::FocusPreviousFile",
+ "cmd-}": "settings_editor::FocusNextFile"
+ }
+ },
+ {
+ "context": "SettingsWindow > NavigationMenu",
+ "use_key_equivalents": true,
+ "bindings": {
+ "right": "settings_editor::ExpandNavEntry",
+ "left": "settings_editor::CollapseNavEntry",
+ "pageup": "settings_editor::FocusPreviousRootNavEntry",
+ "pagedown": "settings_editor::FocusNextRootNavEntry",
+ "home": "settings_editor::FocusFirstNavEntry",
+ "end": "settings_editor::FocusLastNavEntry"
+ }
}
]
diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.json
index e5839964ad545f3994d675da817a5f4571b88db4..570766e92ce8adddb6913fcc20acd71bf7ed240b 100644
--- a/assets/keymaps/default-windows.json
+++ b/assets/keymaps/default-windows.json
@@ -17,7 +17,6 @@
"up": "menu::SelectPrevious",
"enter": "menu::Confirm",
"ctrl-enter": "menu::SecondaryConfirm",
- "ctrl-escape": "menu::Cancel",
"ctrl-c": "menu::Cancel",
"escape": "menu::Cancel",
"shift-alt-enter": "menu::Restart",
@@ -31,6 +30,7 @@
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
"ctrl-,": "zed::OpenSettings",
+ "ctrl-alt-,": "zed::OpenSettingsFile",
"ctrl-q": "zed::Quit",
"f4": "debugger::Start",
"shift-f5": "debugger::Stop",
@@ -134,7 +134,7 @@
"ctrl-k z": "editor::ToggleSoftWrap",
"ctrl-f": "buffer_search::Deploy",
"ctrl-h": "buffer_search::DeployReplace",
- "ctrl-shift-.": "assistant::QuoteSelection",
+ "ctrl-shift-.": "agent::QuoteSelection",
"ctrl-shift-,": "assistant::InsertIntoEditor",
"shift-alt-e": "editor::SelectEnclosingSymbol",
"ctrl-shift-backspace": "editor::GoToPreviousChange",
@@ -244,7 +244,7 @@
"ctrl-shift-i": "agent::ToggleOptionsMenu",
// "ctrl-shift-alt-n": "agent::ToggleNewThreadMenu",
"shift-alt-escape": "agent::ExpandMessageEditor",
- "ctrl-shift-.": "assistant::QuoteSelection",
+ "ctrl-shift-.": "agent::QuoteSelection",
"shift-alt-e": "agent::RemoveAllContext",
"ctrl-shift-e": "project_panel::ToggleFocus",
"ctrl-shift-enter": "agent::ContinueThread",
@@ -252,7 +252,7 @@
"alt-enter": "agent::ContinueWithBurnMode",
"ctrl-y": "agent::AllowOnce",
"ctrl-alt-y": "agent::AllowAlways",
- "ctrl-d": "agent::RejectOnce"
+ "ctrl-alt-z": "agent::RejectOnce"
}
},
{
@@ -346,7 +346,7 @@
}
},
{
- "context": "AcpThread > Editor",
+ "context": "AcpThread > Editor && !use_modifier_to_send",
"use_key_equivalents": true,
"bindings": {
"enter": "agent::Chat",
@@ -356,6 +356,17 @@
"shift-tab": "agent::CycleModeSelector"
}
},
+ {
+ "context": "AcpThread > Editor && use_modifier_to_send",
+ "use_key_equivalents": true,
+ "bindings": {
+ "ctrl-enter": "agent::Chat",
+ "ctrl-shift-r": "agent::OpenAgentDiff",
+ "ctrl-shift-y": "agent::KeepAll",
+ "ctrl-shift-n": "agent::RejectAll",
+ "shift-tab": "agent::CycleModeSelector"
+ }
+ },
{
"context": "ThreadHistory",
"use_key_equivalents": true,
@@ -368,7 +379,8 @@
"use_key_equivalents": true,
"bindings": {
"ctrl-n": "rules_library::NewRule",
- "ctrl-shift-s": "rules_library::ToggleDefaultRule"
+ "ctrl-shift-s": "rules_library::ToggleDefaultRule",
+ "ctrl-w": "workspace::CloseWindow"
}
},
{
@@ -465,8 +477,8 @@
"ctrl-k ctrl-w": "workspace::CloseAllItemsAndPanes",
"back": "pane::GoBack",
"alt--": "pane::GoBack",
- "alt-=": "pane::GoForward",
"forward": "pane::GoForward",
+ "alt-=": "pane::GoForward",
"f3": "search::SelectNextMatch",
"shift-f3": "search::SelectPreviousMatch",
"ctrl-shift-f": "project_search::ToggleFocus",
@@ -524,15 +536,15 @@
"ctrl-k ctrl-l": "editor::ToggleFold",
"ctrl-k ctrl-[": "editor::FoldRecursive",
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
- "ctrl-k ctrl-1": ["editor::FoldAtLevel", 1],
- "ctrl-k ctrl-2": ["editor::FoldAtLevel", 2],
- "ctrl-k ctrl-3": ["editor::FoldAtLevel", 3],
- "ctrl-k ctrl-4": ["editor::FoldAtLevel", 4],
- "ctrl-k ctrl-5": ["editor::FoldAtLevel", 5],
- "ctrl-k ctrl-6": ["editor::FoldAtLevel", 6],
- "ctrl-k ctrl-7": ["editor::FoldAtLevel", 7],
- "ctrl-k ctrl-8": ["editor::FoldAtLevel", 8],
- "ctrl-k ctrl-9": ["editor::FoldAtLevel", 9],
+ "ctrl-k ctrl-1": "editor::FoldAtLevel_1",
+ "ctrl-k ctrl-2": "editor::FoldAtLevel_2",
+ "ctrl-k ctrl-3": "editor::FoldAtLevel_3",
+ "ctrl-k ctrl-4": "editor::FoldAtLevel_4",
+ "ctrl-k ctrl-5": "editor::FoldAtLevel_5",
+ "ctrl-k ctrl-6": "editor::FoldAtLevel_6",
+ "ctrl-k ctrl-7": "editor::FoldAtLevel_7",
+ "ctrl-k ctrl-8": "editor::FoldAtLevel_8",
+ "ctrl-k ctrl-9": "editor::FoldAtLevel_9",
"ctrl-k ctrl-0": "editor::FoldAll",
"ctrl-k ctrl-j": "editor::UnfoldAll",
"ctrl-space": "editor::ShowCompletions",
@@ -608,12 +620,10 @@
"shift-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
"shift-alt-=": ["workspace::IncreaseActiveDockSize", { "px": 0 }],
"shift-alt-0": "workspace::ResetOpenDocksSize",
- "ctrl-shift-alt--": ["workspace::DecreaseOpenDocksSize", { "px": 0 }],
- "ctrl-shift-alt-=": ["workspace::IncreaseOpenDocksSize", { "px": 0 }],
"ctrl-shift-f": "pane::DeploySearch",
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"ctrl-shift-t": "pane::ReopenClosedItem",
- "ctrl-k ctrl-s": "zed::OpenKeymapEditor",
+ "ctrl-k ctrl-s": "zed::OpenKeymap",
"ctrl-k ctrl-t": "theme_selector::Toggle",
"ctrl-alt-super-p": "settings_profile_selector::Toggle",
"ctrl-t": "project_symbols::Toggle",
@@ -1113,6 +1123,7 @@
"alt-f": ["terminal::SendText", "\u001bf"],
"alt-.": ["terminal::SendText", "\u001b."],
"ctrl-delete": ["terminal::SendText", "\u001bd"],
+ "ctrl-n": "workspace::NewTerminal",
// Overrides for conflicting keybindings
"ctrl-b": ["terminal::SendKeystroke", "ctrl-b"],
"ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
@@ -1158,6 +1169,13 @@
"ctrl-enter": "menu::Confirm"
}
},
+ {
+ "context": "ContextServerToolsModal",
+ "use_key_equivalents": true,
+ "bindings": {
+ "escape": "menu::Cancel"
+ }
+ },
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1239,12 +1257,45 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
- "ctrl-1": "onboarding::ActivateBasicsPage",
- "ctrl-2": "onboarding::ActivateEditingPage",
- "ctrl-3": "onboarding::ActivateAISetupPage",
- "ctrl-escape": "onboarding::Finish",
- "alt-tab": "onboarding::SignIn",
+ "ctrl-enter": "onboarding::Finish",
+ "alt-shift-l": "onboarding::SignIn",
"shift-alt-a": "onboarding::OpenAccount"
}
+ },
+ {
+ "context": "SettingsWindow",
+ "use_key_equivalents": true,
+ "bindings": {
+ "ctrl-w": "workspace::CloseWindow",
+ "escape": "workspace::CloseWindow",
+ "ctrl-m": "settings_editor::Minimize",
+ "ctrl-f": "search::FocusSearch",
+ "ctrl-shift-e": "settings_editor::ToggleFocusNav",
+ // todo(settings_ui): cut this down based on the max files and overflow UI
+ "ctrl-1": ["settings_editor::FocusFile", 0],
+ "ctrl-2": ["settings_editor::FocusFile", 1],
+ "ctrl-3": ["settings_editor::FocusFile", 2],
+ "ctrl-4": ["settings_editor::FocusFile", 3],
+ "ctrl-5": ["settings_editor::FocusFile", 4],
+ "ctrl-6": ["settings_editor::FocusFile", 5],
+ "ctrl-7": ["settings_editor::FocusFile", 6],
+ "ctrl-8": ["settings_editor::FocusFile", 7],
+ "ctrl-9": ["settings_editor::FocusFile", 8],
+ "ctrl-0": ["settings_editor::FocusFile", 9],
+ "ctrl-pageup": "settings_editor::FocusPreviousFile",
+ "ctrl-pagedown": "settings_editor::FocusNextFile"
+ }
+ },
+ {
+ "context": "SettingsWindow > NavigationMenu",
+ "use_key_equivalents": true,
+ "bindings": {
+ "right": "settings_editor::ExpandNavEntry",
+ "left": "settings_editor::CollapseNavEntry",
+ "pageup": "settings_editor::FocusPreviousRootNavEntry",
+ "pagedown": "settings_editor::FocusNextRootNavEntry",
+ "home": "settings_editor::FocusFirstNavEntry",
+ "end": "settings_editor::FocusLastNavEntry"
+ }
}
]
diff --git a/assets/keymaps/linux/jetbrains.json b/assets/keymaps/linux/jetbrains.json
index 59a182a968a849edb3359927e7647f611bcd44da..a5e387c014e1315bf51cfdf7c5226adaa8a20b27 100644
--- a/assets/keymaps/linux/jetbrains.json
+++ b/assets/keymaps/linux/jetbrains.json
@@ -1,7 +1,7 @@
[
{
"bindings": {
- "ctrl-alt-s": "zed::OpenSettings",
+ "ctrl-alt-s": "zed::OpenSettingsFile",
"ctrl-{": "pane::ActivatePreviousItem",
"ctrl-}": "pane::ActivateNextItem",
"shift-escape": null, // Unmap workspace::zoom
diff --git a/assets/keymaps/macos/emacs.json b/assets/keymaps/macos/emacs.json
index 0f936ba2f968abe0759e4bb294271a5e5f501848..78e2235965335ac2914355fc0c51abe38d390897 100755
--- a/assets/keymaps/macos/emacs.json
+++ b/assets/keymaps/macos/emacs.json
@@ -4,6 +4,7 @@
// from the command palette.
[
{
+ "context": "!GitPanel",
"bindings": {
"ctrl-g": "menu::Cancel"
}
diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json
index ed79b00c16a7586f4a121c3fbd6e71f883dbb2d4..c90b439c6abb60f4e3d826c171d7e2491fce1d90 100644
--- a/assets/keymaps/vim.json
+++ b/assets/keymaps/vim.json
@@ -95,8 +95,8 @@
"g g": "vim::StartOfDocument",
"g h": "editor::Hover",
"g B": "editor::BlameHover",
- "g t": "pane::ActivateNextItem",
- "g shift-t": "pane::ActivatePreviousItem",
+ "g t": "vim::GoToTab",
+ "g shift-t": "vim::GoToPreviousTab",
"g d": "editor::GoToDefinition",
"g shift-d": "editor::GoToDeclaration",
"g y": "editor::GoToTypeDefinition",
@@ -240,6 +240,7 @@
"delete": "vim::DeleteRight",
"g shift-j": "vim::JoinLinesNoWhitespace",
"y": "vim::PushYank",
+ "shift-y": "vim::YankLine",
"x": "vim::DeleteRight",
"shift-x": "vim::DeleteLeft",
"ctrl-a": "vim::Increment",
@@ -328,7 +329,7 @@
{
"context": "vim_mode == helix_select",
"bindings": {
- "escape": "vim::NormalBefore",
+ "v": "vim::NormalBefore",
";": "vim::HelixCollapseSelection",
"~": "vim::ChangeCase",
"ctrl-a": "vim::Increment",
@@ -426,6 +427,7 @@
";": "vim::HelixCollapseSelection",
":": "command_palette::Toggle",
"m": "vim::PushHelixMatch",
+ "s": "vim::HelixSelectRegex",
"]": ["vim::PushHelixNext", { "around": true }],
"[": ["vim::PushHelixPrevious", { "around": true }],
"left": "vim::WrappingLeft",
@@ -433,6 +435,8 @@
"h": "vim::WrappingLeft",
"l": "vim::WrappingRight",
"y": "vim::HelixYank",
+ "p": "vim::HelixPaste",
+ "shift-p": ["vim::HelixPaste", { "before": true }],
"alt-;": "vim::OtherEnd",
"ctrl-r": "vim::Redo",
"f": ["vim::PushFindForward", { "before": false, "multiline": true }],
@@ -442,9 +446,8 @@
">": "vim::Indent",
"<": "vim::Outdent",
"=": "vim::AutoIndent",
- "g u": "vim::PushLowercase",
- "g shift-u": "vim::PushUppercase",
- "g ~": "vim::PushOppositeCase",
+ "`": "vim::ConvertToLowerCase",
+ "alt-`": "vim::ConvertToUpperCase",
"g q": "vim::PushRewrap",
"g w": "vim::PushRewrap",
"insert": "vim::InsertBefore",
@@ -577,18 +580,18 @@
// "q": "vim::AnyQuotes",
"q": "vim::MiniQuotes",
"|": "vim::VerticalBars",
- "(": "vim::Parentheses",
+ "(": ["vim::Parentheses", { "opening": true }],
")": "vim::Parentheses",
"b": "vim::Parentheses",
// "b": "vim::AnyBrackets",
// "b": "vim::MiniBrackets",
- "[": "vim::SquareBrackets",
+ "[": ["vim::SquareBrackets", { "opening": true }],
"]": "vim::SquareBrackets",
"r": "vim::SquareBrackets",
- "{": "vim::CurlyBrackets",
+ "{": ["vim::CurlyBrackets", { "opening": true }],
"}": "vim::CurlyBrackets",
"shift-b": "vim::CurlyBrackets",
- "<": "vim::AngleBrackets",
+ "<": ["vim::AngleBrackets", { "opening": true }],
">": "vim::AngleBrackets",
"a": "vim::Argument",
"i": "vim::IndentObj",
@@ -881,10 +884,12 @@
"/": "project_panel::NewSearchInDirectory",
"d": "project_panel::NewDirectory",
"enter": "project_panel::OpenPermanent",
- "escape": "project_panel::ToggleFocus",
+ "escape": "vim::ToggleProjectPanelFocus",
"h": "project_panel::CollapseSelectedEntry",
- "j": "menu::SelectNext",
- "k": "menu::SelectPrevious",
+ "j": "vim::MenuSelectNext",
+ "k": "vim::MenuSelectPrevious",
+ "down": "vim::MenuSelectNext",
+ "up": "vim::MenuSelectPrevious",
"l": "project_panel::ExpandSelectedEntry",
"shift-d": "project_panel::Delete",
"shift-r": "project_panel::Rename",
@@ -903,7 +908,22 @@
"{": "project_panel::SelectPrevDirectory",
"shift-g": "menu::SelectLast",
"g g": "menu::SelectFirst",
- "-": "project_panel::SelectParent"
+ "-": "project_panel::SelectParent",
+ "ctrl-u": "project_panel::ScrollUp",
+ "ctrl-d": "project_panel::ScrollDown",
+ "z t": "project_panel::ScrollCursorTop",
+ "z z": "project_panel::ScrollCursorCenter",
+ "z b": "project_panel::ScrollCursorBottom",
+ "0": ["vim::Number", 0],
+ "1": ["vim::Number", 1],
+ "2": ["vim::Number", 2],
+ "3": ["vim::Number", 3],
+ "4": ["vim::Number", 4],
+ "5": ["vim::Number", 5],
+ "6": ["vim::Number", 6],
+ "7": ["vim::Number", 7],
+ "8": ["vim::Number", 8],
+ "9": ["vim::Number", 9]
}
},
{
diff --git a/assets/prompts/content_prompt.hbs b/assets/prompts/content_prompt.hbs
index e601e6dc63376af54e6e1a9bfa53cdbd57190e22..6db53ff48ff251b90f9120398852a9160ca41755 100644
--- a/assets/prompts/content_prompt.hbs
+++ b/assets/prompts/content_prompt.hbs
@@ -29,7 +29,9 @@ Generate {{content_type}} based on the following prompt:
Match the indentation in the original file in the inserted {{content_type}}, don't include any indentation on blank lines.
-Immediately start with the following format with no remarks:
+Return ONLY the {{content_type}} to insert. Do NOT include any XML tags like , , or any surrounding markup from the input.
+
+Respond with a code block containing the {{content_type}} to insert. Replace \{{INSERTED_CODE}} with your actual {{content_type}}:
```
\{{INSERTED_CODE}}
@@ -66,7 +68,9 @@ Only make changes that are necessary to fulfill the prompt, leave everything els
Start at the indentation level in the original file in the rewritten {{content_type}}. Don't stop until you've rewritten the entire section, even if you have no more changes to make, always write out the whole section with no unnecessary elisions.
-Immediately start with the following format with no remarks:
+Return ONLY the rewritten {{content_type}}. Do NOT include any XML tags like , , or any surrounding markup from the input.
+
+Respond with a code block containing the rewritten {{content_type}}. Replace \{{REWRITTEN_CODE}} with your actual rewritten {{content_type}}:
```
\{{REWRITTEN_CODE}}
diff --git a/assets/settings/default.json b/assets/settings/default.json
index b83025116cc4e2d9358b4274e33f598ebe198b7c..0526f178837b515f6a3f6421525380edf1b3417a 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -1,5 +1,8 @@
{
- "project_name": null,
+ "$schema": "zed://schemas/settings",
+ /// The displayed name of this project. If not set or empty, the root directory name
+ /// will be displayed.
+ "project_name": "",
// The name of the Zed theme to use for the UI.
//
// `mode` is one of:
@@ -72,8 +75,10 @@
"ui_font_weight": 400,
// The default font size for text in the UI
"ui_font_size": 16,
- // The default font size for text in the agent panel. Falls back to the UI font size if unset.
- "agent_font_size": null,
+ // The default font size for agent responses in the agent panel. Falls back to the UI font size if unset.
+ "agent_ui_font_size": null,
+ // The default font size for user messages in the agent panel.
+ "agent_buffer_font_size": 12,
// How much to fade out unused code.
"unnecessary_code_fade": 0.3,
// Active pane styling settings.
@@ -115,6 +120,7 @@
// Whether to enable vim modes and key bindings.
"vim_mode": false,
// Whether to enable helix mode and key bindings.
+ // Enabling this mode will automatically enable vim mode.
"helix_mode": false,
// Whether to show the informational hover box when moving the mouse
// over symbols in the editor.
@@ -311,7 +317,7 @@
// bracket, brace, single or double quote characters.
// For example, when you select text and type (, Zed will surround the text with ().
"use_auto_surround": true,
- /// Whether indentation should be adjusted based on the context whilst typing.
+ // Whether indentation should be adjusted based on the context whilst typing.
"auto_indent": true,
// Whether indentation of pasted content should be adjusted based on the context.
"auto_indent_on_paste": true,
@@ -406,6 +412,39 @@
// Whether to show the menus in the titlebar.
"show_menus": false
},
+ "audio": {
+ // Opt into the new audio system.
+ "experimental.rodio_audio": false,
+ // Requires 'rodio_audio: true'
+ //
+ // Automatically increase or decrease you microphone's volume. This affects how
+ // loud you sound to others.
+ //
+ // Recommended: off (default)
+ // Microphones are too quite in zed, until everyone is on experimental
+ // audio and has auto speaker volume on this will make you very loud
+ // compared to other speakers.
+ "experimental.auto_microphone_volume": false,
+ // Requires 'rodio_audio: true'
+ //
+ // Automatically increate or decrease the volume of other call members.
+ // This only affects how things sound for you.
+ "experimental.auto_speaker_volume": true,
+ // Requires 'rodio_audio: true'
+ //
+ // Remove background noises. Works great for typing, cars, dogs, AC. Does
+ // not work well on music.
+ "experimental.denoise": true,
+ // Requires 'rodio_audio: true'
+ //
+ // Use audio parameters compatible with the previous versions of
+ // experimental audio and non-experimental audio. When this is false you
+ // will sound strange to anyone not on the latest experimental audio. In
+ // the future we will migrate by setting this to false
+ //
+ // You need to rejoin a call for this setting to apply
+ "experimental.legacy_audio_compatible": true
+ },
// Scrollbar related settings
"scrollbar": {
// When to show the scrollbar in the editor.
@@ -586,6 +625,7 @@
// Toggle certain types of hints on and off, all switched on by default.
"show_type_hints": true,
"show_parameter_hints": true,
+ "show_value_hints": true,
// Corresponds to null/None LSP hint type value.
"show_other_hints": true,
// Whether to show a background for inlay hints.
@@ -682,7 +722,9 @@
// Whether to enable drag-and-drop operations in the project panel.
"drag_and_drop": true,
// Whether to hide the root entry when only one folder is open in the window.
- "hide_root": false
+ "hide_root": false,
+ // Whether to hide the hidden entries in the project panel.
+ "hide_hidden": false
},
"outline_panel": {
// Whether to show the outline panel button in the status bar
@@ -794,7 +836,7 @@
"agent": {
// Whether the agent is enabled.
"enabled": true,
- /// What completion mode to start new threads in, if available. Can be 'normal' or 'burn'.
+ // What completion mode to start new threads in, if available. Can be 'normal' or 'burn'.
"preferred_completion_mode": "normal",
// Whether to show the agent panel button in the status bar.
"button": true,
@@ -804,6 +846,8 @@
"default_width": 640,
// Default height when the agent panel is docked to the bottom.
"default_height": 320,
+ // The view to use by default (thread, or text_thread)
+ "default_view": "thread",
// The default model to use when creating new threads.
"default_model": {
// The provider to use.
@@ -905,22 +949,22 @@
// Default: false
"play_sound_when_agent_done": false,
- /// Whether to have edit cards in the agent panel expanded, showing a preview of the full diff.
- ///
- /// Default: true
+ // Whether to have edit cards in the agent panel expanded, showing a preview of the full diff.
+ //
+ // Default: true
"expand_edit_card": true,
- /// Whether to have terminal cards in the agent panel expanded, showing the whole command output.
- ///
- /// Default: true
- "expand_terminal_card": true
- },
- // The settings for slash commands.
- "slash_commands": {
- // Settings for the `/project` slash command.
- "project": {
- // Whether `/project` is enabled.
- "enabled": false
- }
+ // Whether to have terminal cards in the agent panel expanded, showing the whole command output.
+ //
+ // Default: true
+ "expand_terminal_card": true,
+ // Whether to always use cmd-enter (or ctrl-enter on Linux or Windows) to send messages in the agent panel.
+ //
+ // Default: false
+ "use_modifier_to_send": false,
+ // Minimum number of lines to display in the agent message editor.
+ //
+ // Default: 4
+ "message_editor_min_lines": 4
},
// Whether the screen sharing icon is shown in the os status bar.
"show_call_status_icon": true,
@@ -933,6 +977,7 @@
//
// This is typically customized on a per-language basis.
"language_servers": ["..."],
+
// When to automatically save edited buffers. This setting can
// take four values.
//
@@ -1059,7 +1104,7 @@
// Removes any lines containing only whitespace at the end of the file and
// ensures just one newline at the end.
"ensure_final_newline_on_save": true,
- // Whether or not to perform a buffer format before saving: [on, off, prettier, language_server]
+ // Whether or not to perform a buffer format before saving: [on, off]
// Keep in mind, if the autosave with delay is enabled, format_on_save will be ignored
"format_on_save": "on",
// How to perform a buffer format. This setting can take 4 values:
@@ -1189,6 +1234,10 @@
// 2. Hide the gutter
// "git_gutter": "hide"
"git_gutter": "tracked_files",
+ /// Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
+ ///
+ /// Default: 0
+ "gutter_debounce": 0,
// Control whether the git blame information is shown inline,
// in the currently focused line.
"inline_blame": {
@@ -1204,6 +1253,9 @@
// The minimum column number to show the inline blame information at
"min_column": 0
},
+ "blame": {
+ "show_avatar": true
+ },
// Control which information is shown in the branch picker.
"branch_picker": {
"show_author_name": true
@@ -1262,6 +1314,15 @@
// "proxy": "",
// "proxy_no_verify": false
// },
+ "copilot": {
+ "enterprise_uri": null,
+ "proxy": null,
+ "proxy_no_verify": null
+ },
+ "codestral": {
+ "model": null,
+ "max_tokens": null
+ },
// Whether edit predictions are enabled when editing text threads.
// This setting has no effect if globally disabled.
"enabled_in_text_threads": true
@@ -1278,6 +1339,8 @@
},
// Status bar-related settings.
"status_bar": {
+ // Whether to show the status bar.
+ "experimental.show": true,
// Whether to show the active language button in the status bar.
"active_language_button": true,
// Whether to show the cursor position button in the status bar.
@@ -1344,8 +1407,8 @@
// 4. A box drawn around the following character
// "hollow"
//
- // Default: not set, defaults to "block"
- "cursor_shape": null,
+ // Default: "block"
+ "cursor_shape": "block",
// Set whether Alternate Scroll mode (code: ?1007) is active by default.
// Alternate Scroll mode converts mouse scroll events into up / down key
// presses when in the alternate screen (e.g. when running applications
@@ -1367,8 +1430,8 @@
// Whether or not selecting text in the terminal will automatically
// copy to the system clipboard.
"copy_on_select": false,
- // Whether to keep the text selection after copying it to the clipboard
- "keep_selection_on_copy": false,
+ // Whether to keep the text selection after copying it to the clipboard.
+ "keep_selection_on_copy": true,
// Whether to show the terminal button in the status bar
"button": true,
// Any key-value pairs added to this list will be added to the terminal's
@@ -1387,7 +1450,7 @@
// "line_height": {
// "custom": 2
// },
- "line_height": "comfortable",
+ "line_height": "standard",
// Activate the python virtual environment, if one is found, in the
// terminal's working directory (as resolved by the working_directory
// setting). Set this to "off" to disable this behavior.
@@ -1407,7 +1470,7 @@
//
// The shell running in the terminal needs to be configured to emit the title.
// Example: `echo -e "\e]2;New Title\007";`
- "breadcrumbs": true
+ "breadcrumbs": false
},
// Scrollbar-related settings
"scrollbar": {
@@ -1458,7 +1521,6 @@
// A value of 45 preserves colorful themes while ensuring legibility.
"minimum_contrast": 45
},
- "code_actions_on_format": {},
// Settings related to running tasks.
"tasks": {
"variables": {},
@@ -1487,7 +1549,7 @@
// }
//
"file_types": {
- "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
+ "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json", "tsconfig*.json"],
"Shell Script": [".env.*"]
},
// Settings for which version of Node.js and NPM to use when installing
@@ -1513,6 +1575,14 @@
"auto_install_extensions": {
"html": true
},
+ // The capabilities granted to extensions.
+ //
+ // This list can be customized to restrict what extensions are able to do.
+ "granted_extension_capabilities": [
+ { "kind": "process:exec", "command": "*", "args": ["**"] },
+ { "kind": "download_file", "host": "*", "path": ["**"] },
+ { "kind": "npm:install", "package": "*" }
+ ],
// Controls how completions are processed for this language.
"completions": {
// Controls how words are completed.
@@ -1620,9 +1690,7 @@
"preferred_line_length": 72
},
"Go": {
- "code_actions_on_format": {
- "source.organizeImports": true
- },
+ "formatter": [{ "code_action": "source.organizeImports" }, { "language_server": {} }],
"debuggers": ["Delve"]
},
"GraphQL": {
@@ -1767,6 +1835,7 @@
"anthropic": {
"api_url": "https://api.anthropic.com"
},
+ "bedrock": {},
"google": {
"api_url": "https://generativelanguage.googleapis.com"
},
@@ -1788,27 +1857,41 @@
},
"mistral": {
"api_url": "https://api.mistral.ai/v1"
- }
+ },
+ "vercel": {
+ "api_url": "https://api.v0.dev/v1"
+ },
+ "x_ai": {
+ "api_url": "https://api.x.ai/v1"
+ },
+ "zed.dev": {}
+ },
+ "session": {
+ // Whether or not to restore unsaved buffers on restart.
+ //
+ // If this is true, user won't be prompted whether to save/discard
+ // dirty files when closing the application.
+ //
+ // Default: true
+ "restore_unsaved_buffers": true
},
// Zed's Prettier integration settings.
// Allows to enable/disable formatting with Prettier
// and configure default Prettier, used when no project-level Prettier installation is found.
"prettier": {
- // // Whether to consider prettier formatter or not when attempting to format a file.
- // "allowed": false,
- //
- // // Use regular Prettier json configuration.
- // // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
- // // the project has no other Prettier installed.
- // "plugins": [],
- //
- // // Use regular Prettier json configuration.
- // // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
- // // the project has no other Prettier installed.
+ // Enables or disables formatting with Prettier for any given language.
+ "allowed": false,
+ // Forces Prettier integration to use a specific parser name when formatting files with the language.
+ "plugins": [],
+ // Default Prettier options, in the format as in package.json section for Prettier.
+ // If project installs Prettier via its package.json, these options will be ignored.
// "trailingComma": "es5",
// "tabWidth": 4,
// "semi": false,
// "singleQuote": true
+ // Forces Prettier integration to use a specific parser name when formatting files with the language
+ // when set to a non-empty string.
+ "parser": ""
},
// Settings for auto-closing of JSX tags.
"jsx_tag_auto_close": {
@@ -1828,6 +1911,10 @@
// }
// }
},
+ // DAP Specific settings.
+ "dap": {
+ // Specify the DAP name as a key here.
+ },
// Common language server settings.
"global_lsp_settings": {
// Whether to show the LSP servers button in the status bar.
@@ -1835,13 +1922,23 @@
},
// Jupyter settings
"jupyter": {
- "enabled": true
+ "enabled": true,
+ "kernel_selections": {}
// Specify the language name as the key and the kernel name as the value.
// "kernel_selections": {
// "python": "conda-base"
// "typescript": "deno"
// }
},
+ // REPL settings.
+ "repl": {
+ // Maximum number of columns to keep in REPL's scrollback buffer.
+ // Clamped with [20, 512] range.
+ "max_columns": 128,
+ // Maximum number of lines to keep in REPL's scrollback buffer.
+ // Clamped with [4, 256] range.
+ "max_lines": 32
+ },
// Vim settings
"vim": {
"default_mode": "normal",
@@ -1944,7 +2041,7 @@
// Examples:
// "profiles": {
// "Presenting": {
- // "agent_font_size": 20.0,
+ // "agent_ui_font_size": 20.0,
// "buffer_font_size": 20.0,
// "theme": "One Light",
// "ui_font_size": 20.0
@@ -1957,5 +2054,11 @@
// }
// }
// }
- "profiles": []
+ "profiles": {},
+
+ // A map of log scopes to the desired log level.
+ // Useful for filtering out noisy logs or enabling more verbose logging.
+ //
+ // Example: {"log": {"client": "warn"}}
+ "log": {}
}
diff --git a/assets/settings/initial_tasks.json b/assets/settings/initial_tasks.json
index 5cead67b6d5bb89e878e3bfb8d250dcbbd2ce447..a79e98063237ca297a89b0d151bd48149061b7bb 100644
--- a/assets/settings/initial_tasks.json
+++ b/assets/settings/initial_tasks.json
@@ -43,7 +43,11 @@
// "args": ["--login"]
// }
// }
- "shell": "system"
+ "shell": "system",
+ // Whether to show the task line in the output of the spawned task, defaults to `true`.
+ "show_summary": true,
+ // Whether to show the command line in the output of the spawned task, defaults to `true`.
+ "show_command": true
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
}
diff --git a/assets/sounds/guest_joined_call.wav b/assets/sounds/guest_joined_call.wav
new file mode 100644
index 0000000000000000000000000000000000000000..336a6ca754b09c408f63c411193157a20c14bb78
Binary files /dev/null and b/assets/sounds/guest_joined_call.wav differ
diff --git a/assets/themes/ayu/ayu.json b/assets/themes/ayu/ayu.json
index f71048caafba7156b53fd8637ca35c715ad300f2..7c84c603bda7fd7590067ec9f566f3582ba6aefd 100644
--- a/assets/themes/ayu/ayu.json
+++ b/assets/themes/ayu/ayu.json
@@ -192,7 +192,7 @@
"font_weight": null
},
"comment": {
- "color": "#abb5be8c",
+ "color": "#5c6773ff",
"font_style": null,
"font_weight": null
},
@@ -239,7 +239,7 @@
"hint": {
"color": "#628b80ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#ff8f3fff",
@@ -583,7 +583,7 @@
"font_weight": null
},
"comment": {
- "color": "#787b8099",
+ "color": "#abb0b6ff",
"font_style": null,
"font_weight": null
},
@@ -630,7 +630,7 @@
"hint": {
"color": "#8ca7c2ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#fa8d3eff",
@@ -974,7 +974,7 @@
"font_weight": null
},
"comment": {
- "color": "#b8cfe680",
+ "color": "#5c6773ff",
"font_style": null,
"font_weight": null
},
@@ -1021,7 +1021,7 @@
"hint": {
"color": "#7399a3ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#ffad65ff",
diff --git a/assets/themes/gruvbox/gruvbox.json b/assets/themes/gruvbox/gruvbox.json
index fc11cac55f638349778c88869dcb217c89111022..4e6f8334b269e3e5090b0f91d995834906c09083 100644
--- a/assets/themes/gruvbox/gruvbox.json
+++ b/assets/themes/gruvbox/gruvbox.json
@@ -248,7 +248,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -653,7 +653,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -1058,7 +1058,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -1463,7 +1463,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#9d0006ff",
@@ -1868,7 +1868,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#9d0006ff",
@@ -2273,7 +2273,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#9d0006ff",
diff --git a/assets/themes/one/one.json b/assets/themes/one/one.json
index 7cc8c96a23f32aab69596722188e3c5ec87aba08..6849cd05dc70752216789ae04e81fad232f7b14b 100644
--- a/assets/themes/one/one.json
+++ b/assets/themes/one/one.json
@@ -244,7 +244,7 @@
"hint": {
"color": "#788ca6ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#b477cfff",
@@ -643,7 +643,7 @@
"hint": {
"color": "#7274a7ff",
"font_style": null,
- "font_weight": 700
+ "font_weight": null
},
"keyword": {
"color": "#a449abff",
diff --git a/clippy.toml b/clippy.toml
index e606ad4c79b5cfe289b1f8460b1f46715103fe1b..57f6f59385a4885730015c3d09f040a5f340d379 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -5,3 +5,14 @@ ignore-interior-mutability = [
# and Hash impls do not use fields with interior mutability.
"agent::context::AgentContextKey"
]
+disallowed-methods = [
+ { path = "std::process::Command::spawn", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::spawn" },
+ { path = "std::process::Command::output", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::output" },
+ { path = "std::process::Command::status", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::status" },
+]
+disallowed-types = [
+ # { path = "std::collections::HashMap", replacement = "collections::HashMap" },
+ # { path = "std::collections::HashSet", replacement = "collections::HashSet" },
+ # { path = "indexmap::IndexSet", replacement = "collections::IndexSet" },
+ # { path = "indexmap::IndexMap", replacement = "collections::IndexMap" },
+]
diff --git a/compose.yml b/compose.yml
index d0d9bac425356687bfb33efab9ee24e76d1b30a0..00a5780b597738260f90020f139627e7d0b0107c 100644
--- a/compose.yml
+++ b/compose.yml
@@ -1,6 +1,6 @@
services:
postgres:
- image: postgres:15
+ image: docker.io/library/postgres:15
container_name: zed_postgres
ports:
- 5432:5432
@@ -23,7 +23,7 @@ services:
- ./.blob_store:/data
livekit_server:
- image: livekit/livekit-server
+ image: docker.io/livekit/livekit-server
container_name: livekit_server
entrypoint: /livekit-server --config /livekit.yaml
ports:
@@ -34,7 +34,7 @@ services:
- ./livekit.yaml:/livekit.yaml
postgrest_app:
- image: postgrest/postgrest
+ image: docker.io/postgrest/postgrest
container_name: postgrest_app
ports:
- 8081:8081
@@ -47,7 +47,7 @@ services:
- postgres
postgrest_llm:
- image: postgrest/postgrest
+ image: docker.io/postgrest/postgrest
container_name: postgrest_llm
ports:
- 8082:8082
@@ -60,7 +60,7 @@ services:
- postgres
stripe-mock:
- image: stripe/stripe-mock:v0.178.0
+ image: docker.io/stripe/stripe-mock:v0.178.0
ports:
- 12111:12111
- 12112:12112
diff --git a/crates/acp_thread/Cargo.toml b/crates/acp_thread/Cargo.toml
index a0bbda848f9ec761aebdf66b644a8b2926685122..ac24a6ed0f41c75d5c4dcd9b9b4122336022ddf3 100644
--- a/crates/acp_thread/Cargo.toml
+++ b/crates/acp_thread/Cargo.toml
@@ -45,7 +45,6 @@ url.workspace = true
util.workspace = true
uuid.workspace = true
watch.workspace = true
-which.workspace = true
workspace-hack.workspace = true
[dev-dependencies]
diff --git a/crates/acp_thread/src/acp_thread.rs b/crates/acp_thread/src/acp_thread.rs
index afbb4781f61d5ccf1ea753df1fd0379e533e8e46..61486a475c4601a9d9201d3a6920c63566a1ba36 100644
--- a/crates/acp_thread/src/acp_thread.rs
+++ b/crates/acp_thread/src/acp_thread.rs
@@ -3,16 +3,17 @@ mod diff;
mod mention;
mod terminal;
+use ::terminal::terminal_settings::TerminalSettings;
use agent_settings::AgentSettings;
use collections::HashSet;
pub use connection::*;
pub use diff::*;
-use futures::future::Shared;
use language::language_settings::FormatOnSave;
pub use mention::*;
use project::lsp_store::{FormatTrigger, LspFormatTarget};
use serde::{Deserialize, Serialize};
-use settings::Settings as _;
+use settings::{Settings as _, SettingsLocation};
+use task::{Shell, ShellBuilder};
pub use terminal::*;
use action_log::ActionLog;
@@ -34,7 +35,7 @@ use std::rc::Rc;
use std::time::{Duration, Instant};
use std::{fmt::Display, mem, path::PathBuf, sync::Arc};
use ui::App;
-use util::{ResultExt, get_system_shell};
+use util::{ResultExt, get_default_system_shell_preferring_bash};
use uuid::Uuid;
#[derive(Debug)]
@@ -573,7 +574,7 @@ impl ToolCallContent {
))),
acp::ToolCallContent::Diff { diff } => Ok(Self::Diff(cx.new(|cx| {
Diff::finalized(
- diff.path,
+ diff.path.to_string_lossy().into_owned(),
diff.old_text,
diff.new_text,
language_registry,
@@ -786,8 +787,9 @@ pub struct AcpThread {
token_usage: Option,
prompt_capabilities: acp::PromptCapabilities,
_observe_prompt_capabilities: Task>,
- determine_shell: Shared>,
terminals: HashMap>,
+ pending_terminal_output: HashMap>>,
+ pending_terminal_exit: HashMap,
}
#[derive(Debug)]
@@ -810,6 +812,126 @@ pub enum AcpThreadEvent {
impl EventEmitter for AcpThread {}
+#[derive(Debug, Clone)]
+pub enum TerminalProviderEvent {
+ Created {
+ terminal_id: acp::TerminalId,
+ label: String,
+ cwd: Option,
+ output_byte_limit: Option,
+ terminal: Entity<::terminal::Terminal>,
+ },
+ Output {
+ terminal_id: acp::TerminalId,
+ data: Vec,
+ },
+ TitleChanged {
+ terminal_id: acp::TerminalId,
+ title: String,
+ },
+ Exit {
+ terminal_id: acp::TerminalId,
+ status: acp::TerminalExitStatus,
+ },
+}
+
+#[derive(Debug, Clone)]
+pub enum TerminalProviderCommand {
+ WriteInput {
+ terminal_id: acp::TerminalId,
+ bytes: Vec,
+ },
+ Resize {
+ terminal_id: acp::TerminalId,
+ cols: u16,
+ rows: u16,
+ },
+ Close {
+ terminal_id: acp::TerminalId,
+ },
+}
+
+impl AcpThread {
+ pub fn on_terminal_provider_event(
+ &mut self,
+ event: TerminalProviderEvent,
+ cx: &mut Context,
+ ) {
+ match event {
+ TerminalProviderEvent::Created {
+ terminal_id,
+ label,
+ cwd,
+ output_byte_limit,
+ terminal,
+ } => {
+ let entity = self.register_terminal_created(
+ terminal_id.clone(),
+ label,
+ cwd,
+ output_byte_limit,
+ terminal,
+ cx,
+ );
+
+ if let Some(mut chunks) = self.pending_terminal_output.remove(&terminal_id) {
+ for data in chunks.drain(..) {
+ entity.update(cx, |term, cx| {
+ term.inner().update(cx, |inner, cx| {
+ inner.write_output(&data, cx);
+ })
+ });
+ }
+ }
+
+ if let Some(_status) = self.pending_terminal_exit.remove(&terminal_id) {
+ entity.update(cx, |_term, cx| {
+ cx.notify();
+ });
+ }
+
+ cx.notify();
+ }
+ TerminalProviderEvent::Output { terminal_id, data } => {
+ if let Some(entity) = self.terminals.get(&terminal_id) {
+ entity.update(cx, |term, cx| {
+ term.inner().update(cx, |inner, cx| {
+ inner.write_output(&data, cx);
+ })
+ });
+ } else {
+ self.pending_terminal_output
+ .entry(terminal_id)
+ .or_default()
+ .push(data);
+ }
+ }
+ TerminalProviderEvent::TitleChanged { terminal_id, title } => {
+ if let Some(entity) = self.terminals.get(&terminal_id) {
+ entity.update(cx, |term, cx| {
+ term.inner().update(cx, |inner, cx| {
+ inner.breadcrumb_text = title;
+ cx.emit(::terminal::Event::BreadcrumbsChanged);
+ })
+ });
+ }
+ }
+ TerminalProviderEvent::Exit {
+ terminal_id,
+ status,
+ } => {
+ if let Some(entity) = self.terminals.get(&terminal_id) {
+ entity.update(cx, |_term, cx| {
+ cx.notify();
+ });
+ } else {
+ self.pending_terminal_exit.insert(terminal_id, status);
+ }
+ }
+ }
+ }
+}
+
#[derive(PartialEq, Eq, Debug)]
pub enum ThreadStatus {
Idle,
@@ -873,20 +995,6 @@ impl AcpThread {
}
});
- let determine_shell = cx
- .background_spawn(async move {
- if cfg!(windows) {
- return get_system_shell();
- }
-
- if which::which("bash").is_ok() {
- "bash".into()
- } else {
- get_system_shell()
- }
- })
- .shared();
-
Self {
action_log,
shared_buffers: Default::default(),
@@ -901,7 +1009,8 @@ impl AcpThread {
prompt_capabilities,
_observe_prompt_capabilities: task,
terminals: HashMap::default(),
- determine_shell,
+ pending_terminal_output: HashMap::default(),
+ pending_terminal_exit: HashMap::default(),
}
}
@@ -1127,9 +1236,33 @@ impl AcpThread {
let update = update.into();
let languages = self.project.read(cx).languages().clone();
- let ix = self
- .index_for_tool_call(update.id())
- .context("Tool call not found")?;
+ let ix = match self.index_for_tool_call(update.id()) {
+ Some(ix) => ix,
+ None => {
+ // Tool call not found - create a failed tool call entry
+ let failed_tool_call = ToolCall {
+ id: update.id().clone(),
+ label: cx.new(|cx| Markdown::new("Tool call not found".into(), None, None, cx)),
+ kind: acp::ToolKind::Fetch,
+ content: vec![ToolCallContent::ContentBlock(ContentBlock::new(
+ acp::ContentBlock::Text(acp::TextContent {
+ text: "Tool call not found".to_string(),
+ annotations: None,
+ meta: None,
+ }),
+ &languages,
+ cx,
+ ))],
+ status: ToolCallStatus::Failed,
+ locations: Vec::new(),
+ resolved_locations: Vec::new(),
+ raw_input: None,
+ raw_output: None,
+ };
+ self.push_entry(AgentThreadEntry::ToolCall(failed_tool_call), cx);
+ return Ok(());
+ }
+ };
let AgentThreadEntry::ToolCall(call) = &mut self.entries[ix] else {
unreachable!()
};
@@ -1772,17 +1905,26 @@ impl AcpThread {
limit: Option,
reuse_shared_snapshot: bool,
cx: &mut Context,
- ) -> Task> {
+ ) -> Task> {
+ // Args are 1-based, move to 0-based
+ let line = line.unwrap_or_default().saturating_sub(1);
+ let limit = limit.unwrap_or(u32::MAX);
let project = self.project.clone();
let action_log = self.action_log.clone();
cx.spawn(async move |this, cx| {
- let load = project.update(cx, |project, cx| {
- let path = project
- .project_path_for_absolute_path(&path, cx)
- .context("invalid path")?;
- anyhow::Ok(project.open_buffer(path, cx))
- });
- let buffer = load??.await?;
+ let load = project
+ .update(cx, |project, cx| {
+ let path = project
+ .project_path_for_absolute_path(&path, cx)
+ .ok_or_else(|| {
+ acp::Error::resource_not_found(Some(path.display().to_string()))
+ })?;
+ Ok(project.open_buffer(path, cx))
+ })
+ .map_err(|e| acp::Error::internal_error().with_data(e.to_string()))
+ .flatten()?;
+
+ let buffer = load.await?;
let snapshot = if reuse_shared_snapshot {
this.read_with(cx, |this, _| {
@@ -1800,44 +1942,39 @@ impl AcpThread {
action_log.update(cx, |action_log, cx| {
action_log.buffer_read(buffer.clone(), cx);
})?;
- project.update(cx, |project, cx| {
- let position = buffer
- .read(cx)
- .snapshot()
- .anchor_before(Point::new(line.unwrap_or_default(), 0));
- project.set_agent_location(
- Some(AgentLocation {
- buffer: buffer.downgrade(),
- position,
- }),
- cx,
- );
- })?;
- buffer.update(cx, |buffer, _| buffer.snapshot())?
+ let snapshot = buffer.update(cx, |buffer, _| buffer.snapshot())?;
+ this.update(cx, |this, _| {
+ this.shared_buffers.insert(buffer.clone(), snapshot.clone());
+ })?;
+ snapshot
};
- this.update(cx, |this, _| {
- let text = snapshot.text();
- this.shared_buffers.insert(buffer.clone(), snapshot);
- if line.is_none() && limit.is_none() {
- return Ok(text);
- }
- let limit = limit.unwrap_or(u32::MAX) as usize;
- let Some(line) = line else {
- return Ok(text.lines().take(limit).collect::());
- };
+ let max_point = snapshot.max_point();
+ let start_position = Point::new(line, 0);
- let count = text.lines().count();
- if count < line as usize {
- anyhow::bail!("There are only {} lines", count);
- }
- Ok(text
- .lines()
- .skip(line as usize + 1)
- .take(limit)
- .collect::())
- })?
+ if start_position > max_point {
+ return Err(acp::Error::invalid_params().with_data(format!(
+ "Attempting to read beyond the end of the file, line {}:{}",
+ max_point.row + 1,
+ max_point.column
+ )));
+ }
+
+ let start = snapshot.anchor_before(start_position);
+ let end = snapshot.anchor_before(Point::new(line.saturating_add(limit), 0));
+
+ project.update(cx, |project, cx| {
+ project.set_agent_location(
+ Some(AgentLocation {
+ buffer: buffer.downgrade(),
+ position: start,
+ }),
+ cx,
+ );
+ })?;
+
+ Ok(snapshot.text_for_range(start..end).collect::())
})
}
@@ -1940,40 +2077,33 @@ impl AcpThread {
pub fn create_terminal(
&self,
- mut command: String,
+ command: String,
args: Vec,
extra_env: Vec,
cwd: Option,
output_byte_limit: Option,
cx: &mut Context,
) -> Task>> {
- for arg in args {
- command.push(' ');
- command.push_str(&arg);
- }
-
- let shell_command = if cfg!(windows) {
- format!("$null | & {{{}}}", command.replace("\"", "'"))
- } else if let Some(cwd) = cwd.as_ref().and_then(|cwd| cwd.as_os_str().to_str()) {
- // Make sure once we're *inside* the shell, we cd into `cwd`
- format!("(cd {cwd}; {}) self.project.update(cx, |project, cx| {
- project.directory_environment(dir.as_path().into(), cx)
+ let worktree = project.find_worktree(dir.as_path(), cx);
+ let shell = TerminalSettings::get(
+ worktree.as_ref().map(|(worktree, path)| SettingsLocation {
+ worktree_id: worktree.read(cx).id(),
+ path: &path,
+ }),
+ cx,
+ )
+ .shell
+ .clone();
+ project.directory_environment(&shell, dir.as_path().into(), cx)
}),
None => Task::ready(None).shared(),
};
-
let env = cx.spawn(async move |_, _| {
let mut env = env.await.unwrap_or_default();
- if cfg!(unix) {
- env.insert("PAGER".into(), "cat".into());
- }
+ // Disables paging for `git` and hopefully other commands
+ env.insert("PAGER".into(), "".into());
for var in extra_env {
env.insert(var.name, var.value);
}
@@ -1982,20 +2112,28 @@ impl AcpThread {
let project = self.project.clone();
let language_registry = project.read(cx).languages().clone();
- let determine_shell = self.determine_shell.clone();
let terminal_id = acp::TerminalId(Uuid::new_v4().to_string().into());
let terminal_task = cx.spawn({
let terminal_id = terminal_id.clone();
async move |_this, cx| {
- let program = determine_shell.await;
let env = env.await;
+ let shell = project
+ .update(cx, |project, cx| {
+ project
+ .remote_client()
+ .and_then(|r| r.read(cx).default_system_shell())
+ })?
+ .unwrap_or_else(|| get_default_system_shell_preferring_bash());
+ let (task_command, task_args) = ShellBuilder::new(&Shell::Program(shell))
+ .redirect_stdin_to_dev_null()
+ .build(Some(command.clone()), &args);
let terminal = project
.update(cx, |project, cx| {
project.create_terminal_task(
task::SpawnInTerminal {
- command: Some(program),
- args,
+ command: Some(task_command),
+ args: task_args,
cwd: cwd.clone(),
env,
..Default::default()
@@ -2008,7 +2146,7 @@ impl AcpThread {
cx.new(|cx| {
Terminal::new(
terminal_id,
- command,
+ &format!("{} {}", command, args.join(" ")),
cwd,
output_byte_limit.map(|l| l as usize),
terminal,
@@ -2072,6 +2210,32 @@ impl AcpThread {
pub fn emit_load_error(&mut self, error: LoadError, cx: &mut Context) {
cx.emit(AcpThreadEvent::LoadError(error));
}
+
+ pub fn register_terminal_created(
+ &mut self,
+ terminal_id: acp::TerminalId,
+ command_label: String,
+ working_dir: Option,
+ output_byte_limit: Option,
+ terminal: Entity<::terminal::Terminal>,
+ cx: &mut Context,
+ ) -> Entity {
+ let language_registry = self.project.read(cx).languages().clone();
+
+ let entity = cx.new(|cx| {
+ Terminal::new(
+ terminal_id.clone(),
+ &command_label,
+ working_dir.clone(),
+ output_byte_limit.map(|l| l as usize),
+ terminal,
+ language_registry,
+ cx,
+ )
+ });
+ self.terminals.insert(terminal_id.clone(), entity.clone());
+ entity
+ }
}
fn markdown_for_raw_output(
@@ -2148,6 +2312,145 @@ mod tests {
});
}
+ #[gpui::test]
+ async fn test_terminal_output_buffered_before_created_renders(cx: &mut gpui::TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ let project = Project::test(fs, [], cx).await;
+ let connection = Rc::new(FakeAgentConnection::new());
+ let thread = cx
+ .update(|cx| connection.new_thread(project, std::path::Path::new(path!("/test")), cx))
+ .await
+ .unwrap();
+
+ let terminal_id = acp::TerminalId(uuid::Uuid::new_v4().to_string().into());
+
+ // Send Output BEFORE Created - should be buffered by acp_thread
+ thread.update(cx, |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Output {
+ terminal_id: terminal_id.clone(),
+ data: b"hello buffered".to_vec(),
+ },
+ cx,
+ );
+ });
+
+ // Create a display-only terminal and then send Created
+ let lower = cx.new(|cx| {
+ let builder = ::terminal::TerminalBuilder::new_display_only(
+ ::terminal::terminal_settings::CursorShape::default(),
+ ::terminal::terminal_settings::AlternateScroll::On,
+ None,
+ 0,
+ )
+ .unwrap();
+ builder.subscribe(cx)
+ });
+
+ thread.update(cx, |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Created {
+ terminal_id: terminal_id.clone(),
+ label: "Buffered Test".to_string(),
+ cwd: None,
+ output_byte_limit: None,
+ terminal: lower.clone(),
+ },
+ cx,
+ );
+ });
+
+ // After Created, buffered Output should have been flushed into the renderer
+ let content = thread.read_with(cx, |thread, cx| {
+ let term = thread.terminal(terminal_id.clone()).unwrap();
+ term.read_with(cx, |t, cx| t.inner().read(cx).get_content())
+ });
+
+ assert!(
+ content.contains("hello buffered"),
+ "expected buffered output to render, got: {content}"
+ );
+ }
+
+ #[gpui::test]
+ async fn test_terminal_output_and_exit_buffered_before_created(cx: &mut gpui::TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ let project = Project::test(fs, [], cx).await;
+ let connection = Rc::new(FakeAgentConnection::new());
+ let thread = cx
+ .update(|cx| connection.new_thread(project, std::path::Path::new(path!("/test")), cx))
+ .await
+ .unwrap();
+
+ let terminal_id = acp::TerminalId(uuid::Uuid::new_v4().to_string().into());
+
+ // Send Output BEFORE Created
+ thread.update(cx, |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Output {
+ terminal_id: terminal_id.clone(),
+ data: b"pre-exit data".to_vec(),
+ },
+ cx,
+ );
+ });
+
+ // Send Exit BEFORE Created
+ thread.update(cx, |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Exit {
+ terminal_id: terminal_id.clone(),
+ status: acp::TerminalExitStatus {
+ exit_code: Some(0),
+ signal: None,
+ meta: None,
+ },
+ },
+ cx,
+ );
+ });
+
+ // Now create a display-only lower-level terminal and send Created
+ let lower = cx.new(|cx| {
+ let builder = ::terminal::TerminalBuilder::new_display_only(
+ ::terminal::terminal_settings::CursorShape::default(),
+ ::terminal::terminal_settings::AlternateScroll::On,
+ None,
+ 0,
+ )
+ .unwrap();
+ builder.subscribe(cx)
+ });
+
+ thread.update(cx, |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Created {
+ terminal_id: terminal_id.clone(),
+ label: "Buffered Exit Test".to_string(),
+ cwd: None,
+ output_byte_limit: None,
+ terminal: lower.clone(),
+ },
+ cx,
+ );
+ });
+
+ // Output should be present after Created (flushed from buffer)
+ let content = thread.read_with(cx, |thread, cx| {
+ let term = thread.terminal(terminal_id.clone()).unwrap();
+ term.read_with(cx, |t, cx| t.inner().read(cx).get_content())
+ });
+
+ assert!(
+ content.contains("pre-exit data"),
+ "expected pre-exit data to render, got: {content}"
+ );
+ }
+
#[gpui::test]
async fn test_push_user_content_block(cx: &mut gpui::TestAppContext) {
init_test(cx);
@@ -2388,6 +2691,188 @@ mod tests {
request.await.unwrap();
}
+ #[gpui::test]
+ async fn test_reading_from_line(cx: &mut TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ fs.insert_tree(path!("/tmp"), json!({"foo": "one\ntwo\nthree\nfour\n"}))
+ .await;
+ let project = Project::test(fs.clone(), [], cx).await;
+ project
+ .update(cx, |project, cx| {
+ project.find_or_create_worktree(path!("/tmp/foo"), true, cx)
+ })
+ .await
+ .unwrap();
+
+ let connection = Rc::new(FakeAgentConnection::new());
+
+ let thread = cx
+ .update(|cx| connection.new_thread(project, Path::new(path!("/tmp")), cx))
+ .await
+ .unwrap();
+
+ // Whole file
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), None, None, false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "one\ntwo\nthree\nfour\n");
+
+ // Only start line
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(3), None, false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "three\nfour\n");
+
+ // Only limit
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), None, Some(2), false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "one\ntwo\n");
+
+ // Range
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(2), Some(2), false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "two\nthree\n");
+
+ // Invalid
+ let err = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(6), Some(2), false, cx)
+ })
+ .await
+ .unwrap_err();
+
+ assert_eq!(
+ err.to_string(),
+ "Invalid params: \"Attempting to read beyond the end of the file, line 5:0\""
+ );
+ }
+
+ #[gpui::test]
+ async fn test_reading_empty_file(cx: &mut TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ fs.insert_tree(path!("/tmp"), json!({"foo": ""})).await;
+ let project = Project::test(fs.clone(), [], cx).await;
+ project
+ .update(cx, |project, cx| {
+ project.find_or_create_worktree(path!("/tmp/foo"), true, cx)
+ })
+ .await
+ .unwrap();
+
+ let connection = Rc::new(FakeAgentConnection::new());
+
+ let thread = cx
+ .update(|cx| connection.new_thread(project, Path::new(path!("/tmp")), cx))
+ .await
+ .unwrap();
+
+ // Whole file
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), None, None, false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "");
+
+ // Only start line
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(1), None, false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "");
+
+ // Only limit
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), None, Some(2), false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "");
+
+ // Range
+ let content = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(1), Some(1), false, cx)
+ })
+ .await
+ .unwrap();
+
+ assert_eq!(content, "");
+
+ // Invalid
+ let err = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/tmp/foo").into(), Some(5), Some(2), false, cx)
+ })
+ .await
+ .unwrap_err();
+
+ assert_eq!(
+ err.to_string(),
+ "Invalid params: \"Attempting to read beyond the end of the file, line 1:0\""
+ );
+ }
+ #[gpui::test]
+ async fn test_reading_non_existing_file(cx: &mut TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ fs.insert_tree(path!("/tmp"), json!({})).await;
+ let project = Project::test(fs.clone(), [], cx).await;
+ project
+ .update(cx, |project, cx| {
+ project.find_or_create_worktree(path!("/tmp"), true, cx)
+ })
+ .await
+ .unwrap();
+
+ let connection = Rc::new(FakeAgentConnection::new());
+
+ let thread = cx
+ .update(|cx| connection.new_thread(project, Path::new(path!("/tmp")), cx))
+ .await
+ .unwrap();
+
+ // Out of project file
+ let err = thread
+ .update(cx, |thread, cx| {
+ thread.read_text_file(path!("/foo").into(), None, None, false, cx)
+ })
+ .await
+ .unwrap_err();
+
+ assert_eq!(err.code, acp::ErrorCode::RESOURCE_NOT_FOUND.code);
+ }
+
#[gpui::test]
async fn test_succeeding_canceled_toolcall(cx: &mut TestAppContext) {
init_test(cx);
@@ -3181,4 +3666,65 @@ mod tests {
Task::ready(Ok(()))
}
}
+
+ #[gpui::test]
+ async fn test_tool_call_not_found_creates_failed_entry(cx: &mut TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor());
+ let project = Project::test(fs, [], cx).await;
+ let connection = Rc::new(FakeAgentConnection::new());
+ let thread = cx
+ .update(|cx| connection.new_thread(project, Path::new(path!("/test")), cx))
+ .await
+ .unwrap();
+
+ // Try to update a tool call that doesn't exist
+ let nonexistent_id = acp::ToolCallId("nonexistent-tool-call".into());
+ thread.update(cx, |thread, cx| {
+ let result = thread.handle_session_update(
+ acp::SessionUpdate::ToolCallUpdate(acp::ToolCallUpdate {
+ id: nonexistent_id.clone(),
+ fields: acp::ToolCallUpdateFields {
+ status: Some(acp::ToolCallStatus::Completed),
+ ..Default::default()
+ },
+ meta: None,
+ }),
+ cx,
+ );
+
+ // The update should succeed (not return an error)
+ assert!(result.is_ok());
+
+ // There should now be exactly one entry in the thread
+ assert_eq!(thread.entries.len(), 1);
+
+ // The entry should be a failed tool call
+ if let AgentThreadEntry::ToolCall(tool_call) = &thread.entries[0] {
+ assert_eq!(tool_call.id, nonexistent_id);
+ assert!(matches!(tool_call.status, ToolCallStatus::Failed));
+ assert_eq!(tool_call.kind, acp::ToolKind::Fetch);
+
+ // Check that the content contains the error message
+ assert_eq!(tool_call.content.len(), 1);
+ if let ToolCallContent::ContentBlock(content_block) = &tool_call.content[0] {
+ match content_block {
+ ContentBlock::Markdown { markdown } => {
+ let markdown_text = markdown.read(cx).source();
+ assert!(markdown_text.contains("Tool call not found"));
+ }
+ ContentBlock::Empty => panic!("Expected markdown content, got empty"),
+ ContentBlock::ResourceLink { .. } => {
+ panic!("Expected markdown content, got resource link")
+ }
+ }
+ } else {
+ panic!("Expected ContentBlock, got: {:?}", tool_call.content[0]);
+ }
+ } else {
+ panic!("Expected ToolCall entry, got: {:?}", thread.entries[0]);
+ }
+ });
+ }
}
diff --git a/crates/acp_thread/src/connection.rs b/crates/acp_thread/src/connection.rs
index 10c9dd22b6ec476f17fabeae7f6bd4f1a9672db7..fe66f954370f8118d054ee56f1e9f68f2de7e6f4 100644
--- a/crates/acp_thread/src/connection.rs
+++ b/crates/acp_thread/src/connection.rs
@@ -68,7 +68,7 @@ pub trait AgentConnection {
///
/// If the agent does not support model selection, returns [None].
/// This allows sharing the selector in UI components.
- fn model_selector(&self) -> Option> {
+ fn model_selector(&self, _session_id: &acp::SessionId) -> Option> {
None
}
@@ -177,61 +177,48 @@ pub trait AgentModelSelector: 'static {
/// If the session doesn't exist or the model is invalid, it returns an error.
///
/// # Parameters
- /// - `session_id`: The ID of the session (thread) to apply the model to.
/// - `model`: The model to select (should be one from [list_models]).
/// - `cx`: The GPUI app context.
///
/// # Returns
/// A task resolving to `Ok(())` on success or an error.
- fn select_model(
- &self,
- session_id: acp::SessionId,
- model_id: AgentModelId,
- cx: &mut App,
- ) -> Task>;
+ fn select_model(&self, model_id: acp::ModelId, cx: &mut App) -> Task>;
/// Retrieves the currently selected model for a specific session (thread).
///
/// # Parameters
- /// - `session_id`: The ID of the session (thread) to query.
/// - `cx`: The GPUI app context.
///
/// # Returns
/// A task resolving to the selected model (always set) or an error (e.g., session not found).
- fn selected_model(
- &self,
- session_id: &acp::SessionId,
- cx: &mut App,
- ) -> Task>;
+ fn selected_model(&self, cx: &mut App) -> Task>;
/// Whenever the model list is updated the receiver will be notified.
- fn watch(&self, cx: &mut App) -> watch::Receiver<()>;
-}
-
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct AgentModelId(pub SharedString);
-
-impl std::ops::Deref for AgentModelId {
- type Target = SharedString;
-
- fn deref(&self) -> &Self::Target {
- &self.0
- }
-}
-
-impl fmt::Display for AgentModelId {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- self.0.fmt(f)
+ /// Optional for agents that don't update their model list.
+ fn watch(&self, _cx: &mut App) -> Option> {
+ None
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AgentModelInfo {
- pub id: AgentModelId,
+ pub id: acp::ModelId,
pub name: SharedString,
+ pub description: Option,
pub icon: Option,
}
+impl From for AgentModelInfo {
+ fn from(info: acp::ModelInfo) -> Self {
+ Self {
+ id: info.model_id,
+ name: info.name.into(),
+ description: info.description.map(|desc| desc.into()),
+ icon: None,
+ }
+ }
+}
+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct AgentModelGroupName(pub SharedString);
diff --git a/crates/acp_thread/src/diff.rs b/crates/acp_thread/src/diff.rs
index f75af0543e373b47b0c6de36760ba18b5d9da318..15de12af27fe233bad4ad8ebb2893ffa5fbdd598 100644
--- a/crates/acp_thread/src/diff.rs
+++ b/crates/acp_thread/src/diff.rs
@@ -6,12 +6,7 @@ use itertools::Itertools;
use language::{
Anchor, Buffer, Capability, LanguageRegistry, OffsetRangeExt as _, Point, Rope, TextBuffer,
};
-use std::{
- cmp::Reverse,
- ops::Range,
- path::{Path, PathBuf},
- sync::Arc,
-};
+use std::{cmp::Reverse, ops::Range, path::Path, sync::Arc};
use util::ResultExt;
pub enum Diff {
@@ -21,7 +16,7 @@ pub enum Diff {
impl Diff {
pub fn finalized(
- path: PathBuf,
+ path: String,
old_text: Option,
new_text: String,
language_registry: Arc,
@@ -36,7 +31,7 @@ impl Diff {
let buffer = new_buffer.clone();
async move |_, cx| {
let language = language_registry
- .language_for_file_path(&path)
+ .load_language_for_file_path(Path::new(&path))
.await
.log_err();
@@ -152,12 +147,15 @@ impl Diff {
let path = match self {
Diff::Pending(PendingDiff {
new_buffer: buffer, ..
- }) => buffer.read(cx).file().map(|file| file.path().as_ref()),
- Diff::Finalized(FinalizedDiff { path, .. }) => Some(path.as_path()),
+ }) => buffer
+ .read(cx)
+ .file()
+ .map(|file| file.path().display(file.path_style(cx))),
+ Diff::Finalized(FinalizedDiff { path, .. }) => Some(path.as_str().into()),
};
format!(
"Diff: {}\n```\n{}\n```\n",
- path.unwrap_or(Path::new("untitled")).display(),
+ path.unwrap_or("untitled".into()),
buffer_text
)
}
@@ -244,8 +242,8 @@ impl PendingDiff {
.new_buffer
.read(cx)
.file()
- .map(|file| file.path().as_ref())
- .unwrap_or(Path::new("untitled"))
+ .map(|file| file.path().display(file.path_style(cx)))
+ .unwrap_or("untitled".into())
.into();
// Replace the buffer in the multibuffer with the snapshot
@@ -348,7 +346,7 @@ impl PendingDiff {
}
pub struct FinalizedDiff {
- path: PathBuf,
+ path: String,
base_text: Arc,
new_buffer: Entity,
multibuffer: Entity,
diff --git a/crates/acp_thread/src/mention.rs b/crates/acp_thread/src/mention.rs
index 122cd9a5cabb9676b0a7afdf76c0de5862f979cb..bbd13da5fa4124546d5457755f2bd2f5d737ccac 100644
--- a/crates/acp_thread/src/mention.rs
+++ b/crates/acp_thread/src/mention.rs
@@ -126,6 +126,39 @@ impl MentionUri {
abs_path: None,
line_range,
})
+ } else if let Some(name) = path.strip_prefix("/agent/symbol/") {
+ let fragment = url
+ .fragment()
+ .context("Missing fragment for untitled buffer selection")?;
+ let line_range = parse_line_range(fragment)?;
+ let path =
+ single_query_param(&url, "path")?.context("Missing path for symbol")?;
+ Ok(Self::Symbol {
+ name: name.to_string(),
+ abs_path: path.into(),
+ line_range,
+ })
+ } else if path.starts_with("/agent/file") {
+ let path =
+ single_query_param(&url, "path")?.context("Missing path for file")?;
+ Ok(Self::File {
+ abs_path: path.into(),
+ })
+ } else if path.starts_with("/agent/directory") {
+ let path =
+ single_query_param(&url, "path")?.context("Missing path for directory")?;
+ Ok(Self::Directory {
+ abs_path: path.into(),
+ })
+ } else if path.starts_with("/agent/selection") {
+ let fragment = url.fragment().context("Missing fragment for selection")?;
+ let line_range = parse_line_range(fragment)?;
+ let path =
+ single_query_param(&url, "path")?.context("Missing path for selection")?;
+ Ok(Self::Selection {
+ abs_path: Some(path.into()),
+ line_range,
+ })
} else {
bail!("invalid zed url: {:?}", input);
}
@@ -180,20 +213,29 @@ impl MentionUri {
pub fn to_uri(&self) -> Url {
match self {
MentionUri::File { abs_path } => {
- Url::from_file_path(abs_path).expect("mention path should be absolute")
+ let mut url = Url::parse("zed:///").unwrap();
+ url.set_path("/agent/file");
+ url.query_pairs_mut()
+ .append_pair("path", &abs_path.to_string_lossy());
+ url
}
MentionUri::PastedImage => Url::parse("zed:///agent/pasted-image").unwrap(),
MentionUri::Directory { abs_path } => {
- Url::from_directory_path(abs_path).expect("mention path should be absolute")
+ let mut url = Url::parse("zed:///").unwrap();
+ url.set_path("/agent/directory");
+ url.query_pairs_mut()
+ .append_pair("path", &abs_path.to_string_lossy());
+ url
}
MentionUri::Symbol {
abs_path,
name,
line_range,
} => {
- let mut url =
- Url::from_file_path(abs_path).expect("mention path should be absolute");
- url.query_pairs_mut().append_pair("symbol", name);
+ let mut url = Url::parse("zed:///").unwrap();
+ url.set_path(&format!("/agent/symbol/{name}"));
+ url.query_pairs_mut()
+ .append_pair("path", &abs_path.to_string_lossy());
url.set_fragment(Some(&format!(
"L{}:{}",
line_range.start() + 1,
@@ -202,15 +244,16 @@ impl MentionUri {
url
}
MentionUri::Selection {
- abs_path: path,
+ abs_path,
line_range,
} => {
- let mut url = if let Some(path) = path {
- Url::from_file_path(path).expect("mention path should be absolute")
+ let mut url = Url::parse("zed:///").unwrap();
+ if let Some(abs_path) = abs_path {
+ url.set_path("/agent/selection");
+ url.query_pairs_mut()
+ .append_pair("path", &abs_path.to_string_lossy());
} else {
- let mut url = Url::parse("zed:///").unwrap();
url.set_path("/agent/untitled-buffer");
- url
};
url.set_fragment(Some(&format!(
"L{}:{}",
@@ -295,37 +338,32 @@ mod tests {
#[test]
fn test_parse_file_uri() {
- let file_uri = uri!("file:///path/to/file.rs");
- let parsed = MentionUri::parse(file_uri).unwrap();
+ let old_uri = uri!("file:///path/to/file.rs");
+ let parsed = MentionUri::parse(old_uri).unwrap();
match &parsed {
MentionUri::File { abs_path } => {
assert_eq!(abs_path.to_str().unwrap(), path!("/path/to/file.rs"));
}
_ => panic!("Expected File variant"),
}
- assert_eq!(parsed.to_uri().to_string(), file_uri);
+ let new_uri = parsed.to_uri().to_string();
+ assert!(new_uri.starts_with("zed:///agent/file"));
+ assert_eq!(MentionUri::parse(&new_uri).unwrap(), parsed);
}
#[test]
fn test_parse_directory_uri() {
- let file_uri = uri!("file:///path/to/dir/");
- let parsed = MentionUri::parse(file_uri).unwrap();
+ let old_uri = uri!("file:///path/to/dir/");
+ let parsed = MentionUri::parse(old_uri).unwrap();
match &parsed {
MentionUri::Directory { abs_path } => {
assert_eq!(abs_path.to_str().unwrap(), path!("/path/to/dir/"));
}
_ => panic!("Expected Directory variant"),
}
- assert_eq!(parsed.to_uri().to_string(), file_uri);
- }
-
- #[test]
- fn test_to_directory_uri_with_slash() {
- let uri = MentionUri::Directory {
- abs_path: PathBuf::from(path!("/path/to/dir/")),
- };
- let expected = uri!("file:///path/to/dir/");
- assert_eq!(uri.to_uri().to_string(), expected);
+ let new_uri = parsed.to_uri().to_string();
+ assert!(new_uri.starts_with("zed:///agent/directory"));
+ assert_eq!(MentionUri::parse(&new_uri).unwrap(), parsed);
}
#[test]
@@ -333,14 +371,15 @@ mod tests {
let uri = MentionUri::Directory {
abs_path: PathBuf::from(path!("/path/to/dir")),
};
- let expected = uri!("file:///path/to/dir/");
- assert_eq!(uri.to_uri().to_string(), expected);
+ let uri_string = uri.to_uri().to_string();
+ assert!(uri_string.starts_with("zed:///agent/directory"));
+ assert_eq!(MentionUri::parse(&uri_string).unwrap(), uri);
}
#[test]
fn test_parse_symbol_uri() {
- let symbol_uri = uri!("file:///path/to/file.rs?symbol=MySymbol#L10:20");
- let parsed = MentionUri::parse(symbol_uri).unwrap();
+ let old_uri = uri!("file:///path/to/file.rs?symbol=MySymbol#L10:20");
+ let parsed = MentionUri::parse(old_uri).unwrap();
match &parsed {
MentionUri::Symbol {
abs_path: path,
@@ -354,13 +393,15 @@ mod tests {
}
_ => panic!("Expected Symbol variant"),
}
- assert_eq!(parsed.to_uri().to_string(), symbol_uri);
+ let new_uri = parsed.to_uri().to_string();
+ assert!(new_uri.starts_with("zed:///agent/symbol/MySymbol"));
+ assert_eq!(MentionUri::parse(&new_uri).unwrap(), parsed);
}
#[test]
fn test_parse_selection_uri() {
- let selection_uri = uri!("file:///path/to/file.rs#L5:15");
- let parsed = MentionUri::parse(selection_uri).unwrap();
+ let old_uri = uri!("file:///path/to/file.rs#L5:15");
+ let parsed = MentionUri::parse(old_uri).unwrap();
match &parsed {
MentionUri::Selection {
abs_path: path,
@@ -375,7 +416,9 @@ mod tests {
}
_ => panic!("Expected Selection variant"),
}
- assert_eq!(parsed.to_uri().to_string(), selection_uri);
+ let new_uri = parsed.to_uri().to_string();
+ assert!(new_uri.starts_with("zed:///agent/selection"));
+ assert_eq!(MentionUri::parse(&new_uri).unwrap(), parsed);
}
#[test]
diff --git a/crates/acp_thread/src/terminal.rs b/crates/acp_thread/src/terminal.rs
index a927083b0bd576f1580ba261d4028407fcea7a5c..888c7698c3d2270769f3afbe712ecba7d08b055f 100644
--- a/crates/acp_thread/src/terminal.rs
+++ b/crates/acp_thread/src/terminal.rs
@@ -28,7 +28,7 @@ pub struct TerminalOutput {
impl Terminal {
pub fn new(
id: acp::TerminalId,
- command: String,
+ command_label: &str,
working_dir: Option,
output_byte_limit: Option,
terminal: Entity,
@@ -40,7 +40,7 @@ impl Terminal {
id,
command: cx.new(|cx| {
Markdown::new(
- format!("```\n{}\n```", command).into(),
+ format!("```\n{}\n```", command_label).into(),
Some(language_registry.clone()),
None,
cx,
diff --git a/crates/action_log/src/action_log.rs b/crates/action_log/src/action_log.rs
index 11ba596ac5a0ecd4ed49744d0eafa9defcde20c1..b7722f211afda3a77bc96292a50acf869e7424d6 100644
--- a/crates/action_log/src/action_log.rs
+++ b/crates/action_log/src/action_log.rs
@@ -8,10 +8,7 @@ use language::{Anchor, Buffer, BufferEvent, DiskState, Point, ToPoint};
use project::{Project, ProjectItem, lsp_store::OpenLspBufferHandle};
use std::{cmp, ops::Range, sync::Arc};
use text::{Edit, Patch, Rope};
-use util::{
- RangeExt, ResultExt as _,
- paths::{PathStyle, RemotePathBuf},
-};
+use util::{RangeExt, ResultExt as _};
/// Tracks actions performed by tools in a thread
pub struct ActionLog {
@@ -62,7 +59,13 @@ impl ActionLog {
let file_path = buffer
.read(cx)
.file()
- .map(|file| RemotePathBuf::new(file.full_path(cx), PathStyle::Posix).to_proto())
+ .map(|file| {
+ let mut path = file.full_path(cx).to_string_lossy().into_owned();
+ if file.path_style(cx).is_windows() {
+ path = path.replace('\\', "/");
+ }
+ path
+ })
.unwrap_or_else(|| format!("buffer_{}", buffer.entity_id()));
let mut result = String::new();
@@ -2301,7 +2304,7 @@ mod tests {
.await;
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
- &[("file.txt".into(), "a\nb\nc\nd\ne\nf\ng\nh\ni\nj".into())],
+ &[("file.txt", "a\nb\nc\nd\ne\nf\ng\nh\ni\nj".into())],
"0000000",
);
cx.run_until_parked();
@@ -2384,7 +2387,7 @@ mod tests {
// - Ignores the last line edit (j stays as j)
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
- &[("file.txt".into(), "A\nb\nc\nf\nG\nh\ni\nj".into())],
+ &[("file.txt", "A\nb\nc\nf\nG\nh\ni\nj".into())],
"0000001",
);
cx.run_until_parked();
@@ -2415,10 +2418,7 @@ mod tests {
// Make another commit that accepts the NEW line but with different content
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
- &[(
- "file.txt".into(),
- "A\nb\nc\nf\nGGG\nh\nDIFFERENT\ni\nj".into(),
- )],
+ &[("file.txt", "A\nb\nc\nf\nGGG\nh\nDIFFERENT\ni\nj".into())],
"0000002",
);
cx.run_until_parked();
@@ -2444,7 +2444,7 @@ mod tests {
// Final commit that accepts all remaining edits
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
- &[("file.txt".into(), "A\nb\nc\nf\nGGG\nh\nNEW\ni\nJ".into())],
+ &[("file.txt", "A\nb\nc\nf\nGGG\nh\nNEW\ni\nJ".into())],
"0000003",
);
cx.run_until_parked();
diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs
index 1870ab74db214b518bb0b543166067e636f14965..f35b2ad17879c57b15ac8579e6b50a26110ff21d 100644
--- a/crates/activity_indicator/src/activity_indicator.rs
+++ b/crates/activity_indicator/src/activity_indicator.rs
@@ -1,4 +1,4 @@
-use auto_update::{AutoUpdateStatus, AutoUpdater, DismissErrorMessage, VersionCheckType};
+use auto_update::{AutoUpdateStatus, AutoUpdater, DismissMessage, VersionCheckType};
use editor::Editor;
use extension_host::{ExtensionOperation, ExtensionStore};
use futures::StreamExt;
@@ -280,18 +280,13 @@ impl ActivityIndicator {
});
}
- fn dismiss_error_message(
- &mut self,
- _: &DismissErrorMessage,
- _: &mut Window,
- cx: &mut Context,
- ) {
- let error_dismissed = if let Some(updater) = &self.auto_updater {
- updater.update(cx, |updater, cx| updater.dismiss_error(cx))
+ fn dismiss_message(&mut self, _: &DismissMessage, _: &mut Window, cx: &mut Context) {
+ let dismissed = if let Some(updater) = &self.auto_updater {
+ updater.update(cx, |updater, cx| updater.dismiss(cx))
} else {
false
};
- if error_dismissed {
+ if dismissed {
return;
}
@@ -513,7 +508,7 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |this, window, cx| {
this.statuses
.retain(|status| !downloading.contains(&status.name));
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
});
@@ -542,7 +537,7 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |this, window, cx| {
this.statuses
.retain(|status| !checking_for_update.contains(&status.name));
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
});
@@ -650,13 +645,14 @@ impl ActivityIndicator {
.and_then(|updater| match &updater.read(cx).status() {
AutoUpdateStatus::Checking => Some(Content {
icon: Some(
- Icon::new(IconName::Download)
+ Icon::new(IconName::LoadCircle)
.size(IconSize::Small)
+ .with_rotate_animation(3)
.into_any_element(),
),
message: "Checking for Zed updates…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
}),
@@ -668,19 +664,20 @@ impl ActivityIndicator {
),
message: "Downloading Zed update…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
AutoUpdateStatus::Installing { version } => Some(Content {
icon: Some(
- Icon::new(IconName::Download)
+ Icon::new(IconName::LoadCircle)
.size(IconSize::Small)
+ .with_rotate_animation(3)
.into_any_element(),
),
message: "Installing Zed update…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
@@ -690,17 +687,18 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |_, _, cx| workspace::reload(cx))),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
- AutoUpdateStatus::Errored => Some(Content {
+ AutoUpdateStatus::Errored { error } => Some(Content {
icon: Some(
Icon::new(IconName::Warning)
.size(IconSize::Small)
.into_any_element(),
),
- message: "Auto update failed".to_string(),
+ message: "Failed to update Zed".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
- this.dismiss_error_message(&DismissErrorMessage, window, cx)
+ window.dispatch_action(Box::new(workspace::OpenLog), cx);
+ this.dismiss_message(&DismissMessage, window, cx);
})),
- tooltip_message: None,
+ tooltip_message: Some(format!("{error}")),
}),
AutoUpdateStatus::Idle => None,
})
@@ -738,7 +736,7 @@ impl ActivityIndicator {
})),
message,
on_click: Some(Arc::new(|this, window, cx| {
- this.dismiss_error_message(&Default::default(), window, cx)
+ this.dismiss_message(&Default::default(), window, cx)
})),
tooltip_message: None,
})
@@ -777,7 +775,7 @@ impl Render for ActivityIndicator {
let result = h_flex()
.id("activity-indicator")
.on_action(cx.listener(Self::show_error_message))
- .on_action(cx.listener(Self::dismiss_error_message));
+ .on_action(cx.listener(Self::dismiss_message));
let Some(content) = self.content_to_render(cx) else {
return result;
};
diff --git a/crates/agent/src/agent.rs b/crates/agent/src/agent.rs
index 7e3590f05df18d258fae91fd8aa596c07c5fb516..9cd2a93d9bfc9a8a1940fea150f651b60f1a1073 100644
--- a/crates/agent/src/agent.rs
+++ b/crates/agent/src/agent.rs
@@ -9,12 +9,14 @@ pub mod tool_use;
pub use context::{AgentContext, ContextId, ContextLoadResult};
pub use context_store::ContextStore;
+use fs::Fs;
+use std::sync::Arc;
pub use thread::{
LastRestoreCheckpoint, Message, MessageCrease, MessageId, MessageSegment, Thread, ThreadError,
ThreadEvent, ThreadFeedback, ThreadId, ThreadSummary, TokenUsageRatio,
};
pub use thread_store::{SerializedThread, TextThreadStore, ThreadStore};
-pub fn init(cx: &mut gpui::App) {
- thread_store::init(cx);
+pub fn init(fs: Arc, cx: &mut gpui::App) {
+ thread_store::init(fs, cx);
}
diff --git a/crates/agent/src/agent_profile.rs b/crates/agent/src/agent_profile.rs
index c9e73372f60686cf330531926f4129e9c9b25db8..40ba2f07db7ad425a5d0e9befe91499eb746b74e 100644
--- a/crates/agent/src/agent_profile.rs
+++ b/crates/agent/src/agent_profile.rs
@@ -49,10 +49,10 @@ impl AgentProfile {
.unwrap_or_default(),
};
- update_settings_file::(fs, cx, {
+ update_settings_file(fs, cx, {
let id = id.clone();
move |settings, _cx| {
- settings.create_profile(id, profile_settings).log_err();
+ profile_settings.save_to_settings(id, settings).log_err();
}
});
diff --git a/crates/agent/src/context.rs b/crates/agent/src/context.rs
index 4510b0d3d3548b3ff807a3e549a9f2dc53951452..3b2922087a94c497c07f1df67a8d4d9adf759909 100644
--- a/crates/agent/src/context.rs
+++ b/crates/agent/src/context.rs
@@ -18,6 +18,7 @@ use std::path::PathBuf;
use std::{ops::Range, path::Path, sync::Arc};
use text::{Anchor, OffsetRangeExt as _};
use util::markdown::MarkdownCodeBlock;
+use util::rel_path::RelPath;
use util::{ResultExt as _, post_inc};
pub const RULES_ICON: IconName = IconName::Reader;
@@ -158,7 +159,7 @@ pub struct FileContextHandle {
#[derive(Debug, Clone)]
pub struct FileContext {
pub handle: FileContextHandle,
- pub full_path: Arc,
+ pub full_path: String,
pub text: SharedString,
pub is_outline: bool,
}
@@ -186,7 +187,7 @@ impl FileContextHandle {
log::error!("file context missing path");
return Task::ready(None);
};
- let full_path: Arc = file.full_path(cx).into();
+ let full_path = file.full_path(cx).to_string_lossy().into_owned();
let rope = buffer_ref.as_rope().clone();
let buffer = self.buffer.clone();
@@ -235,14 +236,14 @@ pub struct DirectoryContextHandle {
#[derive(Debug, Clone)]
pub struct DirectoryContext {
pub handle: DirectoryContextHandle,
- pub full_path: Arc,
+ pub full_path: String,
pub descendants: Vec,
}
#[derive(Debug, Clone)]
pub struct DirectoryContextDescendant {
/// Path within the directory.
- pub rel_path: Arc,
+ pub rel_path: Arc,
pub fenced_codeblock: SharedString,
}
@@ -273,13 +274,16 @@ impl DirectoryContextHandle {
}
let directory_path = entry.path.clone();
- let directory_full_path = worktree_ref.full_path(&directory_path).into();
+ let directory_full_path = worktree_ref
+ .full_path(&directory_path)
+ .to_string_lossy()
+ .to_string();
let file_paths = collect_files_in_path(worktree_ref, &directory_path);
let descendants_future = future::join_all(file_paths.into_iter().map(|path| {
let worktree_ref = worktree.read(cx);
let worktree_id = worktree_ref.id();
- let full_path = worktree_ref.full_path(&path);
+ let full_path = worktree_ref.full_path(&path).to_string_lossy().into_owned();
let rel_path = path
.strip_prefix(&directory_path)
@@ -360,7 +364,7 @@ pub struct SymbolContextHandle {
#[derive(Debug, Clone)]
pub struct SymbolContext {
pub handle: SymbolContextHandle,
- pub full_path: Arc,
+ pub full_path: String,
pub line_range: Range,
pub text: SharedString,
}
@@ -399,7 +403,7 @@ impl SymbolContextHandle {
log::error!("symbol context's file has no path");
return Task::ready(None);
};
- let full_path = file.full_path(cx).into();
+ let full_path = file.full_path(cx).to_string_lossy().into_owned();
let line_range = self.enclosing_range.to_point(&buffer_ref.snapshot());
let text = self.text(cx);
let buffer = self.buffer.clone();
@@ -433,7 +437,7 @@ pub struct SelectionContextHandle {
#[derive(Debug, Clone)]
pub struct SelectionContext {
pub handle: SelectionContextHandle,
- pub full_path: Arc,
+ pub full_path: String,
pub line_range: Range,
pub text: SharedString,
}
@@ -472,7 +476,7 @@ impl SelectionContextHandle {
let text = self.text(cx);
let buffer = self.buffer.clone();
let context = AgentContext::Selection(SelectionContext {
- full_path: full_path.into(),
+ full_path: full_path.to_string_lossy().into_owned(),
line_range: self.line_range(cx),
text,
handle: self,
@@ -702,7 +706,7 @@ impl Display for RulesContext {
#[derive(Debug, Clone)]
pub struct ImageContext {
pub project_path: Option,
- pub full_path: Option>,
+ pub full_path: Option,
pub original_image: Arc,
// TODO: handle this elsewhere and remove `ignore-interior-mutability` opt-out in clippy.toml
// needed due to a false positive of `clippy::mutable_key_type`.
@@ -968,7 +972,7 @@ pub fn load_context(
})
}
-fn collect_files_in_path(worktree: &Worktree, path: &Path) -> Vec> {
+fn collect_files_in_path(worktree: &Worktree, path: &RelPath) -> Vec> {
let mut files = Vec::new();
for entry in worktree.child_entries(path) {
@@ -982,14 +986,17 @@ fn collect_files_in_path(worktree: &Worktree, path: &Path) -> Vec> {
files
}
-fn codeblock_tag(full_path: &Path, line_range: Option>) -> String {
+fn codeblock_tag(full_path: &str, line_range: Option>) -> String {
let mut result = String::new();
- if let Some(extension) = full_path.extension().and_then(|ext| ext.to_str()) {
+ if let Some(extension) = Path::new(full_path)
+ .extension()
+ .and_then(|ext| ext.to_str())
+ {
let _ = write!(result, "{} ", extension);
}
- let _ = write!(result, "{}", full_path.display());
+ let _ = write!(result, "{}", full_path);
if let Some(range) = line_range {
if range.start.row == range.end.row {
diff --git a/crates/agent/src/context_store.rs b/crates/agent/src/context_store.rs
index b531852a184ffeaf86862990f03210ceb6033395..cf35840cc4215695a966931701257c838c00af18 100644
--- a/crates/agent/src/context_store.rs
+++ b/crates/agent/src/context_store.rs
@@ -14,7 +14,10 @@ use futures::{self, FutureExt};
use gpui::{App, Context, Entity, EventEmitter, Image, SharedString, Task, WeakEntity};
use language::{Buffer, File as _};
use language_model::LanguageModelImage;
-use project::{Project, ProjectItem, ProjectPath, Symbol, image_store::is_image_file};
+use project::{
+ Project, ProjectItem, ProjectPath, Symbol, image_store::is_image_file,
+ lsp_store::SymbolLocation,
+};
use prompt_store::UserPromptId;
use ref_cast::RefCast as _;
use std::{
@@ -309,7 +312,7 @@ impl ContextStore {
let item = image_item.read(cx);
this.insert_image(
Some(item.project_path(cx)),
- Some(item.file.full_path(cx).into()),
+ Some(item.file.full_path(cx).to_string_lossy().into_owned()),
item.image.clone(),
remove_if_exists,
cx,
@@ -325,7 +328,7 @@ impl ContextStore {
fn insert_image(
&mut self,
project_path: Option,
- full_path: Option>,
+ full_path: Option,
image: Arc,
remove_if_exists: bool,
cx: &mut Context,
@@ -500,7 +503,7 @@ impl ContextStore {
let Some(context_path) = buffer.project_path(cx) else {
return false;
};
- if context_path != symbol.path {
+ if symbol.path != SymbolLocation::InProject(context_path) {
return false;
}
let context_range = context.range.to_point_utf16(&buffer.snapshot());
diff --git a/crates/agent/src/history_store.rs b/crates/agent/src/history_store.rs
index 285ce7c04b7268aea24e0a746737f65d7c3608df..4b1795047b7444dc74f8a41097c0c66aa54ecfd9 100644
--- a/crates/agent/src/history_store.rs
+++ b/crates/agent/src/history_store.rs
@@ -155,7 +155,7 @@ impl HistoryStore {
.iter()
.filter_map(|entry| match entry {
HistoryEntryId::Context(path) => path.file_name().map(|file| {
- SerializedRecentOpen::ContextName(file.to_string_lossy().to_string())
+ SerializedRecentOpen::ContextName(file.to_string_lossy().into_owned())
}),
HistoryEntryId::Thread(id) => Some(SerializedRecentOpen::Thread(id.to_string())),
})
diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 7b70fde56ab1e7acb6705aeace82f142dc28a9f3..d189b7611209d2fbea5c882ea548318f73ddbfb3 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -234,7 +234,6 @@ impl MessageSegment {
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ProjectSnapshot {
pub worktree_snapshots: Vec,
- pub unsaved_buffer_paths: Vec,
pub timestamp: DateTime,
}
@@ -1277,62 +1276,6 @@ impl Thread {
);
}
- pub fn retry_last_completion(
- &mut self,
- window: Option,
- cx: &mut Context,
- ) {
- // Clear any existing error state
- self.retry_state = None;
-
- // Use the last error context if available, otherwise fall back to configured model
- let (model, intent) = if let Some((model, intent)) = self.last_error_context.take() {
- (model, intent)
- } else if let Some(configured_model) = self.configured_model.as_ref() {
- let model = configured_model.model.clone();
- let intent = if self.has_pending_tool_uses() {
- CompletionIntent::ToolResults
- } else {
- CompletionIntent::UserPrompt
- };
- (model, intent)
- } else if let Some(configured_model) = self.get_or_init_configured_model(cx) {
- let model = configured_model.model.clone();
- let intent = if self.has_pending_tool_uses() {
- CompletionIntent::ToolResults
- } else {
- CompletionIntent::UserPrompt
- };
- (model, intent)
- } else {
- return;
- };
-
- self.send_to_model(model, intent, window, cx);
- }
-
- pub fn enable_burn_mode_and_retry(
- &mut self,
- window: Option,
- cx: &mut Context,
- ) {
- self.completion_mode = CompletionMode::Burn;
- cx.emit(ThreadEvent::ProfileChanged);
- self.retry_last_completion(window, cx);
- }
-
- pub fn used_tools_since_last_user_message(&self) -> bool {
- for message in self.messages.iter().rev() {
- if self.tool_use.message_has_tool_results(message.id) {
- return true;
- } else if message.role == Role::User {
- return false;
- }
- }
-
- false
- }
-
pub fn to_completion_request(
&self,
model: Arc,
@@ -2857,27 +2800,11 @@ impl Thread {
.map(|worktree| Self::worktree_snapshot(worktree, git_store.clone(), cx))
.collect();
- cx.spawn(async move |_, cx| {
+ cx.spawn(async move |_, _| {
let worktree_snapshots = futures::future::join_all(worktree_snapshots).await;
- let mut unsaved_buffers = Vec::new();
- cx.update(|app_cx| {
- let buffer_store = project.read(app_cx).buffer_store();
- for buffer_handle in buffer_store.read(app_cx).buffers() {
- let buffer = buffer_handle.read(app_cx);
- if buffer.is_dirty()
- && let Some(file) = buffer.file()
- {
- let path = file.path().to_string_lossy().to_string();
- unsaved_buffers.push(path);
- }
- }
- })
- .ok();
-
Arc::new(ProjectSnapshot {
worktree_snapshots,
- unsaved_buffer_paths: unsaved_buffers,
timestamp: Utc::now(),
})
})
@@ -2892,7 +2819,7 @@ impl Thread {
// Get worktree path and snapshot
let worktree_info = cx.update(|app_cx| {
let worktree = worktree.read(app_cx);
- let path = worktree.abs_path().to_string_lossy().to_string();
+ let path = worktree.abs_path().to_string_lossy().into_owned();
let snapshot = worktree.snapshot();
(path, snapshot)
});
@@ -3272,9 +3199,10 @@ mod tests {
// Test-specific constants
const TEST_RATE_LIMIT_RETRY_SECS: u64 = 30;
- use agent_settings::{AgentProfileId, AgentSettings, LanguageModelParameters};
+ use agent_settings::{AgentProfileId, AgentSettings};
use assistant_tool::ToolRegistry;
use assistant_tools;
+ use fs::Fs;
use futures::StreamExt;
use futures::future::BoxFuture;
use futures::stream::BoxStream;
@@ -3289,18 +3217,18 @@ mod tests {
use project::{FakeFs, Project};
use prompt_store::PromptBuilder;
use serde_json::json;
- use settings::{Settings, SettingsStore};
+ use settings::{LanguageModelParameters, Settings, SettingsStore};
use std::sync::Arc;
use std::time::Duration;
- use theme::ThemeSettings;
use util::path;
use workspace::Workspace;
#[gpui::test]
async fn test_message_with_context(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3375,9 +3303,10 @@ fn main() {{
#[gpui::test]
async fn test_only_include_new_contexts(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({
"file1.rs": "fn function1() {}\n",
@@ -3531,9 +3460,10 @@ fn main() {{
#[gpui::test]
async fn test_message_without_files(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3610,9 +3540,10 @@ fn main() {{
#[gpui::test]
#[ignore] // turn this test on when project_notifications tool is re-enabled
async fn test_stale_buffer_notification(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3738,9 +3669,10 @@ fn main() {{
#[gpui::test]
async fn test_storing_profile_setting_per_thread(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3760,9 +3692,10 @@ fn main() {{
#[gpui::test]
async fn test_serializing_thread_profile(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3803,9 +3736,10 @@ fn main() {{
#[gpui::test]
async fn test_temperature_setting(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
let project = create_test_project(
+ &fs,
cx,
json!({"code.rs": "fn main() {\n println!(\"Hello, world!\");\n}"}),
)
@@ -3897,9 +3831,9 @@ fn main() {{
#[gpui::test]
async fn test_thread_summary(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _thread_store, thread, _context_store, model) =
setup_test_environment(cx, project.clone()).await;
@@ -3982,9 +3916,9 @@ fn main() {{
#[gpui::test]
async fn test_thread_summary_error_set_manually(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _thread_store, thread, _context_store, model) =
setup_test_environment(cx, project.clone()).await;
@@ -4004,9 +3938,9 @@ fn main() {{
#[gpui::test]
async fn test_thread_summary_error_retry(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _thread_store, thread, _context_store, model) =
setup_test_environment(cx, project.clone()).await;
@@ -4158,9 +4092,9 @@ fn main() {{
#[gpui::test]
async fn test_retry_on_overloaded_error(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4236,9 +4170,9 @@ fn main() {{
#[gpui::test]
async fn test_retry_on_internal_server_error(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4318,9 +4252,9 @@ fn main() {{
#[gpui::test]
async fn test_exponential_backoff_on_retries(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4438,9 +4372,9 @@ fn main() {{
#[gpui::test]
async fn test_max_retries_exceeded(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4529,9 +4463,9 @@ fn main() {{
#[gpui::test]
async fn test_retry_message_removed_on_retry(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4702,9 +4636,9 @@ fn main() {{
#[gpui::test]
async fn test_successful_completion_clears_retry_state(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -4868,9 +4802,9 @@ fn main() {{
#[gpui::test]
async fn test_rate_limit_retry_single_attempt(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -5053,9 +4987,9 @@ fn main() {{
#[gpui::test]
async fn test_ui_only_messages_not_sent_to_model(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, model) = setup_test_environment(cx, project.clone()).await;
// Insert a regular user message
@@ -5153,9 +5087,9 @@ fn main() {{
#[gpui::test]
async fn test_no_retry_without_burn_mode(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Ensure we're in Normal mode (not Burn mode)
@@ -5226,9 +5160,9 @@ fn main() {{
#[gpui::test]
async fn test_retry_canceled_on_stop(cx: &mut TestAppContext) {
- init_test_settings(cx);
+ let fs = init_test_settings(cx);
- let project = create_test_project(cx, json!({})).await;
+ let project = create_test_project(&fs, cx, json!({})).await;
let (_, _, thread, _, _base_model) = setup_test_environment(cx, project.clone()).await;
// Enable Burn Mode to allow retries
@@ -5334,7 +5268,8 @@ fn main() {{
cx.run_until_parked();
}
- fn init_test_settings(cx: &mut TestAppContext) {
+ fn init_test_settings(cx: &mut TestAppContext) -> Arc {
+ let fs = FakeFs::new(cx.executor());
cx.update(|cx| {
let settings_store = SettingsStore::test(cx);
cx.set_global(settings_store);
@@ -5342,10 +5277,10 @@ fn main() {{
Project::init_settings(cx);
AgentSettings::register(cx);
prompt_store::init(cx);
- thread_store::init(cx);
+ thread_store::init(fs.clone(), cx);
workspace::init_settings(cx);
language_model::init_settings(cx);
- ThemeSettings::register(cx);
+ theme::init(theme::LoadThemes::JustBase, cx);
ToolRegistry::default_global(cx);
assistant_tool::init(cx);
@@ -5356,16 +5291,17 @@ fn main() {{
));
assistant_tools::init(http_client, cx);
});
+ fs
}
// Helper to create a test project with test files
async fn create_test_project(
+ fs: &Arc,
cx: &mut TestAppContext,
files: serde_json::Value,
) -> Entity {
- let fs = FakeFs::new(cx.executor());
- fs.insert_tree(path!("/test"), files).await;
- Project::test(fs, [path!("/test").as_ref()], cx).await
+ fs.as_fake().insert_tree(path!("/test"), files).await;
+ Project::test(fs.clone(), [path!("/test").as_ref()], cx).await
}
async fn setup_test_environment(
diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rs
index 2eae758b835d5d79ccf86f18be032f2d9bb87c2b..2139f232e3e99b1affb78928dec70e1aaef2a03a 100644
--- a/crates/agent/src/thread_store.rs
+++ b/crates/agent/src/thread_store.rs
@@ -10,6 +10,7 @@ use assistant_tool::{Tool, ToolId, ToolWorkingSet};
use chrono::{DateTime, Utc};
use collections::HashMap;
use context_server::ContextServerId;
+use fs::{Fs, RemoveOptions};
use futures::{
FutureExt as _, StreamExt as _,
channel::{mpsc, oneshot},
@@ -37,9 +38,9 @@ use std::{
cell::{Ref, RefCell},
path::{Path, PathBuf},
rc::Rc,
- sync::{Arc, Mutex},
+ sync::{Arc, LazyLock, Mutex},
};
-use util::ResultExt as _;
+use util::{ResultExt as _, rel_path::RelPath};
use zed_env_vars::ZED_STATELESS;
@@ -73,20 +74,22 @@ impl Column for DataType {
}
}
-const RULES_FILE_NAMES: [&str; 9] = [
- ".rules",
- ".cursorrules",
- ".windsurfrules",
- ".clinerules",
- ".github/copilot-instructions.md",
- "CLAUDE.md",
- "AGENT.md",
- "AGENTS.md",
- "GEMINI.md",
-];
-
-pub fn init(cx: &mut App) {
- ThreadsDatabase::init(cx);
+static RULES_FILE_NAMES: LazyLock<[&RelPath; 9]> = LazyLock::new(|| {
+ [
+ RelPath::unix(".rules").unwrap(),
+ RelPath::unix(".cursorrules").unwrap(),
+ RelPath::unix(".windsurfrules").unwrap(),
+ RelPath::unix(".clinerules").unwrap(),
+ RelPath::unix(".github/copilot-instructions.md").unwrap(),
+ RelPath::unix("CLAUDE.md").unwrap(),
+ RelPath::unix("AGENT.md").unwrap(),
+ RelPath::unix("AGENTS.md").unwrap(),
+ RelPath::unix("GEMINI.md").unwrap(),
+ ]
+});
+
+pub fn init(fs: Arc, cx: &mut App) {
+ ThreadsDatabase::init(fs, cx);
}
/// A system prompt shared by all threads created by this ThreadStore
@@ -231,11 +234,10 @@ impl ThreadStore {
self.enqueue_system_prompt_reload();
}
project::Event::WorktreeUpdatedEntries(_, items) => {
- if items.iter().any(|(path, _, _)| {
- RULES_FILE_NAMES
- .iter()
- .any(|name| path.as_ref() == Path::new(name))
- }) {
+ if items
+ .iter()
+ .any(|(path, _, _)| RULES_FILE_NAMES.iter().any(|name| path.as_ref() == *name))
+ {
self.enqueue_system_prompt_reload();
}
}
@@ -327,7 +329,7 @@ impl ThreadStore {
cx: &mut App,
) -> Task<(WorktreeContext, Option)> {
let tree = worktree.read(cx);
- let root_name = tree.root_name().into();
+ let root_name = tree.root_name_str().into();
let abs_path = tree.abs_path();
let mut context = WorktreeContext {
@@ -869,13 +871,13 @@ impl ThreadsDatabase {
GlobalThreadsDatabase::global(cx).0.clone()
}
- fn init(cx: &mut App) {
+ fn init(fs: Arc, cx: &mut App) {
let executor = cx.background_executor().clone();
let database_future = executor
.spawn({
let executor = executor.clone();
let threads_dir = paths::data_dir().join("threads");
- async move { ThreadsDatabase::new(threads_dir, executor) }
+ async move { ThreadsDatabase::new(fs, threads_dir, executor).await }
})
.then(|result| future::ready(result.map(Arc::new).map_err(Arc::new)))
.boxed()
@@ -884,13 +886,17 @@ impl ThreadsDatabase {
cx.set_global(GlobalThreadsDatabase(database_future));
}
- pub fn new(threads_dir: PathBuf, executor: BackgroundExecutor) -> Result {
- std::fs::create_dir_all(&threads_dir)?;
+ pub async fn new(
+ fs: Arc,
+ threads_dir: PathBuf,
+ executor: BackgroundExecutor,
+ ) -> Result {
+ fs.create_dir(&threads_dir).await?;
let sqlite_path = threads_dir.join("threads.db");
let mdb_path = threads_dir.join("threads-db.1.mdb");
- let needs_migration_from_heed = mdb_path.exists();
+ let needs_migration_from_heed = fs.is_file(&mdb_path).await;
let connection = if *ZED_STATELESS {
Connection::open_memory(Some("THREAD_FALLBACK_DB"))
@@ -932,7 +938,14 @@ impl ThreadsDatabase {
.spawn(async move {
log::info!("Starting threads.db migration");
Self::migrate_from_heed(&mdb_path, db_connection, executor_clone)?;
- std::fs::remove_dir_all(mdb_path)?;
+ fs.remove_dir(
+ &mdb_path,
+ RemoveOptions {
+ recursive: true,
+ ignore_if_not_exists: true,
+ },
+ )
+ .await?;
log::info!("threads.db migrated to sqlite");
Ok::<(), anyhow::Error>(())
})
diff --git a/crates/agent2/src/agent.rs b/crates/agent2/src/agent.rs
index d72216208769de98c6ad408fec0c17133090b79b..bf1fe8b5bb72038e197eafc842ca02e417b9e7c3 100644
--- a/crates/agent2/src/agent.rs
+++ b/crates/agent2/src/agent.rs
@@ -6,7 +6,6 @@ use crate::{HistoryStore, TerminalHandle, ThreadEnvironment, TitleUpdated, Token
use acp_thread::{AcpThread, AgentModelSelector};
use action_log::ActionLog;
use agent_client_protocol as acp;
-use agent_settings::AgentSettings;
use anyhow::{Context as _, Result, anyhow};
use collections::{HashSet, IndexMap};
use fs::Fs;
@@ -21,13 +20,14 @@ use project::{Project, ProjectItem, ProjectPath, Worktree};
use prompt_store::{
ProjectContext, PromptId, PromptStore, RulesFileContext, UserRulesContext, WorktreeContext,
};
-use settings::update_settings_file;
+use settings::{LanguageModelSelection, update_settings_file};
use std::any::Any;
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::rc::Rc;
use std::sync::Arc;
use util::ResultExt;
+use util::rel_path::RelPath;
const RULES_FILE_NAMES: [&str; 9] = [
".rules",
@@ -57,7 +57,7 @@ struct Session {
pub struct LanguageModels {
/// Access language model by ID
- models: HashMap>,
+ models: HashMap>,
/// Cached list for returning language model information
model_list: acp_thread::AgentModelList,
refresh_models_rx: watch::Receiver<()>,
@@ -133,10 +133,7 @@ impl LanguageModels {
self.refresh_models_rx.clone()
}
- pub fn model_from_id(
- &self,
- model_id: &acp_thread::AgentModelId,
- ) -> Option> {
+ pub fn model_from_id(&self, model_id: &acp::ModelId) -> Option> {
self.models.get(model_id).cloned()
}
@@ -147,12 +144,13 @@ impl LanguageModels {
acp_thread::AgentModelInfo {
id: Self::model_id(model),
name: model.name().0,
+ description: None,
icon: Some(provider.icon()),
}
}
- fn model_id(model: &Arc) -> acp_thread::AgentModelId {
- acp_thread::AgentModelId(format!("{}/{}", model.provider_id().0, model.id().0).into())
+ fn model_id(model: &Arc) -> acp::ModelId {
+ acp::ModelId(format!("{}/{}", model.provider_id().0, model.id().0).into())
}
fn authenticate_all_language_model_providers(cx: &mut App) -> Task<()> {
@@ -166,33 +164,41 @@ impl LanguageModels {
cx.background_spawn(async move {
for (provider_id, provider_name, authenticate_task) in authenticate_all_providers {
if let Err(err) = authenticate_task.await {
- if matches!(err, language_model::AuthenticateError::CredentialsNotFound) {
- // Since we're authenticating these providers in the
- // background for the purposes of populating the
- // language selector, we don't care about providers
- // where the credentials are not found.
- } else {
- // Some providers have noisy failure states that we
- // don't want to spam the logs with every time the
- // language model selector is initialized.
- //
- // Ideally these should have more clear failure modes
- // that we know are safe to ignore here, like what we do
- // with `CredentialsNotFound` above.
- match provider_id.0.as_ref() {
- "lmstudio" | "ollama" => {
- // LM Studio and Ollama both make fetch requests to the local APIs to determine if they are "authenticated".
- //
- // These fail noisily, so we don't log them.
- }
- "copilot_chat" => {
- // Copilot Chat returns an error if Copilot is not enabled, so we don't log those errors.
- }
- _ => {
- log::error!(
- "Failed to authenticate provider: {}: {err}",
- provider_name.0
- );
+ match err {
+ language_model::AuthenticateError::CredentialsNotFound => {
+ // Since we're authenticating these providers in the
+ // background for the purposes of populating the
+ // language selector, we don't care about providers
+ // where the credentials are not found.
+ }
+ language_model::AuthenticateError::ConnectionRefused => {
+ // Not logging connection refused errors as they are mostly from LM Studio's noisy auth failures.
+ // LM Studio only has one auth method (endpoint call) which fails for users who haven't enabled it.
+ // TODO: Better manage LM Studio auth logic to avoid these noisy failures.
+ }
+ _ => {
+ // Some providers have noisy failure states that we
+ // don't want to spam the logs with every time the
+ // language model selector is initialized.
+ //
+ // Ideally these should have more clear failure modes
+ // that we know are safe to ignore here, like what we do
+ // with `CredentialsNotFound` above.
+ match provider_id.0.as_ref() {
+ "lmstudio" | "ollama" => {
+ // LM Studio and Ollama both make fetch requests to the local APIs to determine if they are "authenticated".
+ //
+ // These fail noisily, so we don't log them.
+ }
+ "copilot_chat" => {
+ // Copilot Chat returns an error if Copilot is not enabled, so we don't log those errors.
+ }
+ _ => {
+ log::error!(
+ "Failed to authenticate provider: {}: {err}",
+ provider_name.0
+ );
+ }
}
}
}
@@ -429,7 +435,7 @@ impl NativeAgent {
cx: &mut App,
) -> Task<(WorktreeContext, Option)> {
let tree = worktree.read(cx);
- let root_name = tree.root_name().into();
+ let root_name = tree.root_name_str().into();
let abs_path = tree.abs_path();
let mut context = WorktreeContext {
@@ -469,7 +475,7 @@ impl NativeAgent {
.into_iter()
.filter_map(|name| {
worktree
- .entry_for_path(name)
+ .entry_for_path(RelPath::unix(name).unwrap())
.filter(|entry| entry.is_file())
.map(|entry| entry.path.clone())
})
@@ -553,7 +559,7 @@ impl NativeAgent {
if items.iter().any(|(path, _, _)| {
RULES_FILE_NAMES
.iter()
- .any(|name| path.as_ref() == Path::new(name))
+ .any(|name| path.as_ref() == RelPath::unix(name).unwrap())
}) {
self.project_context_needs_refresh.send(()).ok();
}
@@ -829,10 +835,15 @@ impl NativeAgentConnection {
}
}
-impl AgentModelSelector for NativeAgentConnection {
+struct NativeAgentModelSelector {
+ session_id: acp::SessionId,
+ connection: NativeAgentConnection,
+}
+
+impl acp_thread::AgentModelSelector for NativeAgentModelSelector {
fn list_models(&self, cx: &mut App) -> Task> {
log::debug!("NativeAgentConnection::list_models called");
- let list = self.0.read(cx).models.model_list.clone();
+ let list = self.connection.0.read(cx).models.model_list.clone();
Task::ready(if list.is_empty() {
Err(anyhow::anyhow!("No models available"))
} else {
@@ -840,24 +851,24 @@ impl AgentModelSelector for NativeAgentConnection {
})
}
- fn select_model(
- &self,
- session_id: acp::SessionId,
- model_id: acp_thread::AgentModelId,
- cx: &mut App,
- ) -> Task> {
- log::debug!("Setting model for session {}: {}", session_id, model_id);
+ fn select_model(&self, model_id: acp::ModelId, cx: &mut App) -> Task> {
+ log::debug!(
+ "Setting model for session {}: {}",
+ self.session_id,
+ model_id
+ );
let Some(thread) = self
+ .connection
.0
.read(cx)
.sessions
- .get(&session_id)
+ .get(&self.session_id)
.map(|session| session.thread.clone())
else {
return Task::ready(Err(anyhow!("Session not found")));
};
- let Some(model) = self.0.read(cx).models.model_from_id(&model_id) else {
+ let Some(model) = self.connection.0.read(cx).models.model_from_id(&model_id) else {
return Task::ready(Err(anyhow!("Invalid model ID {}", model_id)));
};
@@ -865,29 +876,32 @@ impl AgentModelSelector for NativeAgentConnection {
thread.set_model(model.clone(), cx);
});
- update_settings_file::(
- self.0.read(cx).fs.clone(),
+ update_settings_file(
+ self.connection.0.read(cx).fs.clone(),
cx,
move |settings, _cx| {
- settings.set_model(model);
+ let provider = model.provider_id().0.to_string();
+ let model = model.id().0.to_string();
+ settings
+ .agent
+ .get_or_insert_default()
+ .set_model(LanguageModelSelection {
+ provider: provider.into(),
+ model,
+ });
},
);
Task::ready(Ok(()))
}
- fn selected_model(
- &self,
- session_id: &acp::SessionId,
- cx: &mut App,
- ) -> Task> {
- let session_id = session_id.clone();
-
+ fn selected_model(&self, cx: &mut App) -> Task> {
let Some(thread) = self
+ .connection
.0
.read(cx)
.sessions
- .get(&session_id)
+ .get(&self.session_id)
.map(|session| session.thread.clone())
else {
return Task::ready(Err(anyhow!("Session not found")));
@@ -904,8 +918,8 @@ impl AgentModelSelector for NativeAgentConnection {
)))
}
- fn watch(&self, cx: &mut App) -> watch::Receiver<()> {
- self.0.read(cx).models.watch()
+ fn watch(&self, cx: &mut App) -> Option> {
+ Some(self.connection.0.read(cx).models.watch())
}
}
@@ -961,8 +975,11 @@ impl acp_thread::AgentConnection for NativeAgentConnection {
Task::ready(Ok(()))
}
- fn model_selector(&self) -> Option> {
- Some(Rc::new(self.clone()) as Rc)
+ fn model_selector(&self, session_id: &acp::SessionId) -> Option> {
+ Some(Rc::new(NativeAgentModelSelector {
+ session_id: session_id.clone(),
+ connection: self.clone(),
+ }) as Rc)
}
fn prompt(
@@ -1185,16 +1202,14 @@ mod tests {
use crate::HistoryEntryId;
use super::*;
- use acp_thread::{
- AgentConnection, AgentModelGroupName, AgentModelId, AgentModelInfo, MentionUri,
- };
+ use acp_thread::{AgentConnection, AgentModelGroupName, AgentModelInfo, MentionUri};
use fs::FakeFs;
use gpui::TestAppContext;
- use indoc::indoc;
+ use indoc::formatdoc;
use language_model::fake_provider::FakeLanguageModel;
use serde_json::json;
use settings::SettingsStore;
- use util::path;
+ use util::{path, rel_path::rel_path};
#[gpui::test]
async fn test_maintaining_project_context(cx: &mut TestAppContext) {
@@ -1244,14 +1259,17 @@ mod tests {
fs.insert_file("/a/.rules", Vec::new()).await;
cx.run_until_parked();
agent.read_with(cx, |agent, cx| {
- let rules_entry = worktree.read(cx).entry_for_path(".rules").unwrap();
+ let rules_entry = worktree
+ .read(cx)
+ .entry_for_path(rel_path(".rules"))
+ .unwrap();
assert_eq!(
agent.project_context.read(cx).worktrees,
vec![WorktreeContext {
root_name: "a".into(),
abs_path: Path::new("/a").into(),
rules_file: Some(RulesFileContext {
- path_in_worktree: Path::new(".rules").into(),
+ path_in_worktree: rel_path(".rules").into(),
text: "".into(),
project_entry_id: rules_entry.id.to_usize()
})
@@ -1281,7 +1299,25 @@ mod tests {
.unwrap(),
);
- let models = cx.update(|cx| connection.list_models(cx)).await.unwrap();
+ // Create a thread/session
+ let acp_thread = cx
+ .update(|cx| {
+ Rc::new(connection.clone()).new_thread(project.clone(), Path::new("/a"), cx)
+ })
+ .await
+ .unwrap();
+
+ let session_id = cx.update(|cx| acp_thread.read(cx).session_id().clone());
+
+ let models = cx
+ .update(|cx| {
+ connection
+ .model_selector(&session_id)
+ .unwrap()
+ .list_models(cx)
+ })
+ .await
+ .unwrap();
let acp_thread::AgentModelList::Grouped(models) = models else {
panic!("Unexpected model group");
@@ -1291,8 +1327,9 @@ mod tests {
IndexMap::from_iter([(
AgentModelGroupName("Fake".into()),
vec![AgentModelInfo {
- id: AgentModelId("fake/fake".into()),
+ id: acp::ModelId("fake/fake".into()),
name: "Fake".into(),
+ description: None,
icon: Some(ui::IconName::ZedAssistant),
}]
)])
@@ -1349,8 +1386,9 @@ mod tests {
let session_id = cx.update(|cx| acp_thread.read(cx).session_id().clone());
// Select a model
- let model_id = AgentModelId("fake/fake".into());
- cx.update(|cx| connection.select_model(session_id.clone(), model_id.clone(), cx))
+ let selector = connection.model_selector(&session_id).unwrap();
+ let model_id = acp::ModelId("fake/fake".into());
+ cx.update(|cx| selector.select_model(model_id.clone(), cx))
.await
.unwrap();
@@ -1380,7 +1418,6 @@ mod tests {
}
#[gpui::test]
- #[cfg_attr(target_os = "windows", ignore)] // TODO: Fix this test on Windows
async fn test_save_load_thread(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.executor());
@@ -1460,17 +1497,22 @@ mod tests {
model.send_last_completion_stream_text_chunk("Lorem.");
model.end_last_completion_stream();
cx.run_until_parked();
- summary_model.send_last_completion_stream_text_chunk("Explaining /a/b.md");
+ summary_model
+ .send_last_completion_stream_text_chunk(&format!("Explaining {}", path!("/a/b.md")));
summary_model.end_last_completion_stream();
send.await.unwrap();
+ let uri = MentionUri::File {
+ abs_path: path!("/a/b.md").into(),
+ }
+ .to_uri();
acp_thread.read_with(cx, |thread, cx| {
assert_eq!(
thread.to_markdown(cx),
- indoc! {"
+ formatdoc! {"
## User
- What does [@b.md](file:///a/b.md) mean?
+ What does [@b.md]({uri}) mean?
## Assistant
@@ -1496,7 +1538,7 @@ mod tests {
history_entries(&history_store, cx),
vec![(
HistoryEntryId::AcpThread(session_id.clone()),
- "Explaining /a/b.md".into()
+ format!("Explaining {}", path!("/a/b.md"))
)]
);
let acp_thread = agent
@@ -1506,10 +1548,10 @@ mod tests {
acp_thread.read_with(cx, |thread, cx| {
assert_eq!(
thread.to_markdown(cx),
- indoc! {"
+ formatdoc! {"
## User
- What does [@b.md](file:///a/b.md) mean?
+ What does [@b.md]({uri}) mean?
## Assistant
diff --git a/crates/agent2/src/db.rs b/crates/agent2/src/db.rs
index 3be37bbb55a9b6820b59245ba05143e3432ab397..563ccdd7ca5b2c2cc63a8c7f30c59b9443f8a0bd 100644
--- a/crates/agent2/src/db.rs
+++ b/crates/agent2/src/db.rs
@@ -422,17 +422,15 @@ mod tests {
use agent::MessageSegment;
use agent::context::LoadedContext;
use client::Client;
- use fs::FakeFs;
+ use fs::{FakeFs, Fs};
use gpui::AppContext;
use gpui::TestAppContext;
use http_client::FakeHttpClient;
use language_model::Role;
use project::Project;
- use serde_json::json;
use settings::SettingsStore;
- use util::test::TempTree;
- fn init_test(cx: &mut TestAppContext) {
+ fn init_test(fs: Arc, cx: &mut TestAppContext) {
env_logger::try_init().ok();
cx.update(|cx| {
let settings_store = SettingsStore::test(cx);
@@ -443,7 +441,7 @@ mod tests {
let http_client = FakeHttpClient::with_404_response();
let clock = Arc::new(clock::FakeSystemClock::new());
let client = Client::new(clock, http_client, cx);
- agent::init(cx);
+ agent::init(fs, cx);
agent_settings::init(cx);
language_model::init(client, cx);
});
@@ -451,10 +449,8 @@ mod tests {
#[gpui::test]
async fn test_retrieving_old_thread(cx: &mut TestAppContext) {
- let tree = TempTree::new(json!({}));
- util::paths::set_home_dir(tree.path().into());
- init_test(cx);
let fs = FakeFs::new(cx.executor());
+ init_test(fs.clone(), cx);
let project = Project::test(fs, [], cx).await;
// Save a thread using the old agent.
diff --git a/crates/agent2/src/history_store.rs b/crates/agent2/src/history_store.rs
index c656456e01780505c355c878c26d2405286e56b2..ff6caacc78e5dba4ee38f160fa6ded7fcb45a845 100644
--- a/crates/agent2/src/history_store.rs
+++ b/crates/agent2/src/history_store.rs
@@ -262,7 +262,7 @@ impl HistoryStore {
.iter()
.filter_map(|entry| match entry {
HistoryEntryId::TextThread(path) => path.file_name().map(|file| {
- SerializedRecentOpen::TextThread(file.to_string_lossy().to_string())
+ SerializedRecentOpen::TextThread(file.to_string_lossy().into_owned())
}),
HistoryEntryId::AcpThread(id) => {
Some(SerializedRecentOpen::AcpThread(id.to_string()))
diff --git a/crates/agent2/src/templates/system_prompt.hbs b/crates/agent2/src/templates/system_prompt.hbs
index a9f67460d81e79f03d0a0a9b60cd4d6c32fc3b20..ca324fad7acccb3e50f1140c8f99d52319d159d4 100644
--- a/crates/agent2/src/templates/system_prompt.hbs
+++ b/crates/agent2/src/templates/system_prompt.hbs
@@ -48,16 +48,15 @@ The one exception to this is if the user references something you don't know abo
## Code Block Formatting
Whenever you mention a code block, you MUST use ONLY use the following format:
+
```path/to/Something.blah#L123-456
(code goes here)
```
-The `#L123-456` means the line number range 123 through 456, and the path/to/Something.blah
-is a path in the project. (If there is no valid path in the project, then you can use
-/dev/null/path.extension for its path.) This is the ONLY valid way to format code blocks, because the Markdown parser
-does not understand the more common ```language syntax, or bare ``` blocks. It only
-understands this path-based syntax, and if the path is missing, then it will error and you will have to do it over again.
+
+The `#L123-456` means the line number range 123 through 456, and the path/to/Something.blah is a path in the project. (If there is no valid path in the project, then you can use /dev/null/path.extension for its path.) This is the ONLY valid way to format code blocks, because the Markdown parser does not understand the more common ```language syntax, or bare ``` blocks. It only understands this path-based syntax, and if the path is missing, then it will error and you will have to do it over again.
Just to be really clear about this, if you ever find yourself writing three backticks followed by a language name, STOP!
You have made a mistake. You can only ever put paths after triple backticks!
+
Based on all the information I've gathered, here's a summary of how this system works:
1. The README file is loaded into the system.
@@ -74,6 +73,7 @@ This is the last header in the README.
```
4. Finally, it passes this information on to the next process.
+
In Markdown, hash marks signify headings. For example:
```/dev/null/example.md#L1-3
@@ -82,6 +82,7 @@ In Markdown, hash marks signify headings. For example:
### Level 3 heading
```
+
Here are examples of ways you must never render code blocks:
In Markdown, hash marks signify headings. For example:
@@ -91,7 +92,9 @@ In Markdown, hash marks signify headings. For example:
### Level 3 heading
```
+
This example is unacceptable because it does not include the path.
+
In Markdown, hash marks signify headings. For example:
```markdown
@@ -101,14 +104,15 @@ In Markdown, hash marks signify headings. For example:
```
This example is unacceptable because it has the language instead of the path.
+
In Markdown, hash marks signify headings. For example:
# Level 1 heading
## Level 2 heading
### Level 3 heading
-This example is unacceptable because it uses indentation to mark the code block
-instead of backticks with a path.
+This example is unacceptable because it uses indentation to mark the code block instead of backticks with a path.
+
In Markdown, hash marks signify headings. For example:
```markdown
diff --git a/crates/agent2/src/tests/mod.rs b/crates/agent2/src/tests/mod.rs
index c0f693afe6dc0decdce4447471191bd78cf345f1..2e63aa5856501f880fec94f7659b13be321b03b3 100644
--- a/crates/agent2/src/tests/mod.rs
+++ b/crates/agent2/src/tests/mod.rs
@@ -1850,8 +1850,18 @@ async fn test_agent_connection(cx: &mut TestAppContext) {
.unwrap();
let connection = NativeAgentConnection(agent.clone());
+ // Create a thread using new_thread
+ let connection_rc = Rc::new(connection.clone());
+ let acp_thread = cx
+ .update(|cx| connection_rc.new_thread(project, cwd, cx))
+ .await
+ .expect("new_thread should succeed");
+
+ // Get the session_id from the AcpThread
+ let session_id = acp_thread.read_with(cx, |thread, _| thread.session_id().clone());
+
// Test model_selector returns Some
- let selector_opt = connection.model_selector();
+ let selector_opt = connection.model_selector(&session_id);
assert!(
selector_opt.is_some(),
"agent2 should always support ModelSelector"
@@ -1868,23 +1878,16 @@ async fn test_agent_connection(cx: &mut TestAppContext) {
};
assert!(!listed_models.is_empty(), "should have at least one model");
assert_eq!(
- listed_models[&AgentModelGroupName("Fake".into())][0].id.0,
+ listed_models[&AgentModelGroupName("Fake".into())][0]
+ .id
+ .0
+ .as_ref(),
"fake/fake"
);
- // Create a thread using new_thread
- let connection_rc = Rc::new(connection.clone());
- let acp_thread = cx
- .update(|cx| connection_rc.new_thread(project, cwd, cx))
- .await
- .expect("new_thread should succeed");
-
- // Get the session_id from the AcpThread
- let session_id = acp_thread.read_with(cx, |thread, _| thread.session_id().clone());
-
// Test selected_model returns the default
let model = cx
- .update(|cx| selector.selected_model(&session_id, cx))
+ .update(|cx| selector.selected_model(cx))
.await
.expect("selected_model should succeed");
let model = cx
diff --git a/crates/agent2/src/thread.rs b/crates/agent2/src/thread.rs
index b19d34adafe4a7b6567be9a1864b88ea2504bf12..756b868dcfc26239911d6e5c0cd8ad984cd7dc4e 100644
--- a/crates/agent2/src/thread.rs
+++ b/crates/agent2/src/thread.rs
@@ -15,10 +15,11 @@ use agent_settings::{
use anyhow::{Context as _, Result, anyhow};
use assistant_tool::adapt_schema_to_format;
use chrono::{DateTime, Utc};
-use client::{ModelRequestUsage, RequestUsage};
-use cloud_llm_client::{CompletionIntent, CompletionRequestStatus, UsageLimit};
+use client::{ModelRequestUsage, RequestUsage, UserStore};
+use cloud_llm_client::{CompletionIntent, CompletionRequestStatus, Plan, UsageLimit};
use collections::{HashMap, HashSet, IndexMap};
use fs::Fs;
+use futures::stream;
use futures::{
FutureExt,
channel::{mpsc, oneshot},
@@ -34,7 +35,7 @@ use language_model::{
LanguageModelImage, LanguageModelProviderId, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, LanguageModelRequestTool, LanguageModelToolResult,
LanguageModelToolResultContent, LanguageModelToolSchemaFormat, LanguageModelToolUse,
- LanguageModelToolUseId, Role, SelectedModel, StopReason, TokenUsage,
+ LanguageModelToolUseId, Role, SelectedModel, StopReason, TokenUsage, ZED_CLOUD_PROVIDER_ID,
};
use project::{
Project,
@@ -585,6 +586,7 @@ pub struct Thread {
pending_title_generation: Option>,
summary: Option,
messages: Vec,
+ user_store: Entity,
completion_mode: CompletionMode,
/// Holds the task that handles agent interaction until the end of the turn.
/// Survives across multiple requests as the model performs tool calls and
@@ -641,6 +643,7 @@ impl Thread {
pending_title_generation: None,
summary: None,
messages: Vec::new(),
+ user_store: project.read(cx).user_store(),
completion_mode: AgentSettings::get_global(cx).preferred_completion_mode,
running_turn: None,
pending_message: None,
@@ -820,6 +823,7 @@ impl Thread {
pending_title_generation: None,
summary: db_thread.detailed_summary,
messages: db_thread.messages,
+ user_store: project.read(cx).user_store(),
completion_mode: db_thread.completion_mode.unwrap_or_default(),
running_turn: None,
pending_message: None,
@@ -879,27 +883,11 @@ impl Thread {
.map(|worktree| Self::worktree_snapshot(worktree, git_store.clone(), cx))
.collect();
- cx.spawn(async move |_, cx| {
+ cx.spawn(async move |_, _| {
let worktree_snapshots = futures::future::join_all(worktree_snapshots).await;
- let mut unsaved_buffers = Vec::new();
- cx.update(|app_cx| {
- let buffer_store = project.read(app_cx).buffer_store();
- for buffer_handle in buffer_store.read(app_cx).buffers() {
- let buffer = buffer_handle.read(app_cx);
- if buffer.is_dirty()
- && let Some(file) = buffer.file()
- {
- let path = file.path().to_string_lossy().to_string();
- unsaved_buffers.push(path);
- }
- }
- })
- .ok();
-
Arc::new(ProjectSnapshot {
worktree_snapshots,
- unsaved_buffer_paths: unsaved_buffers,
timestamp: Utc::now(),
})
})
@@ -914,7 +902,7 @@ impl Thread {
// Get worktree path and snapshot
let worktree_info = cx.update(|app_cx| {
let worktree = worktree.read(app_cx);
- let path = worktree.abs_path().to_string_lossy().to_string();
+ let path = worktree.abs_path().to_string_lossy().into_owned();
let snapshot = worktree.snapshot();
(path, snapshot)
});
@@ -1265,12 +1253,12 @@ impl Thread {
);
log::debug!("Calling model.stream_completion, attempt {}", attempt);
- let mut events = model
- .stream_completion(request, cx)
- .await
- .map_err(|error| anyhow!(error))?;
+
+ let (mut events, mut error) = match model.stream_completion(request, cx).await {
+ Ok(events) => (events, None),
+ Err(err) => (stream::empty().boxed(), Some(err)),
+ };
let mut tool_results = FuturesUnordered::new();
- let mut error = None;
while let Some(event) = events.next().await {
log::trace!("Received completion event: {:?}", event);
match event {
@@ -1318,8 +1306,10 @@ impl Thread {
if let Some(error) = error {
attempt += 1;
- let retry =
- this.update(cx, |this, _| this.handle_completion_error(error, attempt))??;
+ let retry = this.update(cx, |this, cx| {
+ let user_store = this.user_store.read(cx);
+ this.handle_completion_error(error, attempt, user_store.plan())
+ })??;
let timer = cx.background_executor().timer(retry.duration);
event_stream.send_retry(retry);
timer.await;
@@ -1346,8 +1336,23 @@ impl Thread {
&mut self,
error: LanguageModelCompletionError,
attempt: u8,
+ plan: Option,
) -> Result {
- if self.completion_mode == CompletionMode::Normal {
+ let Some(model) = self.model.as_ref() else {
+ return Err(anyhow!(error));
+ };
+
+ let auto_retry = if model.provider_id() == ZED_CLOUD_PROVIDER_ID {
+ match plan {
+ Some(Plan::V2(_)) => true,
+ Some(Plan::V1(_)) => self.completion_mode == CompletionMode::Burn,
+ None => false,
+ }
+ } else {
+ true
+ };
+
+ if !auto_retry {
return Err(anyhow!(error));
}
@@ -2477,8 +2482,11 @@ impl ToolCallEventStream {
"always_allow" => {
if let Some(fs) = fs.clone() {
cx.update(|cx| {
- update_settings_file::(fs, cx, |settings, _| {
- settings.set_always_allow_tool_actions(true);
+ update_settings_file(fs, cx, |settings, _| {
+ settings
+ .agent
+ .get_or_insert_default()
+ .set_always_allow_tool_actions(true);
});
})?;
}
diff --git a/crates/agent2/src/tools/copy_path_tool.rs b/crates/agent2/src/tools/copy_path_tool.rs
index 8fcd80391f828c7503701a86e9e1b400115763d6..236978c78f0c2fee7ecf611486349bab094b3cec 100644
--- a/crates/agent2/src/tools/copy_path_tool.rs
+++ b/crates/agent2/src/tools/copy_path_tool.rs
@@ -9,14 +9,14 @@ use std::sync::Arc;
use util::markdown::MarkdownInlineCode;
/// Copies a file or directory in the project, and returns confirmation that the copy succeeded.
-/// Directory contents will be copied recursively (like `cp -r`).
+/// Directory contents will be copied recursively.
///
/// This tool should be used when it's desirable to create a copy of a file or directory without modifying the original.
/// It's much more efficient than doing this by separately reading and then writing the file or directory's contents, so this tool should be preferred over that approach whenever copying is the goal.
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct CopyPathToolInput {
/// The source path of the file or directory to copy.
- /// If a directory is specified, its contents will be copied recursively (like `cp -r`).
+ /// If a directory is specified, its contents will be copied recursively.
///
///
/// If the project has the following files:
@@ -84,9 +84,7 @@ impl AgentTool for CopyPathTool {
.and_then(|project_path| project.entry_for_path(&project_path, cx))
{
Some(entity) => match project.find_project_path(&input.destination_path, cx) {
- Some(project_path) => {
- project.copy_entry(entity.id, None, project_path.path, cx)
- }
+ Some(project_path) => project.copy_entry(entity.id, project_path, cx),
None => Task::ready(Err(anyhow!(
"Destination path {} was outside the project.",
input.destination_path
diff --git a/crates/agent2/src/tools/create_directory_tool.rs b/crates/agent2/src/tools/create_directory_tool.rs
index 30bd6418db35182358ed6139a9078e40a29dfac5..b6240e99cf4dd6698bf9f46edd8d4681247d8f64 100644
--- a/crates/agent2/src/tools/create_directory_tool.rs
+++ b/crates/agent2/src/tools/create_directory_tool.rs
@@ -11,7 +11,7 @@ use crate::{AgentTool, ToolCallEventStream};
/// Creates a new directory at the specified path within the project. Returns confirmation that the directory was created.
///
-/// This tool creates a directory and all necessary parent directories (similar to `mkdir -p`). It should be used whenever you need to create new directories within the project.
+/// This tool creates a directory and all necessary parent directories. It should be used whenever you need to create new directories within the project.
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct CreateDirectoryToolInput {
/// The path of the new directory.
diff --git a/crates/agent2/src/tools/diagnostics_tool.rs b/crates/agent2/src/tools/diagnostics_tool.rs
index a38e317d43cb16d8ee652f1a5f7aabd8b1ce4c8f..f07ec4cfe6903ec454eb39a7afc7748327e026ec 100644
--- a/crates/agent2/src/tools/diagnostics_tool.rs
+++ b/crates/agent2/src/tools/diagnostics_tool.rs
@@ -6,7 +6,7 @@ use language::{DiagnosticSeverity, OffsetRangeExt};
use project::Project;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
-use std::{fmt::Write, path::Path, sync::Arc};
+use std::{fmt::Write, sync::Arc};
use ui::SharedString;
use util::markdown::MarkdownInlineCode;
@@ -147,9 +147,7 @@ impl AgentTool for DiagnosticsTool {
has_diagnostics = true;
output.push_str(&format!(
"{}: {} error(s), {} warning(s)\n",
- Path::new(worktree.read(cx).root_name())
- .join(project_path.path)
- .display(),
+ worktree.read(cx).absolutize(&project_path.path).display(),
summary.error_count,
summary.warning_count
));
diff --git a/crates/agent2/src/tools/edit_file_tool.rs b/crates/agent2/src/tools/edit_file_tool.rs
index 1e725b8f59d1219a0761334c5364940ee0e8bf6a..7c51df0fae274e2d5906aa73e70c30105b1a2353 100644
--- a/crates/agent2/src/tools/edit_file_tool.rs
+++ b/crates/agent2/src/tools/edit_file_tool.rs
@@ -17,10 +17,12 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::Settings;
use smol::stream::StreamExt as _;
+use std::ffi::OsStr;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use ui::SharedString;
use util::ResultExt;
+use util::rel_path::RelPath;
const DEFAULT_UI_TEXT: &str = "Editing file";
@@ -148,12 +150,11 @@ impl EditFileTool {
// If any path component matches the local settings folder, then this could affect
// the editor in ways beyond the project source, so prompt.
- let local_settings_folder = paths::local_settings_folder_relative_path();
+ let local_settings_folder = paths::local_settings_folder_name();
let path = Path::new(&input.path);
- if path
- .components()
- .any(|component| component.as_os_str() == local_settings_folder.as_os_str())
- {
+ if path.components().any(|component| {
+ component.as_os_str() == <_ as AsRef>::as_ref(&local_settings_folder)
+ }) {
return event_stream.authorize(
format!("{} (local settings)", input.display_description),
cx,
@@ -162,6 +163,7 @@ impl EditFileTool {
// It's also possible that the global config dir is configured to be inside the project,
// so check for that edge case too.
+ // TODO this is broken when remoting
if let Ok(canonical_path) = std::fs::canonicalize(&input.path)
&& canonical_path.starts_with(paths::config_dir())
{
@@ -216,9 +218,7 @@ impl AgentTool for EditFileTool {
.read(cx)
.short_full_path_for_project_path(&project_path, cx)
})
- .unwrap_or(Path::new(&input.path).into())
- .to_string_lossy()
- .to_string()
+ .unwrap_or(input.path.to_string_lossy().into_owned())
.into(),
Err(raw_input) => {
if let Some(input) =
@@ -235,9 +235,7 @@ impl AgentTool for EditFileTool {
.read(cx)
.short_full_path_for_project_path(&project_path, cx)
})
- .unwrap_or(Path::new(&input.path).into())
- .to_string_lossy()
- .to_string()
+ .unwrap_or(input.path)
.into();
}
@@ -478,7 +476,7 @@ impl AgentTool for EditFileTool {
) -> Result<()> {
event_stream.update_diff(cx.new(|cx| {
Diff::finalized(
- output.input_path,
+ output.input_path.to_string_lossy().into_owned(),
Some(output.old_text.to_string()),
output.new_text,
self.language_registry.clone(),
@@ -542,10 +540,12 @@ fn resolve_path(
let file_name = input
.path
.file_name()
+ .and_then(|file_name| file_name.to_str())
+ .and_then(|file_name| RelPath::unix(file_name).ok())
.context("Can't create file: invalid filename")?;
let new_file_path = parent_project_path.map(|parent| ProjectPath {
- path: Arc::from(parent.path.join(file_name)),
+ path: parent.path.join(file_name),
..parent
});
@@ -565,7 +565,7 @@ mod tests {
use prompt_store::ProjectContext;
use serde_json::json;
use settings::SettingsStore;
- use util::path;
+ use util::{path, rel_path::rel_path};
#[gpui::test]
async fn test_edit_nonexistent_file(cx: &mut TestAppContext) {
@@ -614,13 +614,13 @@ mod tests {
let mode = &EditFileMode::Create;
let result = test_resolve_path(mode, "root/new.txt", cx);
- assert_resolved_path_eq(result.await, "new.txt");
+ assert_resolved_path_eq(result.await, rel_path("new.txt"));
let result = test_resolve_path(mode, "new.txt", cx);
- assert_resolved_path_eq(result.await, "new.txt");
+ assert_resolved_path_eq(result.await, rel_path("new.txt"));
let result = test_resolve_path(mode, "dir/new.txt", cx);
- assert_resolved_path_eq(result.await, "dir/new.txt");
+ assert_resolved_path_eq(result.await, rel_path("dir/new.txt"));
let result = test_resolve_path(mode, "root/dir/subdir/existing.txt", cx);
assert_eq!(
@@ -642,10 +642,10 @@ mod tests {
let path_with_root = "root/dir/subdir/existing.txt";
let path_without_root = "dir/subdir/existing.txt";
let result = test_resolve_path(mode, path_with_root, cx);
- assert_resolved_path_eq(result.await, path_without_root);
+ assert_resolved_path_eq(result.await, rel_path(path_without_root));
let result = test_resolve_path(mode, path_without_root, cx);
- assert_resolved_path_eq(result.await, path_without_root);
+ assert_resolved_path_eq(result.await, rel_path(path_without_root));
let result = test_resolve_path(mode, "root/nonexistent.txt", cx);
assert_eq!(
@@ -690,14 +690,10 @@ mod tests {
cx.update(|cx| resolve_path(&input, project, cx))
}
- fn assert_resolved_path_eq(path: anyhow::Result, expected: &str) {
- let actual = path
- .expect("Should return valid path")
- .path
- .to_str()
- .unwrap()
- .replace("\\", "/"); // Naive Windows paths normalization
- assert_eq!(actual, expected);
+ #[track_caller]
+ fn assert_resolved_path_eq(path: anyhow::Result, expected: &RelPath) {
+ let actual = path.expect("Should return valid path").path;
+ assert_eq!(actual.as_ref(), expected);
}
#[gpui::test]
@@ -791,14 +787,11 @@ mod tests {
// First, test with format_on_save enabled
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(
- cx,
- |settings| {
- settings.defaults.format_on_save = Some(FormatOnSave::On);
- settings.defaults.formatter =
- Some(language::language_settings::SelectedFormatter::Auto);
- },
- );
+ store.update_user_settings(cx, |settings| {
+ settings.project.all_languages.defaults.format_on_save = Some(FormatOnSave::On);
+ settings.project.all_languages.defaults.formatter =
+ Some(language::language_settings::SelectedFormatter::Auto);
+ });
});
});
@@ -853,12 +846,10 @@ mod tests {
// Next, test with format_on_save disabled
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(
- cx,
- |settings| {
- settings.defaults.format_on_save = Some(FormatOnSave::Off);
- },
- );
+ store.update_user_settings(cx, |settings| {
+ settings.project.all_languages.defaults.format_on_save =
+ Some(FormatOnSave::Off);
+ });
});
});
@@ -935,12 +926,13 @@ mod tests {
// First, test with remove_trailing_whitespace_on_save enabled
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(
- cx,
- |settings| {
- settings.defaults.remove_trailing_whitespace_on_save = Some(true);
- },
- );
+ store.update_user_settings(cx, |settings| {
+ settings
+ .project
+ .all_languages
+ .defaults
+ .remove_trailing_whitespace_on_save = Some(true);
+ });
});
});
@@ -991,12 +983,13 @@ mod tests {
// Next, test with remove_trailing_whitespace_on_save disabled
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(
- cx,
- |settings| {
- settings.defaults.remove_trailing_whitespace_on_save = Some(false);
- },
- );
+ store.update_user_settings(cx, |settings| {
+ settings
+ .project
+ .all_languages
+ .defaults
+ .remove_trailing_whitespace_on_save = Some(false);
+ });
});
});
@@ -1411,8 +1404,8 @@ mod tests {
// Parent directory references - find_project_path resolves these
(
"project/../other",
- false,
- "Path with .. is resolved by find_project_path",
+ true,
+ "Path with .. that goes outside of root directory",
),
(
"project/./src/file.rs",
@@ -1440,16 +1433,18 @@ mod tests {
)
});
+ cx.run_until_parked();
+
if should_confirm {
stream_rx.expect_authorization().await;
} else {
- auth.await.unwrap();
assert!(
stream_rx.try_next().is_err(),
"Failed for case: {} - path: {} - expected no confirmation but got one",
description,
path
);
+ auth.await.unwrap();
}
}
}
diff --git a/crates/agent2/src/tools/find_path_tool.rs b/crates/agent2/src/tools/find_path_tool.rs
index b8b60f79f4cf9808a730b0c6428885b23b32d998..59f203cec98a17fda9e46f6fc222f3157d125060 100644
--- a/crates/agent2/src/tools/find_path_tool.rs
+++ b/crates/agent2/src/tools/find_path_tool.rs
@@ -156,10 +156,14 @@ impl AgentTool for FindPathTool {
}
fn search_paths(glob: &str, project: Entity, cx: &mut App) -> Task>> {
- let path_matcher = match PathMatcher::new([
- // Sometimes models try to search for "". In this case, return all paths in the project.
- if glob.is_empty() { "*" } else { glob },
- ]) {
+ let path_style = project.read(cx).path_style(cx);
+ let path_matcher = match PathMatcher::new(
+ [
+ // Sometimes models try to search for "". In this case, return all paths in the project.
+ if glob.is_empty() { "*" } else { glob },
+ ],
+ path_style,
+ ) {
Ok(matcher) => matcher,
Err(err) => return Task::ready(Err(anyhow!("Invalid glob: {err}"))),
};
@@ -173,9 +177,8 @@ fn search_paths(glob: &str, project: Entity, cx: &mut App) -> Task>(),
+ path_style,
) {
Ok(matcher) => matcher,
Err(error) => {
@@ -132,7 +135,7 @@ impl AgentTool for GrepTool {
.iter()
.chain(global_settings.private_files.sources().iter());
- match PathMatcher::new(exclude_patterns) {
+ match PathMatcher::new(exclude_patterns, path_style) {
Ok(matcher) => matcher,
Err(error) => {
return Task::ready(Err(anyhow!("invalid exclude pattern: {error}")));
@@ -308,7 +311,7 @@ mod tests {
use super::*;
use gpui::{TestAppContext, UpdateGlobal};
use language::{Language, LanguageConfig, LanguageMatcher};
- use project::{FakeFs, Project, WorktreeSettings};
+ use project::{FakeFs, Project};
use serde_json::json;
use settings::SettingsStore;
use unindent::Unindent;
@@ -827,19 +830,21 @@ mod tests {
cx.update(|cx| {
use gpui::UpdateGlobal;
- use project::WorktreeSettings;
use settings::SettingsStore;
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions = Some(vec![
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions = Some(vec![
"**/.secretdir".to_string(),
"**/.mymetadata".to_string(),
]);
- settings.private_files = Some(vec![
- "**/.mysecrets".to_string(),
- "**/*.privatekey".to_string(),
- "**/*.mysensitive".to_string(),
- ]);
+ settings.project.worktree.private_files = Some(
+ vec![
+ "**/.mysecrets".to_string(),
+ "**/*.privatekey".to_string(),
+ "**/*.mysensitive".to_string(),
+ ]
+ .into(),
+ );
});
});
});
@@ -1062,10 +1067,11 @@ mod tests {
// Set global settings
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions =
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions =
Some(vec!["**/.git".to_string(), "**/node_modules".to_string()]);
- settings.private_files = Some(vec!["**/.env".to_string()]);
+ settings.project.worktree.private_files =
+ Some(vec!["**/.env".to_string()].into());
});
});
});
diff --git a/crates/agent2/src/tools/list_directory_tool.rs b/crates/agent2/src/tools/list_directory_tool.rs
index 0fbe23fe205e6a9bd5a77e737460c17b997f9175..cd8b46ddebc2d9ffb953f8aabef10c30a33dde37 100644
--- a/crates/agent2/src/tools/list_directory_tool.rs
+++ b/crates/agent2/src/tools/list_directory_tool.rs
@@ -2,12 +2,12 @@ use crate::{AgentTool, ToolCallEventStream};
use agent_client_protocol::ToolKind;
use anyhow::{Result, anyhow};
use gpui::{App, Entity, SharedString, Task};
-use project::{Project, WorktreeSettings};
+use project::{Project, ProjectPath, WorktreeSettings};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::Settings;
use std::fmt::Write;
-use std::{path::Path, sync::Arc};
+use std::sync::Arc;
use util::markdown::MarkdownInlineCode;
/// Lists files and directories in a given path. Prefer the `grep` or `find_path` tools when searching the codebase.
@@ -86,13 +86,13 @@ impl AgentTool for ListDirectoryTool {
.read(cx)
.worktrees(cx)
.filter_map(|worktree| {
- worktree.read(cx).root_entry().and_then(|entry| {
- if entry.is_dir() {
- entry.path.to_str()
- } else {
- None
- }
- })
+ let worktree = worktree.read(cx);
+ let root_entry = worktree.root_entry()?;
+ if root_entry.is_dir() {
+ Some(root_entry.path.display(worktree.path_style()))
+ } else {
+ None
+ }
})
.collect::>()
.join("\n");
@@ -143,7 +143,7 @@ impl AgentTool for ListDirectoryTool {
}
let worktree_snapshot = worktree.read(cx).snapshot();
- let worktree_root_name = worktree.read(cx).root_name().to_string();
+ let worktree_root_name = worktree.read(cx).root_name();
let Some(entry) = worktree_snapshot.entry_for_path(&project_path.path) else {
return Task::ready(Err(anyhow!("Path not found: {}", input.path)));
@@ -165,25 +165,17 @@ impl AgentTool for ListDirectoryTool {
continue;
}
- if self
- .project
- .read(cx)
- .find_project_path(&entry.path, cx)
- .map(|project_path| {
- let worktree_settings = WorktreeSettings::get(Some((&project_path).into()), cx);
-
- worktree_settings.is_path_excluded(&project_path.path)
- || worktree_settings.is_path_private(&project_path.path)
- })
- .unwrap_or(false)
+ let project_path: ProjectPath = (worktree_snapshot.id(), entry.path.clone()).into();
+ if worktree_settings.is_path_excluded(&project_path.path)
+ || worktree_settings.is_path_private(&project_path.path)
{
continue;
}
- let full_path = Path::new(&worktree_root_name)
+ let full_path = worktree_root_name
.join(&entry.path)
- .display()
- .to_string();
+ .display(worktree_snapshot.path_style())
+ .into_owned();
if entry.is_dir() {
folders.push(full_path);
} else {
@@ -214,7 +206,7 @@ mod tests {
use super::*;
use gpui::{TestAppContext, UpdateGlobal};
use indoc::indoc;
- use project::{FakeFs, Project, WorktreeSettings};
+ use project::{FakeFs, Project};
use serde_json::json;
use settings::SettingsStore;
use util::path;
@@ -421,17 +413,20 @@ mod tests {
// Configure settings explicitly
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions = Some(vec![
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions = Some(vec![
"**/.secretdir".to_string(),
"**/.mymetadata".to_string(),
"**/.hidden_subdir".to_string(),
]);
- settings.private_files = Some(vec![
- "**/.mysecrets".to_string(),
- "**/*.privatekey".to_string(),
- "**/*.mysensitive".to_string(),
- ]);
+ settings.project.worktree.private_files = Some(
+ vec![
+ "**/.mysecrets".to_string(),
+ "**/*.privatekey".to_string(),
+ "**/*.mysensitive".to_string(),
+ ]
+ .into(),
+ );
});
});
});
@@ -565,10 +560,11 @@ mod tests {
// Set global settings
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions =
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions =
Some(vec!["**/.git".to_string(), "**/node_modules".to_string()]);
- settings.private_files = Some(vec!["**/.env".to_string()]);
+ settings.project.worktree.private_files =
+ Some(vec!["**/.env".to_string()].into());
});
});
});
diff --git a/crates/agent2/src/tools/move_path_tool.rs b/crates/agent2/src/tools/move_path_tool.rs
index 91880c1243e0aa48569ab8e6981ddd45b41ab411..ae58145126f6356beaa1457d719812bb56d6e7db 100644
--- a/crates/agent2/src/tools/move_path_tool.rs
+++ b/crates/agent2/src/tools/move_path_tool.rs
@@ -98,7 +98,7 @@ impl AgentTool for MovePathTool {
.and_then(|project_path| project.entry_for_path(&project_path, cx))
{
Some(entity) => match project.find_project_path(&input.destination_path, cx) {
- Some(project_path) => project.rename_entry(entity.id, project_path.path, cx),
+ Some(project_path) => project.rename_entry(entity.id, project_path, cx),
None => Task::ready(Err(anyhow!(
"Destination path {} was outside the project.",
input.destination_path
diff --git a/crates/agent2/src/tools/open_tool.rs b/crates/agent2/src/tools/open_tool.rs
index 595a9f380b752635f97ef5d1819a1140c1db8be0..b98ae9af3bd98cd44bc9348e72519ceea53c6292 100644
--- a/crates/agent2/src/tools/open_tool.rs
+++ b/crates/agent2/src/tools/open_tool.rs
@@ -104,7 +104,7 @@ mod tests {
async fn test_to_absolute_path(cx: &mut TestAppContext) {
init_test(cx);
let temp_dir = TempDir::new().expect("Failed to create temp directory");
- let temp_path = temp_dir.path().to_string_lossy().to_string();
+ let temp_path = temp_dir.path().to_string_lossy().into_owned();
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
diff --git a/crates/agent2/src/tools/read_file_tool.rs b/crates/agent2/src/tools/read_file_tool.rs
index 87163e769c26b0cee053fcf149d047fc451c470f..ce8dcba10236aa194e8b30d3fe6855d8c5fa5148 100644
--- a/crates/agent2/src/tools/read_file_tool.rs
+++ b/crates/agent2/src/tools/read_file_tool.rs
@@ -82,12 +82,12 @@ impl AgentTool for ReadFileTool {
{
match (input.start_line, input.end_line) {
(Some(start), Some(end)) => {
- format!("Read file `{}` (lines {}-{})", path.display(), start, end,)
+ format!("Read file `{path}` (lines {}-{})", start, end,)
}
(Some(start), None) => {
- format!("Read file `{}` (from line {})", path.display(), start)
+ format!("Read file `{path}` (from line {})", start)
}
- _ => format!("Read file `{}`", path.display()),
+ _ => format!("Read file `{path}`"),
}
.into()
} else {
@@ -201,7 +201,6 @@ impl AgentTool for ReadFileTool {
// Check if specific line ranges are provided
let result = if input.start_line.is_some() || input.end_line.is_some() {
let result = buffer.read_with(cx, |buffer, _cx| {
- let text = buffer.text();
// .max(1) because despite instructions to be 1-indexed, sometimes the model passes 0.
let start = input.start_line.unwrap_or(1).max(1);
let start_row = start - 1;
@@ -210,13 +209,13 @@ impl AgentTool for ReadFileTool {
anchor = Some(buffer.anchor_before(Point::new(start_row, column)));
}
- let lines = text.split('\n').skip(start_row as usize);
- if let Some(end) = input.end_line {
- let count = end.saturating_sub(start).saturating_add(1); // Ensure at least 1 line
- itertools::intersperse(lines.take(count as usize), "\n").collect::()
- } else {
- itertools::intersperse(lines, "\n").collect::()
+ let mut end_row = input.end_line.unwrap_or(u32::MAX);
+ if end_row <= start_row {
+ end_row = start_row + 1; // read at least one lines
}
+ let start = buffer.anchor_before(Point::new(start_row, 0));
+ let end = buffer.anchor_before(Point::new(end_row, 0));
+ buffer.text_for_range(start..end).collect::()
})?;
action_log.update(cx, |log, cx| {
@@ -226,9 +225,12 @@ impl AgentTool for ReadFileTool {
Ok(result.into())
} else {
// No line ranges specified, so check file size to see if it's too big.
- let buffer_content =
- outline::get_buffer_content_or_outline(buffer.clone(), Some(&abs_path), cx)
- .await?;
+ let buffer_content = outline::get_buffer_content_or_outline(
+ buffer.clone(),
+ Some(&abs_path.to_string_lossy()),
+ cx,
+ )
+ .await?;
action_log.update(cx, |log, cx| {
log.buffer_read(buffer.clone(), cx);
@@ -445,7 +447,7 @@ mod test {
tool.run(input, ToolCallEventStream::test().0, cx)
})
.await;
- assert_eq!(result.unwrap(), "Line 2\nLine 3\nLine 4".into());
+ assert_eq!(result.unwrap(), "Line 2\nLine 3\nLine 4\n".into());
}
#[gpui::test]
@@ -475,7 +477,7 @@ mod test {
tool.clone().run(input, ToolCallEventStream::test().0, cx)
})
.await;
- assert_eq!(result.unwrap(), "Line 1\nLine 2".into());
+ assert_eq!(result.unwrap(), "Line 1\nLine 2\n".into());
// end_line of 0 should result in at least 1 line
let result = cx
@@ -488,7 +490,7 @@ mod test {
tool.clone().run(input, ToolCallEventStream::test().0, cx)
})
.await;
- assert_eq!(result.unwrap(), "Line 1".into());
+ assert_eq!(result.unwrap(), "Line 1\n".into());
// when start_line > end_line, should still return at least 1 line
let result = cx
@@ -501,7 +503,7 @@ mod test {
tool.clone().run(input, ToolCallEventStream::test().0, cx)
})
.await;
- assert_eq!(result.unwrap(), "Line 3".into());
+ assert_eq!(result.unwrap(), "Line 3\n".into());
}
fn init_test(cx: &mut TestAppContext) {
@@ -587,19 +589,21 @@ mod test {
cx.update(|cx| {
use gpui::UpdateGlobal;
- use project::WorktreeSettings;
use settings::SettingsStore;
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions = Some(vec![
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions = Some(vec![
"**/.secretdir".to_string(),
"**/.mymetadata".to_string(),
]);
- settings.private_files = Some(vec![
- "**/.mysecrets".to_string(),
- "**/*.privatekey".to_string(),
- "**/*.mysensitive".to_string(),
- ]);
+ settings.project.worktree.private_files = Some(
+ vec![
+ "**/.mysecrets".to_string(),
+ "**/*.privatekey".to_string(),
+ "**/*.mysensitive".to_string(),
+ ]
+ .into(),
+ );
});
});
});
@@ -803,10 +807,11 @@ mod test {
// Set global settings
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
- store.update_user_settings::(cx, |settings| {
- settings.file_scan_exclusions =
+ store.update_user_settings(cx, |settings| {
+ settings.project.worktree.file_scan_exclusions =
Some(vec!["**/.git".to_string(), "**/node_modules".to_string()]);
- settings.private_files = Some(vec!["**/.env".to_string()]);
+ settings.project.worktree.private_files =
+ Some(vec!["**/.env".to_string()].into());
});
});
});
diff --git a/crates/agent2/src/tools/terminal_tool.rs b/crates/agent2/src/tools/terminal_tool.rs
index 7acfc2455093eac0f3d15e840abce47f38a6c8b0..6d30c19152001deaef5deeacbdf266e28ac03d08 100644
--- a/crates/agent2/src/tools/terminal_tool.rs
+++ b/crates/agent2/src/tools/terminal_tool.rs
@@ -82,7 +82,7 @@ impl AgentTool for TerminalTool {
.into(),
}
} else {
- "Run terminal command".into()
+ "".into()
}
}
diff --git a/crates/agent_servers/Cargo.toml b/crates/agent_servers/Cargo.toml
index bb3fe6ff9078535b500e28f4beeab957929546a5..bdf1b72fdc0c2c71d5e445633d1d4a8ce32a6ba4 100644
--- a/crates/agent_servers/Cargo.toml
+++ b/crates/agent_servers/Cargo.toml
@@ -23,6 +23,7 @@ action_log.workspace = true
agent-client-protocol.workspace = true
agent_settings.workspace = true
anyhow.workspace = true
+async-trait.workspace = true
client.workspace = true
collections.workspace = true
env_logger = { workspace = true, optional = true }
@@ -30,6 +31,7 @@ fs.workspace = true
futures.workspace = true
gpui.workspace = true
gpui_tokio = { workspace = true, optional = true }
+http_client.workspace = true
indoc.workspace = true
language.workspace = true
language_model.workspace = true
@@ -45,6 +47,8 @@ task.workspace = true
tempfile.workspace = true
thiserror.workspace = true
ui.workspace = true
+terminal.workspace = true
+uuid.workspace = true
util.workspace = true
watch.workspace = true
workspace-hack.workspace = true
diff --git a/crates/agent_servers/src/acp.rs b/crates/agent_servers/src/acp.rs
index cc897d85e7b4de149a0dca84df84d2b8c2c5bc98..57ddfcf9dc9d635e33f252e6b6f35f015581cfc4 100644
--- a/crates/agent_servers/src/acp.rs
+++ b/crates/agent_servers/src/acp.rs
@@ -9,17 +9,20 @@ use futures::io::BufReader;
use project::Project;
use project::agent_server_store::AgentServerCommand;
use serde::Deserialize;
+use task::Shell;
use util::ResultExt as _;
use std::path::PathBuf;
use std::{any::Any, cell::RefCell};
-use std::{path::Path, rc::Rc, sync::Arc};
+use std::{path::Path, rc::Rc};
use thiserror::Error;
use anyhow::{Context as _, Result};
use gpui::{App, AppContext as _, AsyncApp, Entity, SharedString, Task, WeakEntity};
-use acp_thread::{AcpThread, AuthRequired, LoadError};
+use acp_thread::{AcpThread, AuthRequired, LoadError, TerminalProviderEvent};
+use terminal::TerminalBuilder;
+use terminal::terminal_settings::{AlternateScroll, CursorShape};
#[derive(Debug, Error)]
#[error("Unsupported version")]
@@ -44,6 +47,7 @@ pub struct AcpConnection {
pub struct AcpSession {
thread: WeakEntity,
suppress_abort_err: bool,
+ models: Option>>,
session_modes: Option>>,
}
@@ -78,7 +82,7 @@ impl AcpConnection {
is_remote: bool,
cx: &mut AsyncApp,
) -> Result {
- let mut child = util::command::new_smol_command(command.path);
+ let mut child = util::command::new_smol_command(&command.path);
child
.args(command.args.iter().map(|arg| arg.as_str()))
.envs(command.env.iter().flatten())
@@ -93,6 +97,11 @@ impl AcpConnection {
let stdout = child.stdout.take().context("Failed to take stdout")?;
let stdin = child.stdin.take().context("Failed to take stdin")?;
let stderr = child.stderr.take().context("Failed to take stderr")?;
+ log::info!(
+ "Spawning external agent server: {:?}, {:?}",
+ command.path,
+ command.args
+ );
log::trace!("Spawned (pid: {})", child.id());
let sessions = Rc::new(RefCell::new(HashMap::default()));
@@ -264,6 +273,7 @@ impl AgentConnection for AcpConnection {
})?;
let modes = response.modes.map(|modes| Rc::new(RefCell::new(modes)));
+ let models = response.models.map(|models| Rc::new(RefCell::new(models)));
if let Some(default_mode) = default_mode {
if let Some(modes) = modes.as_ref() {
@@ -326,10 +336,12 @@ impl AgentConnection for AcpConnection {
)
})?;
+
let session = AcpSession {
thread: thread.downgrade(),
suppress_abort_err: false,
- session_modes: modes
+ session_modes: modes,
+ models,
};
sessions.borrow_mut().insert(session_id, session);
@@ -376,6 +388,10 @@ impl AgentConnection for AcpConnection {
match result {
Ok(response) => Ok(response),
Err(err) => {
+ if err.code == acp::ErrorCode::AUTH_REQUIRED.code {
+ return Err(anyhow!(acp::Error::auth_required()));
+ }
+
if err.code != ErrorCode::INTERNAL_ERROR.code {
anyhow::bail!(err)
}
@@ -450,6 +466,27 @@ impl AgentConnection for AcpConnection {
}
}
+ fn model_selector(
+ &self,
+ session_id: &acp::SessionId,
+ ) -> Option> {
+ let sessions = self.sessions.clone();
+ let sessions_ref = sessions.borrow();
+ let Some(session) = sessions_ref.get(session_id) else {
+ return None;
+ };
+
+ if let Some(models) = session.models.as_ref() {
+ Some(Rc::new(AcpModelSelector::new(
+ session_id.clone(),
+ self.connection.clone(),
+ models.clone(),
+ )) as _)
+ } else {
+ None
+ }
+ }
+
fn into_any(self: Rc) -> Rc {
self
}
@@ -500,11 +537,88 @@ impl acp_thread::AgentSessionModes for AcpSessionModes {
}
}
+struct AcpModelSelector {
+ session_id: acp::SessionId,
+ connection: Rc,
+ state: Rc>,
+}
+
+impl AcpModelSelector {
+ fn new(
+ session_id: acp::SessionId,
+ connection: Rc,
+ state: Rc>,
+ ) -> Self {
+ Self {
+ session_id,
+ connection,
+ state,
+ }
+ }
+}
+
+impl acp_thread::AgentModelSelector for AcpModelSelector {
+ fn list_models(&self, _cx: &mut App) -> Task> {
+ Task::ready(Ok(acp_thread::AgentModelList::Flat(
+ self.state
+ .borrow()
+ .available_models
+ .clone()
+ .into_iter()
+ .map(acp_thread::AgentModelInfo::from)
+ .collect(),
+ )))
+ }
+
+ fn select_model(&self, model_id: acp::ModelId, cx: &mut App) -> Task> {
+ let connection = self.connection.clone();
+ let session_id = self.session_id.clone();
+ let old_model_id;
+ {
+ let mut state = self.state.borrow_mut();
+ old_model_id = state.current_model_id.clone();
+ state.current_model_id = model_id.clone();
+ };
+ let state = self.state.clone();
+ cx.foreground_executor().spawn(async move {
+ let result = connection
+ .set_session_model(acp::SetSessionModelRequest {
+ session_id,
+ model_id,
+ meta: None,
+ })
+ .await;
+
+ if result.is_err() {
+ state.borrow_mut().current_model_id = old_model_id;
+ }
+
+ result?;
+
+ Ok(())
+ })
+ }
+
+ fn selected_model(&self, _cx: &mut App) -> Task> {
+ let state = self.state.borrow();
+ Task::ready(
+ state
+ .available_models
+ .iter()
+ .find(|m| m.model_id == state.current_model_id)
+ .cloned()
+ .map(acp_thread::AgentModelInfo::from)
+ .ok_or_else(|| anyhow::anyhow!("Model not found")),
+ )
+ }
+}
+
struct ClientDelegate {
sessions: Rc>>,
cx: AsyncApp,
}
+#[async_trait::async_trait(?Send)]
impl acp::Client for ClientDelegate {
async fn request_permission(
&self,
@@ -594,10 +708,100 @@ impl acp::Client for ClientDelegate {
}
}
+ // Clone so we can inspect meta both before and after handing off to the thread
+ let update_clone = notification.update.clone();
+
+ // Pre-handle: if a ToolCall carries terminal_info, create/register a display-only terminal.
+ if let acp::SessionUpdate::ToolCall(tc) = &update_clone {
+ if let Some(meta) = &tc.meta {
+ if let Some(terminal_info) = meta.get("terminal_info") {
+ if let Some(id_str) = terminal_info.get("terminal_id").and_then(|v| v.as_str())
+ {
+ let terminal_id = acp::TerminalId(id_str.into());
+ let cwd = terminal_info
+ .get("cwd")
+ .and_then(|v| v.as_str().map(PathBuf::from));
+
+ // Create a minimal display-only lower-level terminal and register it.
+ let _ = session.thread.update(&mut self.cx.clone(), |thread, cx| {
+ let builder = TerminalBuilder::new_display_only(
+ CursorShape::default(),
+ AlternateScroll::On,
+ None,
+ 0,
+ )?;
+ let lower = cx.new(|cx| builder.subscribe(cx));
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Created {
+ terminal_id: terminal_id.clone(),
+ label: tc.title.clone(),
+ cwd,
+ output_byte_limit: None,
+ terminal: lower,
+ },
+ cx,
+ );
+ anyhow::Ok(())
+ });
+ }
+ }
+ }
+ }
+
+ // Forward the update to the acp_thread as usual.
session.thread.update(&mut self.cx.clone(), |thread, cx| {
- thread.handle_session_update(notification.update, cx)
+ thread.handle_session_update(notification.update.clone(), cx)
})??;
+ // Post-handle: stream terminal output/exit if present on ToolCallUpdate meta.
+ if let acp::SessionUpdate::ToolCallUpdate(tcu) = &update_clone {
+ if let Some(meta) = &tcu.meta {
+ if let Some(term_out) = meta.get("terminal_output") {
+ if let Some(id_str) = term_out.get("terminal_id").and_then(|v| v.as_str()) {
+ let terminal_id = acp::TerminalId(id_str.into());
+ if let Some(s) = term_out.get("data").and_then(|v| v.as_str()) {
+ let data = s.as_bytes().to_vec();
+ let _ = session.thread.update(&mut self.cx.clone(), |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Output {
+ terminal_id: terminal_id.clone(),
+ data,
+ },
+ cx,
+ );
+ });
+ }
+ }
+ }
+
+ // terminal_exit
+ if let Some(term_exit) = meta.get("terminal_exit") {
+ if let Some(id_str) = term_exit.get("terminal_id").and_then(|v| v.as_str()) {
+ let terminal_id = acp::TerminalId(id_str.into());
+ let status = acp::TerminalExitStatus {
+ exit_code: term_exit
+ .get("exit_code")
+ .and_then(|v| v.as_u64())
+ .map(|i| i as u32),
+ signal: term_exit
+ .get("signal")
+ .and_then(|v| v.as_str().map(|s| s.to_string())),
+ meta: None,
+ };
+ let _ = session.thread.update(&mut self.cx.clone(), |thread, cx| {
+ thread.on_terminal_provider_event(
+ TerminalProviderEvent::Exit {
+ terminal_id: terminal_id.clone(),
+ status,
+ },
+ cx,
+ );
+ });
+ }
+ }
+ }
+ }
+
Ok(())
}
@@ -605,25 +809,68 @@ impl acp::Client for ClientDelegate {
&self,
args: acp::CreateTerminalRequest,
) -> Result {
- let terminal = self
- .session_thread(&args.session_id)?
- .update(&mut self.cx.clone(), |thread, cx| {
- thread.create_terminal(
- args.command,
- args.args,
- args.env,
- args.cwd,
- args.output_byte_limit,
+ let thread = self.session_thread(&args.session_id)?;
+ let project = thread.read_with(&self.cx, |thread, _cx| thread.project().clone())?;
+
+ let mut env = if let Some(dir) = &args.cwd {
+ project
+ .update(&mut self.cx.clone(), |project, cx| {
+ project.directory_environment(&task::Shell::System, dir.clone().into(), cx)
+ })?
+ .await
+ .unwrap_or_default()
+ } else {
+ Default::default()
+ };
+ for var in args.env {
+ env.insert(var.name, var.value);
+ }
+
+ // Use remote shell or default system shell, as appropriate
+ let shell = project
+ .update(&mut self.cx.clone(), |project, cx| {
+ project
+ .remote_client()
+ .and_then(|r| r.read(cx).default_system_shell())
+ .map(Shell::Program)
+ })?
+ .unwrap_or(task::Shell::System);
+ let (task_command, task_args) = task::ShellBuilder::new(&shell)
+ .redirect_stdin_to_dev_null()
+ .build(Some(args.command.clone()), &args.args);
+
+ let terminal_entity = project
+ .update(&mut self.cx.clone(), |project, cx| {
+ project.create_terminal_task(
+ task::SpawnInTerminal {
+ command: Some(task_command),
+ args: task_args,
+ cwd: args.cwd.clone(),
+ env,
+ ..Default::default()
+ },
cx,
)
})?
.await?;
- Ok(
- terminal.read_with(&self.cx, |terminal, _| acp::CreateTerminalResponse {
- terminal_id: terminal.id().clone(),
- meta: None,
- })?,
- )
+
+ // Register with renderer
+ let terminal_entity = thread.update(&mut self.cx.clone(), |thread, cx| {
+ thread.register_terminal_created(
+ acp::TerminalId(uuid::Uuid::new_v4().to_string().into()),
+ format!("{} {}", args.command, args.args.join(" ")),
+ args.cwd.clone(),
+ args.output_byte_limit,
+ terminal_entity,
+ cx,
+ )
+ })?;
+ let terminal_id =
+ terminal_entity.read_with(&self.cx, |terminal, _| terminal.id().clone())?;
+ Ok(acp::CreateTerminalResponse {
+ terminal_id,
+ meta: None,
+ })
}
async fn kill_terminal_command(
@@ -638,19 +885,11 @@ impl acp::Client for ClientDelegate {
Ok(Default::default())
}
- async fn ext_method(
- &self,
- _name: Arc,
- _params: Arc,
- ) -> Result, acp::Error> {
+ async fn ext_method(&self, _args: acp::ExtRequest) -> Result {
Err(acp::Error::method_not_found())
}
- async fn ext_notification(
- &self,
- _name: Arc,
- _params: Arc,
- ) -> Result<(), acp::Error> {
+ async fn ext_notification(&self, _args: acp::ExtNotification) -> Result<(), acp::Error> {
Err(acp::Error::method_not_found())
}
diff --git a/crates/agent_servers/src/agent_servers.rs b/crates/agent_servers/src/agent_servers.rs
index 2c2900cb79328249355704606652c54d08f072e5..b44c2123fb5052e2487464d813936cd1edf9821a 100644
--- a/crates/agent_servers/src/agent_servers.rs
+++ b/crates/agent_servers/src/agent_servers.rs
@@ -1,5 +1,6 @@
mod acp;
mod claude;
+mod codex;
mod custom;
mod gemini;
@@ -7,15 +8,20 @@ mod gemini;
pub mod e2e_tests;
pub use claude::*;
+use client::ProxySettings;
+pub use codex::*;
+use collections::HashMap;
pub use custom::*;
use fs::Fs;
pub use gemini::*;
+use http_client::read_no_proxy_from_env;
use project::agent_server_store::AgentServerStore;
use acp_thread::AgentConnection;
use anyhow::Result;
-use gpui::{App, Entity, SharedString, Task};
+use gpui::{App, AppContext, Entity, SharedString, Task};
use project::Project;
+use settings::SettingsStore;
use std::{any::Any, path::Path, rc::Rc, sync::Arc};
pub use acp::AcpConnection;
@@ -77,3 +83,28 @@ impl dyn AgentServer {
self.into_any().downcast().ok()
}
}
+
+/// Load the default proxy environment variables to pass through to the agent
+pub fn load_proxy_env(cx: &mut App) -> HashMap {
+ let proxy_url = cx
+ .read_global(|settings: &SettingsStore, _| settings.get::(None).proxy_url());
+ let mut env = HashMap::default();
+
+ if let Some(proxy_url) = &proxy_url {
+ let env_var = if proxy_url.scheme() == "https" {
+ "HTTPS_PROXY"
+ } else {
+ "HTTP_PROXY"
+ };
+ env.insert(env_var.to_owned(), proxy_url.to_string());
+ }
+
+ if let Some(no_proxy) = read_no_proxy_from_env() {
+ env.insert("NO_PROXY".to_owned(), no_proxy);
+ } else if proxy_url.is_some() {
+ // We sometimes need local MCP servers that we don't want to proxy
+ env.insert("NO_PROXY".to_owned(), "localhost,127.0.0.1".to_owned());
+ }
+
+ env
+}
diff --git a/crates/agent_servers/src/claude.rs b/crates/agent_servers/src/claude.rs
index c75c9539abe5fdd03293d98719d4a905b368c4a4..b84a386679cee825be22d895634a6971b537fa89 100644
--- a/crates/agent_servers/src/claude.rs
+++ b/crates/agent_servers/src/claude.rs
@@ -10,7 +10,7 @@ use anyhow::{Context as _, Result};
use gpui::{App, AppContext as _, SharedString, Task};
use project::agent_server_store::{AllAgentServersSettings, CLAUDE_CODE_NAME};
-use crate::{AgentServer, AgentServerDelegate};
+use crate::{AgentServer, AgentServerDelegate, load_proxy_env};
use acp_thread::AgentConnection;
#[derive(Clone)]
@@ -45,8 +45,13 @@ impl AgentServer for ClaudeCode {
}
fn set_default_mode(&self, mode_id: Option, fs: Arc, cx: &mut App) {
- update_settings_file::(fs, cx, |settings, _| {
- settings.claude.get_or_insert_default().default_mode = mode_id.map(|m| m.to_string())
+ update_settings_file(fs, cx, |settings, _| {
+ settings
+ .agent_servers
+ .get_or_insert_default()
+ .claude
+ .get_or_insert_default()
+ .default_mode = mode_id.map(|m| m.to_string())
});
}
@@ -57,9 +62,10 @@ impl AgentServer for ClaudeCode {
cx: &mut App,
) -> Task, Option)>> {
let name = self.name();
- let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().to_string());
+ let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().into_owned());
let is_remote = delegate.project.read(cx).is_via_remote_server();
let store = delegate.store.downgrade();
+ let extra_env = load_proxy_env(cx);
let default_mode = self.default_mode(cx);
cx.spawn(async move |cx| {
@@ -70,7 +76,7 @@ impl AgentServer for ClaudeCode {
.context("Claude Code is not registered")?;
anyhow::Ok(agent.get_command(
root_dir.as_deref(),
- Default::default(),
+ extra_env,
delegate.status_tx,
delegate.new_version_available,
&mut cx.to_async(),
diff --git a/crates/agent_servers/src/codex.rs b/crates/agent_servers/src/codex.rs
new file mode 100644
index 0000000000000000000000000000000000000000..0a19cfd03214972e9c7cd62aee713f3689d525df
--- /dev/null
+++ b/crates/agent_servers/src/codex.rs
@@ -0,0 +1,80 @@
+use std::rc::Rc;
+use std::{any::Any, path::Path};
+
+use crate::{AgentServer, AgentServerDelegate, load_proxy_env};
+use acp_thread::AgentConnection;
+use anyhow::{Context as _, Result};
+use gpui::{App, SharedString, Task};
+use project::agent_server_store::CODEX_NAME;
+
+#[derive(Clone)]
+pub struct Codex;
+
+#[cfg(test)]
+pub(crate) mod tests {
+ use super::*;
+
+ crate::common_e2e_tests!(async |_, _, _| Codex, allow_option_id = "proceed_once");
+}
+
+impl AgentServer for Codex {
+ fn telemetry_id(&self) -> &'static str {
+ "codex"
+ }
+
+ fn name(&self) -> SharedString {
+ "Codex".into()
+ }
+
+ fn logo(&self) -> ui::IconName {
+ ui::IconName::AiOpenAi
+ }
+
+ fn connect(
+ &self,
+ root_dir: Option<&Path>,
+ delegate: AgentServerDelegate,
+ cx: &mut App,
+ ) -> Task, Option)>> {
+ let name = self.name();
+ let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().into_owned());
+ let is_remote = delegate.project.read(cx).is_via_remote_server();
+ let store = delegate.store.downgrade();
+ let extra_env = load_proxy_env(cx);
+ let default_mode = self.default_mode(cx);
+
+ cx.spawn(async move |cx| {
+ let (command, root_dir, login) = store
+ .update(cx, |store, cx| {
+ let agent = store
+ .get_external_agent(&CODEX_NAME.into())
+ .context("Codex is not registered")?;
+ anyhow::Ok(agent.get_command(
+ root_dir.as_deref(),
+ extra_env,
+ delegate.status_tx,
+ // For now, report that there are no updates.
+ // (A future PR will use the GitHub Releases API to fetch them.)
+ delegate.new_version_available,
+ &mut cx.to_async(),
+ ))
+ })??
+ .await?;
+
+ let connection = crate::acp::connect(
+ name,
+ command,
+ root_dir.as_ref(),
+ default_mode,
+ is_remote,
+ cx,
+ )
+ .await?;
+ Ok((connection, login))
+ })
+ }
+
+ fn into_any(self: Rc) -> Rc {
+ self
+ }
+}
diff --git a/crates/agent_servers/src/custom.rs b/crates/agent_servers/src/custom.rs
index f035952a7939201e4b7d990b97e1fc695105d505..406a18965111a44bc4e78469b20aaf199cbda037 100644
--- a/crates/agent_servers/src/custom.rs
+++ b/crates/agent_servers/src/custom.rs
@@ -1,4 +1,4 @@
-use crate::AgentServerDelegate;
+use crate::{AgentServerDelegate, load_proxy_env};
use acp_thread::AgentConnection;
use agent_client_protocol as acp;
use anyhow::{Context as _, Result};
@@ -49,8 +49,14 @@ impl crate::AgentServer for CustomAgentServer {
fn set_default_mode(&self, mode_id: Option, fs: Arc, cx: &mut App) {
let name = self.name();
- update_settings_file::(fs, cx, move |settings, _| {
- settings.custom.get_mut(&name).unwrap().default_mode = mode_id.map(|m| m.to_string())
+ update_settings_file(fs, cx, move |settings, _| {
+ settings
+ .agent_servers
+ .get_or_insert_default()
+ .custom
+ .get_mut(&name)
+ .unwrap()
+ .default_mode = mode_id.map(|m| m.to_string())
});
}
@@ -61,10 +67,11 @@ impl crate::AgentServer for CustomAgentServer {
cx: &mut App,
) -> Task, Option)>> {
let name = self.name();
- let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().to_string());
+ let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().into_owned());
let is_remote = delegate.project.read(cx).is_via_remote_server();
let default_mode = self.default_mode(cx);
let store = delegate.store.downgrade();
+ let extra_env = load_proxy_env(cx);
cx.spawn(async move |cx| {
let (command, root_dir, login) = store
@@ -76,7 +83,7 @@ impl crate::AgentServer for CustomAgentServer {
})?;
anyhow::Ok(agent.get_command(
root_dir.as_deref(),
- Default::default(),
+ extra_env,
delegate.status_tx,
delegate.new_version_available,
&mut cx.to_async(),
diff --git a/crates/agent_servers/src/e2e_tests.rs b/crates/agent_servers/src/e2e_tests.rs
index 1ee2e099f0ae355267b5f0a5aaddb3371f427240..60480caa541ba1c39dba62ed709c157fd67fede0 100644
--- a/crates/agent_servers/src/e2e_tests.rs
+++ b/crates/agent_servers/src/e2e_tests.rs
@@ -483,6 +483,13 @@ pub async fn init_test(cx: &mut TestAppContext) -> Arc {
default_mode: None,
}),
gemini: Some(crate::gemini::tests::local_command().into()),
+ codex: Some(BuiltinAgentServerSettings {
+ path: Some("codex-acp".into()),
+ args: None,
+ env: None,
+ ignore_system_version: None,
+ default_mode: None,
+ }),
custom: collections::HashMap::default(),
},
cx,
diff --git a/crates/agent_servers/src/gemini.rs b/crates/agent_servers/src/gemini.rs
index 01f15557899e1c7826e91d1555320996eccd0f45..8004f5caec4a7bd2e3e6b1d9a885f4943fa21147 100644
--- a/crates/agent_servers/src/gemini.rs
+++ b/crates/agent_servers/src/gemini.rs
@@ -1,15 +1,12 @@
use std::rc::Rc;
use std::{any::Any, path::Path};
-use crate::{AgentServer, AgentServerDelegate};
+use crate::{AgentServer, AgentServerDelegate, load_proxy_env};
use acp_thread::AgentConnection;
use anyhow::{Context as _, Result};
-use client::ProxySettings;
-use collections::HashMap;
-use gpui::{App, AppContext, SharedString, Task};
+use gpui::{App, SharedString, Task};
use language_models::provider::google::GoogleLanguageModelProvider;
use project::agent_server_store::GEMINI_NAME;
-use settings::SettingsStore;
#[derive(Clone)]
pub struct Gemini;
@@ -34,20 +31,23 @@ impl AgentServer for Gemini {
cx: &mut App,
) -> Task, Option)>> {
let name = self.name();
- let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().to_string());
+ let root_dir = root_dir.map(|root_dir| root_dir.to_string_lossy().into_owned());
let is_remote = delegate.project.read(cx).is_via_remote_server();
let store = delegate.store.downgrade();
- let proxy_url = cx.read_global(|settings: &SettingsStore, _| {
- settings.get::(None).proxy.clone()
- });
+ let mut extra_env = load_proxy_env(cx);
let default_mode = self.default_mode(cx);
cx.spawn(async move |cx| {
- let mut extra_env = HashMap::default();
- if let Some(api_key) = cx.update(GoogleLanguageModelProvider::api_key)?.await.ok() {
- extra_env.insert("GEMINI_API_KEY".into(), api_key.key);
+ extra_env.insert("SURFACE".to_owned(), "zed".to_owned());
+
+ if let Some(api_key) = cx
+ .update(GoogleLanguageModelProvider::api_key_for_gemini_cli)?
+ .await
+ .ok()
+ {
+ extra_env.insert("GEMINI_API_KEY".into(), api_key);
}
- let (mut command, root_dir, login) = store
+ let (command, root_dir, login) = store
.update(cx, |store, cx| {
let agent = store
.get_external_agent(&GEMINI_NAME.into())
@@ -62,14 +62,6 @@ impl AgentServer for Gemini {
})??
.await?;
- // Add proxy flag if proxy settings are configured in Zed and not in the args
- if let Some(proxy_url_value) = &proxy_url
- && !command.args.iter().any(|arg| arg.contains("--proxy"))
- {
- command.args.push("--proxy".into());
- command.args.push(proxy_url_value.clone());
- }
-
let connection = crate::acp::connect(
name,
command,
diff --git a/crates/agent_servers/src/settings.rs b/crates/agent_servers/src/settings.rs
deleted file mode 100644
index 9a610465be5516664dafd9cd4cb46be96ad89c8b..0000000000000000000000000000000000000000
--- a/crates/agent_servers/src/settings.rs
+++ /dev/null
@@ -1,125 +0,0 @@
-use agent_client_protocol as acp;
-use std::path::PathBuf;
-
-use crate::AgentServerCommand;
-use anyhow::Result;
-use collections::HashMap;
-use gpui::{App, SharedString};
-use schemars::JsonSchema;
-use serde::{Deserialize, Serialize};
-use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
-
-pub fn init(cx: &mut App) {
- AllAgentServersSettings::register(cx);
-}
-
-#[derive(Default, Deserialize, Serialize, Clone, JsonSchema, Debug, SettingsUi, SettingsKey)]
-#[settings_key(key = "agent_servers")]
-pub struct AllAgentServersSettings {
- pub gemini: Option,
- pub claude: Option,
-
- /// Custom agent servers configured by the user
- #[serde(flatten)]
- pub custom: HashMap,
-}
-
-#[derive(Default, Deserialize, Serialize, Clone, JsonSchema, Debug, PartialEq)]
-pub struct BuiltinAgentServerSettings {
- /// Absolute path to a binary to be used when launching this agent.
- ///
- /// This can be used to run a specific binary without automatic downloads or searching `$PATH`.
- #[serde(rename = "command")]
- pub path: Option,
- /// If a binary is specified in `command`, it will be passed these arguments.
- pub args: Option>,
- /// If a binary is specified in `command`, it will be passed these environment variables.
- pub env: Option>,
- /// Whether to skip searching `$PATH` for an agent server binary when
- /// launching this agent.
- ///
- /// This has no effect if a `command` is specified. Otherwise, when this is
- /// `false`, Zed will search `$PATH` for an agent server binary and, if one
- /// is found, use it for threads with this agent. If no agent binary is
- /// found on `$PATH`, Zed will automatically install and use its own binary.
- /// When this is `true`, Zed will not search `$PATH`, and will always use
- /// its own binary.
- ///
- /// Default: true
- pub ignore_system_version: Option,
- /// The default mode for new threads.
- ///
- /// Note: Not all agents support modes.
- ///
- /// Default: None
- #[serde(skip_serializing_if = "Option::is_none")]
- pub default_mode: Option,
-}
-
-impl BuiltinAgentServerSettings {
- pub(crate) fn custom_command(self) -> Option {
- self.path.map(|path| AgentServerCommand {
- path,
- args: self.args.unwrap_or_default(),
- env: self.env,
- })
- }
-}
-
-impl From for BuiltinAgentServerSettings {
- fn from(value: AgentServerCommand) -> Self {
- BuiltinAgentServerSettings {
- path: Some(value.path),
- args: Some(value.args),
- env: value.env,
- ..Default::default()
- }
- }
-}
-
-#[derive(Deserialize, Serialize, Clone, JsonSchema, Debug, PartialEq)]
-pub struct CustomAgentServerSettings {
- #[serde(flatten)]
- pub command: AgentServerCommand,
- /// The default mode for new threads.
- ///
- /// Note: Not all agents support modes.
- ///
- /// Default: None
- #[serde(skip_serializing_if = "Option::is_none")]
- pub default_mode: Option,
-}
-
-impl settings::Settings for AllAgentServersSettings {
- type FileContent = Self;
-
- fn load(sources: SettingsSources, _: &mut App) -> Result {
- let mut settings = AllAgentServersSettings::default();
-
- for AllAgentServersSettings {
- gemini,
- claude,
- custom,
- } in sources.defaults_and_customizations()
- {
- if gemini.is_some() {
- settings.gemini = gemini.clone();
- }
- if claude.is_some() {
- settings.claude = claude.clone();
- }
-
- // Merge custom agents
- for (name, config) in custom {
- // Skip built-in agent names to avoid conflicts
- if name != "gemini" && name != "claude" {
- settings.custom.insert(name.clone(), config.clone());
- }
- }
- }
-
- Ok(settings)
- }
-
- fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
-}
diff --git a/crates/agent_settings/Cargo.toml b/crates/agent_settings/Cargo.toml
index 8af76053c2aabead30413c98e482ed97dbdbc361..a8b457a9dddb1f8932d015f895e6d2064944bfe9 100644
--- a/crates/agent_settings/Cargo.toml
+++ b/crates/agent_settings/Cargo.toml
@@ -19,6 +19,7 @@ convert_case.workspace = true
fs.workspace = true
gpui.workspace = true
language_model.workspace = true
+project.workspace = true
schemars.workspace = true
serde.workspace = true
settings.workspace = true
diff --git a/crates/agent_settings/src/agent_profile.rs b/crates/agent_settings/src/agent_profile.rs
index 42a273e2dcfccfb839e6e7d97efb42dcd7b0bba9..999ddc8083a1a4b4c271ea9bde4c1e45307e9542 100644
--- a/crates/agent_settings/src/agent_profile.rs
+++ b/crates/agent_settings/src/agent_profile.rs
@@ -1,15 +1,17 @@
use std::sync::Arc;
+use anyhow::{Result, bail};
use collections::IndexMap;
use convert_case::{Case, Casing as _};
use fs::Fs;
use gpui::{App, SharedString};
-use schemars::JsonSchema;
-use serde::{Deserialize, Serialize};
-use settings::{Settings as _, update_settings_file};
+use settings::{
+ AgentProfileContent, ContextServerPresetContent, Settings as _, SettingsContent,
+ update_settings_file,
+};
use util::ResultExt as _;
-use crate::AgentSettings;
+use crate::{AgentProfileId, AgentSettings};
pub mod builtin_profiles {
use super::AgentProfileId;
@@ -23,27 +25,6 @@ pub mod builtin_profiles {
}
}
-#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize, Deserialize, JsonSchema)]
-pub struct AgentProfileId(pub Arc);
-
-impl AgentProfileId {
- pub fn as_str(&self) -> &str {
- &self.0
- }
-}
-
-impl std::fmt::Display for AgentProfileId {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}", self.0)
- }
-}
-
-impl Default for AgentProfileId {
- fn default() -> Self {
- Self("write".into())
- }
-}
-
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AgentProfile {
id: AgentProfileId,
@@ -87,10 +68,10 @@ impl AgentProfile {
.unwrap_or_default(),
};
- update_settings_file::(fs, cx, {
+ update_settings_file(fs, cx, {
let id = id.clone();
move |settings, _cx| {
- settings.create_profile(id, profile_settings).log_err();
+ profile_settings.save_to_settings(id, settings).log_err();
}
});
@@ -129,9 +110,71 @@ impl AgentProfileSettings {
.get(server_id)
.is_some_and(|preset| preset.tools.get(tool_name) == Some(&true))
}
+
+ pub fn save_to_settings(
+ &self,
+ profile_id: AgentProfileId,
+ content: &mut SettingsContent,
+ ) -> Result<()> {
+ let profiles = content
+ .agent
+ .get_or_insert_default()
+ .profiles
+ .get_or_insert_default();
+ if profiles.contains_key(&profile_id.0) {
+ bail!("profile with ID '{profile_id}' already exists");
+ }
+
+ profiles.insert(
+ profile_id.0,
+ AgentProfileContent {
+ name: self.name.clone().into(),
+ tools: self.tools.clone(),
+ enable_all_context_servers: Some(self.enable_all_context_servers),
+ context_servers: self
+ .context_servers
+ .clone()
+ .into_iter()
+ .map(|(server_id, preset)| {
+ (
+ server_id,
+ ContextServerPresetContent {
+ tools: preset.tools,
+ },
+ )
+ })
+ .collect(),
+ },
+ );
+
+ Ok(())
+ }
+}
+
+impl From for AgentProfileSettings {
+ fn from(content: AgentProfileContent) -> Self {
+ Self {
+ name: content.name.into(),
+ tools: content.tools,
+ enable_all_context_servers: content.enable_all_context_servers.unwrap_or_default(),
+ context_servers: content
+ .context_servers
+ .into_iter()
+ .map(|(server_id, preset)| (server_id, preset.into()))
+ .collect(),
+ }
+ }
}
#[derive(Debug, Clone, Default)]
pub struct ContextServerPreset {
pub tools: IndexMap, bool>,
}
+
+impl From for ContextServerPreset {
+ fn from(content: settings::ContextServerPresetContent) -> Self {
+ Self {
+ tools: content.tools,
+ }
+ }
+}
diff --git a/crates/agent_settings/src/agent_settings.rs b/crates/agent_settings/src/agent_settings.rs
index e850945a40f46f31543fad2631216139706b405a..ec05c95672fa29b6e4813207e3e592fff9d3be15 100644
--- a/crates/agent_settings/src/agent_settings.rs
+++ b/crates/agent_settings/src/agent_settings.rs
@@ -2,14 +2,16 @@ mod agent_profile;
use std::sync::Arc;
-use anyhow::{Result, bail};
use collections::IndexMap;
-use gpui::{App, Pixels, SharedString};
+use gpui::{App, Pixels, px};
use language_model::LanguageModel;
-use schemars::{JsonSchema, json_schema};
+use project::DisableAiSettings;
+use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
-use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
-use std::borrow::Cow;
+use settings::{
+ DefaultAgentView, DockPosition, LanguageModelParameters, LanguageModelSelection,
+ NotifyWhenAgentWaiting, Settings, SettingsContent,
+};
pub use crate::agent_profile::*;
@@ -22,37 +24,11 @@ pub fn init(cx: &mut App) {
AgentSettings::register(cx);
}
-#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize, JsonSchema)]
-#[serde(rename_all = "snake_case")]
-pub enum AgentDockPosition {
- Left,
- #[default]
- Right,
- Bottom,
-}
-
-#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize, JsonSchema)]
-#[serde(rename_all = "snake_case")]
-pub enum DefaultView {
- #[default]
- Thread,
- TextThread,
-}
-
-#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
-#[serde(rename_all = "snake_case")]
-pub enum NotifyWhenAgentWaiting {
- #[default]
- PrimaryScreen,
- AllScreens,
- Never,
-}
-
-#[derive(Default, Clone, Debug)]
+#[derive(Clone, Debug)]
pub struct AgentSettings {
pub enabled: bool,
pub button: bool,
- pub dock: AgentDockPosition,
+ pub dock: DockPosition,
pub default_width: Pixels,
pub default_height: Pixels,
pub default_model: Option,
@@ -60,9 +36,8 @@ pub struct AgentSettings {
pub commit_message_model: Option,
pub thread_summary_model: Option,
pub inline_alternatives: Vec,
- pub using_outdated_settings_version: bool,
pub default_profile: AgentProfileId,
- pub default_view: DefaultView,
+ pub default_view: DefaultAgentView,
pub profiles: IndexMap,
pub always_allow_tool_actions: bool,
pub notify_when_agent_waiting: NotifyWhenAgentWaiting,
@@ -75,76 +50,30 @@ pub struct AgentSettings {
pub expand_edit_card: bool,
pub expand_terminal_card: bool,
pub use_modifier_to_send: bool,
+ pub message_editor_min_lines: usize,
}
impl AgentSettings {
- pub fn temperature_for_model(model: &Arc, cx: &App) -> Option {
- let settings = Self::get_global(cx);
- settings
- .model_parameters
- .iter()
- .rfind(|setting| setting.matches(model))
- .and_then(|m| m.temperature)
+ pub fn enabled(&self, cx: &App) -> bool {
+ self.enabled && !DisableAiSettings::get_global(cx).disable_ai
}
- pub fn set_inline_assistant_model(&mut self, provider: String, model: String) {
- self.inline_assistant_model = Some(LanguageModelSelection {
- provider: provider.into(),
- model,
- });
- }
-
- pub fn set_commit_message_model(&mut self, provider: String, model: String) {
- self.commit_message_model = Some(LanguageModelSelection {
- provider: provider.into(),
- model,
- });
- }
-
- pub fn set_thread_summary_model(&mut self, provider: String, model: String) {
- self.thread_summary_model = Some(LanguageModelSelection {
- provider: provider.into(),
- model,
- });
- }
-}
-
-#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
-pub struct LanguageModelParameters {
- pub provider: Option,
- pub model: Option,
- pub temperature: Option,
-}
-
-impl LanguageModelParameters {
- pub fn matches(&self, model: &Arc) -> bool {
- if let Some(provider) = &self.provider
- && provider.0 != model.provider_id().0
- {
- return false;
- }
- if let Some(setting_model) = &self.model
- && *setting_model != model.id().0
- {
- return false;
+ pub fn temperature_for_model(model: &Arc, cx: &App) -> Option {
+ let settings = Self::get_global(cx);
+ for setting in settings.model_parameters.iter().rev() {
+ if let Some(provider) = &setting.provider
+ && provider.0 != model.provider_id().0
+ {
+ continue;
+ }
+ if let Some(setting_model) = &setting.model
+ && *setting_model != model.id().0
+ {
+ continue;
+ }
+ return setting.temperature;
}
- true
- }
-}
-
-impl AgentSettingsContent {
- pub fn set_dock(&mut self, dock: AgentDockPosition) {
- self.dock = Some(dock);
- }
-
- pub fn set_model(&mut self, language_model: Arc) {
- let model = language_model.id().0.to_string();
- let provider = language_model.provider_id().0.to_string();
-
- self.default_model = Some(LanguageModelSelection {
- provider: provider.into(),
- model,
- });
+ return None;
}
pub fn set_inline_assistant_model(&mut self, provider: String, model: String) {
@@ -168,160 +97,11 @@ impl AgentSettingsContent {
});
}
- pub fn set_always_allow_tool_actions(&mut self, allow: bool) {
- self.always_allow_tool_actions = Some(allow);
- }
-
- pub fn set_play_sound_when_agent_done(&mut self, allow: bool) {
- self.play_sound_when_agent_done = Some(allow);
- }
-
- pub fn set_single_file_review(&mut self, allow: bool) {
- self.single_file_review = Some(allow);
- }
-
- pub fn set_use_modifier_to_send(&mut self, always_use: bool) {
- self.use_modifier_to_send = Some(always_use);
- }
-
- pub fn set_profile(&mut self, profile_id: AgentProfileId) {
- self.default_profile = Some(profile_id);
- }
-
- pub fn create_profile(
- &mut self,
- profile_id: AgentProfileId,
- profile_settings: AgentProfileSettings,
- ) -> Result<()> {
- let profiles = self.profiles.get_or_insert_default();
- if profiles.contains_key(&profile_id) {
- bail!("profile with ID '{profile_id}' already exists");
- }
-
- profiles.insert(
- profile_id,
- AgentProfileContent {
- name: profile_settings.name.into(),
- tools: profile_settings.tools,
- enable_all_context_servers: Some(profile_settings.enable_all_context_servers),
- context_servers: profile_settings
- .context_servers
- .into_iter()
- .map(|(server_id, preset)| {
- (
- server_id,
- ContextServerPresetContent {
- tools: preset.tools,
- },
- )
- })
- .collect(),
- },
- );
-
- Ok(())
+ pub fn set_message_editor_max_lines(&self) -> usize {
+ self.message_editor_min_lines * 2
}
}
-#[derive(Clone, Serialize, Deserialize, JsonSchema, Debug, Default, SettingsUi, SettingsKey)]
-#[settings_key(key = "agent", fallback_key = "assistant")]
-pub struct AgentSettingsContent {
- /// Whether the Agent is enabled.
- ///
- /// Default: true
- enabled: Option,
- /// Whether to show the agent panel button in the status bar.
- ///
- /// Default: true
- button: Option,
- /// Where to dock the agent panel.
- ///
- /// Default: right
- dock: Option,
- /// Default width in pixels when the agent panel is docked to the left or right.
- ///
- /// Default: 640
- default_width: Option,
- /// Default height in pixels when the agent panel is docked to the bottom.
- ///
- /// Default: 320
- default_height: Option,
- /// The default model to use when creating new chats and for other features when a specific model is not specified.
- default_model: Option,
- /// Model to use for the inline assistant. Defaults to default_model when not specified.
- inline_assistant_model: Option,
- /// Model to use for generating git commit messages. Defaults to default_model when not specified.
- commit_message_model: Option,
- /// Model to use for generating thread summaries. Defaults to default_model when not specified.
- thread_summary_model: Option,
- /// Additional models with which to generate alternatives when performing inline assists.
- inline_alternatives: Option>,
- /// The default profile to use in the Agent.
- ///
- /// Default: write
- default_profile: Option,
- /// Which view type to show by default in the agent panel.
- ///
- /// Default: "thread"
- default_view: Option,
- /// The available agent profiles.
- pub profiles: Option>,
- /// Whenever a tool action would normally wait for your confirmation
- /// that you allow it, always choose to allow it.
- ///
- /// This setting has no effect on external agents that support permission modes, such as Claude Code.
- ///
- /// Set `agent_servers.claude.default_mode` to `bypassPermissions`, to disable all permission requests when using Claude Code.
- ///
- /// Default: false
- always_allow_tool_actions: Option,
- /// Where to show a popup notification when the agent is waiting for user input.
- ///
- /// Default: "primary_screen"
- notify_when_agent_waiting: Option,
- /// Whether to play a sound when the agent has either completed its response, or needs user input.
- ///
- /// Default: false
- play_sound_when_agent_done: Option,
- /// Whether to stream edits from the agent as they are received.
- ///
- /// Default: false
- stream_edits: Option,
- /// Whether to display agent edits in single-file editors in addition to the review multibuffer pane.
- ///
- /// Default: true
- single_file_review: Option,
- /// Additional parameters for language model requests. When making a request
- /// to a model, parameters will be taken from the last entry in this list
- /// that matches the model's provider and name. In each entry, both provider
- /// and model are optional, so that you can specify parameters for either
- /// one.
- ///
- /// Default: []
- #[serde(default)]
- model_parameters: Vec,
- /// What completion mode to enable for new threads
- ///
- /// Default: normal
- preferred_completion_mode: Option,
- /// Whether to show thumb buttons for feedback in the agent panel.
- ///
- /// Default: true
- enable_feedback: Option,
- /// Whether to have edit cards in the agent panel expanded, showing a preview of the full diff.
- ///
- /// Default: true
- expand_edit_card: Option,
- /// Whether to have terminal cards in the agent panel expanded, showing the whole command output.
- ///
- /// Default: true
- expand_terminal_card: Option,
- /// Whether to always use cmd-enter (or ctrl-enter on Linux or Windows) to send messages in the agent panel.
- ///
- /// Default: false
- use_modifier_to_send: Option,
-}
-
#[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]
#[serde(rename_all = "snake_case")]
pub enum CompletionMode {
@@ -340,202 +120,80 @@ impl From for cloud_llm_client::CompletionMode {
}
}
-#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
-pub struct LanguageModelSelection {
- pub provider: LanguageModelProviderSetting,
- pub model: String,
+impl From for CompletionMode {
+ fn from(value: settings::CompletionMode) -> Self {
+ match value {
+ settings::CompletionMode::Normal => CompletionMode::Normal,
+ settings::CompletionMode::Burn => CompletionMode::Burn,
+ }
+ }
}
-#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
-pub struct LanguageModelProviderSetting(pub String);
-
-impl JsonSchema for LanguageModelProviderSetting {
- fn schema_name() -> Cow<'static, str> {
- "LanguageModelProviderSetting".into()
- }
+#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize, Deserialize, JsonSchema)]
+pub struct AgentProfileId(pub Arc);
- fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema {
- json_schema!({
- "enum": [
- "amazon-bedrock",
- "anthropic",
- "copilot_chat",
- "deepseek",
- "google",
- "lmstudio",
- "mistral",
- "ollama",
- "openai",
- "openrouter",
- "vercel",
- "x_ai",
- "zed.dev"
- ]
- })
+impl AgentProfileId {
+ pub fn as_str(&self) -> &str {
+ &self.0
}
}
-impl From for LanguageModelProviderSetting {
- fn from(provider: String) -> Self {
- Self(provider)
+impl std::fmt::Display for AgentProfileId {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", self.0)
}
}
-impl From<&str> for LanguageModelProviderSetting {
- fn from(provider: &str) -> Self {
- Self(provider.to_string())
+impl Default for AgentProfileId {
+ fn default() -> Self {
+ Self("write".into())
}
}
-#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, JsonSchema)]
-pub struct AgentProfileContent {
- pub name: Arc,
- #[serde(default)]
- pub tools: IndexMap, bool>,
- /// Whether all context servers are enabled by default.
- pub enable_all_context_servers: Option,
- #[serde(default)]
- pub context_servers: IndexMap