diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 251cad6234..2404bafa46 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -47,6 +47,7 @@ - [Overview](./ai/overview.md) - [Agent Panel](./ai/agent-panel.md) - [Tools](./ai/tools.md) + - [Gemini CLI](./ai/gemini-cli.md) - [Inline Assistant](./ai/inline-assistant.md) - [Edit Prediction](./ai/edit-prediction.md) - [Text Threads](./ai/text-threads.md) diff --git a/docs/src/ai/agent-panel.md b/docs/src/ai/agent-panel.md index f944eb88b0..6caa2047d2 100644 --- a/docs/src/ai/agent-panel.md +++ b/docs/src/ai/agent-panel.md @@ -8,7 +8,8 @@ If you're using the Agent Panel for the first time, you need to have at least on You can do that by: 1. [subscribing to our Pro plan](https://zed.dev/pricing), so you have access to our hosted models -2. or by [bringing your own API keys](./llm-providers.md#use-your-own-keys) for your desired provider +2. [bringing your own API keys](./llm-providers.md#use-your-own-keys) for your desired provider +3. Using [Gemini CLI](./gemini-cli.md) through the Zed Agent Panel. ## Overview {#overview} @@ -71,9 +72,9 @@ So, if your active tab had edits made by the AI, you'll see diffs with the same Although Zed's agent is very efficient at reading through your code base to autonomously pick up relevant files, directories, and other context, manually adding context is still encouraged as a way to speed up and improve the AI's response quality. If you have a tab open while using the Agent Panel, that tab appears as a suggested context in form of a dashed button. -You can also add other forms of context by either mentioning them with `@` or hitting the `+` icon button. +You can also add other forms of context by mentioning them by typing `@` in the editor. -You can even add previous threads as context by mentioning them with `@thread`, or by selecting the "New From Summary" option from the `+` menu to continue a longer conversation, keeping it within the context window. +You can include files with `@files`, symbols with `@symbol`, previous Agent Panel threads with `@thread` or fetch from the web with `@fetch`. Pasting images as context is also supported by the Agent Panel. diff --git a/docs/src/ai/gemini-cli.md b/docs/src/ai/gemini-cli.md new file mode 100644 index 0000000000..ee1c771f0b --- /dev/null +++ b/docs/src/ai/gemini-cli.md @@ -0,0 +1,23 @@ +# Gemini CLI + +Zed provides the ability to run Gemini CLI directly in our [Agent Panel](./agent-panel.md). + +Under the hood we run Gemini CLI in the background, and talk to it over [ACP](TODO TODO). This means that you're running the real Gemini CLI, with all of the advantages of that, but you can see and interact with files in your editor. + +## Getting Started + +The Gemini integration should be enabled by default, run `agent: new gemini cli thread`. + +If you don't yet have Gemini CLI installed, then Zed will install a version for you. If you do, then we will use the version of Gemini on your path. + +If it is too old, you will see an error message, and you will have to upgrade Gemini. The instructions depend on how you originally installed it, but typically `npm install -g gemini-cli@preview` should work. + +After you have Gemini running, you'll be prompted to choose your authentication method. Most users should click "Log in with Google", but if you have an API key already you can also click "Use Gemini API Key". The "Vertex AI" option is for those who are using Vertex AI, and have already configured their environment correctly. + +For more information, see the [Gemini docs](TODO TODO) + +## Usage + +Similar to the built in agent, you can use Gemini CLI to do anything that you need. You can @-mention files, recent conversations, symbols, or fetch the web. + +In the initial version, Gemini CLI does not support editing previous messages. We hope to add this ability soon.