ai: Separate model settings for each feature (#28088)
Closes: https://github.com/zed-industries/zed/issues/20582 Allows users to select a specific model for each AI-powered feature: - Agent panel - Inline assistant - Thread summarization - Commit message generation If unspecified for a given feature, it will use the `default_model` setting. Release Notes: - Added support for configuring a specific model for each AI-powered feature --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
parent
cf0d1e4229
commit
43cb925a59
27 changed files with 670 additions and 381 deletions
|
@ -9,7 +9,7 @@ use collections::HashSet;
|
|||
use edit_action::{EditAction, EditActionParser, edit_model_prompt};
|
||||
use futures::{SinkExt, StreamExt, channel::mpsc};
|
||||
use gpui::{App, AppContext, AsyncApp, Entity, Task};
|
||||
use language_model::LanguageModelToolSchemaFormat;
|
||||
use language_model::{ConfiguredModel, LanguageModelToolSchemaFormat};
|
||||
use language_model::{
|
||||
LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage, MessageContent, Role,
|
||||
};
|
||||
|
@ -205,8 +205,8 @@ impl EditToolRequest {
|
|||
cx: &mut App,
|
||||
) -> Task<Result<String>> {
|
||||
let model_registry = LanguageModelRegistry::read_global(cx);
|
||||
let Some(model) = model_registry.editor_model() else {
|
||||
return Task::ready(Err(anyhow!("No editor model configured")));
|
||||
let Some(ConfiguredModel { model, .. }) = model_registry.default_model() else {
|
||||
return Task::ready(Err(anyhow!("No model configured")));
|
||||
};
|
||||
|
||||
let mut messages = messages.to_vec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue