assistant: Fix inline assistant not working for non-terminal panel views (#15864)
Fixes #15729 Release Notes: - Fixed an issue where the terminal inline assistant would not appear when opening a terminal in the center pane ([#15729](https://github.com/zed-industries/zed/issues/15729)).
This commit is contained in:
parent
33afbe9a94
commit
2e27448d5f
1 changed files with 5 additions and 0 deletions
|
@ -813,6 +813,11 @@ impl AssistantPanel {
|
||||||
.and_then(|item| item.act_as::<Editor>(cx))
|
.and_then(|item| item.act_as::<Editor>(cx))
|
||||||
{
|
{
|
||||||
Some(InlineAssistTarget::Editor(workspace_editor, true))
|
Some(InlineAssistTarget::Editor(workspace_editor, true))
|
||||||
|
} else if let Some(terminal_view) = workspace
|
||||||
|
.active_item(cx)
|
||||||
|
.and_then(|item| item.act_as::<TerminalView>(cx))
|
||||||
|
{
|
||||||
|
Some(InlineAssistTarget::Terminal(terminal_view))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue