@@ -724,7 +724,7 @@ mod tests {
}
}
- pub fn gemini_acp_server(project: Entity<Project>, mut cx: AsyncApp) -> Result<Arc<AcpServer>> {
+ pub fn gemini_acp_server(project: Entity<Project>, cx: AsyncApp) -> Result<Arc<AcpServer>> {
let cli_path =
Path::new(env!("CARGO_MANIFEST_DIR")).join("../../../gemini-cli/packages/cli");
let mut command = util::command::new_smol_command("node");
@@ -743,6 +743,6 @@ mod tests {
let child = command.spawn().unwrap();
- Ok(AcpServer::stdio(child, project, &mut cx))
+ cx.update(|cx| AcpServer::stdio(child, project, cx))
}
}
@@ -95,16 +95,6 @@ impl AcpThreadView {
}),
);
- Self {
- thread_state: Self::initial_state(project, window, cx),
- thread_entry_views: Vec::new(),
- message_editor,
- send_task: None,
- list_state: list_state,
- last_error: None,
- }
- }
-
let root_dir = project
.read(cx)
.visible_worktrees(cx)
@@ -132,6 +122,7 @@ impl AcpThreadView {
thread_state: Self::initial_state(agent.clone(), window, cx),
agent,
message_editor,
+ thread_entry_views: Vec::new(),
send_task: None,
list_state: list_state,
last_error: None,