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

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
This commit is contained in:
Danilo Leal 2025-02-24 09:19:38 -03:00 committed by GitHub
parent 4b3a2a33a8
commit f020291039
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 13 deletions

View file

@ -184,9 +184,9 @@
"ctrl-alt-/": "assistant::ToggleModelSelector", "ctrl-alt-/": "assistant::ToggleModelSelector",
"ctrl-k h": "assistant::DeployHistory", "ctrl-k h": "assistant::DeployHistory",
"ctrl-k l": "assistant::DeployPromptLibrary", "ctrl-k l": "assistant::DeployPromptLibrary",
"new": "assistant::NewContext", "new": "assistant::NewChat",
"ctrl-t": "assistant::NewContext", "ctrl-t": "assistant::NewChat",
"ctrl-n": "assistant::NewContext" "ctrl-n": "assistant::NewChat"
} }
}, },
{ {

View file

@ -211,8 +211,8 @@
"cmd-alt-/": "assistant::ToggleModelSelector", "cmd-alt-/": "assistant::ToggleModelSelector",
"cmd-k h": "assistant::DeployHistory", "cmd-k h": "assistant::DeployHistory",
"cmd-k l": "assistant::DeployPromptLibrary", "cmd-k l": "assistant::DeployPromptLibrary",
"cmd-t": "assistant::NewContext", "cmd-t": "assistant::NewChat",
"cmd-n": "assistant::NewContext" "cmd-n": "assistant::NewChat"
} }
}, },
{ {

View file

@ -33,7 +33,7 @@ actions!(
[ [
InsertActivePrompt, InsertActivePrompt,
DeployHistory, DeployHistory,
NewContext, NewChat,
CycleNextInlineAssist, CycleNextInlineAssist,
CyclePreviousInlineAssist CyclePreviousInlineAssist
] ]

View file

@ -1,6 +1,6 @@
use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent}; use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent};
use crate::{ use crate::{
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewContext, terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewChat,
}; };
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use assistant_context_editor::{ use assistant_context_editor::{
@ -129,7 +129,7 @@ impl AssistantPanel {
workspace.project().clone(), workspace.project().clone(),
Default::default(), Default::default(),
None, None,
NewContext.boxed_clone(), NewChat.boxed_clone(),
window, window,
cx, cx,
); );
@ -228,12 +228,12 @@ impl AssistantPanel {
IconButton::new("new-chat", IconName::Plus) IconButton::new("new-chat", IconName::Plus)
.icon_size(IconSize::Small) .icon_size(IconSize::Small)
.on_click(cx.listener(|_, _, window, cx| { .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(move |window, cx| {
Tooltip::for_action_in( Tooltip::for_action_in(
"New Chat", "New Chat",
&NewContext, &NewChat,
&focus_handle, &focus_handle,
window, window,
cx, cx,
@ -256,7 +256,7 @@ impl AssistantPanel {
let focus_handle = _pane.focus_handle(cx); let focus_handle = _pane.focus_handle(cx);
Some(ContextMenu::build(window, cx, move |menu, _, _| { Some(ContextMenu::build(window, cx, move |menu, _, _| {
menu.context(focus_handle.clone()) menu.context(focus_handle.clone())
.action("New Chat", Box::new(NewContext)) .action("New Chat", Box::new(NewChat))
.action("History", Box::new(DeployHistory)) .action("History", Box::new(DeployHistory))
.action("Prompt Library", Box::new(DeployPromptLibrary)) .action("Prompt Library", Box::new(DeployPromptLibrary))
.action("Configure", Box::new(ShowConfiguration)) .action("Configure", Box::new(ShowConfiguration))
@ -760,7 +760,7 @@ impl AssistantPanel {
pub fn create_new_context( pub fn create_new_context(
workspace: &mut Workspace, workspace: &mut Workspace,
_: &NewContext, _: &NewChat,
window: &mut Window, window: &mut Window,
cx: &mut Context<Workspace>, cx: &mut Context<Workspace>,
) { ) {
@ -1206,7 +1206,7 @@ impl Render for AssistantPanel {
v_flex() v_flex()
.key_context("AssistantPanel") .key_context("AssistantPanel")
.size_full() .size_full()
.on_action(cx.listener(|this, _: &NewContext, window, cx| { .on_action(cx.listener(|this, _: &NewChat, window, cx| {
this.new_context(window, cx); this.new_context(window, cx);
})) }))
.on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| { .on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| {