@@ -26,11 +26,10 @@ use zed_actions::agent::{OpenClaudeAgentOnboardingModal, ReauthenticateAgent, Re
2626
2727use crate :: ui:: { AcpOnboardingModal , ClaudeCodeOnboardingModal } ;
2828use crate :: {
29- AddContextServer , AgentDiffPane , CopyThreadToClipboard , Follow , InlineAssistant ,
30- LoadThreadFromClipboard , NewTextThread , NewThread , OpenActiveThreadAsMarkdown , OpenAgentDiff ,
31- OpenHistory , ResetTrialEndUpsell , ResetTrialUpsell , ToggleNavigationMenu , ToggleNewThreadMenu ,
32- ToggleOptionsMenu ,
33- acp:: AcpServerView ,
29+ AddContextServer , AgentDiffPane , ConnectionView , CopyThreadToClipboard , Follow ,
30+ InlineAssistant , LoadThreadFromClipboard , NewTextThread , NewThread , OpenActiveThreadAsMarkdown ,
31+ OpenAgentDiff , OpenHistory , ResetTrialEndUpsell , ResetTrialUpsell , ToggleNavigationMenu ,
32+ ToggleNewThreadMenu , ToggleOptionsMenu ,
3433 agent_configuration:: { AgentConfiguration , AssistantConfigurationEvent } ,
3534 slash_command:: SlashCommandCompletionProvider ,
3635 text_thread_editor:: { AgentPanelDelegate , TextThreadEditor , make_lsp_adapter_delegate} ,
@@ -40,11 +39,10 @@ use crate::{
4039 AgentInitialContent , ExternalAgent , NewExternalAgentThread , NewNativeAgentThreadFromSummary ,
4140} ;
4241use crate :: {
43- ExpandMessageEditor ,
44- acp:: { AcpThreadHistory , ThreadHistoryEvent } ,
42+ ExpandMessageEditor , ThreadHistory , ThreadHistoryEvent ,
4543 text_thread_history:: { TextThreadHistory , TextThreadHistoryEvent } ,
4644} ;
47- use crate :: { ManageProfiles , acp :: thread_view :: AcpThreadView } ;
45+ use crate :: { ManageProfiles , connection_view :: ThreadView } ;
4846use agent_settings:: AgentSettings ;
4947use ai_onboarding:: AgentPanelOnboarding ;
5048use anyhow:: { Result , anyhow} ;
@@ -341,7 +339,7 @@ enum HistoryKind {
341339enum ActiveView {
342340 Uninitialized ,
343341 AgentThread {
344- server_view : Entity < AcpServerView > ,
342+ server_view : Entity < ConnectionView > ,
345343 } ,
346344 TextThread {
347345 text_thread_editor : Entity < TextThreadEditor > ,
@@ -504,7 +502,7 @@ pub struct AgentPanel {
504502 project : Entity < Project > ,
505503 fs : Arc < dyn Fs > ,
506504 language_registry : Arc < LanguageRegistry > ,
507- acp_history : Entity < AcpThreadHistory > ,
505+ acp_history : Entity < ThreadHistory > ,
508506 text_thread_history : Entity < TextThreadHistory > ,
509507 thread_store : Entity < ThreadStore > ,
510508 text_thread_store : Entity < assistant_text_thread:: TextThreadStore > ,
@@ -679,7 +677,7 @@ impl AgentPanel {
679677 cx. new ( |cx| ContextServerRegistry :: new ( project. read ( cx) . context_server_store ( ) , cx) ) ;
680678
681679 let thread_store = ThreadStore :: global ( cx) ;
682- let acp_history = cx. new ( |cx| AcpThreadHistory :: new ( None , window, cx) ) ;
680+ let acp_history = cx. new ( |cx| ThreadHistory :: new ( None , window, cx) ) ;
683681 let text_thread_history =
684682 cx. new ( |cx| TextThreadHistory :: new ( text_thread_store. clone ( ) , window, cx) ) ;
685683 cx. subscribe_in (
@@ -863,7 +861,7 @@ impl AgentPanel {
863861 & self . thread_store
864862 }
865863
866- pub fn history ( & self ) -> & Entity < AcpThreadHistory > {
864+ pub fn history ( & self ) -> & Entity < ThreadHistory > {
867865 & self . acp_history
868866 }
869867
@@ -903,7 +901,7 @@ impl AgentPanel {
903901 . unwrap_or ( false )
904902 }
905903
906- pub ( crate ) fn active_thread_view ( & self ) -> Option < & Entity < AcpServerView > > {
904+ pub ( crate ) fn active_thread_view ( & self ) -> Option < & Entity < ConnectionView > > {
907905 match & self . active_view {
908906 ActiveView :: AgentThread { server_view, .. } => Some ( server_view) ,
909907 ActiveView :: Uninitialized
@@ -1546,14 +1544,14 @@ impl AgentPanel {
15461544 }
15471545 }
15481546
1549- pub fn as_active_server_view ( & self ) -> Option < & Entity < AcpServerView > > {
1547+ pub fn as_active_server_view ( & self ) -> Option < & Entity < ConnectionView > > {
15501548 match & self . active_view {
15511549 ActiveView :: AgentThread { server_view } => Some ( server_view) ,
15521550 _ => None ,
15531551 }
15541552 }
15551553
1556- pub fn as_active_thread_view ( & self , cx : & App ) -> Option < Entity < AcpThreadView > > {
1554+ pub fn as_active_thread_view ( & self , cx : & App ) -> Option < Entity < ThreadView > > {
15571555 let server_view = self . as_active_server_view ( ) ?;
15581556 server_view. read ( cx) . active_thread ( ) . cloned ( )
15591557 }
@@ -1855,7 +1853,7 @@ impl AgentPanel {
18551853 . then ( || self . thread_store . clone ( ) ) ;
18561854
18571855 let server_view = cx. new ( |cx| {
1858- crate :: acp :: AcpServerView :: new (
1856+ crate :: ConnectionView :: new (
18591857 server,
18601858 resume_thread,
18611859 initial_content,
@@ -2128,7 +2126,7 @@ impl AgentPanel {
21282126 . into_any ( )
21292127 }
21302128
2131- fn handle_regenerate_thread_title ( thread_view : Entity < AcpServerView > , cx : & mut App ) {
2129+ fn handle_regenerate_thread_title ( thread_view : Entity < ConnectionView > , cx : & mut App ) {
21322130 thread_view. update ( cx, |thread_view, cx| {
21332131 if let Some ( thread) = thread_view. as_native_thread ( cx) {
21342132 thread. update ( cx, |thread, cx| {
@@ -3467,15 +3465,15 @@ impl AgentPanel {
34673465 ///
34683466 /// This is a test-only accessor that exposes the private `active_thread_view()`
34693467 /// method for test assertions. Not compiled into production builds.
3470- pub fn active_thread_view_for_tests ( & self ) -> Option < & Entity < AcpServerView > > {
3468+ pub fn active_thread_view_for_tests ( & self ) -> Option < & Entity < ConnectionView > > {
34713469 self . active_thread_view ( )
34723470 }
34733471}
34743472
34753473#[ cfg( test) ]
34763474mod tests {
34773475 use super :: * ;
3478- use crate :: acp :: thread_view :: tests:: { StubAgentServer , init_test} ;
3476+ use crate :: connection_view :: tests:: { StubAgentServer , init_test} ;
34793477 use assistant_text_thread:: TextThreadStore ;
34803478 use feature_flags:: FeatureFlagAppExt ;
34813479 use fs:: FakeFs ;
0 commit comments