Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assistant: Rename action from New Context to New Chat #25455

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@
"ctrl-alt-/": "assistant::ToggleModelSelector",
"ctrl-k h": "assistant::DeployHistory",
"ctrl-k l": "assistant::DeployPromptLibrary",
"new": "assistant::NewContext",
"ctrl-t": "assistant::NewContext",
"ctrl-n": "assistant::NewContext"
"new": "assistant::NewChat",
"ctrl-t": "assistant::NewChat",
"ctrl-n": "assistant::NewChat"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@
"cmd-alt-/": "assistant::ToggleModelSelector",
"cmd-k h": "assistant::DeployHistory",
"cmd-k l": "assistant::DeployPromptLibrary",
"cmd-t": "assistant::NewContext",
"cmd-n": "assistant::NewContext"
"cmd-t": "assistant::NewChat",
"cmd-n": "assistant::NewChat"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion crates/assistant/src/assistant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ actions!(
[
InsertActivePrompt,
DeployHistory,
NewContext,
NewChat,
CycleNextInlineAssist,
CyclePreviousInlineAssist
]
Expand Down
14 changes: 7 additions & 7 deletions crates/assistant/src/assistant_panel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent};
use crate::{
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewContext,
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewChat,
};
use anyhow::{anyhow, Result};
use assistant_context_editor::{
Expand Down Expand Up @@ -129,7 +129,7 @@ impl AssistantPanel {
workspace.project().clone(),
Default::default(),
None,
NewContext.boxed_clone(),
NewChat.boxed_clone(),
window,
cx,
);
Expand Down Expand Up @@ -228,12 +228,12 @@ impl AssistantPanel {
IconButton::new("new-chat", IconName::Plus)
.icon_size(IconSize::Small)
.on_click(cx.listener(|_, _, window, cx| {
window.dispatch_action(NewContext.boxed_clone(), cx)
window.dispatch_action(NewChat.boxed_clone(), cx)
}))
.tooltip(move |window, cx| {
Tooltip::for_action_in(
"New Chat",
&NewContext,
&NewChat,
&focus_handle,
window,
cx,
Expand All @@ -256,7 +256,7 @@ impl AssistantPanel {
let focus_handle = _pane.focus_handle(cx);
Some(ContextMenu::build(window, cx, move |menu, _, _| {
menu.context(focus_handle.clone())
.action("New Chat", Box::new(NewContext))
.action("New Chat", Box::new(NewChat))
.action("History", Box::new(DeployHistory))
.action("Prompt Library", Box::new(DeployPromptLibrary))
.action("Configure", Box::new(ShowConfiguration))
Expand Down Expand Up @@ -760,7 +760,7 @@ impl AssistantPanel {

pub fn create_new_context(
workspace: &mut Workspace,
_: &NewContext,
_: &NewChat,
window: &mut Window,
cx: &mut Context<Workspace>,
) {
Expand Down Expand Up @@ -1206,7 +1206,7 @@ impl Render for AssistantPanel {
v_flex()
.key_context("AssistantPanel")
.size_full()
.on_action(cx.listener(|this, _: &NewContext, window, cx| {
.on_action(cx.listener(|this, _: &NewChat, window, cx| {
this.new_context(window, cx);
}))
.on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| {
Expand Down
Loading