9613084f59
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
- [x] Rewrite worktree git handling - [x] Fix tests - [x] Fix `test_propagate_statuses_for_repos_under_project` - [x] Replace `WorkDirectoryEntry` with `WorkDirectory` in `RepositoryEntry` - [x] Add a worktree event for capturing git status changes - [x] Confirm that the local repositories are correctly updating the new WorkDirectory field - [x] Implement the git statuses query as a join when pulling entries out of worktree - [x] Use this new join to implement the project panel and outline panel. - [x] Synchronize git statuses over the wire for collab and remote dev (use the existing `worktree_repository_statuses` table, adjust as needed) - [x] Only send changed statuses to collab Release Notes: - N/A --------- Co-authored-by: Cole Miller <cole@zed.dev> Co-authored-by: Mikayla <mikayla@zed.com> Co-authored-by: Nathan <nathan@zed.dev> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
extension.toml | ||
LICENSE-APACHE | ||
README.md |
Zed Perplexity Extension
This example extension adds the /perplexity
slash command to the Zed AI assistant.
Usage
Open the AI Assistant panel (cmd-r
or ctrl-r
) and enter:
/perplexity What's the weather in Boulder, CO tomorrow evening?
Development Setup
-
Install the Rust toolchain and clone the zed repo:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh mkdir -p ~/code cd ~/code git clone https://github.com/zed-industries/zed
-
Open Zed
-
Open Zed Extensions (
cmd-shift-x
/ctrl-shift-x
) -
Click "Install Dev Extension"
-
Navigate to the "extensions/perplexity" folder inside the zed git repo.
-
Ensure your
PERPLEXITY_API_KEY
environment variable is set (instructions below)env | grep PERPLEXITY_API_KEY
-
Quit and relaunch Zed
PERPLEXITY_API_KEY
This extension requires a Perplexity API key to be available via the PERPLEXITY_API_KEY
environment variable.
To obtain a Perplexity.ai API token, login to your Perplexity.ai account and go Settings->API and under "API Keys" click "Generate". This will require you to have Perplexity Pro or to buy API credits. By default the extension uses llama-3.1-sonar-small-128k-online
, currently cheapest model available which is roughly half a penny per request + a penny per 50,000 tokens. So most requests will cost less than $0.01 USD.
Take your API key and add it to your environment by adding export PERPLEXITY_API_KEY="pplx-0123456789abcdef..."
to your ~/.zshrc
or ~/.bashrc
. Reload close and reopen your terminal session. Check with env |grep PERPLEXITY_API_KEY
.