assistant_tool: Pass an Entity<Project>
to Tool::run
(#26312)
This PR updates the `Tool::run` method to take an `Entity<Project>` instead of a `WeakEntity<Project>`. Release Notes: - N/A
This commit is contained in:
parent
921c24e274
commit
e70d0edfac
7 changed files with 20 additions and 30 deletions
|
@ -4,7 +4,7 @@ mod tool_working_set;
|
|||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use gpui::{App, Task, WeakEntity};
|
||||
use gpui::{App, Entity, Task};
|
||||
use project::Project;
|
||||
|
||||
pub use crate::tool_registry::*;
|
||||
|
@ -31,7 +31,7 @@ pub trait Tool: 'static + Send + Sync {
|
|||
fn run(
|
||||
self: Arc<Self>,
|
||||
input: serde_json::Value,
|
||||
project: WeakEntity<Project>,
|
||||
project: Entity<Project>,
|
||||
cx: &mut App,
|
||||
) -> Task<Result<String>>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue