Skip to content

Commit

Permalink
assistant: Rename action from New Context to New Chat (#25455)
Browse files Browse the repository at this point in the history
If you looked that up via the Command Palette, we were showing an
outdated action name ("new context") which causes confusion given the
panel says "New Chat".

Release Notes:

- N/A
  • Loading branch information
danilo-leal authored Feb 24, 2025
1 parent 4b3a2a3 commit f020291
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
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

0 comments on commit f020291

Please sign in to comment.