From 6995f6287046d6d7b0bd25ae70a4238a01b570d6 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Thu, 20 Feb 2025 10:49:44 -0500 Subject: [PATCH 1/5] Re-list avante page and update changelog --- docs/about/changelog.md | 6 ++++++ docs/index.md | 2 ++ docs/integrations/avante.mdx | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/about/changelog.md b/docs/about/changelog.md index 81a2292..18dfc94 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -13,6 +13,12 @@ Major features and changes are noted here. To review all updates, see the Related: [Upgrade CodeGate](../how-to/install.md#upgrade-codegate) +- **New integration: Open Interpreter** - 20 Feb, 2025\ + CodeGate v0.1.24 adds support for the + [avante.nvim](https://github.com/yetone/avante.nvim) plugin for NeoVim with + OpenAI and CodeGate muxing. See the + [integration guide](../integrations/avante.mdx) to get started. + - **Muxing filter rules** - 18 Feb, 2025\ CodeGate v0.1.23 adds filter rules for model muxing, allowing you to define which model should be used for a given file type. See the diff --git a/docs/index.md b/docs/index.md index 003632c..72c2809 100644 --- a/docs/index.md +++ b/docs/index.md @@ -54,6 +54,8 @@ AI coding assistants / IDEs: - **[Aider](./integrations/aider.mdx)** with Ollama and OpenAI-compatible APIs +- **[avante.nvim](./integrations/avante.mdx)** (NeoVim plugin) with OpenAI + - **[Cline](./integrations/cline.mdx)** in Visual Studio Code CodeGate supports Ollama, Anthropic, OpenAI and compatible APIs, OpenRouter, diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 43e50b1..a6d4b9f 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -3,7 +3,6 @@ title: Use CodeGate with avante.nvim description: Configure the `avante.nvim` plugin for Neovim sidebar_label: avante.nvim sidebar_position: 15 -unlisted: true --- **[avante.nvim](https://github.com/yetone/avante.nvim)** is a Neovim plugin that From 17c214a79b1de364067256f39157e6192a0f0c91 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Thu, 20 Feb 2025 11:33:23 -0500 Subject: [PATCH 2/5] Update to match other integrations --- docs/integrations/avante.mdx | 125 +++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 48 deletions(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index a6d4b9f..99ee7ac 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -5,75 +5,104 @@ sidebar_label: avante.nvim sidebar_position: 15 --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + **[avante.nvim](https://github.com/yetone/avante.nvim)** is a Neovim plugin that -provides a Cursor-like user experience. It integrates with multiple AI providers -(e.g. Claude and OpenAI). +provides a Cursor-like user experience with multiple AI providers. + +CodeGate works with [OpenAI](https://openai.com/api/) and compatible APIs +through Avante. + +You can also use [CodeGate muxing](../features/muxing.mdx) to select your +provider and model using [workspaces](../features/workspaces.mdx). ## Install avante.nvim -Install the **avante.nvim** plugin using your preferred plugin manager. For -instructions, consult **avante.nvim**'s +Install the `avante.nvim` plugin using your preferred NeoVim plugin manager. For +detailed installation instructions, refer to `avante.nvim`'s [documentation](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation). -## Configure CodeGate with avante.nvim +## Configure avante.nvim to use CodeGate + +Configure `avante.nvim` to route requests through CodeGate by setting its +provider endpoint to `http://localhost:8989/`. -Consult **avante.nvim**'s documentation for specific examples on customizing -your configuration using your preferred plugin manager. +Using [lazy.nvim](https://lazy.folke.io/) (recommended), configure the +`avante.nvim` provider as shown: -Using `lazy.nvim` (recommended) add the following configuration to enable -CodeGate with **avante.nvim**: + + +First, configure your [provider(s)](../features/muxing.mdx#add-a-provider) and +select a model for each of your +[workspace(s)](../features/workspaces.mdx#manage-workspaces) in the CodeGate dashboard. -```lua +Then configure `avante.nvim` to use the CodeGate mux endpoint: + +```lua title="~/.config/nvim/lua/plugins/avante.lua" { - "yetone/avante.nvim", - -- ... etc ... - opts = { - -- your provider configuration ... - provider = "openai", - openai = { - endpoint = "http://localhost:8989/openai", -- use the endpoint matching your LLM provider - model = "gpt-4o", -- your desired model (or use gpt-4o, etc.) - timeout = 30000, -- timeout in milliseconds - temperature = 0, -- adjust if needed - max_tokens = 4096, - }, + "yetone/avante.nvim", + -- ... etc ... + opts = { + provider = "openai", + openai = { + endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint + model = "gpt-4o", -- the actual model is determined by your CodeGate workspace + timeout = 30000, -- timeout in milliseconds + temperature = 0, -- adjust if needed + max_tokens = 4096, }, - -- ... etc ... + }, + -- ... etc ... } ``` -:::note + + +You need an [OpenAI API](https://openai.com/api/) account to use this provider. +To use a different OpenAI-compatible endpoint, set the `CODEGATE_OPENAI_URL` +[configuration parameter](../how-to/configure.md) when you launch CodeGate. -**avante.nvim** does not yet support _fill-in-the-middle_ completions. You have -to configure your fill-in-the-middle completion plugin separately. +```lua title="~/.config/nvim/lua/plugins/avante.lua" +{ + "yetone/avante.nvim", + -- ... etc ... + opts = { + provider = "openai", + openai = { + endpoint = "http://localhost:8989/openai", -- CodeGate's OpenAI endpoint + model = "gpt-4o", -- your desired model + timeout = 30000, -- timeout in milliseconds + temperature = 0, -- adjust if needed + max_tokens = 4096, + }, + }, + -- ... etc ... +} +``` -::: + + -### Verifying configuration +:::note -To verify the configuration, type `:AvanteChat` to start the **avante.nvim** -plugin. You should see the **avante.nvim** UI appear in the Neovim window. +`avante.nvim` does not yet support _fill-in-the-middle_ (FIM) completions. You +have to configure your FIM completion plugin separately. -Type and send the following message: +::: -``` -codegate version -``` +## Verify configuration -If CodeGate is configured correctly, you should see a response from the CodeGate -server. +To verify your setup: -### Model muxing +1. Type `:AvanteChat` to launch the `avante.nvim `interface +2. Enter the following command in the chat: + ``` + codegate version + ``` +3. You should receive a response showing the current CodeGate version number -To take advantage of CodeGate's [model muxing feature](../features/muxing.mdx), -use **avante.nvim**'s OpenAI provider with the following configuration: +## Next steps -```lua -openai = { - endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint - model = "gpt-4o", -- the actual model is determined by your CodeGate workspace - timeout = 30000, -- timeout in milliseconds - temperature = 0, -- adjust if needed - max_tokens = 4096, -}, -``` +Learn more about [CodeGate's features](../features/index.mdx) and explore the +[dashboard](../how-to/dashboard.md). From 0119b6db085405d398bb51def37663e35ce82d6e Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Thu, 20 Feb 2025 13:37:15 -0500 Subject: [PATCH 3/5] Fix Neovim capitalization, other minor edits --- docs/about/changelog.md | 2 +- docs/index.md | 2 +- docs/integrations/avante.mdx | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/about/changelog.md b/docs/about/changelog.md index 18dfc94..a26fe7f 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -15,7 +15,7 @@ Related: [Upgrade CodeGate](../how-to/install.md#upgrade-codegate) - **New integration: Open Interpreter** - 20 Feb, 2025\ CodeGate v0.1.24 adds support for the - [avante.nvim](https://github.com/yetone/avante.nvim) plugin for NeoVim with + [avante.nvim](https://github.com/yetone/avante.nvim) plugin for Neovim with OpenAI and CodeGate muxing. See the [integration guide](../integrations/avante.mdx) to get started. diff --git a/docs/index.md b/docs/index.md index 72c2809..e1b034f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -54,7 +54,7 @@ AI coding assistants / IDEs: - **[Aider](./integrations/aider.mdx)** with Ollama and OpenAI-compatible APIs -- **[avante.nvim](./integrations/avante.mdx)** (NeoVim plugin) with OpenAI +- **[avante.nvim](./integrations/avante.mdx)** (Neovim plugin) with OpenAI - **[Cline](./integrations/cline.mdx)** in Visual Studio Code diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 99ee7ac..d2f075e 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -19,7 +19,7 @@ provider and model using [workspaces](../features/workspaces.mdx). ## Install avante.nvim -Install the `avante.nvim` plugin using your preferred NeoVim plugin manager. For +Install the `avante.nvim` plugin using your preferred Neovim plugin manager. For detailed installation instructions, refer to `avante.nvim`'s [documentation](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation). @@ -29,7 +29,7 @@ Configure `avante.nvim` to route requests through CodeGate by setting its provider endpoint to `http://localhost:8989/`. Using [lazy.nvim](https://lazy.folke.io/) (recommended), configure the -`avante.nvim` provider as shown: +`avante.nvim` provider settings as shown: @@ -95,12 +95,12 @@ have to configure your FIM completion plugin separately. To verify your setup: -1. Type `:AvanteChat` to launch the `avante.nvim `interface -2. Enter the following command in the chat: +1. In Neovim, type `:AvanteChat` to launch the `avante.nvim `interface. +2. Enter the following prompt in the chat: ``` codegate version ``` -3. You should receive a response showing the current CodeGate version number +3. You should receive a response like like "CodeGate version 0.1.24". ## Next steps From 3deea4af43b488047f96c7df6e25fce2598c4084 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Thu, 20 Feb 2025 14:23:29 -0500 Subject: [PATCH 4/5] Add codegate.nvim note --- docs/integrations/avante.mdx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index d2f075e..b0d44af 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -20,9 +20,17 @@ provider and model using [workspaces](../features/workspaces.mdx). ## Install avante.nvim Install the `avante.nvim` plugin using your preferred Neovim plugin manager. For -detailed installation instructions, refer to `avante.nvim`'s +detailed installation instructions, refer to Avante's [documentation](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation). +:::tip + +You can also install [codegate.nvim](https://github.com/stacklok/codegate.nvim), +a plugin that interfaces with CodeGate and allows you to quickly switch between +workspaces without leaving Neovim. + +::: + ## Configure avante.nvim to use CodeGate Configure `avante.nvim` to route requests through CodeGate by setting its @@ -95,7 +103,7 @@ have to configure your FIM completion plugin separately. To verify your setup: -1. In Neovim, type `:AvanteChat` to launch the `avante.nvim `interface. +1. In Neovim, type `:AvanteChat` to launch the Avante interface. 2. Enter the following prompt in the chat: ``` codegate version From 0fcfc3ca9468c48ad7003e67e97397a894119c39 Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Thu, 20 Feb 2025 20:03:59 +0100 Subject: [PATCH 5/5] make avante public and add note about codegate.nvim --- docs/integrations/avante.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index b0d44af..fd8b067 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -17,6 +17,14 @@ through Avante. You can also use [CodeGate muxing](../features/muxing.mdx) to select your provider and model using [workspaces](../features/workspaces.mdx). +:::note + +You can **additionally** install +[codegate.nvim](https://github.com/stacklok/codegate.nvim), which will provide a +closer integration with CodeGate. + +::: + ## Install avante.nvim Install the `avante.nvim` plugin using your preferred Neovim plugin manager. For