Use the same InlineAssist action between both assistant and assistant2 (#22126)

This PR makes it so `assistant` and `assistant2` both use the same
action for inline assist (`zed_actions::InlineAssist`).

This makes it so the keybindings to deploy the inline assist seamlessly
swap based on the feature flag without needing to rebind them.

One minor caveat: if you're using `assistant2` the action name in the
command palette will be `assistant: inline assist`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-12-16 23:57:07 -05:00 committed by GitHub
parent 80431e5518
commit 3052fc2565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 11 deletions

View file

@ -314,12 +314,13 @@ pub fn initialize_workspace(
workspace_handle.update(&mut cx, |workspace, cx| {
if let Some(assistant_panel) = assistant_panel {
workspace.add_panel(assistant_panel, cx);
workspace.register_action(assistant::AssistantPanel::inline_assist);
}
if let Some(assistant2_panel) = assistant2_panel {
workspace.add_panel(assistant2_panel, cx);
workspace.register_action(assistant2::InlineAssistant::inline_assist);
}
})
})
.detach();