assistant: Rename "new context" to "new chat" (#20043)
This PR is only updating UI strings and pieces of the documentation—it doesn't touch the actual code, where it's still using things such as `NewContext` and similar terminology for variables, actions, etc. Release Notes: - N/A
This commit is contained in:
parent
c2cf4c45c0
commit
d3a49f6d8f
8 changed files with 55 additions and 59 deletions
|
@ -485,7 +485,7 @@
|
|||
"default_width": 640,
|
||||
// Default height when the assistant is docked to the bottom.
|
||||
"default_height": 320,
|
||||
// The default model to use when creating new contexts.
|
||||
// The default model to use when creating new chats.
|
||||
"default_model": {
|
||||
// The provider to use.
|
||||
"provider": "zed.dev",
|
||||
|
|
|
@ -442,49 +442,45 @@ impl AssistantPanel {
|
|||
.map_or(false, |item| item.downcast::<ContextHistory>().is_some()),
|
||||
);
|
||||
let _pane = cx.view().clone();
|
||||
let right_children =
|
||||
h_flex()
|
||||
.gap(Spacing::XSmall.rems(cx))
|
||||
.child(
|
||||
IconButton::new("new-context", IconName::Plus)
|
||||
.on_click(cx.listener(|_, _, cx| {
|
||||
let right_children = h_flex()
|
||||
.gap(Spacing::XSmall.rems(cx))
|
||||
.child(
|
||||
IconButton::new("new-chat", IconName::Plus)
|
||||
.on_click(
|
||||
cx.listener(|_, _, cx| {
|
||||
cx.dispatch_action(NewContext.boxed_clone())
|
||||
}),
|
||||
)
|
||||
.tooltip(move |cx| {
|
||||
Tooltip::for_action_in("New Chat", &NewContext, &focus_handle, cx)
|
||||
}),
|
||||
)
|
||||
.child(
|
||||
PopoverMenu::new("assistant-panel-popover-menu")
|
||||
.trigger(
|
||||
IconButton::new("menu", IconName::EllipsisVertical)
|
||||
.icon_size(IconSize::Small)
|
||||
.tooltip(|cx| Tooltip::text("Toggle Assistant Menu", cx)),
|
||||
)
|
||||
.menu(move |cx| {
|
||||
let zoom_label = if _pane.read(cx).is_zoomed() {
|
||||
"Zoom Out"
|
||||
} else {
|
||||
"Zoom In"
|
||||
};
|
||||
let focus_handle = _pane.focus_handle(cx);
|
||||
Some(ContextMenu::build(cx, move |menu, _| {
|
||||
menu.context(focus_handle.clone())
|
||||
.action("New Chat", Box::new(NewContext))
|
||||
.action("History", Box::new(DeployHistory))
|
||||
.action("Prompt Library", Box::new(DeployPromptLibrary))
|
||||
.action("Configure", Box::new(ShowConfiguration))
|
||||
.action(zoom_label, Box::new(ToggleZoom))
|
||||
}))
|
||||
.tooltip(move |cx| {
|
||||
Tooltip::for_action_in(
|
||||
"New Context",
|
||||
&NewContext,
|
||||
&focus_handle,
|
||||
cx,
|
||||
)
|
||||
}),
|
||||
)
|
||||
.child(
|
||||
PopoverMenu::new("assistant-panel-popover-menu")
|
||||
.trigger(
|
||||
IconButton::new("menu", IconName::EllipsisVertical)
|
||||
.icon_size(IconSize::Small)
|
||||
.tooltip(|cx| Tooltip::text("Toggle Assistant Menu", cx)),
|
||||
)
|
||||
.menu(move |cx| {
|
||||
let zoom_label = if _pane.read(cx).is_zoomed() {
|
||||
"Zoom Out"
|
||||
} else {
|
||||
"Zoom In"
|
||||
};
|
||||
let focus_handle = _pane.focus_handle(cx);
|
||||
Some(ContextMenu::build(cx, move |menu, _| {
|
||||
menu.context(focus_handle.clone())
|
||||
.action("New Context", Box::new(NewContext))
|
||||
.action("History", Box::new(DeployHistory))
|
||||
.action("Prompt Library", Box::new(DeployPromptLibrary))
|
||||
.action("Configure", Box::new(ShowConfiguration))
|
||||
.action(zoom_label, Box::new(ToggleZoom))
|
||||
}))
|
||||
}),
|
||||
)
|
||||
.into_any_element()
|
||||
.into();
|
||||
}),
|
||||
)
|
||||
.into_any_element()
|
||||
.into();
|
||||
|
||||
(Some(left_children.into_any_element()), right_children)
|
||||
});
|
||||
|
@ -1499,7 +1495,7 @@ pub struct ContextEditor {
|
|||
dragged_file_worktrees: Vec<Model<Worktree>>,
|
||||
}
|
||||
|
||||
const DEFAULT_TAB_TITLE: &str = "New Context";
|
||||
const DEFAULT_TAB_TITLE: &str = "New Chat";
|
||||
const MAX_TAB_TITLE_LEN: usize = 16;
|
||||
|
||||
impl ContextEditor {
|
||||
|
@ -4778,7 +4774,7 @@ impl ConfigurationView {
|
|||
h_flex().justify_end().child(
|
||||
Button::new(
|
||||
SharedString::from(format!("new-context-{provider_id}")),
|
||||
"Open new context",
|
||||
"Open New Chat",
|
||||
)
|
||||
.icon_position(IconPosition::Start)
|
||||
.icon(IconName::Plus)
|
||||
|
|
|
@ -410,7 +410,7 @@ pub struct AssistantSettingsContentV2 {
|
|||
///
|
||||
/// Default: 320
|
||||
default_height: Option<f32>,
|
||||
/// The default model to use when creating new contexts.
|
||||
/// The default model to use when creating new chats.
|
||||
default_model: Option<LanguageModelSelection>,
|
||||
/// Additional models with which to generate alternatives when performing inline assists.
|
||||
inline_alternatives: Option<Vec<LanguageModelSelection>>,
|
||||
|
@ -498,11 +498,11 @@ pub struct LegacyAssistantSettingsContent {
|
|||
///
|
||||
/// Default: 320
|
||||
pub default_height: Option<f32>,
|
||||
/// The default OpenAI model to use when creating new contexts.
|
||||
/// The default OpenAI model to use when creating new chats.
|
||||
///
|
||||
/// Default: gpt-4-1106-preview
|
||||
pub default_open_ai_model: Option<OpenAiModel>,
|
||||
/// OpenAI API base URL to use when creating new contexts.
|
||||
/// OpenAI API base URL to use when creating new chats.
|
||||
///
|
||||
/// Default: https://api.openai.com/v1
|
||||
pub openai_api_url: Option<String>,
|
||||
|
|
|
@ -6497,7 +6497,7 @@ async fn test_context_collaboration_with_reconnect(
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
// Client A creates a new context.
|
||||
// Client A creates a new chats.
|
||||
let context_a = context_store_a.update(cx_a, |store, cx| store.create(cx));
|
||||
executor.run_until_parked();
|
||||
|
||||
|
|
|
@ -7,15 +7,15 @@ To open the assistant panel, toggle the right dock by using the {#action workspa
|
|||
|
||||
> **Note**: A custom [key binding](../key-bindings.md) can be set to toggle the right dock.
|
||||
|
||||
Once you have [configured a provider](./configuration.md#providers), you can interact with the provider's language models in a context editor.
|
||||
Once you have [configured a provider](./configuration.md#providers), you can interact with the provider's language models.
|
||||
|
||||
To create a new context editor, press {#kb workspace::NewFile} or use the menu in the top right of the assistant panel and select the `New Context` option.
|
||||
To create a new chat in the assistant panel, press {#kb workspace::NewFile} or use the menu in the top right of the assistant panel and select the `New Chat` option.
|
||||
|
||||
In the context editor, select a model from one of the configured providers, type a message in the `You` block, and submit with {#kb assistant::Assist}.
|
||||
In the panel, select a model from one of the configured providers, type a message in the `You` block, and submit with {#kb assistant::Assist}.
|
||||
|
||||
### Interacting with the Assistant
|
||||
|
||||
The context editor in Zed functions similarly to any other editor. You can use custom key bindings and work with multiple cursors, allowing for seamless transitions between coding and engaging in discussions with the language models.
|
||||
The assistant panel in Zed functions similarly to any other editor. You can use custom key bindings and work with multiple cursors, allowing for seamless transitions between coding and engaging in discussions with the language models.
|
||||
|
||||
However, the assistant editor differs with the inclusion of message blocks. These blocks serve as containers for text that correspond to different roles within the context. These roles include:
|
||||
|
||||
|
@ -41,7 +41,7 @@ After submitting a message, the assistant's response will be streamed below, in
|
|||
|
||||
The stream can be canceled at any point with <kbd>escape</kbd>. This is useful if you realize early on that the response is not what you were looking for.
|
||||
|
||||
If you want to start a new conversation at any time, you can hit <kbd>cmd-n|ctrl-n</kbd> or use the `New Context` menu option in the hamburger menu at the top left of the panel.
|
||||
If you want to start a new conversation at any time, you can hit <kbd>cmd-n|ctrl-n</kbd> or use the `New Chat` menu option in the hamburger menu at the top left of the panel.
|
||||
|
||||
Simple back-and-forth conversations work well with the assistant. However, there may come a time when you want to modify the previous text in the conversation and steer it in a different direction.
|
||||
|
||||
|
@ -59,7 +59,7 @@ The assistant gives you the flexibility to have control over the context. You ca
|
|||
6. Add additional context to your original message.
|
||||
7. Submit the message with {#kb assistant::Assist}.
|
||||
|
||||
Being able to edit previous messages gives you control over how tokens are used. You don't need to start up a new context to correct a mistake or to add additional information, and you don't have to waste tokens by submitting follow-up corrections.
|
||||
Being able to edit previous messages gives you control over how tokens are used. You don't need to start up a new chats to correct a mistake or to add additional information, and you don't have to waste tokens by submitting follow-up corrections.
|
||||
|
||||
> **Note**: The act of editing past messages is often referred to as "Rewriting History" in the context of the language models.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ The Assistant is a powerful tool that integrates large language models into your
|
|||
|
||||
This section covers various aspects of the Assistant:
|
||||
|
||||
- [Assistant Panel](./assistant-panel.md): Create and collaboratively edit new contexts, and manage interactions with language models.
|
||||
- [Assistant Panel](./assistant-panel.md): Create and collaboratively edit new chats, and manage interactions with language models.
|
||||
|
||||
- [Inline Assistant](./inline-assistant.md): Discover how to use the Assistant to power inline transformations directly within your code editor and terminal.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ A common workflow when using the inline assistant is to create a context in the
|
|||
|
||||
### Example Recipe - Fixing Errors with the Inline Assistant
|
||||
|
||||
1. Create a new context in the assistant panel.
|
||||
1. Create a new chat in the assistant panel.
|
||||
2. Use the `/diagnostic` command to add current diagnostics to the context.
|
||||
3. OR use the `/terminal` command to add the current terminal output to the context (maybe a panic, error, or log?)
|
||||
4. Use the inline assistant to generate a fix for the error.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Prompts are an essential part of interacting with AI assistants in Zed. They help guide the AI's responses and ensure you get the most relevant and useful information.
|
||||
|
||||
Every new context will start with the [default prompt](#default-prompt), which can be customized.
|
||||
Every new chat will start with the [default prompt](#default-prompt), which can be customized.
|
||||
|
||||
Remember that effective prompting is an iterative process. Experiment with different prompt structures and wordings to find what works best for your specific needs and the model you're using.
|
||||
|
||||
|
@ -50,7 +50,7 @@ More on prompt engineering:
|
|||
|
||||
## Editing the Default Prompt {#default-prompt}
|
||||
|
||||
Zed allows you to customize the default prompt used in new context editors. Or to be more precise, it uses a series of prompts that are combined to form the default prompt.
|
||||
Zed allows you to customize the default prompt used when interacting with LLMs. Or to be more precise, it uses a series of prompts that are combined to form the default prompt.
|
||||
|
||||
To edit prompts, select "Prompt Library" from the menu icon (three horizontal lines) in the upper right hand corner or using the `cmd-k l` keyboard shortcut.
|
||||
|
||||
|
@ -69,7 +69,7 @@ You can add prompts to the default prompt by clicking the icon in the top right
|
|||
|
||||
_Changes to the default prompt will not affect existing contexts. You can remove the default prompt and manually re-add it with `/default` to update an existing context._
|
||||
|
||||
Default prompts will show at the top of the prompt list, and will be included with every new context.
|
||||
Default prompts will show at the top of the prompt list, and will be included with every new chat.
|
||||
|
||||
You can manually add the default prompt using the `/default` command.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue