eval: Don't read the model from the user settings (#31230)
This PR fixes an issue where the eval was incorrectly pulling the provider/model from the user settings, which could cause problems when running certain evals. Was introduced in #30168 due to the restructuring after the removal of the `assistant` crate. Release Notes: - N/A
This commit is contained in:
parent
f8b997b25c
commit
cb52acbf3d
4 changed files with 9 additions and 1 deletions
|
@ -117,6 +117,7 @@ pub fn init(
|
||||||
client: Arc<Client>,
|
client: Arc<Client>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
language_registry: Arc<LanguageRegistry>,
|
language_registry: Arc<LanguageRegistry>,
|
||||||
|
is_eval: bool,
|
||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
) {
|
) {
|
||||||
AssistantSettings::register(cx);
|
AssistantSettings::register(cx);
|
||||||
|
@ -124,7 +125,11 @@ pub fn init(
|
||||||
|
|
||||||
assistant_context_editor::init(client.clone(), cx);
|
assistant_context_editor::init(client.clone(), cx);
|
||||||
rules_library::init(cx);
|
rules_library::init(cx);
|
||||||
init_language_model_settings(cx);
|
if !is_eval {
|
||||||
|
// Initializing the language model from the user settings messes with the eval, so we only initialize them when
|
||||||
|
// we're not running inside of the eval.
|
||||||
|
init_language_model_settings(cx);
|
||||||
|
}
|
||||||
assistant_slash_command::init(cx);
|
assistant_slash_command::init(cx);
|
||||||
thread_store::init(cx);
|
thread_store::init(cx);
|
||||||
agent_panel::init(cx);
|
agent_panel::init(cx);
|
||||||
|
|
|
@ -432,6 +432,7 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
||||||
client.clone(),
|
client.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
languages.clone(),
|
languages.clone(),
|
||||||
|
true,
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
assistant_tools::init(client.http_client(), cx);
|
assistant_tools::init(client.http_client(), cx);
|
||||||
|
|
|
@ -519,6 +519,7 @@ fn main() {
|
||||||
app_state.client.clone(),
|
app_state.client.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
app_state.languages.clone(),
|
app_state.languages.clone(),
|
||||||
|
false,
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
assistant_tools::init(app_state.client.http_client(), cx);
|
assistant_tools::init(app_state.client.http_client(), cx);
|
||||||
|
|
|
@ -4295,6 +4295,7 @@ mod tests {
|
||||||
app_state.client.clone(),
|
app_state.client.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
app_state.languages.clone(),
|
app_state.languages.clone(),
|
||||||
|
false,
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
repl::init(app_state.fs.clone(), cx);
|
repl::init(app_state.fs.clone(), cx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue