mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Add some text to clarify no api key state
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
This commit is contained in:
parent
b64fe04803
commit
81098312ef
@ -1218,6 +1218,31 @@ impl View for AssistantPanel {
|
||||
let style = &theme.assistant;
|
||||
if let Some(api_key_editor) = self.api_key_editor.as_ref() {
|
||||
Flex::column()
|
||||
.with_child(
|
||||
Text::new(
|
||||
"To use the assistant panel or inline assistant, you need to add your OpenAI api key.",
|
||||
style.api_key_prompt.text.clone(),
|
||||
),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
" - Having a subscription for another service like GitHub Copilot won't work.",
|
||||
style.api_key_prompt.text.clone(),
|
||||
),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
" - You can create a api key at: platform.openai.com/api-keys",
|
||||
style.api_key_prompt.text.clone(),
|
||||
),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
" ",
|
||||
style.api_key_prompt.text.clone(),
|
||||
)
|
||||
.aligned(),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
"Paste your OpenAI API key and press Enter to use the assistant",
|
||||
@ -1231,6 +1256,20 @@ impl View for AssistantPanel {
|
||||
.with_style(style.api_key_editor.container)
|
||||
.aligned(),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
" ",
|
||||
style.api_key_prompt.text.clone(),
|
||||
)
|
||||
.aligned(),
|
||||
)
|
||||
.with_child(
|
||||
Text::new(
|
||||
"Click on the Z button in the status bar to close this panel.",
|
||||
style.api_key_prompt.text.clone(),
|
||||
)
|
||||
.aligned(),
|
||||
)
|
||||
.contained()
|
||||
.with_style(style.api_key_prompt.container)
|
||||
.aligned()
|
||||
|
Loading…
Reference in New Issue
Block a user