mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-07 17:26:56 +00:00
8ae5a3b61a
Co-authored-by: Antonio <antonio@zed.dev> Resurrected this from some assistant work I did in Spring of 2023. - [x] Resurrect streaming responses - [x] Use streaming responses to enable AI via Zed's servers by default (but preserve API key option for now) - [x] Simplify protobuf - [x] Proxy to OpenAI on zed.dev - [x] Proxy to Gemini on zed.dev - [x] Improve UX for switching between openAI and google models - We current disallow cycling when setting a custom model, but we need a better solution to keep OpenAI models available while testing the google ones - [x] Show remaining tokens correctly for Google models - [x] Remove semantic index - [x] Delete `ai` crate - [x] Cloud front so we can ban abuse - [x] Rate-limiting - [x] Fix panic when using inline assistant - [x] Double check the upgraded `AssistantSettings` are backwards-compatible - [x] Add hosted LLM interaction behind a `language-models` feature flag. Release Notes: - We are temporarily removing the semantic index in order to redesign it from scratch. --------- Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Thorsten <thorsten@zed.dev> Co-authored-by: Max <max@zed.dev>
93 lines
1.7 KiB
Bash
Executable file
93 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
set -e
|
|
|
|
# if sudo is not installed, define an empty alias
|
|
maysudo=$(command -v sudo || command -v doas || true)
|
|
|
|
# Ubuntu, Debian, etc.
|
|
# https://packages.ubuntu.com/
|
|
apt=$(command -v apt-get || true)
|
|
if [[ -n $apt ]]; then
|
|
deps=(
|
|
libasound2-dev
|
|
libfontconfig-dev
|
|
libwayland-dev
|
|
libxkbcommon-x11-dev
|
|
libssl-dev
|
|
libzstd-dev
|
|
libvulkan1
|
|
)
|
|
$maysudo "$apt" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Fedora, CentOS, RHEL, etc.
|
|
# https://packages.fedoraproject.org/
|
|
dnf=$(command -v dnf || true)
|
|
if [[ -n $dnf ]]; then
|
|
deps=(
|
|
alsa-lib-devel
|
|
fontconfig-devel
|
|
wayland-devel
|
|
libxkbcommon-x11-devel
|
|
openssl-devel
|
|
libzstd-devel
|
|
vulkan-loader
|
|
)
|
|
$maysudo "$dnf" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# openSuse
|
|
# https://software.opensuse.org/
|
|
zyp=$(command -v zypper || true)
|
|
if [[ -n $zyp ]]; then
|
|
deps=(
|
|
alsa-devel
|
|
fontconfig-devel
|
|
wayland-devel
|
|
libxkbcommon-x11-devel
|
|
openssl-devel
|
|
libzstd-devel
|
|
vulkan-loader
|
|
)
|
|
$maysudo "$zyp" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Arch, Manjaro, etc.
|
|
# https://archlinux.org/packages
|
|
pacman=$(command -v pacman || true)
|
|
if [[ -n $pacman ]]; then
|
|
deps=(
|
|
alsa-lib
|
|
fontconfig
|
|
wayland
|
|
libxkbcommon-x11
|
|
openssl
|
|
zstd
|
|
)
|
|
$maysudo "$pacman" -S --needed --noconfirm "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Void
|
|
# https://voidlinux.org/packages/
|
|
xbps=$(command -v xbps-install || true)
|
|
if [[ -n $xbps ]]; then
|
|
deps=(
|
|
alsa-lib-devel
|
|
fontconfig-devel
|
|
libxcb-devel
|
|
libxkbcommon-devel
|
|
libzstd-devel
|
|
openssl-devel
|
|
wayland-devel
|
|
vulkan-loader
|
|
)
|
|
$maysudo "$xbps" -Syu "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Unsupported Linux distribution in script/linux"
|