assistant_tool: Decouple Tool
from Workspace
(#26309)
This PR decouples the `Tool` trait from the `Workspace` (and from the UI, in general). `Tool::run` now takes a `WeakEntity<Project>` instead of a `WeakEntity<Workspace>` and a `Window`. Release Notes: - N/A
This commit is contained in:
parent
4f6682c7fe
commit
18f3f8097f
13 changed files with 35 additions and 52 deletions
|
@ -170,8 +170,8 @@ impl AssistantPanel {
|
|||
|
||||
Self {
|
||||
active_view: ActiveView::Thread,
|
||||
workspace: workspace.clone(),
|
||||
project,
|
||||
workspace,
|
||||
project: project.clone(),
|
||||
fs: fs.clone(),
|
||||
language_registry: language_registry.clone(),
|
||||
thread_store: thread_store.clone(),
|
||||
|
@ -179,7 +179,7 @@ impl AssistantPanel {
|
|||
ActiveThread::new(
|
||||
thread.clone(),
|
||||
thread_store.clone(),
|
||||
workspace,
|
||||
project.downgrade(),
|
||||
language_registry,
|
||||
tools.clone(),
|
||||
window,
|
||||
|
@ -246,7 +246,7 @@ impl AssistantPanel {
|
|||
ActiveThread::new(
|
||||
thread.clone(),
|
||||
self.thread_store.clone(),
|
||||
self.workspace.clone(),
|
||||
self.project.downgrade(),
|
||||
self.language_registry.clone(),
|
||||
self.tools.clone(),
|
||||
window,
|
||||
|
@ -381,7 +381,7 @@ impl AssistantPanel {
|
|||
ActiveThread::new(
|
||||
thread.clone(),
|
||||
this.thread_store.clone(),
|
||||
this.workspace.clone(),
|
||||
this.project.downgrade(),
|
||||
this.language_registry.clone(),
|
||||
this.tools.clone(),
|
||||
window,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue