agent: Rename a number of constructs from Assistant to Agent (#30196)

This PR renames a number of constructs in the `agent` crate from the
"Assistant" terminology to "Agent".

Not comprehensive, but it's a start.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-07 21:18:51 -04:00 committed by GitHub
parent d6c7cdd60f
commit 6cc6e4d4b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 155 additions and 163 deletions

View file

@ -12,7 +12,7 @@ use agent::AgentDiffToolbar;
use anyhow::Context as _;
pub use app_menus::*;
use assets::Assets;
use assistant_context_editor::AssistantPanelDelegate;
use assistant_context_editor::AgentPanelDelegate;
use breadcrumbs::Breadcrumbs;
use client::zed_urls;
use collections::VecDeque;
@ -435,7 +435,7 @@ fn initialize_panels(
let is_assistant2_enabled = !cfg!(test);
let agent_panel = if is_assistant2_enabled {
let agent_panel =
agent::AssistantPanel::load(workspace_handle.clone(), prompt_builder, cx.clone())
agent::AgentPanel::load(workspace_handle.clone(), prompt_builder, cx.clone())
.await?;
Some(agent_panel)
@ -453,15 +453,15 @@ fn initialize_panels(
// We need to do this here instead of within the individual `init`
// functions so that we only register the actions once.
//
// Once we ship `assistant2` we can push this back down into `agent::assistant_panel::init`.
// Once we ship `assistant2` we can push this back down into `agent::agent_panel::init`.
if is_assistant2_enabled {
<dyn AssistantPanelDelegate>::set_global(
<dyn AgentPanelDelegate>::set_global(
Arc::new(agent::ConcreteAssistantPanelDelegate),
cx,
);
workspace
.register_action(agent::AssistantPanel::toggle_focus)
.register_action(agent::AgentPanel::toggle_focus)
.register_action(agent::InlineAssistant::inline_assist);
}
})?;