| 591 | .border_1() |
| 592 | .border_color(theme.border) |
| 593 | .child(CompletionInput::new( |
| 594 | input, |
| 595 | Input::new(input).appearance(false).small(), |
| 596 | )), |
| 597 | ) |
| 598 | }) |
| 599 | } |
| 600 | |
| 601 | fn render_api_key_auth(&self, theme: &gpui_component::theme::ThemeColor) -> impl IntoElement { |
| 602 | div() |
| 603 | .flex() |
| 604 | .flex_col() |
| 605 | .gap(px(16.0)) |
| 606 | // Add to selector |
| 607 | .child( |
| 608 | div() |
| 609 | .flex() |
| 610 | .flex_col() |
| 611 | .gap(px(6.0)) |
| 612 | .child( |
| 613 | div() |
| 614 | .text_color(theme.muted_foreground) |
| 615 | .text_size(px(11.0)) |
| 616 | .font_weight(gpui::FontWeight::SEMIBOLD) |
| 617 | .child("Add to"), |
| 618 | ) |
| 619 | .child( |
| 620 | Select::new(&self.api_key_location_select) |
| 621 | .small() |
| 622 | .menu_width(px(120.0)), |
| 623 | ), |
| 624 | ) |
| 625 | // Key name |
| 626 | .child( |
| 627 | div() |
| 628 | .flex() |
| 629 | .flex_col() |
| 630 | .gap(px(6.0)) |
| 631 | .child( |
| 632 | div() |
| 633 | .text_color(theme.muted_foreground) |
| 634 | .text_size(px(11.0)) |
| 635 | .font_weight(gpui::FontWeight::SEMIBOLD) |
| 636 | .child("Key"), |
| 637 | ) |
| 638 | .when_some(self.api_key_name_input.as_ref(), |el, input| { |
| 639 | el.child( |
| 640 | div() |
| 641 | .bg(theme.secondary) |
| 642 | .rounded(px(6.0)) |
| 643 | .border_1() |
| 644 | .border_color(theme.border) |
| 645 | .child(CompletionInput::new( |
| 646 | input, |
| 647 | Input::new(input).appearance(false).small(), |
| 648 | )), |
| 649 | ) |
| 650 | }), |