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

@ -1,4 +1,4 @@
use crate::AssistantPanel;
use crate::AgentPanel;
use crate::context::{AgentContextHandle, RULES_ICON};
use crate::context_picker::{ContextPicker, MentionLink};
use crate::context_store::ContextStore;
@ -712,7 +712,7 @@ fn open_markdown_link(
.detach_and_log_err(cx);
}
Some(MentionLink::Thread(thread_id)) => workspace.update(cx, |workspace, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
if let Some(panel) = workspace.panel::<AgentPanel>(cx) {
panel.update(cx, |panel, cx| {
panel
.open_thread_by_id(&thread_id, window, cx)
@ -721,7 +721,7 @@ fn open_markdown_link(
}
}),
Some(MentionLink::TextThread(path)) => workspace.update(cx, |workspace, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
if let Some(panel) = workspace.panel::<AgentPanel>(cx) {
panel.update(cx, |panel, cx| {
panel
.open_saved_prompt_editor(path, window, cx)
@ -1211,8 +1211,7 @@ impl ActiveThread {
if let Some(workspace) = workspace_handle.upgrade() {
workspace.update(_cx, |workspace, cx| {
workspace
.focus_panel::<AssistantPanel>(window, cx);
workspace.focus_panel::<AgentPanel>(window, cx);
});
}
})
@ -3524,7 +3523,7 @@ pub(crate) fn open_context(
}
AgentContextHandle::Thread(thread_context) => workspace.update(cx, |workspace, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
if let Some(panel) = workspace.panel::<AgentPanel>(cx) {
panel.update(cx, |panel, cx| {
panel.open_thread(thread_context.thread.clone(), window, cx);
});
@ -3533,7 +3532,7 @@ pub(crate) fn open_context(
AgentContextHandle::TextThread(text_thread_context) => {
workspace.update(cx, |workspace, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
if let Some(panel) = workspace.panel::<AgentPanel>(cx) {
panel.update(cx, |panel, cx| {
panel.open_prompt_editor(text_thread_context.context.clone(), window, cx)
});