Register agent actions

This commit is contained in:
Oleksiy Syvokon 2025-07-22 17:46:54 +03:00
parent 4059a21422
commit 585110b2cb
4 changed files with 9 additions and 2 deletions

1
Cargo.lock generated
View file

@ -17688,6 +17688,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
name = "vim"
version = "0.1.0"
dependencies = [
"agent_ui",
"anyhow",
"assets",
"async-compat",

View file

@ -197,6 +197,11 @@ impl ModelUsageContext {
}
}
pub fn init_settings(cx: &mut App) {
AgentSettings::register(cx);
SlashCommandSettings::register(cx);
}
/// Initializes the `agent` crate.
pub fn init(
fs: Arc<dyn Fs>,
@ -206,8 +211,7 @@ pub fn init(
is_eval: bool,
cx: &mut App,
) {
AgentSettings::register(cx);
SlashCommandSettings::register(cx);
init_settings(cx);
assistant_context::init(client.clone(), cx);
rules_library::init(cx);

View file

@ -52,6 +52,7 @@ zed_actions.workspace = true
workspace-hack.workspace = true
[dev-dependencies]
agent_ui.workspace = true
assets.workspace = true
command_palette.workspace = true
editor = { workspace = true, features = ["test-support"] }

View file

@ -29,6 +29,7 @@ impl VimTestContext {
editor::init_settings(cx);
project::Project::init_settings(cx);
theme::init(theme::LoadThemes::JustBase, cx);
agent_ui::init_settings(cx);
});
}