Simplify open router config to make layout structure simpler
This commit is contained in:
parent
297fd858e8
commit
9d9b625483
1 changed files with 4 additions and 22 deletions
|
@ -856,23 +856,11 @@ impl Render for ConfigurationView {
|
||||||
.id("open-router-container")
|
.id("open-router-container")
|
||||||
.size_full()
|
.size_full()
|
||||||
.on_action(cx.listener(Self::save_api_key))
|
.on_action(cx.listener(Self::save_api_key))
|
||||||
.child(Label::new("To use Zed's agent with OpenRouter, you need to add an API key. Follow these steps:"))
|
.child(Label::new(
|
||||||
|
"To use Zed's agent with OpenRouter, you need to add an API key.",
|
||||||
|
))
|
||||||
.child(
|
.child(
|
||||||
List::new()
|
div()
|
||||||
.child(InstructionListItem::new(
|
|
||||||
"Create an API key by visiting",
|
|
||||||
Some("OpenRouter's console"),
|
|
||||||
Some("https://openrouter.ai/keys"),
|
|
||||||
))
|
|
||||||
.child(InstructionListItem::text_only(
|
|
||||||
"Ensure your OpenRouter account has credits",
|
|
||||||
))
|
|
||||||
.child(InstructionListItem::text_only(
|
|
||||||
"Paste your API key below and hit enter to start using the assistant",
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
h_flex()
|
|
||||||
.id("api-key-editor")
|
.id("api-key-editor")
|
||||||
.w_full()
|
.w_full()
|
||||||
.my_2()
|
.my_2()
|
||||||
|
@ -884,12 +872,6 @@ impl Render for ConfigurationView {
|
||||||
.rounded_sm()
|
.rounded_sm()
|
||||||
.child(self.render_api_key_editor(cx)),
|
.child(self.render_api_key_editor(cx)),
|
||||||
)
|
)
|
||||||
.child(
|
|
||||||
Label::new(
|
|
||||||
format!("You can also assign the {OPENROUTER_API_KEY_VAR} environment variable and restart Zed."),
|
|
||||||
)
|
|
||||||
.size(LabelSize::Small).color(Color::Muted),
|
|
||||||
)
|
|
||||||
.into_any()
|
.into_any()
|
||||||
} else {
|
} else {
|
||||||
h_flex()
|
h_flex()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue