assistant panel: Tab-less configuration view (#15682)

TODOs for follow-up:
- [ ] When opening panel: nudge user to sign in if they're not signed-in
and have no provider configured (or if they're not signed-in and have
Zed AI configured)
- [ ] Configuration page is not scrollable
- [ ] Design tweaks

Current status:



https://github.com/user-attachments/assets/d26d65ea-43e8-481b-81a3-b3cba01704a8


Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-08-02 17:16:18 +02:00 committed by GitHub
parent 35a3b00255
commit 390815dd76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 548 additions and 561 deletions

View file

@ -11,8 +11,8 @@ use futures::future::BoxFuture;
use futures::stream::BoxStream;
use futures::{FutureExt, StreamExt};
use gpui::{
percentage, svg, Animation, AnimationExt, AnyView, AppContext, AsyncAppContext, FocusHandle,
Model, Render, Subscription, Task, Transformation,
percentage, svg, Animation, AnimationExt, AnyView, AppContext, AsyncAppContext, Model, Render,
Subscription, Task, Transformation,
};
use settings::{Settings, SettingsStore};
use std::time::Duration;
@ -132,10 +132,9 @@ impl LanguageModelProvider for CopilotChatLanguageModelProvider {
Task::ready(result)
}
fn configuration_view(&self, cx: &mut WindowContext) -> (AnyView, Option<FocusHandle>) {
fn configuration_view(&self, cx: &mut WindowContext) -> AnyView {
let state = self.state.clone();
let view = cx.new_view(|cx| ConfigurationView::new(state, cx)).into();
(view, None)
cx.new_view(|cx| ConfigurationView::new(state, cx)).into()
}
fn reset_credentials(&self, _cx: &mut AppContext) -> Task<Result<()>> {