zed/crates/ai/README.zmd

10 lines
1.1 KiB
Text
Raw Normal View History

2023-05-23 14:52:21 +00:00
# Zed AI Integration
2023-05-23 05:11:22 +00:00
2023-05-23 14:52:21 +00:00
One big concept I want to explore for Zed's AI integration is representing conversations between multiple users and the model as more of a shared document called a *context*, to which we apply fine-grained version control.
2023-05-23 05:11:22 +00:00
2023-05-23 14:52:21 +00:00
The assistant pane will contain a set of contexts, each in its own tab. Each context represents input to a language model, so its maximum length will be limited accordingly. Contexts can be freely edited, and to submit a context you hit cmd-enter or click the button in the toolbar. The toolbar also indicates the number of tokens remaining for the model.
2023-05-23 06:16:44 +00:00
2023-05-23 14:52:21 +00:00
It's possible to "drill in" on a particular piece of the content and start a new context that is based on it. To do this, select any text in Zed and hit `cmd-shift-?`. A portal to the selected code will be created in the most recently active context. Question to self: should we always start a new context? Should there be a binding to start a new one vs appending to the most recently active one? What if we only append to the most recently active one if it's open.
2023-05-23 06:16:44 +00:00
2023-05-23 14:52:21 +00:00
When you embed content