assistant: Only insert the host's default prompt when creating a new context (#15650)

This PR fixes an issue where creating a new context as a guest would
insert multiple default prompts: one for the host and one for the guest.

When creating a new context as a guest while collaborating, we should
only use the host's default prompt.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-01 16:28:45 -04:00 committed by GitHub
parent 21816d1ff5
commit 0799dfb2b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -795,7 +795,7 @@ impl AssistantPanel {
let weak_assistant_panel = cx.view().downgrade();
let editor = cx.new_view(|cx| {
let mut editor = ContextEditor::for_context(
ContextEditor::for_context(
context,
fs,
workspace,
@ -803,9 +803,7 @@ impl AssistantPanel {
lsp_adapter_delegate,
weak_assistant_panel,
cx,
);
editor.insert_default_prompt(cx);
editor
)
});
this.show_context(editor, cx);